Add some float tests to TestArethmic
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 5 Aug 2015 16:55:25 +0000 (18:55 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 5 Aug 2015 16:55:25 +0000 (18:55 +0200)
tpl/template_funcs_test.go

index 81018626a2e90ea7f0274ffa5d3418d6d991dffd..f04cadeefb02ec0e5be59f7903df84345c0e9966 100644 (file)
@@ -125,6 +125,8 @@ func TestArethmic(t *testing.T) {
                {uint16(4), uint8(2), '/', uint64(2)},
                {4, 2, '¤', false},
                {4, 0, '/', false},
+               {float64(2.3), float64(2.3), '+', float64(4.6)},
+               {float64(2.3), int(2), '*', float64(4.6)},
        } {
                // TODO(bep): Take precision into account.
                result, err := doArithmetic(this.a, this.b, this.op)