|
1 | 1 | package com.twitter.chill |
2 | 2 |
|
3 | 3 | import scala.collection.JavaConverters |
| 4 | +import scala.collection.immutable.NumericRange |
4 | 5 |
|
5 | 6 | import org.scalatest.{ Matchers, WordSpec } |
6 | 7 |
|
@@ -53,15 +54,17 @@ class SerializedExamplesOfStandardDataSpec extends WordSpec with Matchers { |
53 | 54 | } |
54 | 55 | } |
55 | 56 |
|
56 | | - // In Scala 2.10, instances of the following classes have a serialized representation that differs from |
57 | | - // newer Scala versions: Wrappers$IteratorWrapper |
| 57 | + // In older Scala versions, instances of the following classes have a serialized representation that differs from |
| 58 | + // the current Scala version 2.12.4: |
| 59 | + // 11 -> scala.collection.convert.Wrappers.IteratorWrapper |
| 60 | + // 29 -> scala.collection.immutable.Range$Inclusive |
58 | 61 | val omitExamplesInScalaVersion: Map[String, Seq[Int]] = Map( |
59 | | - "2.10." -> Seq(11)) |
| 62 | + "2.10." -> Seq(11, 29), |
| 63 | + "2.11." -> Seq(29)) |
60 | 64 |
|
61 | 65 | val specialCasesNotInExamplesMap: Seq[Int] = Seq( |
62 | 66 | 9 // no way to write an example for 9 -> void |
63 | | - // FIXME for the first discussion, let's just assume that all other examples are already implemented |
64 | | - ) ++ Seq.range(19, 143).filterNot(_ == 114) |
| 67 | + ) // TODO remove once no more needed ++ Seq.range(19, 143).filterNot(_ == 114) |
65 | 68 |
|
66 | 69 | val examples = Seq( |
67 | 70 | 0 -> ("AgI=" -> Int.box(1)), |
@@ -91,6 +94,24 @@ class SerializedExamplesOfStandardDataSpec extends WordSpec with Matchers { |
91 | 94 | 16 -> ("EgECBA==" -> Left(2)), |
92 | 95 | 17 -> ("EwECBA==" -> Right(2)), |
93 | 96 | 18 -> ("FAEBAgQ=" -> Vector(2)), |
| 97 | + 19 -> ("FQEBAgQ=" -> Set(2)), |
| 98 | + 20 -> ("FgECAgQCBg==" -> Set(2, 3)), |
| 99 | + 21 -> ("FwEDAgQCBgII" -> Set(2, 3, 4)), |
| 100 | + 22 -> ("GAEEAgQCBgIIAgo=" -> Set(2, 3, 4, 5)), |
| 101 | + // 23 -> TODO find a way to instantiate HashSet$HashTrieSet |
| 102 | + 24 -> ("GgEBJwECBAIG" -> Map(2 -> 3)), |
| 103 | + 25 -> ("GwECJwECBAIGJwECCAIK" -> Map(2 -> 3, 4 -> 5)), |
| 104 | + 26 -> ("HAEDJwECBAIGJwECCAIKJwECDAIO" -> Map(2 -> 3, 4 -> 5, 6 -> 7)), |
| 105 | + 27 -> ("HQEEJwECBAIGJwECCAIKJwECDAIOJwECEAIS" -> Map(2 -> 3, 4 -> 5, 6 -> 7, 8 -> 9)), |
| 106 | + // 28 -> TODO find a way to instantiate HashMap$HashTrieMap |
| 107 | + 29 -> ("HwEMAAwIBgI=" -> new Range.Inclusive(3, 6, 1)), |
| 108 | + 30 -> ("IAEBAgoAAQABAHNjYWxhLm1hdGguTnVtZXJpYyRJbnRJc0ludGVncmFspAEBAAMIAgQCAg==" -> |
| 109 | + new NumericRange.Inclusive[Int](2, 5, 1)), |
| 110 | + 31 -> ("IQEBAgoAAAABAHNjYWxhLm1hdGguTnVtZXJpYyRJbnRJc0ludGVncmFspAEBAAMGAgQCAg==" -> |
| 111 | + new NumericRange.Exclusive[Int](2, 5, 1)), |
| 112 | + 32 -> ("IgECAgYCCg==" -> scala.collection.mutable.BitSet(3, 5)), |
| 113 | + 33 -> ("IwEBJwECBgIK" -> scala.collection.mutable.HashMap(3 -> 5)), |
| 114 | + 34 -> ("JAEBAgY=" -> scala.collection.mutable.HashSet(3)), |
94 | 115 | 114 -> ("dAE=" -> None)) |
95 | 116 |
|
96 | 117 | val kryo: KryoBase = { |
|
0 commit comments