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

Unified Diff: frog/tests/leg/src/TypeGuardUnuserTest.dart

Issue 10250002: test rename overhaul: step 5 - frog and leg tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: frog/tests/leg/src/TypeGuardUnuserTest.dart
diff --git a/frog/tests/leg/src/TypeGuardUnuserTest.dart b/frog/tests/leg/src/TypeGuardUnuserTest.dart
deleted file mode 100644
index 80864cf74bbdb42a85ff96612406020f936f53b1..0000000000000000000000000000000000000000
--- a/frog/tests/leg/src/TypeGuardUnuserTest.dart
+++ /dev/null
@@ -1,67 +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.
-
-#import("compiler_helper.dart");
-
-final String TEST_ONE = @"""
-foo(a) {
- int c = foo(1);
- if (a) c = foo(2);
- return c;
-}
-""";
-
-
-final String TEST_TWO = @"""
-bar(a) {}
-foo(d) {
- int a = 1;
- int c = foo(1);
- if (true) {}
- return a + c;
-}
-""";
-
-final String TEST_THREE = @"""
-foo(int param1, int param2) {
- return 0 + param1 + param2;
-}
-""";
-
-final String TEST_THREE_WITH_BAILOUT = @"""
-foo(int param1, int param2) {
- var t;
- for (int i = 0; i < 1; i++) {
- t = 0 + param1 + param2;
- }
- return t;
-}
-""";
-
-main() {
- String generated = compile(TEST_ONE, 'foo');
- RegExp regexp = new RegExp(getIntTypeCheck(anyIdentifier));
- Iterator<Match> matches = regexp.allMatches(generated).iterator();
- checkNumberOfMatches(matches, 0);
-
- regexp = const RegExp("return c;");
- Expect.isTrue(regexp.hasMatch(generated));
-
- generated = compile(TEST_TWO, 'foo');
- regexp = const RegExp("foo\\(1\\)");
- matches = regexp.allMatches(generated).iterator();
- checkNumberOfMatches(matches, 1);
-
- generated = compile(TEST_THREE, 'foo');
- regexp = new RegExp(getNumberTypeCheck('param1'));
- Expect.isTrue(!regexp.hasMatch(generated));
- regexp = new RegExp(getNumberTypeCheck('param2'));
- Expect.isTrue(!regexp.hasMatch(generated));
-
- generated = compile(TEST_THREE_WITH_BAILOUT, 'foo');
- regexp = new RegExp(getNumberTypeCheck('param1'));
- Expect.isTrue(regexp.hasMatch(generated));
- regexp = new RegExp(getNumberTypeCheck('param2'));
- Expect.isTrue(regexp.hasMatch(generated));
-}

Powered by Google App Engine
This is Rietveld 408576698