Closed elliotchance closed 6 years ago
This works:
type Item struct { a, b float64 } func (i Item) Sum() { return i.a + i.b } func TestItem_Average(t *testing.T) { Sum := tf.Function(t, Item.Sum) Sum(Item{4.2, 5.1}).Returns(9.3) }
Should add this to the docs.
This works:
Should add this to the docs.