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

Side by Side Diff: test/rules/whitespace_around_ops.dart

Issue 2189993002: Remove `whitespace_around_ops` pending re-name and re-design (#249). (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: Created 4 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 | « pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 // test w/ `dart test/util/solo_test.dart whitespace_around_ops`
6
7
8 // Define our own int so we don't need `int` in our mock SDK.
9 class MyInt {
10 MyInt operator -() => this;
11 MyInt operator ~() => this;
12 MyInt operator ~/(MyInt other) => this;
13 MyInt operator /(MyInt other) => this;
14 }
15
16 void main() {
17 MyInt f, g;
18 print(f ~/ g);
19 print(f~/ g); //LINT
20 print(f ~/g); //LINT
21 print(f~/g); //LINT
22 print(f/ ~g); //LINT
23 print(f /~g); //LINT
24 print(f / ~g); //OK
25 f =- g; //LINT
26 f = -g; //OK
27 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698