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: dart/frog/tests/frog/src/PrototypePatchingTest.dart

Issue 10164004: Remove frogsh. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 8 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 | « dart/frog/tests/frog/src/NodeTestHelper.dart ('k') | dart/frog/tests/frog/src/node_config.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/tests/frog/src/PrototypePatchingTest.dart
diff --git a/dart/frog/tests/frog/src/PrototypePatchingTest.dart b/dart/frog/tests/frog/src/PrototypePatchingTest.dart
deleted file mode 100644
index 7f742cce17a4e7e9f4daaaba2ed6003600cfe48d..0000000000000000000000000000000000000000
--- a/dart/frog/tests/frog/src/PrototypePatchingTest.dart
+++ /dev/null
@@ -1,76 +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('PrototypePatchingTest');
-
-/**
- * This simple little test ensures that the methods we add to the JavaScript
- * objects Array and Object with frog are non-enumerable so we don't break
- * arbitrary third-party JavaScript (!).
- */
-
-#import('node_config.dart');
-#import('../../../../lib/unittest/unittest.dart');
-#import('../../../lang.dart');
-#import('../../../file_system_node.dart');
-#import('../../../lib/node/node.dart');
-
-class Veggies {
- int radishes;
- Veggies() {
- radishes = 3;
- }
- String prefs() => 'I eat broccoli.';
- num get getRadishes() => radishes;
- String favorites() => "Sauteed Spinach!";
-}
-
-testMethodCount(testObject) native """
-function findMethodCount(obj) {
- var count = 0;
- for (var i in obj) {
- count++;
- }
- return count;
-}
-return findMethodCount(testObject);""";
-
-
-
-main() {
- useNodeConfiguration();
-
- // Get the home directory from our executable.
- var homedir = path.dirname(fs.realpathSync(process.argv[1]));
-
- var argv = new List.from(process.argv);
- argv.add('tests/frog/src/PrototypePatchingTest.dart');
-
- parseOptions(homedir, argv, new NodeFileSystem());
- initializeWorld(new NodeFileSystem());
-
- world.runCompilationPhases();
- var code = world.getGeneratedCode();
- List foo = new List();
- foo.add('e');
- foo.add('f');
- int count1 = testMethodCount(foo);
- foo = new List();
- int count2 = testMethodCount(foo);
-
-
- test('Testing method count for Lists (Arrays)', () {
- Expect.equals(true, count1 == 2);
- Expect.equals(true, count2 == 0);
- });
-
- Veggies veg = new Veggies();
- veg.prefs();
- veg.favorites(); // Called so they don't get optimized away.
- int count3 = testMethodCount(veg);
- test('Testing method count for Objects', () {
- Expect.equals(true, count3 == 3);
- });
-}
-
« no previous file with comments | « dart/frog/tests/frog/src/NodeTestHelper.dart ('k') | dart/frog/tests/frog/src/node_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698