1 | --log('hello test case')
|
2 | |
3 | function check(output, ...) |
4 | local s = tostring(solution(...)) |
5 | local inputs = table.concat({...}, ", ")
|
6 | if s == output then |
7 | log("OK: "..inputs.." => "..output)
|
8 | else |
9 | log("Oops: "..inputs.." => "..s.." (expected: "..output..")")
|
10 | error("verification failed")
|
11 | end |
12 | end |
13 | |
14 | i = [[<a href="https://play.google.com/store/apps/details?id=de.appwerft.tinybrain"><img src="http://tinybrain.de/tb/images/tinybrain-qrlogo.png" width="120" height="120"></a><br>]] |
15 | |
16 | o = [[<a href="http://tinybrain.de/tb/images/tinybrain-qrlogo.png"><img src="http://tinybrain.de/tb/images/tinybrain-qrlogo.png" width="120" height="120"></a><br>]] |
17 | |
18 | check(o, i, "copy src to href") |
19 | |
20 | return true -- hmm. so easy to forget... but we need it! |
test run test run with input pitch download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Recognizer | Recognition Result | Visualize | Recalc |
|---|---|---|---|
| #308 | 769 | [visualize] |
| Snippet ID: | #40 |
| Snippet name: | copy src to href (test case) |
| Eternal ID of this version: | #40/1 |
| Text MD5: | d2bd69f363f910a613f11dfc2ed84646 |
| Author: | stefan |
| Category: | |
| Type: | Lua code - Test case |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2013-12-22 13:23:43 |
| Source code size: | 769 bytes / 20 lines |
| Pitched / IR pitched: | Yes / Yes |
| Views / Downloads: | 1744 / 513 |
| Referenced in: | [show references] |