mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 08:47:14 +03:00
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
## Test
|
|
|
|
```catala
|
|
declaration scope A:
|
|
internal x content date
|
|
output y content boolean
|
|
|
|
scope A:
|
|
definition x equals |2022-01-16|
|
|
definition y under condition get_year of x < 2010 consequence equals true
|
|
definition y under condition get_year of x >= 2010 and get_year of x < 2015 consequence equals false
|
|
definition y under condition get_year of x >= 2015 and get_year of x < 2020 consequence equals true
|
|
definition y under condition get_year of x >= 2020 consequence equals false
|
|
```
|
|
|
|
|
|
|
|
```catala-test-inline
|
|
$ catala Typecheck --check-invariants
|
|
[RESULT] Invariant typing_defaults checked. result: [52/52]
|
|
[RESULT] Invariant match_inversion checked. result: [0/0]
|
|
[RESULT] Invariant app_inversion checked. result: [0/0]
|
|
[RESULT] Invariant no_return_a_function checked. result: [0/0]
|
|
[RESULT] Invariant no_partial_evaluation checked. result: [0/0]
|
|
[RESULT] Invariant default_no_arrow checked. result: [7/7]
|
|
[RESULT] Typechecking successful!
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Proof --disable-counterexamples
|
|
[RESULT] No errors found during the proof mode run.
|
|
```
|