简体   繁体   中英

F# Canopy - how can I use the “context” tests?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM