this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cue/math: add tests for MultipleOf

This change adds various test cases indicating unexpected output
when using `math.MultipleOf`.

For #2926.

Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com>
Change-Id: I4f6b49b3c4d986c759deaa51d08ae4516aaeff22
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193689
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

authored by

Noam Dolovich and committed by
Daniel Martí
1f4927cd 506a0e83

+23
+23
pkg/math/testdata/mult.txtar
··· 1 + -- in.cue -- 2 + import "math" 3 + 4 + // should be true 5 + t1: math.MultipleOf(99*99, 99) 6 + t2: math.MultipleOf(100010, 10) 7 + t3: math.MultipleOf(22, 2) 8 + t4: math.MultipleOf(11, 1) 9 + 10 + // should be false 11 + f1: math.MultipleOf(5555555, 2) 12 + f2: math.MultipleOf(100.01, 4) 13 + 14 + -- out/math -- 15 + // should be true 16 + t1: false 17 + t2: false 18 + t3: false 19 + t4: false 20 + 21 + // should be false 22 + f1: false 23 + f2: false