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

Unified Diff: frog/tests/frog/native_property_overrides_field1_frog_test.dart

Issue 10548047: Remove frog from the repository. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move test and update apidoc.gyp. Created 8 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 | « frog/tests/frog/native_named_constructors1_frog_test.js ('k') | frog/tests/hello.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/tests/frog/native_property_overrides_field1_frog_test.dart
diff --git a/frog/tests/frog/native_property_overrides_field1_frog_test.dart b/frog/tests/frog/native_property_overrides_field1_frog_test.dart
deleted file mode 100644
index f083af9067a0674497ce478f8f16081984ef6d8c..0000000000000000000000000000000000000000
--- a/frog/tests/frog/native_property_overrides_field1_frog_test.dart
+++ /dev/null
@@ -1,80 +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.
-
-// Test that Frog does not try to put JS get and set properties on a hidden
-// native class.
-//
-// I.e If B was not a hidden native class, Frog could generate the following:
-//
-// Object.defineProperty(B.prototype, "field", {
-// get: B.prototype.get$field,
-// set: B.prototype.set$field
-// });
-//
-// This is clearly not possible when the prototype of B is hidden.
-
-class A native "*A" {
- int field;
-}
-
-class B extends A native "*B" {
- int get field() native 'return this.field*100';
- void set field(int x) { super.field = x; }
-}
-
-
-makeA() native;
-makeB() native;
-
-void setup1() native """
-// Poison hidden native names 'A' and 'B' to prove the compiler didn't place
-// anthing on the hidden native class.
-A = null;
-B = null;
-""";
-
-void setup2() native """
-// This code is all inside 'setup' and so not accesible from the global scope.
-function A(){}
-function B(){}
-makeA = function(){return new A};
-makeB = function(){return new B};
-""";
-
-int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
-
-main() {
- setup1();
- setup2();
-
- var things = [makeA(), makeB()];
- {
- var a = things[inscrutable(0)];
- var b = things[inscrutable(1)];
-
- a.field = 2;
- Expect.equals(2, a.field);
-
- b.field = 3;
- Expect.equals(300, b.field);
- }
-
- {
- A a = things[inscrutable(0)];
- B b = things[inscrutable(1)];
-
- a.field = 2;
- Expect.equals(2, a.field);
-
- b.field = 3;
- Expect.equals(300, b.field);
- }
-
- {
- A a = things[inscrutable(1)]; // Actually a B.
-
- a.field = 4;
- Expect.equals(400, a.field);
- }
-}
« no previous file with comments | « frog/tests/frog/native_named_constructors1_frog_test.js ('k') | frog/tests/hello.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698