Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #122 // compare tables (test case)

Lua code - Test case

1  
assert(compareTables({}, {}))
2  
assert(compareTables({{'abc', hello='world'}}, {{'abc', hello='world'}}))
3  
assert(not compareTables({'abc'}, {}))
4  
5  
-- can also compare strings and simple data types
6  
assert(compareTables('abc', 'abc'))
7  
assert(not compareTables('abc', 'def'))
8  
return true

test run  test run with input  pitch  download  show line numbers   

Relations

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 288 [visualize]

Snippet ID: #122
Snippet name: compare tables (test case)
Eternal ID of this version: #122/1
Text MD5: f531c394f09139d61cd39e13f1c75384
Author: stefan
Category: general lua functions
Type: Lua code - Test case
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2014-01-10 15:33:36
Source code size: 288 bytes / 8 lines
Pitched / IR pitched: Yes / Yes
Views / Downloads: 873 / 242
Referenced in: [show references]