mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 17:10:22 +03:00
Merge remote-tracking branch 'origin/master' into cgr_example
This commit is contained in:
commit
e0e099c724
4
Makefile
4
Makefile
@ -303,10 +303,10 @@ CLERK=$(CLERK_BIN) --exe $(CATALA_BIN) \
|
||||
.FORCE:
|
||||
|
||||
test_suite: .FORCE
|
||||
OCAMLRUNPARAM= $(CLERK) test tests
|
||||
$(MAKE) -C tests pass_all_tests
|
||||
|
||||
test_examples: .FORCE
|
||||
OCAMLRUNPARAM= $(CLERK) test examples
|
||||
$(MAKE) -C examples pass_all_tests
|
||||
|
||||
#> tests : Run interpreter tests
|
||||
tests: test_suite test_examples
|
||||
|
@ -8,16 +8,18 @@ CLERK=_build/default/build_system/clerk.exe --exe "_build/default/compiler/catal
|
||||
# Running legislation unit tests
|
||||
################################
|
||||
|
||||
pass_all_tests:
|
||||
@cd ..;OCAMLRUNPARAM= $(CLERK) examples
|
||||
|
||||
reset_all_tests: CLERK_OPTS+=--reset
|
||||
reset_all_tests:
|
||||
@cd ..;OCAMLRUNPARAM= $(CLERK) examples
|
||||
|
||||
%.catala_en %.catala_fr %.catala_pl: .FORCE
|
||||
# Here we cd to the root of the Catala repository such that the paths \
|
||||
# displayed in error messages start with `examples/` uniformly.
|
||||
@cd ..;$(CLERK) examples/$@
|
||||
|
||||
TEST_FILES?=$(wildcard */*.catala*)
|
||||
|
||||
pass_tests: $(TEST_FILES)
|
||||
reset_tests: CLERK_OPTS+=--reset
|
||||
reset_tests: $(TEST_FILES)
|
||||
@cd ..;OCAMLRUNPARAM= $(CLERK) examples/$@
|
||||
|
||||
.FORCE:
|
||||
|
||||
.PHONY: pass_all_tests reset_all_tests
|
||||
|
@ -10,11 +10,13 @@ of the Catala programming language development.
|
||||
## List of examples
|
||||
|
||||
- `allocations_familiales/`: computation of the French family benefits, based
|
||||
on the _Code de la sécurité sociale_. This case study is the biggest and
|
||||
on the _Code de la sécurité sociale_.
|
||||
- `aides_logement`: computation of the French housing benefits, based on the
|
||||
_Code de la construction et de l'habitation_. This case study is the biggest and
|
||||
most ambitious for Catala so far.
|
||||
- `code_general_impots/`: computation of the French income tax, based on the
|
||||
_Code général des impôts_. Currently, there are only stubs of program.
|
||||
- `tutorial/`: Catala language tutorial for developers of tech-savvy lawyers.
|
||||
- `tutorial_<en/fr>/`: Catala language tutorial for developers of tech-savvy lawyers.
|
||||
The tutorial is written like a piece of legislation that gets annotated by
|
||||
Catala snippets.
|
||||
- `us_tax_code/`: contains the Catala formalization of several sections of the
|
||||
@ -74,9 +76,12 @@ compilation of the whole program using the standard expected by `clerk test`:
|
||||
enter `make help_clerk` from the root of the Catala repository to know more.
|
||||
|
||||
Once your tests are written, then will automatically be added to the regression
|
||||
suite executed using
|
||||
suite executed using:
|
||||
|
||||
make -C examples tests
|
||||
# From the root of the Catala repository
|
||||
make test_examples
|
||||
# From the examples/ folder
|
||||
make pass_all_tests
|
||||
|
||||
You can isolate a part of the regression suite by invoking:
|
||||
|
||||
|
@ -15,3 +15,10 @@ CLERK=_build/default/build_system/clerk.exe --exe "_build/default/compiler/catal
|
||||
# Here we cd to the root of the Catala repository such that the paths \
|
||||
# displayed in error messages start with `tests/` uniformly.
|
||||
@cd ..; $(CLERK) tests/$@
|
||||
|
||||
pass_all_tests:
|
||||
@cd ..;OCAMLRUNPARAM= $(CLERK) tests
|
||||
|
||||
reset_all_tests: CLERK_OPTS+=--reset
|
||||
reset_all_tests:
|
||||
@cd ..;OCAMLRUNPARAM= $(CLERK) tests
|
||||
|
Loading…
Reference in New Issue
Block a user