mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Add some missing doArithmetic test cases
This commit is contained in:
parent
0f6c8439b9
commit
1e8b4d9cde
1 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue