|
|
|
|
|
by redbad
4631 days ago
|
|
> Nobody wants to write and maintain matchers that
> look like: Expect(foo).To(EqualInt64(3))
And nobody does do that. Idiomatic Go is to write if foo != 3 {
t.Errorf("foo: expected 3, got %d", foo)
}
I truly cannot explain why _so many people_ find this style of testing _so objectionable_ that they invent entire DSLs to avoid it. |
|
t.Errorf("foo: expected 3, got %d", foo)
gets old quickly.