serpent = go("#158") go("#121") -- compareTables assert(compareTables) function assertEquals(actual, expected) assert(expected == actual, actual) end function check(tbl) local s = serpent.block(tbl) print(s) local env = newCleanEnv() assert(compareTables) local f, err = load("return "..s, "serpent-made code", "t", env) if err then print(err) end assert(f) print(f) assert(compareTables) local t = f() assert(compareTables) assert(compareTables(tbl, t)) end check {} return true
Began life as a copy of #154
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
2 comment(s) hidden. show
Recognizer | Recognition Result | Visualize | Recalc |
---|---|---|---|
#308 | 534 | [visualize] |
Snippet ID: | #159 |
Snippet name: | test for serpent.lua |
Eternal ID of this version: | #159/1 |
Text MD5: | 1a930c5c7bada68242c5bb684b532cb9 |
Author: | stefan |
Category: | table serializers |
Type: | Lua code - System test |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2014-01-13 04:16:35 |
Source code size: | 534 bytes / 26 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 1324 / 243 |
Referenced in: | [show references] |