Louis Gesbert
0ab7a0f9ce
Turn all existing tests to inline tests
...
Done using
```bash
process() { FILE=$1; awk 'match($0, /^```catala-test *{ *id *= *"(.*)" *}/, a) {print "```catala-test-inline"; f="'"$(dirname $FILE)/output/$(basename $FILE)"'." a[1]; getline; print "$ " $0; while ((getline<f) > 0) print; next} {print}' $FILE >$FILE.new; mv $FILE.new $FILE; }
for f in tests/test_*/*/*.catala_* examples/**/*.catala_*; do process $f; git add $f; done
for d in $(find -name output -type d); do git rm -r $d; done
```
2022-09-23 14:45:10 +02:00
Louis Gesbert
01cc957b3b
Used shared_ast
for scopelang expressions
2022-08-26 11:31:14 +02:00
Louis Gesbert
6d41818e0a
Change syntax for set membership predicate
...
Before: `ELEMENT in SET`; now: `SET contains ELEMENT`
Using the `in` keyword was causing conflicts and blocking #203 .
Current proposal has `contient` for the French syntax, and is untranslated (`contains`) for Polish.
2022-07-27 14:34:58 +02:00
Louis Gesbert
2e5050481d
Register all existing tests through the new engine
...
I removed the '.out' extension for now to preserve the test output file names and avoid a million file renames.
This makes the patch easier to read, and we can do the rename easily in another patch afterwards, without mixing with semantic changes.
(beautiful script àlarrache:
```bash
for f in */*/output/*; do
target_base=${f##*/}
target_base=${target_base%%.*}
echo $f | awk -F. '{
f=$1"."$2; if ($4 == "") { mode=$3; id=$3 } else { scope="-s "$3; mode=$4; id=$3"."$4}
printf "\n```catala-test {id=\"%s\"}\ncatala %s %s\n```\n",id,mode,scope;
}' >> $(dirname $f)/../${target_base}.*; done
```
2022-07-08 17:06:20 +02:00
Denis Merigoux
bdbf202a8d
Minimal implementation of https://github.com/CatalaLang/catala/issues/192#issuecomment-1178750411
2022-07-08 14:10:25 +02:00
Denis Merigoux
2263dd7dab
Update syntax highlighting and test suite [skip ci]
2022-02-07 12:04:48 +01:00
Denis Merigoux
72274057cd
Better Dcalc printing
2022-02-06 18:25:37 +01:00
Denis Merigoux
b2a5551961
Test folders, nice doc and messages
2022-01-11 12:51:34 +01:00
Denis Merigoux
2b6e7c8b98
Working prototype of clerk, the new build system for Catala
2022-01-10 17:57:58 +01:00
Denis Merigoux
56baf91923
Remove prefixes to each line in messages, keep only first line
2021-11-06 23:04:12 +01:00
EmileRolley
6169d19b1e
feat(compiler): add collection concatenation operator
2021-07-08 16:27:46 +02:00
EmileRolley
0ffbb9b266
refactor(tests)!: migrate test file from the abbreviated syntax to the english one
2021-05-26 21:16:29 +02:00
Denis Merigoux
3c8d187be0
Big refactoring of the literate programming structure
...
Partially fixes #120
Removes the distinction between headers and articles, streamlines the surface AST
Changes affects lexers and parser
2021-05-15 01:16:08 +02:00
Denis Merigoux
896a83db4a
Fix test output
2021-03-17 19:43:36 +01:00
EmileRolley
c0a9344eca
refactor(tests): update tests based on the abbreviated english lexer
2021-03-09 22:07:31 +01:00
Aymeric Fromherz
ba03d2db78
Move tests to appropriate folders
2021-01-25 01:16:46 -05:00
Aymeric Fromherz
e63bdf0634
More precise pattern matching when looking for source file in test framework
2021-01-23 20:57:31 -05:00
Aymeric Fromherz
483400ea19
Move tests to their appropriate directory
2021-01-23 20:49:17 -05:00
Denis Merigoux
4d1d3a2e1c
Reset tests
2021-01-20 19:21:02 +01:00
Denis Merigoux
267baea28d
Fixes #58
2021-01-14 00:17:24 +01:00
Denis Merigoux
44d7b616a4
Improve type error messages
2021-01-13 12:04:14 +01:00
Denis Merigoux
e5c6a196e2
Added filter and map operators
2021-01-10 18:11:46 +01:00
Denis Merigoux
f51d8833c7
Implement argmin and argmax
2021-01-10 17:07:41 +01:00
Nicolas Chataing
c4d6220240
Handle extrema operators on collections
2021-01-06 12:41:24 +01:00
Denis Merigoux
89fe5878b0
Various small fixings
2020-12-30 12:02:09 +01:00
Denis Merigoux
be9e7e2a1e
Added collection length and mem test
2020-12-30 11:50:19 +01:00
Denis Merigoux
2cfb348274
Debugged unification and typing
2020-12-30 01:13:28 +01:00
Denis Merigoux
7318b51e25
Debugging unification...
2020-12-30 01:02:04 +01:00
Denis Merigoux
5f58e93c6e
Implemented all aggregate desugaring
2020-12-29 23:43:00 +01:00
Denis Merigoux
a37357bb56
Array type is beginning to work
2020-12-29 22:26:10 +01:00