@@ -53,9 +53,9 @@ final class BindingTest extends FreeSpec with Matchers {
53
53
}
54
54
hello.watch()
55
55
56
-
assert(hello.get == "Hello, World!")
56
+
assert(hello.value == "Hello, World!")
57
57
target.value = "Each"
58
-
assert(hello.get == "Hello, Each!")
58
+
assert(hello.value == "Hello, Each!")
59
59
}
60
60
61
61
"TripleBinding" in {
@@ -64,10 +64,10 @@ final class BindingTest extends FreeSpec with Matchers {
64
64
input.bind + input.bind + input.bind
65
65
}
66
66
output.watch()
67
-
assert(output.get == 0)
67
+
assert(output.value == 0)
68
68
for (i <- 0 until 10) {
69
69
input.value = i
70
-
assert(output.get == i * 3)
70
+
assert(output.value == i * 3)
71
71
}
72
72
}
73
73
@@ -89,7 +89,7 @@ final class BindingTest extends FreeSpec with Matchers {
89
89
90
90
var resultChanged = 0
91
91
92
-
assert(expr1.get == 0)
92
+
assert(expr1.value == 0)
93
93
94
94
addChangedListener(expr1, new ChangedListener[Any] {
95
95
override def changed(event: ChangedEvent[Any]): Unit = {
@@ -98,12 +98,12 @@ final class BindingTest extends FreeSpec with Matchers {
98
98
})
99
99
100
100
assert(resultChanged == 0)
101
-
assert(expr1.get == 32100)
101
+
assert(expr1.value == 32100)
102
102
103
103
expr3.value = 4000
104
104
105
105
assert(resultChanged == 1)
106
-
assert(expr1.get == 34100)
106
+
assert(expr1.value == 34100)
107
107
108
108
}
109
109
@@ -122,10 +122,10 @@ final class BindingTest extends FreeSpec with Matchers {
122
122
resultChanged += 1
123
123
}
124
124
})
125
-
assert(result.get == 0.5)
125
+
assert(result.value == 0.5)
126
126
assert(resultChanged == 0)
127
127
source.value = 4.0
128
-
assert(result.get == 0.25)
128
+
assert(result.value == 0.25)
129
129
assert(resultChanged == 1)
130
130
}
131
131
@@ -218,7 +218,7 @@ final class BindingTest extends FreeSpec with Matchers {
218
218
assert(event.that == Seq("ForYield 0/3", "ForYield 1/3", "ForYield 2/3"))
219
219
}
220
220
assert(
221
-
mapped.get == Seq(
221
+
mapped.value == Seq(
222
222
"ForYield 0/2",
223
223
"ForYield 1/2",
224
224
"ForYield 0/3",
@@ -234,7 +234,7 @@ final class BindingTest extends FreeSpec with Matchers {
234
234
))
235
235
prefix.value = "3"
236
236
assert(sourceEvents.length == 4)
237
-
assert(mapped.get == Seq("3 0/2", "3 1/2", "3 0/4", "3 1/4", "3 2/4", "3 3/4"))
237
+
assert(mapped.value == Seq("3 0/2", "3 1/2", "3 0/4", "3 1/4", "3 2/4", "3 3/4"))
238
238
239
239
removePatchedListener(mapped, mappedEvents.listener)
240
240
removePatchedListener(source, sourceEvents.listener)
@@ -595,7 +595,7 @@ final class BindingTest extends FreeSpec with Matchers {
595
595
val myVars = Vars(1, 2, 100, 3)
596
596
val filtered = myVars.withFilter(_ < 10).map(x => x)
597
597
filtered.watch()
598
-
assert(filtered.get == Seq(1, 2, 3))
598
+
assert(filtered.value == Seq(1, 2, 3))
599
599
}
600
600
}
601
601
@@ -620,21 +620,21 @@ final class BindingTest extends FreeSpec with Matchers {
620
620
c.watch()
621
621
622
622
var result: (Int, Int) = null
623
-
assert((3, 1) == ((c.get, count)))
623
+
assert((3, 1) == ((c.value, count)))
624
624
625
625
a.value = 4
626
-
assert((6, 2) == ((c.get, count)))
626
+
assert((6, 2) == ((c.value, count)))
627
627
628
628
b.value = 3
629
-
assert((7, 3) == ((c.get, count)))
629
+
assert((7, 3) == ((c.value, count)))
630
630
631
631
(0 to 100).foreach { i =>
632
632
a.value = i
633
633
}
634
-
assert((103, 104) == ((c.get, count)))
634
+
assert((103, 104) == ((c.value, count)))
635
635
636
636
b.value = 4
637
-
assert((104, 105) == ((c.get, count)))
637
+
assert((104, 105) == ((c.value, count)))
638
638
}
639
639
640
640
"multi to one dependencies" in {
@@ -659,15 +659,15 @@ final class BindingTest extends FreeSpec with Matchers {
659
659
Binding.BindingInstances.ap _
660
660
println(aPlusOneTimesBPlusOn)
661
661
aPlusOneTimesBPlusOn.watch()
662
-
aPlusOneTimesBPlusOn.get should be((100 + 1) * (200 + 1))
662
+
aPlusOneTimesBPlusOn.value should be((100 + 1) * (200 + 1))
663
663
aFlushCount should be(1)
664
664
bFlushCount should be(1)
665
665
a.value = 500
666
-
aPlusOneTimesBPlusOn.get should be((500 + 1) * (200 + 1))
666
+
aPlusOneTimesBPlusOn.value should be((500 + 1) * (200 + 1))
667
667
aFlushCount should be(2)
668
668
bFlushCount should be(2)
669
669
b.value = 600
670
-
aPlusOneTimesBPlusOn.get should be((500 + 1) * (600 + 1))
670
+
aPlusOneTimesBPlusOn.value should be((500 + 1) * (600 + 1))
671
671
aFlushCount should be(2)
672
672
bFlushCount should be(3)
673
673
@@ -681,14 +681,14 @@ final class BindingTest extends FreeSpec with Matchers {
681
681
if myVar < 10
682
682
} yield myVar
683
683
filtered.watch()
684
-
assert(filtered.get == Seq(1, 2, 3))
684
+
assert(filtered.value == Seq(1, 2, 3))
685
685
}
686
686
domMethod()
687
687
}
688
688
689
689
"flatMap" in {
690
690
val flatMapped = Constants(Constants(1, 2), Constants(), Constants(3)).flatMap(identity)
691
691
flatMapped.watch()
692
-
flatMapped.get should be(Seq(1, 2, 3))
692
+
flatMapped.value should be(Seq(1, 2, 3))
693
693
}
694
694
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4