VirtualBox

Changeset 75123 in vbox for trunk


Ignore:
Timestamp:
Oct 27, 2018 6:16:46 PM (6 years ago)
Author:
vboxsync
Message:

tstRTCRest-1: More double test tweaking. bugref:9167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTCRest-1.cpp

    r75037 r75123  
    832832        RTTESTI_CHECK(obj4.isNull() == false);
    833833
    834         RTTESTI_CHECK_RC(fromString(&obj4, TST_DBL_MIN_STRING1, &ErrInfo, RT_XSTR(__LINE__)), VINF_SUCCESS);
    835         RTTESTI_CHECK(obj4.m_rdValue == TST_DBL_MIN);
    836         RTTESTI_CHECK(obj4.isNull() == false);
     834#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS)
     835        /* Some linux systems and probably all solaris fail to parse the longer MIN string, so just detect and skip. */
     836        RTJSONVAL hTmpValue = NIL_RTJSONVAL;
     837        int rcTmp = RTJsonParseFromString(&hTmpValue, TST_DBL_MIN_STRING1, NULL);
     838        RTJsonValueRelease(hTmpValue);
     839        if (rcTmp != VERR_INVALID_PARAMETER)
     840#endif
     841        {
     842            RTTESTI_CHECK_RC(fromString(&obj4, TST_DBL_MIN_STRING1, &ErrInfo, RT_XSTR(__LINE__)), VINF_SUCCESS);
     843            RTTESTI_CHECK(obj4.m_rdValue == TST_DBL_MIN);
     844            RTTESTI_CHECK(obj4.isNull() == false);
     845        }
    837846
    838847        obj4.m_rdValue = 33.33;
     
    864873        RTTESTI_CHECK_RC(fromString(&obj4, "false", NULL, RT_XSTR(__LINE__)), VERR_NO_DIGITS);
    865874
    866 #if defined(RT_OS_WINDOWS)
     875#if defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS)
    867876        RTTESTI_CHECK_RC(fromString(&obj4, " 0x42 ", &ErrInfo, RT_XSTR(__LINE__)), VERR_TRAILING_CHARS);
    868877        RTTESTI_CHECK(obj4.m_rdValue == 0.0);
     
    22582267int main()
    22592268{
    2260     RTEXITCODE rcExit = RTTestInitAndCreate("tstRTRest-1", &g_hTest);
     2269    RTEXITCODE rcExit = RTTestInitAndCreate("tstRTCRest-1", &g_hTest);
    22612270    if (rcExit == RTEXITCODE_SUCCESS )
    22622271    {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette