Added support for full error messages
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-18 19:56:47 +02:00
parent dc35ba4698
commit 8541085b27
7 changed files with 133 additions and 39 deletions

View File

@@ -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