forked from Alepha/Alepha
Fix some bugs in iostream exception handling for expansions.
This commit is contained in:
@ -38,7 +38,7 @@ static auto init= enroll <=[]
|
||||
},
|
||||
};
|
||||
|
||||
"An exception should be thrown when there is a trailing unenclosed variable."_test <=TableTest< Alepha::expandVariables >::ExceptionCases
|
||||
"An exception should be thrown when there is a trailing unenclosed variable."_test <=TableTest< Alepha::expandVariables >::Cases
|
||||
{
|
||||
{ "Complete var",
|
||||
{ "$H$ $W$", { { "H", lambaste<="Hello" }, { "W", lambaste<="World" } }, '$' },
|
||||
@ -46,11 +46,15 @@ static auto init= enroll <=[]
|
||||
},
|
||||
{ "Complete var",
|
||||
{ "$H$ $W$", { { "H", lambaste<="Hello" }, { "W", lambaste<="World" } }, '$' },
|
||||
std::type_identity< void >{}
|
||||
"Hello World"
|
||||
},
|
||||
{ "Incomplete var",
|
||||
{ "$H$ $W", { { "H", lambaste<="Hello" }, { "W", lambaste<="World" } }, '$' },
|
||||
std::type_identity< std::exception >{}
|
||||
std::runtime_error{ "Unterminated variable `W` in expansion." }
|
||||
},
|
||||
{ "Missing var",
|
||||
{ "$H$ $W$", { { "W", lambaste<="World" } }, '$' },
|
||||
std::runtime_error{ "No such variable: `H`" }
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user