Skip to content

Commit 3f16578

Browse files
committed
test speculative
1 parent 4265f0a commit 3f16578

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test-src/epfl/test8-effects/TestSpeculative.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TestSpeculative extends FileDiffSuite {
1717

1818
val prefix = home + "test-out/epfl/test8-"
1919

20-
trait DSL extends ArrayMutation with LiftPrimitives with PrimitiveOps
20+
trait DSL extends ArrayMutation with PrimitiveOps with LiftPrimitives
2121
with OrderingOps with BooleanOps with LiftVariables with IfThenElse
2222
with While with RangeOps with Print {
2323
def zeros(l: Rep[Int]) = array(l) { i => 0 }
@@ -128,7 +128,7 @@ class TestSpeculative extends FileDiffSuite {
128128
def test(x: Rep[Int]) = {
129129
var x = 7
130130
var c = 0.0
131-
while (c < 10) {
131+
while (c < 10.0) {
132132
print(x) // should be const 7
133133
print(c)
134134
var z = 2 // should remove var
@@ -152,7 +152,7 @@ class TestSpeculative extends FileDiffSuite {
152152
var x = 7
153153
var y = 4.0 // should remove
154154
var c = 0.0
155-
while (c < 10) {
155+
while (c < 10.0) {
156156
print(x) // should be const 7
157157
print(c)
158158
var z = 2 // should remove var
@@ -175,7 +175,7 @@ class TestSpeculative extends FileDiffSuite {
175175
trait Prog extends DSL {
176176
def test(x: Rep[Int]) = {
177177
var c = 0.0
178-
while (c > 10) {
178+
while (c > 10.0) {
179179
print("booooring!")
180180
}
181181
print("done")
@@ -193,8 +193,8 @@ class TestSpeculative extends FileDiffSuite {
193193
def test(x: Rep[Int]) = {
194194
var x = 7.0
195195
var c = 0.0
196-
while (c < 10) {
197-
if (x < 10)
196+
while (c < 10.0) {
197+
if (x < 10.0)
198198
print("test")
199199
else
200200
x = c

0 commit comments

Comments
 (0)