From 00f07c5374d859057c6e7c4731000b5978364819 Mon Sep 17 00:00:00 2001 From: bep Date: Wed, 11 Mar 2015 10:25:53 +0100 Subject: doArithmetic: add test for division by zero --- tpl/template_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tpl/template_test.go') 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) -- cgit v1.2.3