Sign in
cobalt
/
cobalt
/
c73ce7d5dfce7ae20bcc30efc5f220e0fbac12b1
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
basic
/
syntax-error-toplevel-eof.js
blob: 15aaaf7801655434847a66e8dda7eda29b54efd1 [
file
] [
log
] [
blame
]
var
caught
=
false
;
try
{
Reflect
.
parse
(
"}"
);
}
catch
(
e
)
{
assertEq
(
e instanceof
SyntaxError
,
true
);
assertEq
(
e
.
message
.
startsWith
(
"unexpected garbage after script, starting with '}'"
)
==
-
1
,
false
);
caught
=
true
;
}
assertEq
(
caught
,
true
);