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

Side by Side Diff: lib/src/backend/platform_selector/evaluator.dart

Issue 1041453002: Fix analysis warnings. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | lib/src/util/string_literal_iterator.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library unittest.backend.platform_selector.evaluator; 5 library unittest.backend.platform_selector.evaluator;
6 6
7 import 'package:source_span/source_span.dart';
8
9 import '../operating_system.dart'; 7 import '../operating_system.dart';
10 import '../test_platform.dart'; 8 import '../test_platform.dart';
11 import 'ast.dart'; 9 import 'ast.dart';
12 import 'visitor.dart'; 10 import 'visitor.dart';
13 11
14 /// A visitor for evaluating platform selectors against a specific 12 /// A visitor for evaluating platform selectors against a specific
15 /// [TestPlatform] and [OperatingSystem]. 13 /// [TestPlatform] and [OperatingSystem].
16 class Evaluator implements Visitor<bool> { 14 class Evaluator implements Visitor<bool> {
17 /// The platform to test against. 15 /// The platform to test against.
18 final TestPlatform _platform; 16 final TestPlatform _platform;
(...skipping 23 matching lines...) Expand all
42 bool visitOr(OrNode node) => 40 bool visitOr(OrNode node) =>
43 node.left.accept(this) || node.right.accept(this); 41 node.left.accept(this) || node.right.accept(this);
44 42
45 bool visitAnd(AndNode node) => 43 bool visitAnd(AndNode node) =>
46 node.left.accept(this) && node.right.accept(this); 44 node.left.accept(this) && node.right.accept(this);
47 45
48 bool visitConditional(ConditionalNode node) => node.condition.accept(this) 46 bool visitConditional(ConditionalNode node) => node.condition.accept(this)
49 ? node.whenTrue.accept(this) 47 ? node.whenTrue.accept(this)
50 : node.whenFalse.accept(this); 48 : node.whenFalse.accept(this);
51 } 49 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/util/string_literal_iterator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698