File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,16 @@ class JSSymbolTest {
66
66
object JSSymbolTest {
67
67
68
68
@ 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)
71
72
}
72
73
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 ()
75
79
76
80
def mkObject (members : (js.Symbol , js.Any )* ): js.Object = {
77
81
val obj = (new js.Object ).asInstanceOf [ObjectCreator ]
You can’t perform that action at this time.
0 commit comments