Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1105)

Side by Side Diff: test/mjsunit/regress/regress-70066.js

Issue 1544793002: [tests] Fix bogus uses of assertThrows. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/mjsunit.js ('k') | test/mjsunit/third_party/regexp-pcre/regexp-pcre.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 assertEquals(void 0, o.value, "test7"); 113 assertEquals(void 0, o.value, "test7");
114 assertEquals(0, x, "test7"); // Global x is undisturbed. 114 assertEquals(0, x, "test7"); // Global x is undisturbed.
115 115
116 116
117 // Delete on a global property. 117 // Delete on a global property.
118 function test8() { 118 function test8() {
119 with ({}) { return delete x; } 119 with ({}) { return delete x; }
120 } 120 }
121 121
122 assertEquals(true, test8(), "test8"); 122 assertEquals(true, test8(), "test8");
123 assertThrows("x", "test8"); // Global x should be deleted. 123 assertThrows("x"); // Global x should be deleted.
124 124
125 125
126 // Delete on a property that is not found anywhere. 126 // Delete on a property that is not found anywhere.
127 function test9() { 127 function test9() {
128 with ({}) { return delete x; } 128 with ({}) { return delete x; }
129 } 129 }
130 130
131 assertThrows("x", "test9"); // Make sure it's not there. 131 assertThrows("x"); // Make sure it's not there.
132 assertEquals(true, test9(), "test9"); 132 assertEquals(true, test9(), "test9");
133 133
134 134
135 // Delete on a DONT_DELETE property of the global object. 135 // Delete on a DONT_DELETE property of the global object.
136 var y = 10; 136 var y = 10;
137 function test10() { 137 function test10() {
138 with ({}) { return delete y; } 138 with ({}) { return delete y; }
139 } 139 }
140 140
141 assertEquals(false, test10(), "test10"); 141 assertEquals(false, test10(), "test10");
142 assertEquals(10, y, "test10"); 142 assertEquals(10, y, "test10");
OLDNEW
« no previous file with comments | « test/mjsunit/mjsunit.js ('k') | test/mjsunit/third_party/regexp-pcre/regexp-pcre.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698