WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Test cases
targets.diff (text/plain), 4.42 KB, created by
Cameron Zwarich (cpst)
on 2008-06-08 21:42:39 PDT
(
hide
)
Description:
Test cases
Filename:
MIME Type:
Creator:
Cameron Zwarich (cpst)
Created:
2008-06-08 21:42:39 PDT
Size:
4.42 KB
patch
obsolete
>Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 34459) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2008-06-08 Cameron Zwarich <cwzwarich@uwaterloo.ca> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Bug 17932: "ASSERTION FAILED: type != Continue" with do/while and try/finally >+ <https://bugs.webkit.org/show_bug.cgi?id=17932> >+ >+ This bug was fixed by SquirrelFish, but we should add a test, as well >+ as tests for related issues found while developing SquirrelFish. >+ >+ * fast/js/continue-break-multiple-labels-expected.txt: >+ * fast/js/continue-break-multiple-labels.html: >+ * fast/js/resources/continue-break-multiple-labels.js: Added. >+ > 2008-06-08 Dan Bernstein <mitz@apple.com> > > - test for <rdar://problem/5961977> Crash in RenderBlock::layoutColumns() >Index: LayoutTests/fast/js/continue-break-multiple-labels-expected.txt >=================================================================== >--- LayoutTests/fast/js/continue-break-multiple-labels-expected.txt (revision 34459) >+++ LayoutTests/fast/js/continue-break-multiple-labels-expected.txt (working copy) >@@ -1,6 +1,14 @@ >-Expected: 12356789 >-Actual: 12356789 >-Expected: 123 >-Actual: 123 >-Test done >+This test checks break and continue behaviour in the presence of multiple labels. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS test1() is '12356789' >+PASS test2() is '123' >+PASS test3() is 10 >+PASS test4() is 1 >+PASS test5() is 1 >+PASS successfullyParsed is true >+ >+TEST COMPLETE > >Index: LayoutTests/fast/js/continue-break-multiple-labels.html >=================================================================== >--- LayoutTests/fast/js/continue-break-multiple-labels.html (revision 34459) >+++ LayoutTests/fast/js/continue-break-multiple-labels.html (working copy) >@@ -1,28 +1,13 @@ >-<script> >-function print(msg) { >- document.getElementById("log").innerHTML += msg; >-} >-function test() { >- if (window.layoutTestController) >- layoutTestController.dumpAsText(); >- print("Expected: 12356789<br>Actual: "); >- a: >- b: >- for (var foo = 1; foo < 10; foo++) { >- if (foo == 4) >- continue a; >- print(foo); >- } >- print("<br>Expected: 123<br>Actual: "); >- c: >- d: >- for (var bar = 1; bar < 10; bar++) { >- if (bar == 4) >- break c; >- print(bar); >- } >- print("<br>Test done<br>"); >-} >-</script> >-<body onload="test()"> >-<div id="log"></div> >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<link rel="stylesheet" href="resources/js-test-style.css"> >+<script src="resources/js-test-pre.js"></script> >+</head> >+<body> >+<p id="description"></p> >+<div id="console"></div> >+<script src="resources/continue-break-multiple-labels.js"></script> >+<script src="resources/js-test-post.js"></script> >+</body> >+</html> >Index: LayoutTests/fast/js/resources/continue-break-multiple-labels.js >=================================================================== >--- LayoutTests/fast/js/resources/continue-break-multiple-labels.js (revision 0) >+++ LayoutTests/fast/js/resources/continue-break-multiple-labels.js (revision 0) >@@ -0,0 +1,90 @@ >+description( >+'This test checks break and continue behaviour in the presence of multiple labels.' >+); >+ >+function test1() >+{ >+ var s = ""; >+ >+ a: >+ b: >+ for (var i = 1; i < 10; i++) { >+ if (i == 4) >+ continue a; >+ s += i; >+ } >+ >+ return s; >+} >+ >+shouldBe("test1()", "'12356789'"); >+ >+function test2() >+{ >+ var s = ""; >+ >+ a: >+ b: >+ for (var i = 1; i < 10; i++) { >+ if (i == 4) >+ break a; >+ s += i; >+ } >+ >+ return s; >+} >+ >+shouldBe("test2()", "'123'"); >+ >+function test3() >+{ >+ var i; >+ for (i = 1; i < 10; i++) { >+ try { >+ continue; >+ } finally { >+ innerLoop: >+ while (1) { >+ break innerLoop; >+ } >+ } >+ } >+ >+ return i; >+} >+ >+shouldBe("test3()", "10"); >+ >+function test4() >+{ >+ var i = 0; >+ >+ a: >+ i++; >+ while (1) { >+ break; >+ } >+ >+ return i; >+} >+ >+shouldBe("test4()", "1"); >+ >+function test5() >+{ >+ var i = 0; >+ >+ switch (1) { >+ default: >+ while (1) { >+ break; >+ } >+ i++; >+ } >+ >+ return i; >+} >+ >+shouldBe("test5()", "1"); >+ >+var successfullyParsed = true;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
oliver
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 17932
: 21588