mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 08:47:14 +03:00
5efa61a0ce
* Obsolete code for included tests has been removed * The engine uses a proper lexer and is much simplified * An inline test in the middle of the file now only "sees" the file up to that point. This fixes an issue where we had spurious errors when a type error was added at the end of a file, and it would pop up in tests before it. This makes files including many tests much more practical. * diffing and resetting the tests has been reintroduced (done at the moment in Ninja, but for more control (count number of failed tests, etc.) we could put it back into Clerk at some point * The Catala CLI can now take an input from stdin (with the possibility to link a (possibly fake) on-disk file for error reporting and file locations ; this is useful for running tests)
42 lines
936 B
Plaintext
42 lines
936 B
Plaintext
## Article
|
|
|
|
```catala
|
|
declaration scope A:
|
|
context x content money
|
|
context y content money
|
|
context z content money
|
|
|
|
scope A:
|
|
definition x equals $123.54
|
|
definition y equals $8548,650.96
|
|
definition z equals (x * y)
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Interpret -s A
|
|
[ERROR]
|
|
I don't know how to apply operator * on types money and
|
|
money
|
|
|
|
┌─⯈ tests/test_money/bad/no_mingle.catala_en:12.26-12.27:
|
|
└──┐
|
|
12 │ definition z equals (x * y)
|
|
│ ‾
|
|
└─ Article
|
|
|
|
Type money coming from expression:
|
|
┌─⯈ tests/test_money/bad/no_mingle.catala_en:5.21-5.26:
|
|
└─┐
|
|
5 │ context x content money
|
|
│ ‾‾‾‾‾
|
|
└─ Article
|
|
|
|
Type money coming from expression:
|
|
┌─⯈ tests/test_money/bad/no_mingle.catala_en:6.21-6.26:
|
|
└─┐
|
|
6 │ context y content money
|
|
│ ‾‾‾‾‾
|
|
└─ Article
|
|
#return code 123#
|
|
```
|