Skip to content

Commit 7bda102

Browse files
Fix bounds error check in tests
1 parent d99f4df commit 7bda102

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/episodes.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ using Test
116116
@test eb.sampleable_inds == [1,1,1,1,1,0,0]
117117
@test eb[:action][6] == 6
118118
@test eb[:next_action][5] == 6
119-
@test eb[6][:reward] == 0 #6 is not a valid index, the reward there is dummy, filled as zero
119+
@test eb[:reward][6] == 0 #6 is not a valid index, the reward there is dummy, filled as zero
120+
@test_throws BoundsError eb[6] #6 is not a valid index, the reward there is dummy, filled as zero
120121
ep2_len = 0
121122
for (j,i) = enumerate(8:11)
122123
ep2_len += 1

0 commit comments

Comments
 (0)