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

Unified Diff: tests/standalone/javascript_compatibility_errors_test.dart

Issue 322633002: Share ic data between unoptimized and optimized static calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/javascript_compatibility_errors_test.dart
===================================================================
--- tests/standalone/javascript_compatibility_errors_test.dart (revision 37100)
+++ tests/standalone/javascript_compatibility_errors_test.dart (working copy)
@@ -158,16 +158,18 @@
e is Error && "$e".contains("Javascript Compatibility Error");
main() {
- // Since the warning (or error in case of --warning_as_error) is issued at
- // most once per location, the Expect.throw must guard the whole loop.
- Expect.throws(
- () {
- for (var i = 0; i < 20; i++) {
- h(i, i * 1.0);
- }
- },
- isJavascriptCompatibilityError);
-
+ // The warning (or error in case of --warning_as_error) is issued at
+ // most once per location.
+ var numWarnings = 0;
+ for (var i = 0; i < 20; i++) {
+ try {
+ h(i, i * 1.0);
+ } catch(e) {
+ Expect.isTrue(isJavascriptCompatibilityError(e));
+ numWarnings++;
+ }
+ }
+ Expect.equals(1, numWarnings);
// No warnings (errors) should be issued after this point.
for (var i = 0; i < 20; i++) {
k(i * 1.0, i);
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698