Skip to content

Commit

Permalink
Test resolving associative domain literals
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Rift <[email protected]>
  • Loading branch information
riftEmber committed Dec 20, 2024
1 parent 4fa164f commit 822d66a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/test/resolution/testDomains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@ int main() {
testAssociative(context, "domain(int, false)", "int", false);
testAssociative(context, "domain(string)", "string", true);

testDomainLiteral(context, "{1, 2, 3}", DomainType::Kind::Associative);
testDomainLiteral(context, "{\"apple\", \"banana\"}", DomainType::Kind::Associative);

testBadPass(context, "domain(1)", "domain(2)");
testBadPass(context, "domain(1, int(16))", "domain(1, int(8))");
testBadPass(context, "domain(1, int(8))", "domain(1, int(16))");
Expand Down

0 comments on commit 822d66a

Please sign in to comment.