mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
Passing all tests!
This commit is contained in:
parent
0443221e8b
commit
ae1c2c6e02
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -54,6 +54,10 @@ jobs:
|
||||
run: |
|
||||
eval $(opam env)
|
||||
make build
|
||||
- name: Run tests
|
||||
run: |
|
||||
eval $(opam env)
|
||||
make tests
|
||||
|
||||
- name: Make examples
|
||||
run: |
|
||||
|
@ -24,7 +24,8 @@ interpret_with_scope_and_compare =\
|
||||
test_bool/test_bool.catala:
|
||||
$(call interpret_with_scope_and_compare,nv,TestBool)
|
||||
test_func/func.catala:
|
||||
$(call interpret_with_scope,nv,S)
|
||||
$(call interpret_with_scope_and_compare,nv,S)
|
||||
$(call interpret_with_scope_and_compare,nv,R)
|
||||
test_scope/scope.catala:
|
||||
$(call interpret_with_scope_and_compare,nv,A)
|
||||
test_scope/sub_scope.catala:
|
||||
|
@ -6,6 +6,10 @@ new scope S:
|
||||
param x type int
|
||||
param b type bool
|
||||
|
||||
new scope R:
|
||||
param s scope S
|
||||
param r type int
|
||||
|
||||
scope S:
|
||||
def f of x1 [ (x1 >= x1) ] := x1 + x1
|
||||
def f of x2 [ not b ] := x2 * x2
|
||||
@ -13,4 +17,8 @@ scope S:
|
||||
def b := false
|
||||
|
||||
def x := f of 3
|
||||
|
||||
scope R:
|
||||
def s.f of x := x + x * x
|
||||
def r := s.f of 5
|
||||
*/
|
||||
|
1
tests/test_func/func.catala.R.out
Normal file
1
tests/test_func/func.catala.R.out
Normal file
@ -0,0 +1 @@
|
||||
[RESULT] r -> 30
|
13
tests/test_func/func.catala.S.out
Normal file
13
tests/test_func/func.catala.S.out
Normal file
@ -0,0 +1,13 @@
|
||||
[ERROR] There is a conflict between multiple rules for assigning the same variable.
|
||||
[ERROR]
|
||||
[ERROR] This value is available because the justification of its definition is true:
|
||||
[ERROR] --> test_func/func.catala
|
||||
[ERROR] |
|
||||
[ERROR] 14 | def f of x1 [ (x1 >= x1) ] := x1 + x1
|
||||
[ERROR] | ^
|
||||
[ERROR]
|
||||
[ERROR] This value is available because the justification of its definition is true:
|
||||
[ERROR] --> test_func/func.catala
|
||||
[ERROR] |
|
||||
[ERROR] 15 | def f of x2 [ not b ] := x2 * x2
|
||||
[ERROR] | ^
|
Loading…
Reference in New Issue
Block a user