Skip to content

Commit

Permalink
Merge pull request #27 from CQCL/doug/tag-test
Browse files Browse the repository at this point in the history
test: add a test for sum type tags
  • Loading branch information
doug-q authored Jun 14, 2024
2 parents b63c619 + 35785e5 commit 4ae1b8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: src/types.rs
expression: "[]+[]"
---
"{ i32, {}, {} }"
1 change: 1 addition & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ pub mod test {
#[case(0, SumType::new_unary(0))]
#[case(1, SumType::new_unary(1))]
#[case(2,SumType::new([vec![Type::new_unit_sum(0), Type::new_unit_sum(1)], vec![Type::new_unit_sum(2), Type::new_unit_sum(3)]]))]
#[case(3, SumType::new_unary(2))]
fn sum_types(#[case] _id: i32, #[with(_id)] llvm_ctx: TestContext, #[case] st: SumType) {
llvm_ctx.with_tsesh(|tsesh| {
assert_snapshot!(
Expand Down

0 comments on commit 4ae1b8a

Please sign in to comment.