diff --git a/tests/Staging/GenericFor.lua b/tests/Staging/GenericFor.lua index ed5ab9a..b49cccf 100644 --- a/tests/Staging/GenericFor.lua +++ b/tests/Staging/GenericFor.lua @@ -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()