mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-16 10:59:31 +01:00
Rebased approvals for stringified enum tests
This commit is contained in:
@@ -2662,6 +2662,35 @@ Nor would this
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="Directly creating an EnumInfo" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
enumInfo->lookup(0) == "Value1"
|
||||
</Original>
|
||||
<Expanded>
|
||||
Value1 == "Value1"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
enumInfo->lookup(1) == "Value2"
|
||||
</Original>
|
||||
<Expanded>
|
||||
Value2 == "Value2"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
enumInfo->lookup(3) == "{** unexpected enum value **}"
|
||||
</Original>
|
||||
<Expanded>
|
||||
{** unexpected enum value **}
|
||||
==
|
||||
"{** unexpected enum value **}"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="EndsWith string matcher" tags="[.][failing][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Original>
|
||||
@@ -2681,6 +2710,70 @@ Nor would this
|
||||
</Expression>
|
||||
<OverallResult success="false"/>
|
||||
</TestCase>
|
||||
<TestCase name="Enums can quickly have stringification enabled using REGISTER_ENUM" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Original>
|
||||
stringify( EnumClass3::Value1 ) == "Value1"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"Value1" == "Value1"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Original>
|
||||
stringify( EnumClass3::Value2 ) == "Value2"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"Value2" == "Value2"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Original>
|
||||
stringify( EnumClass3::Value3 ) == "Value3"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"Value3" == "Value3"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Original>
|
||||
stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{** unexpected enum value **}"
|
||||
==
|
||||
"{** unexpected enum value **}"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Original>
|
||||
stringify( ec3 ) == "Value2"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"Value2" == "Value2"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Original>
|
||||
stringify( Bikeshed::Colours::Red ) == "Red"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"Red" == "Red"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
|
||||
<Original>
|
||||
stringify( Bikeshed::Colours::Blue ) == "Blue"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"Blue" == "Blue"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="Epsilon only applies to Approx's value" tags="[Approx]" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
|
||||
<Original>
|
||||
@@ -12313,6 +12406,74 @@ loose text artifact
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="parseEnums" tags="[Strings][enums]" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Section name="No enums" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
parseEnums( "" ), Equals( std::vector<std::string>{} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ } Equals: { }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="1" failures="0" expectedFailures="0"/>
|
||||
</Section>
|
||||
<Section name="One enum value" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<std::string>{"Value1"} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ "Value1" } Equals: { "Value1" }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
parseEnums( "Value1" ), Equals( std::vector<std::string>{"Value1"} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ "Value1" } Equals: { "Value1" }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
parseEnums( "EnumName::Value1" ), Equals(std::vector<std::string>{"Value1"} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ "Value1" } Equals: { "Value1" }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="3" failures="0" expectedFailures="0"/>
|
||||
</Section>
|
||||
<Section name="Multiple enum values" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<std::string>{"Value1", "Value2"} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ "Value1", "Value2" } Equals: { "Value1", "Value2" }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<std::string>{"Value1", "Value2", "Value3"} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<std::string>{"Value1", "Value2", "Value3"} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="3" failures="0" expectedFailures="0"/>
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="pointer to class" tags="[Tricky]" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
|
||||
<Original>
|
||||
@@ -12610,6 +12771,33 @@ loose text artifact
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="splitString" tags="[Strings]" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
|
||||
<Original>
|
||||
splitStringRef("", ',' ), Equals(std::vector<StringRef>() )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ } Equals: { }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
|
||||
<Original>
|
||||
splitStringRef("abc", ',' ), Equals(std::vector<StringRef>{"abc"} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ abc } Equals: { abc }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
|
||||
<Original>
|
||||
splitStringRef("abc,def", ',' ), Equals(std::vector<StringRef>{"abc", "def"} )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ abc, def } Equals: { abc, def }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="stacks unscoped info in loops" tags="[.][failing][info][unscoped]" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
|
||||
<Info>
|
||||
Count 1 to 3...
|
||||
@@ -13504,7 +13692,7 @@ loose text artifact
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="1283" failures="142" expectedFailures="21"/>
|
||||
<OverallResults successes="1303" failures="142" expectedFailures="21"/>
|
||||
</Group>
|
||||
<OverallResults successes="1283" failures="141" expectedFailures="21"/>
|
||||
<OverallResults successes="1303" failures="141" expectedFailures="21"/>
|
||||
</Catch>
|
||||
|
||||
Reference in New Issue
Block a user