Skip to content

Commit

Permalink
float trunc symbolic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
epatrizio authored and zapashcanon committed Feb 13, 2024
1 parent 0d51186 commit 2ef083c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/symbolic_value.ml
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ module S = struct

let floor x = unop ty Floor x

let trunc _ = assert false
let trunc x = unop ty Trunc x

let nearest x = unop ty Nearest x

Expand Down Expand Up @@ -484,7 +484,7 @@ module S = struct

let floor x = unop ty Floor x

let trunc _x = assert false
let trunc x = unop ty Trunc x

let nearest x = unop ty Nearest x

Expand Down
6 changes: 2 additions & 4 deletions test/sym/unop_f32.wat
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
(f32.le (f32.neg (local.get $f32)) (f32.const 42))
(if (then unreachable))

;; owi: internal error, uncaught exception:
;; File "src/symbolic_value.ml", line 420, characters 18-24: Assertion failed
;; (f32.eq (f32.trunc (local.get $f32)) (f32.const 123))
;; (if (then unreachable))
(f32.eq (f32.trunc (local.get $f32)) (f32.const 123))
(if (then unreachable))

;; very long computation
;; (f32.eq (f32.sqrt (local.get $f32)) (f32.const 0))
Expand Down
6 changes: 2 additions & 4 deletions test/sym/unop_f64.wat
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
(f64.le (f64.neg (local.get $f64)) (f64.const 42))
(if (then unreachable))

;; owi: internal error, uncaught exception:
;; File "src/symbolic_value.ml", line 420, characters 18-24: Assertion failed
;; (f64.eq (f64.trunc (local.get $f64)) (f64.const 123))
;; (if (then unreachable))
(f64.eq (f64.trunc (local.get $f64)) (f64.const 123))
(if (then unreachable))

;; very long computation
;; (f64.eq (f64.sqrt (local.get $f64)) (f64.const 0))
Expand Down

0 comments on commit 2ef083c

Please sign in to comment.