diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-11 12:25:53 +0300 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-11 12:25:53 +0300 |
commit | 00f07c5374d859057c6e7c4731000b5978364819 (patch) | |
tree | bc1798364075733f6fb8b336adb8583e418c6f60 /tpl/template_test.go | |
parent | 43742e0277216f241ea2ee9ecf9e95b3e0f6105d (diff) |
doArithmetic: add test for division by zero
Diffstat (limited to 'tpl/template_test.go')
-rw-r--r-- | tpl/template_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/template_test.go b/tpl/template_test.go index 3ea57b592..e4ebb5526 100644 --- a/tpl/template_test.go +++ b/tpl/template_test.go @@ -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) |