hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 1e8b4d9cdeced9dd99e21eef1ea042dce8d8a470
parent 0f6c8439b96cfe9cb7189bbf9c6dd0d9c18ea445
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Sun,  7 Feb 2016 14:20:25 +0100

Add some missing doArithmetic test cases

Diffstat:
Mtpl/template_funcs_test.go | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/tpl/template_funcs_test.go b/tpl/template_funcs_test.go
@@ -144,6 +144,17 @@ func TestArethmic(t *testing.T) {
 		{4, 0, '/', false},
 		{float64(2.3), float64(2.3), '+', float64(4.6)},
 		{float64(2.3), int(2), '*', float64(4.6)},
+		{int(1), float64(2), '+', float64(3)},
+		{int(1), uint(2), '+', uint64(3)},
+		{1, "do", '+', false},
+		{float64(1), uint(2), '+', float64(3)},
+		{float64(1), "do", '+', false},
+		{uint(1), int(2), '+', uint64(3)},
+		{uint(1), float64(2), '+', float64(3)},
+		{uint(1), "do", '+', false},
+		{"do ", "be", '+', "do be"},
+		{"do ", "be", '*', false},
+		{t, t, '+', false},
 	} {
 		// TODO(bep): Take precision into account.
 		result, err := doArithmetic(this.a, this.b, this.op)