Skip to content

Commit

Permalink
Message formatting: some more space for results
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGr committed May 3, 2024
1 parent 56b456d commit 396ea03
Show file tree
Hide file tree
Showing 123 changed files with 601 additions and 601 deletions.
2 changes: 1 addition & 1 deletion compiler/catala_utils/message.ml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ module Content = struct
Format.pp_close_box ppf ();
not islast)
| Outcome msg ->
Format.fprintf ppf "@,@[<hov 2>%t@]" msg;
Format.fprintf ppf "@;<0 1>@[<v 1>@[<hov 2>%t@]@]" msg;
true
| Suggestion suggestions_list ->
Format.fprintf ppf "@,@[<v 1>@,@[<hov 2>%a@]@]" Suggestions.format
Expand Down
12 changes: 6 additions & 6 deletions tests/arithmetic/good/priorities.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ scope A:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│w = 0
│x = 4
│y = 4
│z = 390.0
w = 0
x = 4
y = 4
z = 390.0
└─
```
2 changes: 1 addition & 1 deletion tests/arithmetic/good/rounding.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ scope A:
```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│o = false
o = false
└─
```
6 changes: 3 additions & 3 deletions tests/arithmetic/good/trivial.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ scope A:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│w = 6
w = 6
└─
```
14 changes: 7 additions & 7 deletions tests/array/good/aggregation.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ scope B:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│x = [$0.00; $9.00; $5.20]
x = [$0.00; $9.00; $5.20]
└─
```

```catala-test-inline
$ catala test-scope B
┌─[RESULT]─
│max = $18.00
│min = $5.00
│y = $17.20
│z = 1
max = $18.00
min = $5.00
y = $17.20
z = 1
└─
```
18 changes: 9 additions & 9 deletions tests/array/good/aggregation_2.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,28 @@ scope B:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│x =
│ [
│ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 };
│ S { -- id: 2 -- income: $5.20 }
│ ]
x =
[
S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 };
S { -- id: 2 -- income: $5.20 }
]
└─
```

```catala-test-inline
$ catala test-scope B
┌─[RESULT]─
│argmax = S { -- id: 1 -- income: $9.00 }
│argmin = S { -- id: 0 -- income: $0.00 }
argmax = S { -- id: 1 -- income: $9.00 }
argmin = S { -- id: 0 -- income: $0.00 }
└─
```
6 changes: 3 additions & 3 deletions tests/array/good/aggregation_3.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ scope S:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

Expand Down Expand Up @@ -95,6 +95,6 @@ let scope S (x: integer|internal|output) =
```catala-test-inline
$ catala test-scope S
┌─[RESULT]─
│x = 0
x = 0
└─
```
8 changes: 4 additions & 4 deletions tests/array/good/concatenation.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ scope A:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│x = [0; 1; 2; 3; 4; 5; 6]
│y = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10]
x = [0; 1; 2; 3; 4; 5; 6]
y = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10]
└─
```
8 changes: 4 additions & 4 deletions tests/array/good/filter.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ scope B:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│x = [$0.00; $9.00; $5.20]
x = [$0.00; $9.00; $5.20]
└─
```

```catala-test-inline
$ catala test-scope B
┌─[RESULT]─
│y = [$9.00; $5.20]
y = [$9.00; $5.20]
└─
```
10 changes: 5 additions & 5 deletions tests/array/good/filter_map.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ scope B:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│x = [$0.00; $9.00; $5.20]
x = [$0.00; $9.00; $5.20]
└─
```

```catala-test-inline
$ catala test-scope B
┌─[RESULT]─
│y = [$9.00; $5.20]
│z = [false; true; true]
y = [$9.00; $5.20]
z = [false; true; true]
└─
```
18 changes: 9 additions & 9 deletions tests/array/good/fold.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,28 @@ scope B:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│x =
│ [
│ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 };
│ S { -- id: 2 -- income: $5.20 }
│ ]
x =
[
S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 };
S { -- id: 2 -- income: $5.20 }
]
└─
```

```catala-test-inline
$ catala test-scope B
┌─[RESULT]─
│argmax = S { -- id: 1 -- income: $9.00 }
│argmin = S { -- id: 0 -- income: $0.00 }
argmax = S { -- id: 1 -- income: $9.00 }
argmin = S { -- id: 0 -- income: $0.00 }
└─
```
8 changes: 4 additions & 4 deletions tests/array/good/map.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ scope B:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope B
┌─[RESULT]─
│x = [$4.00; $8.00]
│z = [false; true]
x = [$4.00; $8.00]
z = [false; true]
└─
```
14 changes: 7 additions & 7 deletions tests/array/good/simple.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@ scope B:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│x = [0; 9; 64]
x = [0; 9; 64]
└─
```

```catala-test-inline
$ catala test-scope B
┌─[RESULT]─
│v = 3
│w = true
│y = true
│z = false
v = 3
w = true
y = true
z = false
└─
```
8 changes: 4 additions & 4 deletions tests/array/good/simpler.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ scope A:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│w = false
│x = [0; 9; 64]
w = false
x = [0; 9; 64]
└─
```
6 changes: 3 additions & 3 deletions tests/array/good/simplest.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ scope A:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

```catala-test-inline
$ catala test-scope A
┌─[RESULT]─
│x = [0; 4; 8]
x = [0; 4; 8]
└─
```
8 changes: 4 additions & 4 deletions tests/bool/good/test_bool.catala_en
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ scope TestBool:
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[RESULT]─
│All invariant checks passed
All invariant checks passed
└─
┌─[RESULT]─
│Typechecking successful!
Typechecking successful!
└─
```

Expand Down Expand Up @@ -48,8 +48,8 @@ TestBool
```catala-test-inline
$ catala test-scope TestBool
┌─[RESULT]─
│bar = 1
│foo = true
bar = 1
foo = true
└─
```

Expand Down
Loading

0 comments on commit 396ea03

Please sign in to comment.