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

20
LINES

< > BotCompany Repo | #40 // copy src to href (test case)

Lua code - Test case

--log('hello test case')

function check(output, ...)
  local s = tostring(solution(...))
  local inputs = table.concat({...}, ", ")
  if s == output then
    log("OK: "..inputs.." => "..output)
  else
    log("Oops: "..inputs.." => "..s.." (expected: "..output..")")
    error("verification failed")
  end
end

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>]]

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>]]

check(o, i, "copy src to href")

return true -- hmm. so easy to forget... but we need it!

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 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: 1237 / 363
Referenced in: [show references]