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:
Paul Chiusano 2018-07-30 09:30:13 -04:00
parent 0e90be084f
commit a222a46353
13 changed files with 20 additions and 20 deletions

View File

@ -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

View File

@ -1,7 +1,7 @@
(+) = (+_UInt64)
(<) = (<_UInt64)
(+) = (UInt64.+)
(<) = (UInt64.<)
(-) = (UInt64.drop)
(*) = (*_UInt64)
(*) = (UInt64.*)
fib4 n =
loop a b c d n = case n of

View File

@ -1,6 +1,6 @@
(+) = (+_UInt64)
(+) = (UInt64.+)
(-) = UInt64.drop
(*) = (*_UInt64)
(*) = (UInt64.*)
eat-stack n = case n of
0 -> 0

View File

@ -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)

View File

@ -1,5 +1,5 @@
reduce = Stream.reduce
(+) = (+_UInt64)
(+) = (UInt64.+)
take = Stream.take
cons = Stream.cons
from = Stream.from-uint64

View File

@ -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)

View File

@ -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.+)

View File

@ -1,4 +1,4 @@
(+) = (+_Int64)
(+) = (Int64.+)
a |> f = f a
Stream.iterate +0 Int64.increment
|> Stream.take 5

View File

@ -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.+)

View File

@ -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.+)

View File

@ -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)

View File

@ -1,6 +1,6 @@
(+) = (+_Int64)
(/) = (/_Int64)
(<) = (<_Int64)
(+) = (Int64.+)
(/) = (Int64./)
(<) = (Int64.<)
Stream.to-sequence
(Stream.take 5
(Stream.unfold

View File

@ -1,3 +1,3 @@
(+) = (+_UInt64)
(+) = (UInt64.+)
case (1,2,3,4) of
(a,b,c,d) -> (a + b, c + d)