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

Side by Side Diff: tests/compiler/dart2js/use_strict_test.dart

Issue 1278503004: Revert "Move dart2jslib parts into separate libraries." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/unparser_test.dart ('k') | tests/compiler/dart2js/world_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async';
6
5 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
6 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
7 import 'memory_compiler.dart'; 9 import 'memory_compiler.dart';
8 10
9 // Use strict does not allow parameters or locals named "arguments" or "eval". 11 // Use strict does not allow parameters or locals named "arguments" or "eval".
10 12
11 const MEMORY_SOURCE_FILES = const { 13 const MEMORY_SOURCE_FILES = const {
12 'main.dart': ''' 14 'main.dart': '''
13 class A { 15 class A {
14 final arguments; 16 final arguments;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 .where((String line) => !commentLine.hasMatch(line)) 60 .where((String line) => !commentLine.hasMatch(line))
59 .join("\n"); 61 .join("\n");
60 62
61 // TODO(floitsch): we will need to adjust this filter if we start using 63 // TODO(floitsch): we will need to adjust this filter if we start using
62 // 'eval' or 'arguments' ourselves. Currently we disallow any 'eval' or 64 // 'eval' or 'arguments' ourselves. Currently we disallow any 'eval' or
63 // 'arguments'. 65 // 'arguments'.
64 RegExp re = new RegExp(r'[^\w$](arguments|eval)[^\w$]'); 66 RegExp re = new RegExp(r'[^\w$](arguments|eval)[^\w$]');
65 Expect.isFalse(re.hasMatch(filtered)); 67 Expect.isFalse(re.hasMatch(filtered));
66 }); 68 });
67 } 69 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/unparser_test.dart ('k') | tests/compiler/dart2js/world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698