enable and disable compiler

This commit is contained in:
Awni Hannun
2024-01-16 16:09:07 -08:00
parent ba8ce23597
commit 5c78c16f1c
5 changed files with 98 additions and 5 deletions

View File

@@ -96,3 +96,11 @@ TEST_CASE("test nested compile") {
out = cfun({array(1), array(2)})[0];
CHECK_EQ(out.item<int>(), 9);
}
TEST_CASE("test enable and disable compile") {
CHECK_THROWS(compile(nullptr));
disable_compiler();
compile(nullptr);
enable_compiler();
CHECK_THROWS(compile(nullptr));
}