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
ID | Author/Program | Comment | Date |
---|---|---|---|
289 | #1000604 (pitcher) | 2015-08-18 00:54:27 | |
244 | #1000610 (pitcher) | Edit suggestion: !636 !629 main { static Object androidContext; static String programID; public static void main(String[] args) throws Exception { 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 }} | 2015-08-18 00:52:42 |
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: | 1323 / 243 |
Referenced in: | [show references] |