Skip to content

Commit

Permalink
doArithmetic: add test for division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Mar 11, 2015
1 parent 43742e0 commit 00f07c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tpl/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ func TestArethmic(t *testing.T) {
{uint8(2), uint8(2), '*', uint64(4)},
{uint16(4), uint8(2), '/', uint64(2)},
{4, 2, '¤', false},
{4, 0, '/', false},
} {
// TODO(bep): Take precision into account.
result, err := doArithmetic(this.a, this.b, this.op)

if b, ok := this.expect.(bool); ok && !b {
if err == nil {
t.Errorf("[%d] doArethmic didn't return an expected error", i)
Expand Down

0 comments on commit 00f07c5

Please sign in to comment.