Skip to content

Commit eda0a5d

Browse files
sijarsumkrzemien
sijarsu
authored and
mkrzemien
committed
cleanup tests
1 parent 3935a4c commit eda0a5d

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
class A()
22
class B(val oa: Option[A])
33

4-
object TestSome {
5-
val a = new A()
6-
val b = wire[B]
4+
object TestSomeOption {
5+
val a = new A()
6+
val oa = Some(new A())
7+
val b = wire[B]
8+
}
9+
10+
object TestSomeValue {
11+
val a = new A()
12+
val b = wire[B]
713
}
814

915
object TestNone {
10-
val b = wire[B]
16+
val b = wire[B]
1117
}
1218

13-
require(TestSome.b.oa.contains(TestSome.a))
19+
require(TestSomeOption.b.oa.contains(TestSomeOption.oa.get))
20+
require(TestSomeValue.b.oa.contains(TestSomeValue.a))
1421
require(TestNone.b.oa.isEmpty)

tests/src/test/resources/test-cases/_t142_nested.success

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ class A()
22
class B(val oa: Option[Option[A]])
33

44
object TestSome {
5-
val a = Some(new A())
6-
val b = wire[B]
5+
val a = Some(new A())
6+
val b = wire[B]
77
}
88

99
object TestNestedSome {
10-
val a = new A()
11-
val b = wire[B]
10+
val a = new A()
11+
val b = wire[B]
1212
}
1313

1414
object TestNone {
15-
val b = wire[B]
15+
val b = wire[B]
1616
}
1717

1818
require(TestSome.b.oa.contains(TestSome.a))

0 commit comments

Comments
 (0)