Skip to content

Commit d2dfc0d

Browse files
committed
Make the test suite pass on Rhino again.
1 parent 0b49bcc commit d2dfc0d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/JSSymbolTest.scala

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@ class JSSymbolTest {
6666
object JSSymbolTest {
6767

6868
@BeforeClass
69-
def beforeClass() {
70-
assumeTrue("No symbol support", !js.isUndefined(js.Dynamic.global.Symbol))
69+
def beforeClass(): Unit = {
70+
assumeTrue("Assuming JavaScript symbols are supported",
71+
org.scalajs.testsuite.utils.Platform.areJSSymbolsSupported)
7172
}
7273

73-
val sym1 = js.Symbol()
74-
val sym2 = js.Symbol()
74+
/* These need to be lazy vals, so that they do not blow up if there is no
75+
* symbol support at all.
76+
*/
77+
lazy val sym1 = js.Symbol()
78+
lazy val sym2 = js.Symbol()
7579

7680
def mkObject(members: (js.Symbol, js.Any)*): js.Object = {
7781
val obj = (new js.Object).asInstanceOf[ObjectCreator]

0 commit comments

Comments
 (0)