Skip to content

Commit

Permalink
Update GenericFor.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatSageEqualToHeaven authored Mar 27, 2024
1 parent 8ee796c commit 4f98b76
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/Staging/GenericFor.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
local t = {}

for i,v in {1,2,3} do
print(i,v)
t[i] = v
end

assert(t[1] == 1)
assert(t[2] == 2)
assert(t[3] == 3)

print("GENERALIZED DONE")

local t2 = {}
for i,v in pairs({6,7,8,9}) do
print(i,v)
t2[i] = v
end

assert(t2[1] == 6)
assert(t2[2] == 7)
assert(t2[3] == 8)
assert(t2[4] == 9)

OK()

0 comments on commit 4f98b76

Please sign in to comment.