Skip to content

Instantly share code, notes, and snippets.

@joelmccracken
Created April 17, 2013 19:29
Show Gist options
  • Save joelmccracken/5407041 to your computer and use it in GitHub Desktop.
Save joelmccracken/5407041 to your computer and use it in GitHub Desktop.
describe "parentheses", ->
it "supports parenthetical expressions", ->
@handle.press_buttons("1 0 * ( 2 + 4 ) =")
expect(@handle.output_content()).toEqual("60")
it "supports implicit multiplication", ->
@handle.press_buttons("1 0 ( 2 ) =")
expect(@handle.output_content()).toEqual("20")
it "supports implicit multiplication reversed", ->
@handle.press_buttons("( 2 ) 1 0 0 =")
expect(@handle.output_content()).toEqual("200")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment