luontola / gospec

Testing framework for Go. Allows writing self-documenting tests/specifications, and executes them concurrently and safely isolated. [UNMAINTAINED]
Apache License 2.0
113 stars 17 forks source link

Release #2

Closed boggle closed 8 years ago

boggle commented 13 years ago

Hey, I'm using gospec on a pet project of mine and added a few matchers as I went:

(1) Is("arbitrary message") as a more explicit Satisfies (2) Support for catching panics conveniently, e.g.

 c.Expect(func() { panic(os.EINVAL) }, Panic(Equals), os.EINVAL)
 c.Expect(func() { ... }, RunsNormally)

Greets,

boggle

luontola commented 13 years ago

Thanks. Those changes are now in the master branch (I also refactored them). Some usage examples would still be needed for them at https://github.com/orfjackal/gospec/blob/master/examples/expectation_syntax_test.go

Do you have a use case where Panic and RunsNormally are not enough, but Catch and IsNoError are needed? I would like to minimize the number of matchers and make Catch and IsNoError private if possible.