Skip to content

Commit acb49ba

Browse files
gh-130: Fix FDIV tests.
1 parent 47b3c0b commit acb49ba

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

tests/cases/failing/fdiv.pre

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
! Division by zero for FDIV must raise a runtime error per specification
2+
_ = FDIV(0d1.0, 0d0.0)

tests/cases/passing/fdiv.pre

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
INT: a = IADD(0d1, 0d1.0)
2-
FLT: b = FDIV(0d1.0, 0d0.0)
2+
FLT: b = FDIV(0d1.0, 0d1.0)
33
FLT: x = 0d1.0
4-
FLT: y = 0d0.0
5-
FLT: result_div_inf = FDIV(x, y)
6-
ASSERT(EQ(result_div_inf, INF))
4+
FLT: y = 0d0.5
5+
FLT: result_div = FDIV(x, y)
6+
ASSERT(EQ(result_div, 0d2.0))
77
FLT: c = FPOW(-0d1.0, 0d0.5)

0 commit comments

Comments
 (0)