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

Unified Diff: dart/compiler/javatests/com/google/dart/compiler/backend/js/JsFieldAccessOptTest.java

Issue 9353015: Remove dartc optimizing backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix minor test issues Created 8 years, 10 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
Index: dart/compiler/javatests/com/google/dart/compiler/backend/js/JsFieldAccessOptTest.java
diff --git a/dart/compiler/javatests/com/google/dart/compiler/backend/js/JsFieldAccessOptTest.java b/dart/compiler/javatests/com/google/dart/compiler/backend/js/JsFieldAccessOptTest.java
deleted file mode 100644
index 9675fd1338103872c34abdc6f3a41fe22ba638c0..0000000000000000000000000000000000000000
--- a/dart/compiler/javatests/com/google/dart/compiler/backend/js/JsFieldAccessOptTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.backend.js;
-
-import java.io.IOException;
-
-/**
- * Tests for binary expression optimizations.
- */
-public class JsFieldAccessOptTest extends ExprOptTest {
- private static final String DELIMETERS = "[;\\(\\)= ]";
-
- private final DollarMangler mangler = new DollarMangler();
-
- /**
- * Test that unary inc and dec operations on integers are not mangled into operator invocations.
- */
- public void testFieldAccessExprOpt() throws IOException {
- String js = compileSingleUnit(getName());
-
- // Ensure that _marker_0.x remains _marker_0.x for loads
- String findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_0", DELIMETERS, 2);
- assertEquals("_marker_0.x$setter", findMarkerAtOccurrence);
-
- // Ensure that _marker_0.x remains _marker_0.x for stores
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_0", DELIMETERS, 3);
- assertEquals("_marker_0.x$field", findMarkerAtOccurrence);
-
- // Ensure that _marker_1.x becomes _marker_1.x$setter(1) for stores
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_1", DELIMETERS, 2);
- assertEquals("_marker_1." + mangler.createSetterSyntax("x", null), findMarkerAtOccurrence);
-
- // Ensure that _marker_1.x becomes _marker_1.x$getter() for loads
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_1", DELIMETERS, 3);
- assertEquals("_marker_1." + mangler.createGetterSyntax("x", null), findMarkerAtOccurrence);
-
- // var _marker_2 = b.x$field;
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_2", "[;\\n]", 1);
- String[] parts = findMarkerAtOccurrence.split("[=]");
- assertTrue(parts.length == 2);
- assertEquals("b.x$field", parts[1].trim());
-
- // var _marker_3 = b.x_Getter_WithSideEffect$getter();
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_3", "[;\\n]", 1);
- parts = findMarkerAtOccurrence.split("[=]");
- assertTrue(parts.length == 2);
- assertEquals("b.x_Getter_WithSideEffect$getter()", parts[1].trim());
-
- // var _marker_4 = b.x_Getter_WithSideEffect$getter();
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_4", "[;\\n]", 1);
- parts = findMarkerAtOccurrence.split("[=]");
- assertTrue(parts.length == 2);
- assertEquals("b.x_Getter_WithSomeExpression$getter()", parts[1].trim());
-
- // var _marker_5 = b.A_Getter$getter();
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_5", "[;\\n]", 1);
- parts = findMarkerAtOccurrence.split("[=]");
- assertTrue(parts.length == 2);
- assertEquals("b.A_Getter$getter()", parts[1].trim());
-
- // var _marker_6 = b.X_Getter$getter();
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_6", "[;\\n]", 1);
- parts = findMarkerAtOccurrence.split("[=]");
- assertTrue(parts.length == 2);
- assertEquals("b.X_Getter$getter()", parts[1].trim());
-
- // var _marker_7 = c.x$field;
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_7", "[;\\n]", 1);
- parts = findMarkerAtOccurrence.split("[=]");
- assertTrue(parts.length == 2);
- assertEquals("c.x$field", parts[1].trim());
-
- // var _marker_8 = c.AXGetter$getter();
- findMarkerAtOccurrence = findMarkerAtOccurrence(js, "_marker_8", "[;\\n]", 1);
- parts = findMarkerAtOccurrence.split("[=]");
- assertTrue(parts.length == 2);
- assertEquals("c.AXGetter$getter()", parts[1].trim());
- }
-}

Powered by Google App Engine
This is Rietveld 408576698