mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-13 22:29:35 +03:00
fix scala tests to for new Foo.+
(vs +_Foo
) syntax for qualified operators, also reduced test sizes for Sequence a bit so they don't take forever
This commit is contained in:
parent
0e90be084f
commit
a222a46353
@ -50,7 +50,7 @@ object SequenceTests {
|
||||
}
|
||||
|
||||
def sizes(implicit T: Env) =
|
||||
Vector.range(0,100) :+ intIn(150,200) :+ intIn(500,1000) :+ intIn(1000,4000) :+ intIn(4000,8000)
|
||||
Vector.range(0,100) :+ intIn(150,200) :+ intIn(500,2000)
|
||||
|
||||
def seqOf(size: Int): Test[Sequence[Int]] = test { implicit T =>
|
||||
if (size <= 0) S.empty
|
||||
|
@ -1,7 +1,7 @@
|
||||
(+) = (+_UInt64)
|
||||
(<) = (<_UInt64)
|
||||
(+) = (UInt64.+)
|
||||
(<) = (UInt64.<)
|
||||
(-) = (UInt64.drop)
|
||||
(*) = (*_UInt64)
|
||||
(*) = (UInt64.*)
|
||||
|
||||
fib4 n =
|
||||
loop a b c d n = case n of
|
||||
|
@ -1,6 +1,6 @@
|
||||
(+) = (+_UInt64)
|
||||
(+) = (UInt64.+)
|
||||
(-) = UInt64.drop
|
||||
(*) = (*_UInt64)
|
||||
(*) = (UInt64.*)
|
||||
|
||||
eat-stack n = case n of
|
||||
0 -> 0
|
||||
|
@ -1,5 +1,5 @@
|
||||
(++) = Stream.append
|
||||
sum = Stream.reduce 0 (+_UInt64)
|
||||
sum = Stream.reduce 0 (UInt64.+)
|
||||
left = Stream.take 3 (Stream.from-uint64 5)
|
||||
right = Stream.take 10 (Stream.from-uint64 100)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
reduce = Stream.reduce
|
||||
(+) = (+_UInt64)
|
||||
(+) = (UInt64.+)
|
||||
take = Stream.take
|
||||
cons = Stream.cons
|
||||
from = Stream.from-uint64
|
||||
|
@ -1,4 +1,4 @@
|
||||
a |> f = f a
|
||||
Stream.from-uint64 0
|
||||
|> Stream.take 10
|
||||
|> Stream.fold-left 0 (b a -> a +_UInt64 b)
|
||||
|> Stream.fold-left 0 (b a -> a UInt64.+ b)
|
||||
|
@ -1,4 +1,4 @@
|
||||
a |> f = f a
|
||||
Stream.from-uint64 0
|
||||
|> Stream.take 10000
|
||||
|> Stream.fold-left 0 (+_UInt64)
|
||||
|> Stream.fold-left 0 (UInt64.+)
|
||||
|
@ -1,4 +1,4 @@
|
||||
(+) = (+_Int64)
|
||||
(+) = (Int64.+)
|
||||
a |> f = f a
|
||||
Stream.iterate +0 Int64.increment
|
||||
|> Stream.take 5
|
||||
|
@ -2,4 +2,4 @@ a |> f = f a
|
||||
Stream.iterate 0 UInt64.increment
|
||||
|> Stream.take 10000
|
||||
|> Stream.filter UInt64.is-even
|
||||
|> Stream.reduce 0 (+_UInt64)
|
||||
|> Stream.reduce 0 (UInt64.+)
|
||||
|
@ -1,5 +1,5 @@
|
||||
a |> f = f a
|
||||
Stream.from-uint64 1
|
||||
|> Stream.take 10000
|
||||
|> Stream.scan-left 0 (+_UInt64)
|
||||
|> Stream.reduce 0 (+_UInt64)
|
||||
|> Stream.scan-left 0 (UInt64.+)
|
||||
|> Stream.reduce 0 (UInt64.+)
|
||||
|
@ -1,6 +1,6 @@
|
||||
a |> f = f a
|
||||
(*) = (*_UInt64)
|
||||
(<) = (<_UInt64)
|
||||
(*) = (UInt64.*)
|
||||
(<) = (UInt64.<)
|
||||
|
||||
left = Stream.from-uint64 0 |> Stream.take-while (n -> n < 10)
|
||||
right = Stream.from-uint64 77 |> Stream.drop-while (n -> n < 103)
|
||||
|
@ -1,6 +1,6 @@
|
||||
(+) = (+_Int64)
|
||||
(/) = (/_Int64)
|
||||
(<) = (<_Int64)
|
||||
(+) = (Int64.+)
|
||||
(/) = (Int64./)
|
||||
(<) = (Int64.<)
|
||||
Stream.to-sequence
|
||||
(Stream.take 5
|
||||
(Stream.unfold
|
||||
|
@ -1,3 +1,3 @@
|
||||
(+) = (+_UInt64)
|
||||
(+) = (UInt64.+)
|
||||
case (1,2,3,4) of
|
||||
(a,b,c,d) -> (a + b, c + d)
|
||||
|
Loading…
Reference in New Issue
Block a user