mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Add parseUInt utility function
There is an increasing number of places where Catch2 wants to parse strings into numbers, but being stuck in C++14 world, we do not have good stdlib facilities to do this (`strtoul` and `stoul` are both bad).
This commit is contained in:
		| @@ -189,6 +189,7 @@ Nor would this | ||||
| :test-result: FAIL Output from all sections is reported | ||||
| :test-result: PASS Overloaded comma or address-of operators are not used | ||||
| :test-result: PASS Parse test names and tags | ||||
| :test-result: PASS Parse uints | ||||
| :test-result: PASS Parsed tags are matched case insensitive | ||||
| :test-result: PASS Parsing sharding-related cli flags | ||||
| :test-result: PASS Parsing tags with non-alphabetical characters is pass-through | ||||
|   | ||||
| @@ -187,6 +187,7 @@ | ||||
| :test-result: FAIL Output from all sections is reported | ||||
| :test-result: PASS Overloaded comma or address-of operators are not used | ||||
| :test-result: PASS Parse test names and tags | ||||
| :test-result: PASS Parse uints | ||||
| :test-result: PASS Parsed tags are matched case insensitive | ||||
| :test-result: PASS Parsing sharding-related cli flags | ||||
| :test-result: PASS Parsing tags with non-alphabetical characters is pass-through | ||||
|   | ||||
| @@ -1270,6 +1270,17 @@ CmdLine.tests.cpp:<line number>: passed: !(spec.matches(*fakeTestCase("hidden an | ||||
| CmdLine.tests.cpp:<line number>: passed: !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false | ||||
| CmdLine.tests.cpp:<line number>: passed: !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false | ||||
| CmdLine.tests.cpp:<line number>: passed: spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true | ||||
| Parse.tests.cpp:<line number>: passed: parseUInt( "0" ) == Optional<unsigned int>{ 0 } for: {?} == {?} | ||||
| Parse.tests.cpp:<line number>: passed: parseUInt( "100" ) == Optional<unsigned int>{ 100 } for: {?} == {?} | ||||
| Parse.tests.cpp:<line number>: passed: parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } for: {?} == {?} | ||||
| Parse.tests.cpp:<line number>: passed: parseUInt( "0x<hex digits>", 16 ) == Optional<unsigned int>{ 255 } for: {?} == {?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "!!KJHF*#" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "-1" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "4294967296" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "2 4" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "0x<hex digits>", 10 )) for: !{?} | ||||
| TestSpecParser.tests.cpp:<line number>: passed: spec.hasFilters() for: true | ||||
| TestSpecParser.tests.cpp:<line number>: passed: spec.getInvalidSpecs().empty() for: true | ||||
| TestSpecParser.tests.cpp:<line number>: passed: spec.matches( testCase ) for: true | ||||
|   | ||||
| @@ -1268,6 +1268,17 @@ CmdLine.tests.cpp:<line number>: passed: !(spec.matches(*fakeTestCase("hidden an | ||||
| CmdLine.tests.cpp:<line number>: passed: !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false | ||||
| CmdLine.tests.cpp:<line number>: passed: !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false | ||||
| CmdLine.tests.cpp:<line number>: passed: spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true | ||||
| Parse.tests.cpp:<line number>: passed: parseUInt( "0" ) == Optional<unsigned int>{ 0 } for: {?} == {?} | ||||
| Parse.tests.cpp:<line number>: passed: parseUInt( "100" ) == Optional<unsigned int>{ 100 } for: {?} == {?} | ||||
| Parse.tests.cpp:<line number>: passed: parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } for: {?} == {?} | ||||
| Parse.tests.cpp:<line number>: passed: parseUInt( "0x<hex digits>", 16 ) == Optional<unsigned int>{ 255 } for: {?} == {?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "!!KJHF*#" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "-1" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "4294967296" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "2 4" )) for: !{?} | ||||
| Parse.tests.cpp:<line number>: passed: !(parseUInt( "0x<hex digits>", 10 )) for: !{?} | ||||
| TestSpecParser.tests.cpp:<line number>: passed: spec.hasFilters() for: true | ||||
| TestSpecParser.tests.cpp:<line number>: passed: spec.getInvalidSpecs().empty() for: true | ||||
| TestSpecParser.tests.cpp:<line number>: passed: spec.matches( testCase ) for: true | ||||
|   | ||||
| @@ -1394,6 +1394,6 @@ due to unexpected exception with message: | ||||
|   Why would you throw a std::string? | ||||
|  | ||||
| =============================================================================== | ||||
| test cases:  394 |  318 passed |  69 failed |  7 failed as expected | ||||
| assertions: 2284 | 2129 passed | 128 failed | 27 failed as expected | ||||
| test cases:  395 |  319 passed |  69 failed |  7 failed as expected | ||||
| assertions: 2295 | 2140 passed | 128 failed | 27 failed as expected | ||||
|  | ||||
|   | ||||
| @@ -9055,6 +9055,75 @@ CmdLine.tests.cpp:<line number>: PASSED: | ||||
| with expansion: | ||||
|   true | ||||
|  | ||||
| ------------------------------------------------------------------------------- | ||||
| Parse uints | ||||
|   proper inputs | ||||
| ------------------------------------------------------------------------------- | ||||
| Parse.tests.cpp:<line number> | ||||
| ............................................................................... | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE( parseUInt( "0" ) == Optional<unsigned int>{ 0 } ) | ||||
| with expansion: | ||||
|   {?} == {?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE( parseUInt( "100" ) == Optional<unsigned int>{ 100 } ) | ||||
| with expansion: | ||||
|   {?} == {?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE( parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } ) | ||||
| with expansion: | ||||
|   {?} == {?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE( parseUInt( "0x<hex digits>", 16 ) == Optional<unsigned int>{ 255 } ) | ||||
| with expansion: | ||||
|   {?} == {?} | ||||
|  | ||||
| ------------------------------------------------------------------------------- | ||||
| Parse uints | ||||
|   Bad inputs | ||||
| ------------------------------------------------------------------------------- | ||||
| Parse.tests.cpp:<line number> | ||||
| ............................................................................... | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "!!KJHF*#" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "-1" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "4294967296" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "42949672964294967296429496729642949672964294967296" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "2 4" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "0x<hex digits>", 10 ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| ------------------------------------------------------------------------------- | ||||
| Parsed tags are matched case insensitive | ||||
| ------------------------------------------------------------------------------- | ||||
| @@ -18450,6 +18519,6 @@ Misc.tests.cpp:<line number> | ||||
| Misc.tests.cpp:<line number>: PASSED: | ||||
|  | ||||
| =============================================================================== | ||||
| test cases:  394 |  304 passed |  83 failed |  7 failed as expected | ||||
| assertions: 2299 | 2129 passed | 143 failed | 27 failed as expected | ||||
| test cases:  395 |  305 passed |  83 failed |  7 failed as expected | ||||
| assertions: 2310 | 2140 passed | 143 failed | 27 failed as expected | ||||
|  | ||||
|   | ||||
| @@ -9053,6 +9053,75 @@ CmdLine.tests.cpp:<line number>: PASSED: | ||||
| with expansion: | ||||
|   true | ||||
|  | ||||
| ------------------------------------------------------------------------------- | ||||
| Parse uints | ||||
|   proper inputs | ||||
| ------------------------------------------------------------------------------- | ||||
| Parse.tests.cpp:<line number> | ||||
| ............................................................................... | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE( parseUInt( "0" ) == Optional<unsigned int>{ 0 } ) | ||||
| with expansion: | ||||
|   {?} == {?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE( parseUInt( "100" ) == Optional<unsigned int>{ 100 } ) | ||||
| with expansion: | ||||
|   {?} == {?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE( parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } ) | ||||
| with expansion: | ||||
|   {?} == {?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE( parseUInt( "0x<hex digits>", 16 ) == Optional<unsigned int>{ 255 } ) | ||||
| with expansion: | ||||
|   {?} == {?} | ||||
|  | ||||
| ------------------------------------------------------------------------------- | ||||
| Parse uints | ||||
|   Bad inputs | ||||
| ------------------------------------------------------------------------------- | ||||
| Parse.tests.cpp:<line number> | ||||
| ............................................................................... | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "!!KJHF*#" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "-1" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "4294967296" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "42949672964294967296429496729642949672964294967296" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "2 4" ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| Parse.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_FALSE( parseUInt( "0x<hex digits>", 10 ) ) | ||||
| with expansion: | ||||
|   !{?} | ||||
|  | ||||
| ------------------------------------------------------------------------------- | ||||
| Parsed tags are matched case insensitive | ||||
| ------------------------------------------------------------------------------- | ||||
| @@ -18442,6 +18511,6 @@ Misc.tests.cpp:<line number> | ||||
| Misc.tests.cpp:<line number>: PASSED: | ||||
|  | ||||
| =============================================================================== | ||||
| test cases:  394 |  304 passed |  83 failed |  7 failed as expected | ||||
| assertions: 2299 | 2129 passed | 143 failed | 27 failed as expected | ||||
| test cases:  395 |  305 passed |  83 failed |  7 failed as expected | ||||
| assertions: 2310 | 2140 passed | 143 failed | 27 failed as expected | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <testsuitesloose text artifact | ||||
| > | ||||
|   <testsuite name="<exe-name>" errors="17" failures="126" tests="2299" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> | ||||
|   <testsuite name="<exe-name>" errors="17" failures="126" tests="2310" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> | ||||
|     <properties> | ||||
|       <property name="random-seed" value="1"/> | ||||
|       <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/> | ||||
| @@ -1083,6 +1083,8 @@ Message.tests.cpp:<line number> | ||||
|     <testcase classname="<exe-name>.global" name="Parse test names and tags/Leading and trailing spaces in test name" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parse test names and tags/Shortened hide tags are split apart when parsing" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parse test names and tags/Shortened hide tags also properly handle exclusion" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parse uints/proper inputs" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parse uints/Bad inputs" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parsed tags are matched case insensitive" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags/shard-count" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags/Negative shard count reports error" time="{duration}" status="run"/> | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <testsuites> | ||||
|   <testsuite name="<exe-name>" errors="17" failures="126" tests="2299" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> | ||||
|   <testsuite name="<exe-name>" errors="17" failures="126" tests="2310" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> | ||||
|     <properties> | ||||
|       <property name="random-seed" value="1"/> | ||||
|       <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/> | ||||
| @@ -1082,6 +1082,8 @@ Message.tests.cpp:<line number> | ||||
|     <testcase classname="<exe-name>.global" name="Parse test names and tags/Leading and trailing spaces in test name" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parse test names and tags/Shortened hide tags are split apart when parsing" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parse test names and tags/Shortened hide tags also properly handle exclusion" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parse uints/proper inputs" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parse uints/Bad inputs" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parsed tags are matched case insensitive" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags/shard-count" time="{duration}" status="run"/> | ||||
|     <testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags/Negative shard count reports error" time="{duration}" status="run"/> | ||||
|   | ||||
| @@ -157,6 +157,10 @@ | ||||
|     <testCase name="warmup" duration="{duration}"/> | ||||
|     <testCase name="weighted_average_quantile" duration="{duration}"/> | ||||
|   </file> | ||||
|   <file path="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp"> | ||||
|     <testCase name="Parse uints/proper inputs" duration="{duration}"/> | ||||
|     <testCase name="Parse uints/Bad inputs" duration="{duration}"/> | ||||
|   </file> | ||||
|   <file path="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp"> | ||||
|     <testCase name="#1938 - GENERATE after a section/A" duration="{duration}"/> | ||||
|     <testCase name="#1938 - GENERATE after a section/B" duration="{duration}"/> | ||||
|   | ||||
| @@ -156,6 +156,10 @@ | ||||
|     <testCase name="warmup" duration="{duration}"/> | ||||
|     <testCase name="weighted_average_quantile" duration="{duration}"/> | ||||
|   </file> | ||||
|   <file path="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp"> | ||||
|     <testCase name="Parse uints/proper inputs" duration="{duration}"/> | ||||
|     <testCase name="Parse uints/Bad inputs" duration="{duration}"/> | ||||
|   </file> | ||||
|   <file path="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp"> | ||||
|     <testCase name="#1938 - GENERATE after a section/A" duration="{duration}"/> | ||||
|     <testCase name="#1938 - GENERATE after a section/B" duration="{duration}"/> | ||||
|   | ||||
| @@ -2383,6 +2383,28 @@ ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !fal | ||||
| ok {test-number} - !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false | ||||
| # Parse test names and tags | ||||
| ok {test-number} - spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true | ||||
| # Parse uints | ||||
| ok {test-number} - parseUInt( "0" ) == Optional<unsigned int>{ 0 } for: {?} == {?} | ||||
| # Parse uints | ||||
| ok {test-number} - parseUInt( "100" ) == Optional<unsigned int>{ 100 } for: {?} == {?} | ||||
| # Parse uints | ||||
| ok {test-number} - parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } for: {?} == {?} | ||||
| # Parse uints | ||||
| ok {test-number} - parseUInt( "0x<hex digits>", 16 ) == Optional<unsigned int>{ 255 } for: {?} == {?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "!!KJHF*#" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "-1" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "4294967296" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "2 4" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "0x<hex digits>", 10 )) for: !{?} | ||||
| # Parsed tags are matched case insensitive | ||||
| ok {test-number} - spec.hasFilters() for: true | ||||
| # Parsed tags are matched case insensitive | ||||
| @@ -4601,5 +4623,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 | ||||
| ok {test-number} - | ||||
| # xmlentitycheck | ||||
| ok {test-number} - | ||||
| 1..2299 | ||||
| 1..2310 | ||||
|  | ||||
|   | ||||
| @@ -2381,6 +2381,28 @@ ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !fal | ||||
| ok {test-number} - !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false | ||||
| # Parse test names and tags | ||||
| ok {test-number} - spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true | ||||
| # Parse uints | ||||
| ok {test-number} - parseUInt( "0" ) == Optional<unsigned int>{ 0 } for: {?} == {?} | ||||
| # Parse uints | ||||
| ok {test-number} - parseUInt( "100" ) == Optional<unsigned int>{ 100 } for: {?} == {?} | ||||
| # Parse uints | ||||
| ok {test-number} - parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } for: {?} == {?} | ||||
| # Parse uints | ||||
| ok {test-number} - parseUInt( "0x<hex digits>", 16 ) == Optional<unsigned int>{ 255 } for: {?} == {?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "!!KJHF*#" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "-1" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "4294967296" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "2 4" )) for: !{?} | ||||
| # Parse uints | ||||
| ok {test-number} - !(parseUInt( "0x<hex digits>", 10 )) for: !{?} | ||||
| # Parsed tags are matched case insensitive | ||||
| ok {test-number} - spec.hasFilters() for: true | ||||
| # Parsed tags are matched case insensitive | ||||
| @@ -4593,5 +4615,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 | ||||
| ok {test-number} - | ||||
| # xmlentitycheck | ||||
| ok {test-number} - | ||||
| 1..2299 | ||||
| 1..2310 | ||||
|  | ||||
|   | ||||
| @@ -483,6 +483,8 @@ Message.tests.cpp:<line number>|nexplicit failure with message:|n  "Message from | ||||
| ##teamcity[testFinished name='Overloaded comma or address-of operators are not used' duration="{duration}"] | ||||
| ##teamcity[testStarted name='Parse test names and tags'] | ||||
| ##teamcity[testFinished name='Parse test names and tags' duration="{duration}"] | ||||
| ##teamcity[testStarted name='Parse uints'] | ||||
| ##teamcity[testFinished name='Parse uints' duration="{duration}"] | ||||
| ##teamcity[testStarted name='Parsed tags are matched case insensitive'] | ||||
| ##teamcity[testFinished name='Parsed tags are matched case insensitive' duration="{duration}"] | ||||
| ##teamcity[testStarted name='Parsing sharding-related cli flags'] | ||||
|   | ||||
| @@ -483,6 +483,8 @@ Message.tests.cpp:<line number>|nexplicit failure with message:|n  "Message from | ||||
| ##teamcity[testFinished name='Overloaded comma or address-of operators are not used' duration="{duration}"] | ||||
| ##teamcity[testStarted name='Parse test names and tags'] | ||||
| ##teamcity[testFinished name='Parse test names and tags' duration="{duration}"] | ||||
| ##teamcity[testStarted name='Parse uints'] | ||||
| ##teamcity[testFinished name='Parse uints' duration="{duration}"] | ||||
| ##teamcity[testStarted name='Parsed tags are matched case insensitive'] | ||||
| ##teamcity[testFinished name='Parsed tags are matched case insensitive' duration="{duration}"] | ||||
| ##teamcity[testStarted name='Parsing sharding-related cli flags'] | ||||
|   | ||||
| @@ -11005,6 +11005,103 @@ C | ||||
|     </Section> | ||||
|     <OverallResult success="true"/> | ||||
|   </TestCase> | ||||
|   <TestCase name="Parse uints" tags="[parse-numbers]" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|     <Section name="proper inputs" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|       <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           parseUInt( "0" ) == Optional<unsigned int>{ 0 } | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           {?} == {?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           parseUInt( "100" ) == Optional<unsigned int>{ 100 } | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           {?} == {?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           {?} == {?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           parseUInt( "0x<hex digits>", 16 ) == Optional<unsigned int>{ 255 } | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           {?} == {?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <OverallResults successes="4" failures="0" expectedFailures="0"/> | ||||
|     </Section> | ||||
|     <Section name="Bad inputs" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "!!KJHF*#" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "-1" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "4294967296" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "42949672964294967296429496729642949672964294967296" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "2 4" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "0x<hex digits>", 10 )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <OverallResults successes="7" failures="0" expectedFailures="0"/> | ||||
|     </Section> | ||||
|     <OverallResult success="true"/> | ||||
|   </TestCase> | ||||
|   <TestCase name="Parsed tags are matched case insensitive" tags="[test-spec][test-spec-parser]" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > | ||||
|     <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > | ||||
|       <Original> | ||||
| @@ -21702,6 +21799,6 @@ loose text artifact | ||||
|     </Section> | ||||
|     <OverallResult success="true"/> | ||||
|   </TestCase> | ||||
|   <OverallResults successes="2129" failures="143" expectedFailures="27"/> | ||||
|   <OverallResultsCases successes="304" failures="83" expectedFailures="7"/> | ||||
|   <OverallResults successes="2140" failures="143" expectedFailures="27"/> | ||||
|   <OverallResultsCases successes="305" failures="83" expectedFailures="7"/> | ||||
| </Catch2TestRun> | ||||
|   | ||||
| @@ -11005,6 +11005,103 @@ C | ||||
|     </Section> | ||||
|     <OverallResult success="true"/> | ||||
|   </TestCase> | ||||
|   <TestCase name="Parse uints" tags="[parse-numbers]" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|     <Section name="proper inputs" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|       <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           parseUInt( "0" ) == Optional<unsigned int>{ 0 } | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           {?} == {?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           parseUInt( "100" ) == Optional<unsigned int>{ 100 } | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           {?} == {?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           {?} == {?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           parseUInt( "0x<hex digits>", 16 ) == Optional<unsigned int>{ 255 } | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           {?} == {?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <OverallResults successes="4" failures="0" expectedFailures="0"/> | ||||
|     </Section> | ||||
|     <Section name="Bad inputs" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "!!KJHF*#" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "-1" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "4294967296" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "42949672964294967296429496729642949672964294967296" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "2 4" )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > | ||||
|         <Original> | ||||
|           !(parseUInt( "0x<hex digits>", 10 )) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           !{?} | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <OverallResults successes="7" failures="0" expectedFailures="0"/> | ||||
|     </Section> | ||||
|     <OverallResult success="true"/> | ||||
|   </TestCase> | ||||
|   <TestCase name="Parsed tags are matched case insensitive" tags="[test-spec][test-spec-parser]" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > | ||||
|     <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > | ||||
|       <Original> | ||||
| @@ -21701,6 +21798,6 @@ There is no extra whitespace here | ||||
|     </Section> | ||||
|     <OverallResult success="true"/> | ||||
|   </TestCase> | ||||
|   <OverallResults successes="2129" failures="143" expectedFailures="27"/> | ||||
|   <OverallResultsCases successes="304" failures="83" expectedFailures="7"/> | ||||
|   <OverallResults successes="2140" failures="143" expectedFailures="27"/> | ||||
|   <OverallResultsCases successes="305" failures="83" expectedFailures="7"/> | ||||
| </Catch2TestRun> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský