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

Unified Diff: test/testing.dart

Issue 1266483003: format with dart_style 0.2.0-rc.3 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 | « test/report_test.dart ('k') | tool/patch_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/testing.dart
diff --git a/test/testing.dart b/test/testing.dart
index 5c66f96a5d4b524a21d6918db0ccb1f493e5cebb..46e926cd6063c80f54bc3b65dddc1179695c70d5 100644
--- a/test/testing.dart
+++ b/test/testing.dart
@@ -28,16 +28,17 @@ import 'package:dev_compiler/src/options.dart';
import 'package:dev_compiler/src/utils.dart';
/// Shared analysis context used for compilation.
-final realSdkContext = createAnalysisContextWithSources(new StrongModeOptions(),
+final realSdkContext = createAnalysisContextWithSources(
+ new StrongModeOptions(),
new SourceResolverOptions(
dartSdkPath: getSdkDir().path,
customUrlMappings: {
- 'package:expect/expect.dart': _testCodegenPath('expect.dart'),
- 'package:async_helper/async_helper.dart':
- _testCodegenPath('async_helper.dart'),
- 'package:unittest/unittest.dart': _testCodegenPath('unittest.dart'),
- 'package:dom/dom.dart': _testCodegenPath('sunflower', 'dom.dart')
-}))..analysisOptions = (new AnalysisOptionsImpl()..cacheSize = 512);
+ 'package:expect/expect.dart': _testCodegenPath('expect.dart'),
+ 'package:async_helper/async_helper.dart':
+ _testCodegenPath('async_helper.dart'),
+ 'package:unittest/unittest.dart': _testCodegenPath('unittest.dart'),
+ 'package:dom/dom.dart': _testCodegenPath('sunflower', 'dom.dart')
+ }))..analysisOptions = (new AnalysisOptionsImpl()..cacheSize = 512);
String _testCodegenPath(String p1, [String p2]) =>
path.join(testDirectory, 'codegen', p1, p2);
@@ -71,8 +72,10 @@ class _TestUtils {}
/// '''
/// });
///
-void testChecker(Map<String, String> testFiles, {String sdkDir,
- customUrlMappings: const {}, relaxedCasts: true,
+void testChecker(Map<String, String> testFiles,
+ {String sdkDir,
+ customUrlMappings: const {},
+ relaxedCasts: true,
inferDownwards: StrongModeOptions.inferDownwardsDefault,
inferFromOverrides: StrongModeOptions.inferFromOverridesDefault,
inferTransitively: StrongModeOptions.inferTransitivelyDefault,
@@ -88,13 +91,15 @@ void testChecker(Map<String, String> testFiles, {String sdkDir,
useMockSdk: sdkDir == null,
dartSdkPath: sdkDir), fileResolvers: [uriResolver]);
- var checker = new StrongChecker(context, new StrongModeOptions(
- relaxedCasts: relaxedCasts,
- inferDownwards: inferDownwards,
- inferFromOverrides: inferFromOverrides,
- inferTransitively: inferTransitively,
- nonnullableTypes: nonnullableTypes,
- hints: true));
+ var checker = new StrongChecker(
+ context,
+ new StrongModeOptions(
+ relaxedCasts: relaxedCasts,
+ inferDownwards: inferDownwards,
+ inferFromOverrides: inferFromOverrides,
+ inferTransitively: inferTransitively,
+ nonnullableTypes: nonnullableTypes,
+ hints: true));
// Run the checker on /main.dart.
var mainSource = uriResolver.resolveAbsolute(new Uri.file('/main.dart'));
@@ -196,7 +201,6 @@ class _ExpectedErrorVisitor extends UnifyingAstVisitor {
}
void _expectError(AstNode node, _ErrorExpectation expected) {
-
// See if we can find the expected error in our actual errors
for (var actual in _actualErrors) {
if (actual.offset == node.offset && actual.length == node.length) {
« no previous file with comments | « test/report_test.dart ('k') | tool/patch_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698