Added support for full error messages
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -41,6 +41,16 @@ TEST_CASE( "Get diagnostic line", "[integration]" ) {
|
||||
delete script;
|
||||
}
|
||||
|
||||
TEST_CASE( "Get full diagnostic message", "[integration]" ) {
|
||||
auto script = Script::Create(uR"(
|
||||
"\x"
|
||||
)");
|
||||
REQUIRE(script->Diagnostics -> HasErrors());
|
||||
auto diags = script->Diagnostics -> GetDiagnostics();
|
||||
auto msg = script -> Diagnostics -> GetFullErrorMessage(diags[0]);
|
||||
REQUIRE(msg == "[Error] (1, 2) 'x' is not a valid control character.");
|
||||
delete script;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user