Add a diagnostics getter to ComponentCompiler

This commit is contained in:
Simon Hausmann 2021-03-19 18:34:30 +01:00
parent 5b726cacbe
commit e1f9347aaa
4 changed files with 71 additions and 0 deletions

View file

@ -282,6 +282,10 @@ SCENARIO("Component Compiler")
{
auto result = compiler.build_from_path(SOURCE_DIR "/file-not-there.60");
REQUIRE_FALSE(result.has_value());
auto diags = compiler.diagnostics();
REQUIRE(diags.size() == 1);
REQUIRE(diags[0].message.starts_with("Could not load"));
}
SECTION("Compile from path")