diff --git a/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.run.out b/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.run.out new file mode 100644 index 00000000000000..a636931a34d55d --- /dev/null +++ b/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.run.out @@ -0,0 +1,10 @@ +vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.vv:5: fn test_ab + > assert a == b + Left value (len: 6): `Sum(1)` + Right value (len: 6): `Sum(2)` + +vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.vv:9: fn test_sumtype_literals + > assert main.Sum(1) == main.Sum(2) + Left value (len: 11): `main.Sum(1)` + Right value (len: 11): `main.Sum(2)` + diff --git a/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.skip_unused.run.out b/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.skip_unused.run.out new file mode 100644 index 00000000000000..a636931a34d55d --- /dev/null +++ b/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.skip_unused.run.out @@ -0,0 +1,10 @@ +vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.vv:5: fn test_ab + > assert a == b + Left value (len: 6): `Sum(1)` + Right value (len: 6): `Sum(2)` + +vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.vv:9: fn test_sumtype_literals + > assert main.Sum(1) == main.Sum(2) + Left value (len: 11): `main.Sum(1)` + Right value (len: 11): `main.Sum(2)` + diff --git a/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.vv b/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.vv new file mode 100644 index 00000000000000..8173a02e528ebd --- /dev/null +++ b/vlib/v/tests/skip_unused/assert_of_sumtype_values_works_test.vv @@ -0,0 +1,10 @@ +type Sum = int | string + +fn test_ab() { + a, b := Sum(1), Sum(2) + assert a == b +} + +fn test_sumtype_literals() { + assert Sum(1) == Sum(2) +}