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

@ -20,7 +20,7 @@ class LWWMapSpec extends WordSpec with Matchers {
"be able to set entries" in {
val m = LWWMap.empty[Int].put(node1, "a", 1, defaultClock[Int]).put(node2, "b", 2, defaultClock[Int])
m.entries should be(Map("a" -> 1, "b" -> 2))
m.entries should be(Map("a" 1, "b" 2))
}
"be able to have its entries correctly merged with another LWWMap with other entries" in {
@ -28,7 +28,7 @@ class LWWMapSpec extends WordSpec with Matchers {
val m2 = LWWMap.empty.put(node2, "c", 3, defaultClock[Int])
// merge both ways
val expected = Map("a" -> 1, "b" -> 2, "c" -> 3)
val expected = Map("a" 1, "b" 2, "c" 3)
(m1 merge m2).entries should be(expected)
(m2 merge m1).entries should be(expected)
}
@ -40,11 +40,11 @@ class LWWMapSpec extends WordSpec with Matchers {
val merged1 = m1 merge m2
val m3 = merged1.remove(node1, "b")
(merged1 merge m3).entries should be(Map("a" -> 1, "c" -> 3))
(merged1 merge m3).entries should be(Map("a" 1, "c" 3))
// but if there is a conflicting update the entry is not removed
val m4 = merged1.put(node2, "b", 22, defaultClock[Int])
(m3 merge m4).entries should be(Map("a" -> 1, "b" -> 22, "c" -> 3))
(m3 merge m4).entries should be(Map("a" 1, "b" 22, "c" 3))
}
"have unapply extractor" in {
@ -55,7 +55,7 @@ class LWWMapSpec extends WordSpec with Matchers {
case c @ Changed(LWWMapKey("key"))
val LWWMap(entries3) = c.dataValue
val entries4: Map[String, Long] = entries3
entries4 should be(Map("a" -> 1L))
entries4 should be(Map("a" 1L))
}
}