mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Add ComponentCompiler::build_from_path
This commit is contained in:
parent
fd9d154b27
commit
9eecdefb35
5 changed files with 57 additions and 0 deletions
|
@ -277,4 +277,16 @@ SCENARIO("Component Compiler")
|
|||
auto result = compiler.build_from_source("export Dummy := Rectangle {}", "");
|
||||
REQUIRE(result.has_value());
|
||||
}
|
||||
|
||||
SECTION("Compile failure from path")
|
||||
{
|
||||
auto result = compiler.build_from_path(SOURCE_DIR "/file-not-there.60");
|
||||
REQUIRE_FALSE(result.has_value());
|
||||
}
|
||||
|
||||
SECTION("Compile from path")
|
||||
{
|
||||
auto result = compiler.build_from_path(SOURCE_DIR "/tests/test.60");
|
||||
REQUIRE(result.has_value());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue