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

Unified Diff: tests/language/src/NativeNamedConstructors1FrogTest.dart

Issue 8985010: Move tests using frog 'native' extension from tests/language to frog/tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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: tests/language/src/NativeNamedConstructors1FrogTest.dart
diff --git a/tests/language/src/NativeNamedConstructors1FrogTest.dart b/tests/language/src/NativeNamedConstructors1FrogTest.dart
deleted file mode 100644
index 530cc36dc5f7be2aeab317808ab4b0e7070d636f..0000000000000000000000000000000000000000
--- a/tests/language/src/NativeNamedConstructors1FrogTest.dart
+++ /dev/null
@@ -1,32 +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.
-
-#library('X');
-#native('NativeNamedConstructors1FrogTest.js'); // Defines JS constructor 'A'.
-
-// The native class has several constructors which partition the behaviour of
-// the JS constructor function into several well-typed Dart constructors.
-
-class A native "A" {
-
- // factory constructors allow us to do computation ahead of the allocation.
- factory A(int len) { return _construct(len); }
-
- factory A.fromString(String s) {
- return _construct(s.length); // convert string to int.
- }
-
- // Helper that does the actual allocation and construction.
- static A _construct(v) native @'return new A(v);';
-
- foo() native 'return this._x;';
-}
-
-main() {
- var a1 = new A(100);
- var a2 = new A.fromString('Hello');
-
- Expect.equals(100, a1.foo());
- Expect.equals(5, a2.foo());
-}
« no previous file with comments | « tests/language/src/NativeLibrarySameNameUsedLib2.dart ('k') | tests/language/src/NativeNamedConstructors1FrogTest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698