Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4b5291a5
Commit
4b5291a5
authored
May 01, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
May 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript/tests: Added more exception tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
60232cc7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
158 additions
and
0 deletions
+158
-0
lang.js
dlls/jscript/tests/lang.js
+158
-0
No files found.
dlls/jscript/tests/lang.js
View file @
4b5291a5
...
...
@@ -981,6 +981,164 @@ case 3:
return
i
;
})();
(
function
()
{
var
ret
,
x
;
function
unreachable
()
{
ok
(
false
,
"unreachable"
);
}
function
expect
(
value
,
expect_value
)
{
ok
(
value
===
expect_value
,
"got "
+
value
+
" expected "
+
expect_value
);
}
ret
=
(
function
()
{
try
{
return
"try"
;
unreachable
();
}
catch
(
e
)
{
unreachable
();
}
finally
{
return
"finally"
;
unreachable
();
}
unreachable
();
})();
expect
(
ret
,
"finally"
);
x
=
""
;
ret
=
(
function
()
{
try
{
x
+=
"try,"
;
return
x
;
unreachable
();
}
catch
(
e
)
{
unreachable
();
}
finally
{
x
+=
"finally,"
;
}
unreachable
();
})();
expect
(
ret
,
"try,"
);
expect
(
x
,
"try,finally,"
);
x
=
""
;
ret
=
(
function
()
{
try
{
x
+=
"try,"
throw
1
;
unreachable
();
}
catch
(
e
)
{
x
+=
"catch,"
;
return
"catch"
;
unreachable
();
}
finally
{
x
+=
"finally,"
;
return
"finally"
;
unreachable
();
}
unreachable
();
})();
expect
(
ret
,
"finally"
);
expect
(
x
,
"try,catch,finally,"
);
x
=
""
;
ret
=
(
function
()
{
try
{
x
+=
"try,"
throw
1
;
unreachable
();
}
catch
(
e
)
{
x
+=
"catch,"
;
return
"catch"
;
unreachable
();
}
finally
{
x
+=
"finally,"
;
}
unreachable
();
})();
expect
(
ret
,
"catch"
);
expect
(
x
,
"try,catch,finally,"
);
x
=
""
;
ret
=
(
function
()
{
try
{
x
+=
"try,"
try
{
x
+=
"try2,"
;
return
"try2"
;
}
catch
(
e
)
{
unreachable
();
}
finally
{
x
+=
"finally2,"
;
}
unreachable
();
}
catch
(
e
)
{
unreachable
();
}
finally
{
x
+=
"finally,"
;
}
unreachable
();
})();
expect
(
ret
,
"try2"
);
expect
(
x
,
"try,try2,finally2,finally,"
);
x
=
""
;
ret
=
(
function
()
{
while
(
true
)
{
try
{
x
+=
"try,"
try
{
x
+=
"try2,"
;
break
;
}
catch
(
e
)
{
unreachable
();
}
finally
{
x
+=
"finally2,"
;
}
unreachable
();
}
catch
(
e
)
{
unreachable
();
}
finally
{
x
+=
"finally,"
;
}
unreachable
();
}
x
+=
"ret"
;
return
"ret"
;
})();
expect
(
ret
,
"ret"
);
expect
(
x
,
"try,try2,finally2,finally,ret"
);
x
=
""
;
ret
=
(
function
()
{
while
(
true
)
{
try
{
x
+=
"try,"
try
{
x
+=
"try2,"
;
continue
;
}
catch
(
e
)
{
unreachable
();
}
finally
{
x
+=
"finally2,"
;
}
unreachable
();
}
catch
(
e
)
{
unreachable
();
}
finally
{
x
+=
"finally,"
;
break
;
}
unreachable
();
}
x
+=
"ret"
;
return
"ret"
;
})();
expect
(
ret
,
"ret"
);
expect
(
x
,
"try,try2,finally2,finally,ret"
);
})();
tmp
=
eval
(
"1"
);
ok
(
tmp
===
1
,
"eval(
\"
1
\"
) !== 1"
);
eval
(
"{ ok(tmp === 1, 'eval: tmp !== 1'); } tmp = 2;"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment