catala/tests/date/bad/rounding_option_conflict.catala_en
2024-02-12 18:03:16 +01:00

42 lines
1015 B
Plaintext

```catala
declaration scope CheckAgeIsLessThan:
input bday content date
input today content date
input age content duration
output r content boolean
scope CheckAgeIsLessThan:
date round decreasing
definition r equals bday + age <= today
date round increasing
declaration scope Test:
output r content boolean
scope Test:
definition r equals (output of CheckAgeIsLessThan with
{ -- bday: |2000-02-29|
-- today: |2018-03-01|
-- age: 18 year}).r
assertion r
```
```catala-test-inline
$ catala Interpret -s Test
[ERROR]
You cannot set multiple date rounding modes
┌─⯈ tests/date/bad/rounding_option_conflict.catala_en:10.14-10.24:
└──┐
10 │ date round decreasing
│ ‾‾‾‾‾‾‾‾‾‾
┌─⯈ tests/date/bad/rounding_option_conflict.catala_en:12.14-12.24:
└──┐
12 │ date round increasing
│ ‾‾‾‾‾‾‾‾‾‾
#return code 123#
```