Skip to content

Commit 811a6bb

Browse files
committed
add manual test function
1 parent edd2f85 commit 811a6bb

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

test/clock.jl

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -558,16 +558,21 @@ end
558558

559559
@test d2 == 1:6 # y
560560

561-
X = [0, 0] # xy
562-
ti = 0
563-
for ti in 0:10
564-
i = ti + 1
565-
x, y = X
566-
if ti % 2 == 0
567-
y = y + 1
561+
# Manual implementation of the dynamics
562+
function manualtest()
563+
x, y = 0, 0
564+
X = [[x, y]] # xy
565+
ti = 0
566+
for ti in 0:10
567+
i = ti + 1
568+
if ti % 2 == 0
569+
y = y + 1
570+
end
571+
x = x + y
572+
573+
@test d1[i] == x
574+
push!(X, [x, y])
568575
end
569-
x = x + y
570-
571-
@test d1[i] == x
572-
X = [x, y]
576+
X
573577
end
578+
X = manualtest()

0 commit comments

Comments
 (0)