Changeset 25031 in vbox for trunk/src/VBox/Runtime/testcase/tstRTStrVersion.cpp
- Timestamp:
- Nov 26, 2009 9:22:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTStrVersion.cpp
r25029 r25031 89 89 { "VirtualBox-3.1.0", "VirtualBox-3.1.2_Beta1", -1 }, 90 90 { "3.1.0_BETA-r12345", "3.1.2", -1 }, 91 { "3.1.0_BETA1r12345", "3.1.0", -1 }, 92 { "3.1.0_BETAr12345", "3.1.0", 1 }, /* not considered a beta because of missing punctuation */ 91 93 { "3.1.0_BETA-r12345", "3.1.0", -1 }, 92 94 { "3.1.0_BETA-r12345", "3.1.0", -1 }, 95 { "3.1.0_BETA-r12345", "3.1.0.0", -1 }, 96 { "3.1.0_BETA", "3.1.0.0", -1 }, 97 { "3.1.0_BETA1", "3.1.0", -1 }, 93 98 { "3.1.0_BETA-r12345", "3.1.0r12345", -1 }, 99 { "3.1.0_BETA1-r12345", "3.1.0_BETA-r12345", 0 }, 100 { "3.1.0_BETA1-r12345", "3.1.0_BETA1-r12345", 0 }, 101 { "3.1.0_BETA2-r12345", "3.1.0_BETA1-r12345", 1 }, 102 { "3.1.0_BETA2-r12345", "3.1.0_BETA999-r12345", -1 }, 103 { "3.1.0_BETA2", "3.1.0_ABC", -1 }, /* ABC isn't indicating a prerelease, BETA does */ 104 { "3.1.0_BETA", "3.1.0_ATEB", -1 }, 94 105 }; 95 106 for (unsigned iTest = 0; iTest < RT_ELEMENTS(aTests); iTest++) … … 98 109 if (iResult != aTests[iTest].iResult) 99 110 RTTestFailed(hTest, "#%u: '%s' <-> '%s' -> %d, expected %d", 111 iTest, aTests[iTest].pszVer1, aTests[iTest].pszVer2, iResult, aTests[iTest].iResult); 112 113 iResult = -RTStrVersionCompare(aTests[iTest].pszVer2, aTests[iTest].pszVer1); 114 if (iResult != aTests[iTest].iResult) 115 RTTestFailed(hTest, "#%u: '%s' <-> '%s' -> %d, expected %d [inv]", 100 116 iTest, aTests[iTest].pszVer1, aTests[iTest].pszVer2, iResult, aTests[iTest].iResult); 101 117 }
Note:
See TracChangeset
for help on using the changeset viewer.