| Index: compiler/javatests/com/google/dart/compiler/backend/js/RttTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/backend/js/RttTest.java b/compiler/javatests/com/google/dart/compiler/backend/js/RttTest.java
|
| deleted file mode 100644
|
| index 04c0458070c83cf8a766a186b116d951f5386b3f..0000000000000000000000000000000000000000
|
| --- a/compiler/javatests/com/google/dart/compiler/backend/js/RttTest.java
|
| +++ /dev/null
|
| @@ -1,105 +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;
|
| -
|
| -/**
|
| - * @author johnlenz@google.com (John Lenz)
|
| - */
|
| -public class RttTest extends SnippetTestCase {
|
| - private static final String DELIMETERS = "[\\n,;]";
|
| -
|
| - /**
|
| - * We should be able to generate RTT information for nested function parameters.
|
| - * <p>
|
| - * http://code.google.com/p/dart/issues/detail?id=962
|
| - */
|
| - public void test_nestedFunctionParameters() throws Exception {
|
| - String js =
|
| - compileSingleUnitSource(
|
| - makeCode(
|
| - "// filler filler filler filler filler filler filler filler filler filler",
|
| - "class Main {",
|
| - " foo() {",
|
| - " f1(f2(f3())) {}",
|
| - " }",
|
| - "}",
|
| - ""),
|
| - "Main");
|
| - {
|
| - String f3 = "RTT.createFunction(null, RTT.dynamicType.$lookupRTT())";
|
| - String f2 = "RTT.createFunction([" + f3 + "], RTT.dynamicType.$lookupRTT())";
|
| - String f1 = "RTT.createFunction([" + f2 + "], RTT.dynamicType.$lookupRTT())";
|
| - assertTrue(js.contains(f1 + ";"));
|
| - }
|
| - }
|
| -
|
| - public void testRuntimeTypes() throws IOException {
|
| - String js = compileSingleUnit(getName());
|
| - {
|
| - String init = findMarkerAtOccurrence(js, "_marker_B1", DELIMETERS, 1);
|
| - assertEquals("var _marker_B1 = $intern(Test_app4a54ba$B$Dart.B$$Factory())", init);
|
| - String expr = findMarkerAtOccurrence(js, "_marker_B1", "[\\n;]", 2);
|
| - assertEquals(
|
| - "a = !!(tmp$0 = _marker_B1 , tmp$0 != null && tmp$0.$implements$Test_app4a54ba$B$Dart)",
|
| - expr);
|
| - }
|
| - {
|
| - String init = findMarkerAtOccurrence(js, "_marker_B2", DELIMETERS, 1);
|
| - assertEquals("var _marker_B2 = Test_app4a54ba$B$Dart.B$$Factory()", init);
|
| - }
|
| - {
|
| - String init = findMarkerAtOccurrence(js, "_marker_C1", DELIMETERS, 1);
|
| - assertEquals("var _marker_C1 = $intern("
|
| - + "Test_app4a54ba$C$Dart.C$$Factory("
|
| - + "Test_app4a54ba$C$Dart.$lookupRTT())", init);
|
| - String expr = findMarkerAtOccurrence(js, "_marker_C1", "[\\n;]", 2);
|
| - assertEquals(
|
| - "a = !!(tmp$1 = _marker_C1 , tmp$1 != null && tmp$1.$implements$Test_app4a54ba$C$Dart)",
|
| - expr);
|
| - }
|
| - {
|
| - String init = findMarkerAtOccurrence(js, "_marker_C2", DELIMETERS, 1);
|
| - assertEquals("var _marker_C2 = $intern(Test_app4a54ba$C$Dart.C$$Factory("
|
| - + "Test_app4a54ba$C$Dart.$lookupRTT([String$Dart.$lookupRTT()]))", init);
|
| - String expr = findMarkerAtOccurrence(js, "_marker_C2", DELIMETERS, 2);
|
| - assertEquals("a = Test_app4a54ba$C$Dart.$lookupRTT([String$Dart.$lookupRTT()])"
|
| - + ".implementedBy(_marker_C2)", expr);
|
| - }
|
| - {
|
| - String init = findMarkerAtOccurrence(js, "_marker_C3", DELIMETERS, 1);
|
| - assertEquals("var _marker_C3 = "
|
| - + "Test_app4a54ba$C$Dart.C$$Factory("
|
| - + "Test_app4a54ba$C$Dart.$lookupRTT())", init);
|
| - }
|
| - {
|
| - String init = findMarkerAtOccurrence(js, "_marker_C4", DELIMETERS, 1);
|
| - assertEquals("var _marker_C4 = "
|
| - + "Test_app4a54ba$C$Dart.C$$Factory("
|
| - + "Test_app4a54ba$C$Dart.$lookupRTT([Object.$lookupRTT()]))", init);
|
| - String expr = findMarkerAtOccurrence(js, "_marker_C4", DELIMETERS, 2);
|
| - assertEquals("a = Test_app4a54ba$C$Dart.$lookupRTT([Object.$lookupRTT()])"
|
| - + ".implementedBy(_marker_C4)", expr);
|
| - }
|
| - {
|
| - String init = findMarkerAtOccurrence(js, "_marker_D1", DELIMETERS, 1);
|
| - assertEquals("var _marker_D1 = Test_app4a54ba$D$Dart.D$$Factory(null)", init);
|
| - String expr = findMarkerAtOccurrence(js, "_marker_D1", "[\\n;]", 2);
|
| - assertEquals(
|
| - "a = !!(tmp$2 = _marker_D1 , tmp$2 != null && tmp$2.$implements$Test_app4a54ba$D$Dart)",
|
| - expr);
|
| - }
|
| - {
|
| - String init = findMarkerAtOccurrence(js, "_marker_D2", DELIMETERS, 1);
|
| - assertEquals(
|
| - "var _marker_D2 = Test_app4a54ba$D$Dart.D$$Factory([String$Dart.$lookupRTT()])",
|
| - init);
|
| - String expr = findMarkerAtOccurrence(js, "_marker_D2", "[\\n;]", 2);
|
| - assertEquals(
|
| - "a = Test_app4a54ba$D$Dart.$lookupRTT([String$Dart.$lookupRTT()]).implementedBy(_marker_D2)",
|
| - expr);
|
| - }
|
| - }
|
| -}
|
|
|