Skip to content

Commit cc79a38

Browse files
author
KDr2
committed
revert the infinite loops
1 parent c09efc6 commit cc79a38

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/ctask.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@testset "stack allocated objects" begin
44
function f()
55
t = 0
6-
while t < 4
6+
while true
77
produce(t)
88
t = 1 + t
99
end
@@ -23,7 +23,7 @@
2323
@testset "heap allocated objects" begin
2424
function f()
2525
t = [0 1 2]
26-
for _ in 1:10
26+
while true
2727
produce(t[1])
2828
t[1] = 1 + t[1]
2929
end
@@ -44,7 +44,7 @@
4444
@testset "iteration" begin
4545
function f()
4646
t = 1
47-
for _ in 1:12
47+
while true
4848
produce(t)
4949
t = 1 + t
5050
end
@@ -73,7 +73,7 @@
7373
@testset "method error" begin
7474
function f()
7575
t = 0
76-
for _ in 1:3
76+
while true
7777
t[3] = 1
7878
produce(t)
7979
t = t + 1
@@ -94,7 +94,7 @@
9494
@testset "error test" begin
9595
function f()
9696
x = 1
97-
for _ in 1:3
97+
while true
9898
error("error test")
9999
produce(x)
100100
x += 1
@@ -115,7 +115,7 @@
115115
@testset "OutOfBounds Test Before" begin
116116
function f()
117117
x = zeros(2)
118-
for _ in 1:3
118+
while true
119119
x[1] = 1
120120
x[2] = 2
121121
x[3] = 3
@@ -137,7 +137,7 @@
137137
@testset "OutOfBounds Test After `produce`" begin
138138
function f()
139139
x = zeros(2)
140-
for _ in 1:3
140+
while true
141141
x[1] = 1
142142
x[2] = 2
143143
produce(x[2])
@@ -160,7 +160,7 @@
160160
@testset "OutOfBounds Test After `copy`" begin
161161
function f()
162162
x = zeros(2)
163-
for _ in 1:3
163+
while true
164164
x[1] = 1
165165
x[2] = 2
166166
produce(x[2])

test/tarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
function f()
124124
t = TArray(Int, 1)
125125
t[1] = 0
126-
for _ in 1:10
126+
while true
127127
produce(t[1])
128128
t[1]
129129
t[1] = 1 + t[1]

0 commit comments

Comments
 (0)