catala/tests/test_modules/good/mod_use.catala_en
2023-08-31 18:31:48 +02:00

31 lines
723 B
Plaintext

# Test modules + inclusions 2
```catala
declaration scope T2:
t1 scope Mod_def.S
# input i content Enum1
output o1 content Mod_def.Enum1
output o2 content Mod_def.Enum1
output o3 content money
output o4 content decimal
scope T2:
definition o1 equals Mod_def.Enum1.No
definition o2 equals t1.e1
definition o3 equals t1.sr
definition o4 equals Mod_def.half of 10
assertion o1 = Mod_def.Enum1.No
assertion o2 = Mod_def.Enum1.Maybe
assertion o3 = $1000
assertion o4 = 5.0
```
```catala-test-inline
$ catala interpret -s T2 --disable_warnings --use mod_def.catala_en
[RESULT] Computation successful! Results:
[RESULT] o1 = No ()
[RESULT] o2 = Maybe ()
[RESULT] o3 = $1,000.00
[RESULT] o4 = 5.0
```