catala/tests/test_proof/good/enums-nonbool.catala_en
Louis Gesbert a9f8fa36b8 Reduce default verbosity of invariant checks
they break the tests too often for no good reason
2024-01-25 18:18:43 +01:00

48 lines
1.2 KiB
Plaintext

## Test
```catala
declaration enumeration T:
-- C content boolean
-- D content integer
declaration enumeration S:
-- A content integer
-- B content T
declaration scope A:
output x content integer
internal y content S
scope A:
definition y equals B content (D content 1)
definition x under condition (match y with pattern -- A of a: 1 -- B of b: 2) < 2 consequence equals 0
definition x under condition match y with pattern -- A of a: false -- B of b: true consequence equals 1
```
```catala-test-inline
$ catala Typecheck --check-invariants
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
┌─⯈ tests/test_proof/good/enums-nonbool.catala_en:5.7-5.8:
└─┐
5 │ -- C content boolean
│ ‾
└─ Test
[RESULT] All invariant checks passed
[RESULT] Typechecking successful!
```
```catala-test-inline
$ catala Proof --disable-counterexamples
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
┌─⯈ tests/test_proof/good/enums-nonbool.catala_en:5.7-5.8:
└─┐
5 │ -- C content boolean
│ ‾
└─ Test
[RESULT] No errors found during the proof mode run.
```