Update to a working version of Scalariform

This commit is contained in:
Björn Antonsson 2016-06-02 14:06:57 +02:00
parent cae070bd93
commit c66ce62d63
616 changed files with 5966 additions and 5436 deletions

View file

@ -17,20 +17,20 @@ class ORMultiMapSpec extends WordSpec with Matchers {
"be able to add entries" in {
val m = ORMultiMap().addBinding(node1, "a", "A").addBinding(node1, "b", "B")
m.entries should be(Map("a" -> Set("A"), "b" -> Set("B")))
m.entries should be(Map("a" Set("A"), "b" Set("B")))
val m2 = m.addBinding(node1, "a", "C")
m2.entries should be(Map("a" -> Set("A", "C"), "b" -> Set("B")))
m2.entries should be(Map("a" Set("A", "C"), "b" Set("B")))
}
"be able to remove entry" in {
val m = ORMultiMap().addBinding(node1, "a", "A").addBinding(node1, "b", "B").removeBinding(node1, "a", "A")
m.entries should be(Map("b" -> Set("B")))
m.entries should be(Map("b" Set("B")))
}
"be able to replace an entry" in {
val m = ORMultiMap().addBinding(node1, "a", "A").replaceBinding(node1, "a", "A", "B")
m.entries should be(Map("a" -> Set("B")))
m.entries should be(Map("a" Set("B")))
}
"be able to have its entries correctly merged with another ORMultiMap with other entries" in {
@ -40,9 +40,9 @@ class ORMultiMapSpec extends WordSpec with Matchers {
// merge both ways
val expectedMerge = Map(
"a" -> Set("A"),
"b" -> Set("B"),
"c" -> Set("C"))
"a" Set("A"),
"b" Set("B"),
"c" Set("C"))
val merged1 = m1 merge m2
merged1.entries should be(expectedMerge)
@ -67,10 +67,10 @@ class ORMultiMapSpec extends WordSpec with Matchers {
// merge both ways
val expectedMerged = Map(
"a" -> Set("A2"),
"b" -> Set("B1"),
"c" -> Set("C2"),
"d" -> Set("D1", "D2"))
"a" Set("A2"),
"b" Set("B1"),
"c" Set("C2"),
"d" Set("D1", "D2"))
val merged1 = m1 merge m2
merged1.entries should be(expectedMerged)
@ -89,8 +89,8 @@ class ORMultiMapSpec extends WordSpec with Matchers {
val m2 = m.put(node1, "a", a - "A1")
val expectedMerged = Map(
"a" -> Set("A2"),
"b" -> Set("B1"))
"a" Set("A2"),
"b" Set("B1"))
m2.entries should be(expectedMerged)
}
@ -104,7 +104,7 @@ class ORMultiMapSpec extends WordSpec with Matchers {
"remove all bindings for a given key" in {
val m = ORMultiMap().addBinding(node1, "a", "A1").addBinding(node1, "a", "A2").addBinding(node1, "b", "B1")
val m2 = m.remove(node1, "a")
m2.entries should be(Map("b" -> Set("B1")))
m2.entries should be(Map("b" Set("B1")))
}
"have unapply extractor" in {
@ -116,7 +116,7 @@ class ORMultiMapSpec extends WordSpec with Matchers {
case c @ Changed(ORMultiMapKey("key"))
val ORMultiMap(entries3) = c.dataValue
val entries4: Map[String, Set[Long]] = entries3
entries4 should be(Map("a" -> Set(1L, 2L), "b" -> Set(3L)))
entries4 should be(Map("a" Set(1L, 2L), "b" Set(3L)))
}
}
}