Add some float tests to TestArethmic - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 0b7229f7b2a4fbc3537404802cae4c66cedb526c
DIR parent 4a2eda49cdd3180ab884a696ac987d7d6bb375db
HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Wed, 5 Aug 2015 18:55:25 +0200
Add some float tests to TestArethmic
Diffstat:
M tpl/template_funcs_test.go | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
DIR diff --git a/tpl/template_funcs_test.go b/tpl/template_funcs_test.go
@@ -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)