Start exposing ComponentDefinition to C++

This commit is contained in:
Simon Hausmann 2021-03-19 16:50:12 +01:00
parent 9a8c6bf9f7
commit 3588d6ffbe
4 changed files with 123 additions and 3 deletions

View file

@ -258,4 +258,16 @@ SCENARIO("Component Compiler")
REQUIRE(out_paths[0] == "path1");
REQUIRE(out_paths[1] == "path2");
}
SECTION("Compile failure from source")
{
auto result = compiler.build_from_source("Syntax Error!!", "");
REQUIRE_FALSE(result.has_value());
}
SECTION("Compile from source")
{
auto result = compiler.build_from_source("export Dummy := Rectangle {}", "");
REQUIRE(result.has_value());
}
}