Skip to content

Commit 20f7f39

Browse files
author
Antoine Brunner
committed
Add tests for tupleConcat
1 parent 3248227 commit 20f7f39

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

tests/run/tuple-tests.check

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
()
2+
(1,2,3,4,5)
3+
(1,2,3,4,5)
4+
(11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35)
5+
(11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35)
6+
(1,2,3,4,5,6,7,8,9,10)
7+
(1,2,3,4,5,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35)
8+
(11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,1,2,3,4,5)
9+
(11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60)

tests/run/tuple-tests/tuple-concat.check

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/run/tuple-tests/tuple-concat.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ object Test extends App {
1616
// small + xxl
1717
// xxl + small
1818
// xxl + xxl
19-
println(tuple1 ++ emptyTuple)
19+
println(emptyTuple ++ emptyTuple)
2020
println(emptyTuple ++ tuple1)
21+
println(tuple1 ++ emptyTuple)
22+
println(tupleXXL1 ++ emptyTuple)
23+
println(emptyTuple ++ tupleXXL1)
24+
println(tuple1 ++ tuple2)
25+
println(tuple1 ++ tupleXXL1)
26+
println(tupleXXL1 ++ tuple1)
27+
println(tupleXXL1 ++ tupleXXL2)
2128

2229
// Concatenation with an empty tuple should be a no-op
2330
assert((tuple1 ++ emptyTuple).asInstanceOf[AnyRef] eq tuple1.asInstanceOf[AnyRef])

0 commit comments

Comments
 (0)