diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/integers.tm | 2 | ||||
| -rw-r--r-- | test/minmax.tm | 2 | ||||
| -rw-r--r-- | test/rng.tm | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/test/integers.tm b/test/integers.tm index bf15380c..e6b2ba9d 100644 --- a/test/integers.tm +++ b/test/integers.tm @@ -63,7 +63,7 @@ func main(): >> Int8(123):hex() = "0x7B" - >> Int(2.1) + >> Int(2.1, truncate=yes) = 2 : Int do: diff --git a/test/minmax.tm b/test/minmax.tm index 3d11f8e5..f28aec91 100644 --- a/test/minmax.tm +++ b/test/minmax.tm @@ -1,7 +1,7 @@ struct Foo(x:Int, y:Int): func len(f:Foo->Num): - return Num.sqrt(f.x*f.x + f.y*f.y)! + return Num.sqrt(Num(f.x*f.x + f.y*f.y))! func main(): >> 3 _min_ 5 diff --git a/test/rng.tm b/test/rng.tm index 6c38caad..fe3d9f75 100644 --- a/test/rng.tm +++ b/test/rng.tm @@ -36,5 +36,5 @@ func main(): = [30, 50, 100, 20, 90, 10, 80, 40, 70, 60] >> nums:random(rng=rng) = 70 - >> nums:sample(10, weights=[1.0/i for i in nums.length], rng=rng) + >> nums:sample(10, weights=[1.0/Num(i) for i in nums.length], rng=rng) = [10, 20, 10, 10, 30, 70, 10, 40, 60, 80] |
