4

I am stumped on how to format the "context" test utilizing the Canopy API.

The following website lists examples, but I cannot get my program to build with the following code. I have tried other indentation, with no change.

reference: http://lefthandedgoat.github.io/canopy/testing.html

context: "Change text in the fields"
once(fun _ -> contains "98402" (read "#ZipCodeID"))
before(fun _ -> "#FirstNameID" << "Paul")
after(fun _ -> "#CityID" == "Tacoma")
lastly(fun _ -> "#StateID" == "WA")

This gives the following error:

Error   1   Incomplete structured construct at or before this point in lambda expression. Expected incomplete structured construct at or before this point or other token.
Brien Foss
  • 3,336
  • 3
  • 21
  • 31
  • 1
    `:` is redundant in `context: "..."`. – Eugene Fotin Jun 06 '14 at 23:29
  • Ahh yes, I was testing and added that prior to posting this question. However, you led me to another problem by mentioning my syntax error. Thank you, I will post my new question in a few minutes. – Brien Foss Jun 07 '14 at 01:00

1 Answers1

2

@Eugene Fotin, pointed out my syntax error ":". I have fixed this, and the build error went away.

Brien Foss
  • 3,336
  • 3
  • 21
  • 31