1
0
forked from Alepha/Alepha

Table testing for exception cases.

I still have to implement a bit more here, but this is a good start.
This commit is contained in:
2023-10-23 04:10:51 -04:00
parent 795661873e
commit 6aa302f791
3 changed files with 123 additions and 9 deletions

View File

@ -38,14 +38,16 @@ static auto init= enroll <=[]
},
};
"An exception should be thrown when there is a trailing unenclosed variable."_test <=[]
"An exception should be thrown when there is a trailing unenclosed variable."_test <=TableTest< Alepha::expandVariables >::ExceptionCases
{
try
{
Alepha::expandVariables( "$H$ $W", { { "H", lambaste<="Hello" }, { "W", lambaste<="World" } }, '$' );
abort();
}
catch( ... ) {}
{ "Complete var",
{ "$H$ $W$", { { "H", lambaste<="Hello" }, { "W", lambaste<="World" } }, '$' },
{}
},
{ "Incomplete var",
{ "$H$ $W", { { "H", lambaste<="Hello" }, { "W", lambaste<="World" } }, '$' },
std::type_identity< std::exception >{}
},
};
"Does the `split` function handle simple cases correctly?"_test <=TableTest< Alepha::split >::Cases