Adjust test results

Nothing shocking here:
- division by zero now reported on the application rather than the
operator
- renumbering of printed bindlib variables
- some whitespace changes
This commit is contained in:
Louis Gesbert 2022-07-11 11:03:44 +02:00
parent b8e73ab3ae
commit 4726d00df8
10 changed files with 44 additions and 42 deletions

View File

@ -1,6 +1,8 @@
# Reformatting commits to be skipped when running 'git blame'
# Use `git config --global blame.ignoreRevsFile .git-blame-ignore-revs` to use it
# Add new reformatting commits at the top
7485c7f2ce726f59f1ec66ddfe1d3f7d640201d8
f9fc1a8e8b0b2dcbf5361f95ca778df63ac4e247
f17875f90e07688f683e5ea6e880c57ded640a81

View File

@ -1,2 +1,2 @@
[RESULT] Computation successful! Results:
[RESULT] éligible = true
[RESULT] éligible = true

View File

@ -4,7 +4,7 @@ The division operator:
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
20 | definition i equals 1. /. 0.
| ^^
| ^^^^^^^^
+ `Division_by_zero` exception management
+-+ with decimals

View File

@ -4,7 +4,7 @@ The division operator:
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
40 | definition i equals 10 day /^ 0 day
| ^^
| ^^^^^^^^^^^^^^^
+ `Division_by_zero` exception management
+-+ with duration

View File

@ -4,7 +4,7 @@ The division operator:
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
10 | definition i equals 1 / 0
| ^
| ^^^^^
+ `Division_by_zero` exception management
+-+ with integers

View File

@ -4,7 +4,7 @@ The division operator:
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
30 | definition i equals $10.0 /$ $0.0
| ^^
| ^^^^^^^^^^^^^
+ `Division_by_zero` exception management
+-+ with money

View File

@ -1,15 +1,15 @@
let TestBool_13 :
let TestBool_14 :
TestBool_in{"foo_in": unit → bool; "bar_in": unit → integer} →
TestBool_out{"foo_out": bool; "bar_out": integer} =
λ (TestBool_in_14: TestBool_in{"foo_in": unit → bool; "bar_in":
λ (TestBool_in_15: TestBool_in{"foo_in": unit → bool; "bar_in":
unit → integer}) →
let foo_15 : unit → bool = TestBool_in_14."foo_in" in
let bar_16 : unit → integer = TestBool_in_14."bar_in" in
let bar_17 : integer = error_empty
⟨bar_16 () | true ⊢ ⟨⟨true ⊢ 1⟩ | false ⊢ ∅ ⟩⟩ in
let foo_18 : bool = error_empty
⟨foo_15 () | true ⊢
⟨⟨bar_17 < 0 ⊢ false⟩, ⟨bar_17 >= 0 ⊢ true⟩ | false ⊢
let foo_16 : unit → bool = TestBool_in_15."foo_in" in
let bar_17 : unit → integer = TestBool_in_15."bar_in" in
let bar_18 : integer = error_empty
⟨bar_17 () | true ⊢ ⟨⟨true ⊢ 1⟩ | false ⊢ ∅ ⟩⟩ in
let foo_19 : bool = error_empty
⟨foo_16 () | true ⊢
⟨⟨bar_18 < 0 ⊢ false⟩, ⟨bar_18 >= 0 ⊢ true⟩ | false ⊢
∅ ⟩⟩ in
TestBool_out {"foo_out"= foo_18; "bar_out"= bar_17} in
TestBool_13
TestBool_out {"foo_out"= foo_19; "bar_out"= bar_18} in
TestBool_14

View File

@ -1,18 +1,18 @@
let A =
λ (A_in_31: A_in{"c_in": integer; "d_in": integer; "e_in":
λ (A_in_21: A_in{"c_in": integer; "d_in": integer; "e_in":
unit → integer; "f_in": unit → integer}) →
let c_32 : integer = A_in_31."c_in" in
let d_33 : integer = A_in_31."d_in" in
let e_34 : unit → integer = A_in_31."e_in" in
let f_35 : unit → integer = A_in_31."f_in" in
let a_36 : integer = error_empty ⟨⟨true ⊢ 0⟩ | false ⊢ ∅ ⟩
let c_22 : integer = A_in_21."c_in" in
let d_23 : integer = A_in_21."d_in" in
let e_24 : unit → integer = A_in_21."e_in" in
let f_25 : unit → integer = A_in_21."f_in" in
let a_26 : integer = error_empty ⟨⟨true ⊢ 0⟩ | false ⊢ ∅ ⟩
in
let b_37 : integer = error_empty
⟨⟨true ⊢ a_36 + 1⟩ | false ⊢ ∅ ⟩ in
let e_38 : integer = error_empty
⟨e_34 () | true ⊢
⟨⟨true ⊢ b_37 + c_32 + d_33 + 1⟩ | false ⊢ ∅ ⟩⟩ in
let f_39 : integer = error_empty
⟨f_35 () | true ⊢ ⟨⟨true ⊢ e_38 + 1⟩ | false ⊢ ∅ ⟩⟩
let b_27 : integer = error_empty
⟨⟨true ⊢ a_26 + 1⟩ | false ⊢ ∅ ⟩ in
let e_28 : integer = error_empty
⟨e_24 () | true ⊢
⟨⟨true ⊢ b_27 + c_22 + d_23 + 1⟩ | false ⊢ ∅ ⟩⟩ in
let f_29 : integer = error_empty
⟨f_25 () | true ⊢ ⟨⟨true ⊢ e_28 + 1⟩ | false ⊢ ∅ ⟩⟩
in
A_out {"b_out"= b_37; "d_out"= d_33; "f_out"= f_39}
A_out {"b_out"= b_27; "d_out"= d_23; "f_out"= f_29}

View File

@ -1,7 +1,7 @@
let B =
λ (B_in_31: B_in{}) →
let a.x_32 : bool = error_empty ⟨true ⊢ false⟩ in
let result_33 : A_out{"y_out": integer} = A_24 (A_in {"x_in"= a.x_32}) in
let a.y_34 : integer = result_33."y_out" in
let __35 : unit = assert (error_empty a.y_34 = 1) in
λ (B_in_21: B_in{}) →
let a.x_22 : bool = error_empty ⟨true ⊢ false⟩ in
let result_23 : A_out{"y_out": integer} = A_13 (A_in {"x_in"= a.x_22}) in
let a.y_24 : integer = result_23."y_out" in
let __25 : unit = assert (error_empty a.y_24 = 1) in
B_out {}

View File

@ -1,10 +1,10 @@
let B =
λ (B_in_40: B_in{}) →
let a.a_41 : unit → integer = λ (__42: unit) → ∅ in
let a.b_43 : integer = error_empty
λ (B_in_27: B_in{}) →
let a.a_28 : unit → integer = λ (__29: unit) → ∅ in
let a.b_30 : integer = error_empty
⟨⟨true ⊢ 2⟩ | false ⊢ ∅ ⟩ in
let result_44 : A_out{"c_out": integer} =
A_32 (A_in {"a_in"= a.a_41; "b_in"= a.b_43}) in
let a.c_45 : integer = result_44."c_out" in
let __46 : unit = assert (error_empty a.c_45 = 1) in
let result_31 : A_out{"c_out": integer} =
A_17 (A_in {"a_in"= a.a_28; "b_in"= a.b_30}) in
let a.c_32 : integer = result_31."c_out" in
let __33 : unit = assert (error_empty a.c_32 = 1) in
B_out {}