Skip to content

Commit

Permalink
commented out tests that relied on full history tracking for now
Browse files Browse the repository at this point in the history
  • Loading branch information
riadas committed Jul 14, 2023
1 parent 34e0a44 commit 558f1b5
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions test/interpret.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ function test_interpret_basic_particles_1()
(on true (= particle (Particle (Position 4 4))))
)"""
env = interpret_over_time(a, 3)
@test env.state.histories[:particle][0].origin.x == 3
@test env.state.histories[:particle][0].origin.y == 3
@test env.state.histories[:particle][1].origin.x == 4
@test env.state.histories[:particle][1].origin.y == 4
@test env.state.histories[:particle][2].origin.x == 4
@test env.state.histories[:particle][2].origin.y == 4
# @test env.state.histories[:particle][0].origin.x == 3
# @test env.state.histories[:particle][0].origin.y == 3
# @test env.state.histories[:particle][1].origin.x == 4
# @test env.state.histories[:particle][1].origin.y == 4
# @test env.state.histories[:particle][2].origin.x == 4
# @test env.state.histories[:particle][2].origin.y == 4
@test env.state.histories[:particle][3].origin.x == 4
@test env.state.histories[:particle][3].origin.y == 4
end
Expand All @@ -36,12 +36,12 @@ function test_interpret_basic_particles_2()
(+ (.. (.. (prev particle) origin) y) 1)))))
)"""
env = interpret_over_time(a, 3)
@test env.state.histories[:particle][0].origin.x == 3
@test env.state.histories[:particle][0].origin.y == 3
@test env.state.histories[:particle][1].origin.x == 3
@test env.state.histories[:particle][1].origin.y == 4
@test env.state.histories[:particle][2].origin.x == 3
@test env.state.histories[:particle][2].origin.y == 5
# @test env.state.histories[:particle][0].origin.x == 3
# @test env.state.histories[:particle][0].origin.y == 3
# @test env.state.histories[:particle][1].origin.x == 3
# @test env.state.histories[:particle][1].origin.y == 4
# @test env.state.histories[:particle][2].origin.x == 3
# @test env.state.histories[:particle][2].origin.y == 5
@test env.state.histories[:particle][3].origin.x == 3
@test env.state.histories[:particle][3].origin.y == 6
end
Expand All @@ -60,14 +60,14 @@ function test_interpret_full_particles()
(on clicked (= particles (addObj (prev particles) (Particle (Position (.. click x) (.. click y))))))
)"""
env = interpret_over_time(a, 4, [ (click=Autumn.AutumnStandardLibrary.Click(5,5),), empty_env(), (click=Autumn.AutumnStandardLibrary.Click(9,9),), empty_env()])
@test length(env.state.histories[:particles][0]) == 0
@test length(env.state.histories[:particles][1]) == 1
@test length(env.state.histories[:particles][2]) == 1
@test length(env.state.histories[:particles][3]) == 2
# @test length(env.state.histories[:particles][0]) == 0
# @test length(env.state.histories[:particles][1]) == 1
# @test length(env.state.histories[:particles][2]) == 1
# @test length(env.state.histories[:particles][3]) == 2
@test length(env.state.histories[:particles][4]) == 2

@test env.state.histories[:particles][1][1].origin.x == 5
@test env.state.histories[:particles][1][1].origin.y == 5
# @test env.state.histories[:particles][1][1].origin.x == 5
# @test env.state.histories[:particles][1][1].origin.y == 5


end
Expand Down

0 comments on commit 558f1b5

Please sign in to comment.