mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 13:55:39 +02:00
less copies and allocations in replaceInPlace
This commit is contained in:

committed by
Martin Hořeňovský

parent
cde3509664
commit
4d8affc989
@@ -11648,9 +11648,9 @@ Misc.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( sizeof(TestType) > 0 )
|
||||
REQUIRE( std::is_default_constructible<TestType>::value )
|
||||
with expansion:
|
||||
1 > 0
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Template test case with test types specified inside non-copyable and non-
|
||||
@@ -11660,9 +11660,9 @@ Misc.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( sizeof(TestType) > 0 )
|
||||
REQUIRE( std::is_default_constructible<TestType>::value )
|
||||
with expansion:
|
||||
4 > 0
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Template test case with test types specified inside non-default-constructible
|
||||
@@ -11672,9 +11672,9 @@ Misc.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( sizeof(TestType) > 0 )
|
||||
REQUIRE( std::is_trivially_copyable<TestType>::value )
|
||||
with expansion:
|
||||
1 > 0
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Template test case with test types specified inside non-default-constructible
|
||||
@@ -11684,9 +11684,9 @@ Misc.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( sizeof(TestType) > 0 )
|
||||
REQUIRE( std::is_trivially_copyable<TestType>::value )
|
||||
with expansion:
|
||||
4 > 0
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Template test case with test types specified inside std::tuple - MyTypes - 0
|
||||
@@ -11695,9 +11695,9 @@ Misc.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( sizeof(TestType) > 0 )
|
||||
REQUIRE( std::is_arithmetic<TestType>::value )
|
||||
with expansion:
|
||||
4 > 0
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Template test case with test types specified inside std::tuple - MyTypes - 1
|
||||
@@ -11706,9 +11706,9 @@ Misc.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( sizeof(TestType) > 0 )
|
||||
REQUIRE( std::is_arithmetic<TestType>::value )
|
||||
with expansion:
|
||||
1 > 0
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Template test case with test types specified inside std::tuple - MyTypes - 2
|
||||
@@ -11717,9 +11717,9 @@ Misc.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( sizeof(TestType) > 0 )
|
||||
REQUIRE( std::is_arithmetic<TestType>::value )
|
||||
with expansion:
|
||||
4 > 0
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
TemplateTest: vectors can be sized and resized - float
|
||||
@@ -17278,6 +17278,42 @@ StringManip.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
"abcdefcg" == "abcdefcg"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
replaceInPlace
|
||||
no replace in already-replaced string
|
||||
lengthening
|
||||
-------------------------------------------------------------------------------
|
||||
StringManip.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
StringManip.tests.cpp:<line number>: PASSED:
|
||||
CHECK( Catch::replaceInPlace(letters, "c", "cc") )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
StringManip.tests.cpp:<line number>: PASSED:
|
||||
CHECK( letters == "abccdefccg" )
|
||||
with expansion:
|
||||
"abccdefccg" == "abccdefccg"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
replaceInPlace
|
||||
no replace in already-replaced string
|
||||
shortening
|
||||
-------------------------------------------------------------------------------
|
||||
StringManip.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
StringManip.tests.cpp:<line number>: PASSED:
|
||||
CHECK( Catch::replaceInPlace(s, "--", "-") )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
StringManip.tests.cpp:<line number>: PASSED:
|
||||
CHECK( s == "--" )
|
||||
with expansion:
|
||||
"--" == "--"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
replaceInPlace
|
||||
escape '
|
||||
@@ -18721,5 +18757,5 @@ Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected
|
||||
assertions: 2256 | 2075 passed | 146 failed | 35 failed as expected
|
||||
assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected
|
||||
|
||||
|
Reference in New Issue
Block a user