Sign in
cobalt
/
cobalt
/
71840339e1109efe930df5c60712d91cdcc962a8
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
jaeger
/
tableSwitchConst.js
blob: 6422af318704e27b677bf0b5ba58b569b04efb2c [
file
] [
log
] [
blame
]
function
f
()
{
switch
(
2
)
{
case
1
:
return
1
;
case
2
:
return
2
;
default
:
return
-
1
;
}
}
assertEq
(
f
(),
2
);
function
g
()
{
switch
(
3.14
)
{
case
3
:
return
3
;
case
4
:
return
4
;
default
:
return
-
1
;
}
}
assertEq
(
g
(),
-
1
);