catala/tests/test_proof/good/dates_get_year.catala_en
2023-12-19 17:27:44 +01:00

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.
```