From 1fd2d6d88f5f78d879bf38bb3fba7fa2e749d3b0 Mon Sep 17 00:00:00 2001 From: Stefan Weigl-Bosker Date: Thu, 19 Feb 2026 13:13:41 -0500 Subject: [willow]: initial IRBuilder API (#9) - add IRBuilder api - remove `name` field from `Value` - fix some bugs in IList interface - more verifier tests --- willow/unittest/ir/VerifierTest.cpp | 51 ------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 willow/unittest/ir/VerifierTest.cpp (limited to 'willow/unittest/ir/VerifierTest.cpp') diff --git a/willow/unittest/ir/VerifierTest.cpp b/willow/unittest/ir/VerifierTest.cpp deleted file mode 100644 index 959d72a..0000000 --- a/willow/unittest/ir/VerifierTest.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include - -#include -#include -#include -#include -#include -#include - -using namespace willow; - -TEST_CASE("valid modules", "[verifier]") { - WillowContext ctx; - std::vector diags; - DiagnosticEngine eng( - [&](Diagnostic d) { diags.push_back(std::move(d)); }); - - auto &m = *ctx.addModule("test"); - SECTION("empty module") { - REQUIRE(succeeded(verifyModule(ctx, m, eng))); - REQUIRE(diags.empty()); - } -} - -TEST_CASE("valid function", "[verifier]") { - WillowContext ctx; - std::vector diags; - DiagnosticEngine eng( - [&](Diagnostic d) { diags.push_back(std::move(d)); }); - - auto &m = *ctx.addModule("test"); - - Type fty = ctx.types().FunctionType(ctx.types().VoidType(), {}); - auto &fn = *m.emplaceFunction("fn", &m, fty); - - REQUIRE(succeeded(verifyFunction(ctx, fn, eng))); - REQUIRE(diags.empty()); -} - -TEST_CASE("invalid basic block", "[verifier]") { - WillowContext ctx; - std::vector diags; - DiagnosticEngine eng( - [&](Diagnostic d) { diags.push_back(std::move(d)); }); - - auto &m = *ctx.addModule("test"); - - Type fty = ctx.types().FunctionType(ctx.types().VoidType(), {}); - auto &fn = *m.emplaceFunction("fn", &m, fty); - // TODO -} -- cgit v1.2.3