Skip to content

Commit 5533f3b

Browse files
committed
Snapshot tests
1 parent 69eea4b commit 5533f3b

60 files changed

Lines changed: 618 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 7 additions & 1 deletion

runt.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ver = "0.4.1"
2+
3+
[[tests]]
4+
name = "errors"
5+
paths = [
6+
"tests/errors/backend/*.fpcore",
7+
"tests/errors/frontend/**/*.fpcore",
8+
]
9+
cmd = "./target/debug/calyx-libm --format Q16.16 {}"
10+
11+
[[tests]]
12+
name = "errors"
13+
paths = [
14+
"tests/errors/backend/generators/*.fpcore",
15+
"tests/errors/backend/ranges/*.fpcore",
16+
]
17+
cmd = "./target/debug/calyx-libm $(head -n 1 {} | cut -c 2-) {}"
18+
19+
[[tests]]
20+
name = "expressions"
21+
paths = ["tests/expressions/**/*.fpcore"]
22+
cmd = "./target/debug/calyx-libm --format UQ8.0 {}"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---CODE---
2+
1
3+
---STDERR---
4+
error: operator `exp` has infeasible domain
5+
┌─ tests/errors/backend/generators/infeasible_bounds.fpcore:5:3
6+
7+
5 │ (exp x))
8+
│ ^^^ operator has infeasible domain
9+
10+
= endpoint -1 is out of bounds
11+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
; --format UQ8.8
2+
(FPCore (x)
3+
:calyx-domain (-1 1)
4+
:calyx-impl (lut 16)
5+
(exp x))
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---CODE---
2+
1
3+
---STDERR---
4+
error: operator `exp` has infeasible domain
5+
┌─ tests/errors/backend/generators/infeasible_stride.fpcore:5:3
6+
7+
5 │ (exp x))
8+
│ ^^^ operator has infeasible domain
9+
10+
= stride 1/8 is not representable
11+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
; --format Q8.2
2+
(FPCore (x)
3+
:calyx-domain (-1 1)
4+
:calyx-impl (lut 16)
5+
(exp x))
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---CODE---
2+
1
3+
---STDERR---
4+
error: overflow
5+
┌─ tests/errors/backend/overflow.fpcore:1:12
6+
7+
1 │ (FPCore () 0x1p128)
8+
│ ^^^^^^^ value out of range for `(fixed -16 32)`
9+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(FPCore () 0x1p128)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---CODE---
2+
1
3+
---STDERR---
4+
error: couldn't bound ranges
5+
┌─ tests/errors/backend/ranges/infinite.fpcore:4:2
6+
7+
4 │ (/ 1 x))
8+
│ ^^^^^^^ expression has unbounded range
9+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
; --range-analysis interval
2+
(FPCore (x)
3+
:pre (< 0 x 1)
4+
(/ 1 x))

0 commit comments

Comments
 (0)