Skip to content

Instantly share code, notes, and snippets.

@krawaller
Created September 18, 2011 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krawaller/1225249 to your computer and use it in GitHub Desktop.
Save krawaller/1225249 to your computer and use it in GitHub Desktop.
tests.addBatch "the implicit operation function":
"is defined": -> assert.isFunction iO
"returns product for": pairs "1x", "2y", "3z", "5(", "0x", ")(", "xy", "5\"", "x\"", "\"y","\"\"", "5|", "||", "!x"
"returns power for": pairs "x2", "y3", "z4", ")6", "\"2", "\"8", "|2", "x0", "!2"
"returns sum for": pairs "3-", "z-", ")-", "\"-"
"returns nothing for": wrongpairs "3+", "x*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment