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

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

Issue 1799283002: Delete support for source mirrors (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: new attempt Created 4 years, 7 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/quarantined/mirrors_test.dart ('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) 2013, 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 library strip_comment_test;
6
7 import "package:expect/expect.dart";
8 import 'package:compiler/src/mirrors/mirrors_util.dart';
9
10 testComment(String strippedText, String commentText) {
11 Expect.stringEquals(strippedText, stripComment(commentText));
12 }
13
14 void main() {
15 testComment('', '//');
16 testComment('', '// ');
17 testComment(' ', '// ');
18 testComment('foo bar baz', '//foo bar baz');
19 testComment('foo bar baz', '// foo bar baz');
20 testComment('foo bar baz ', '// foo bar baz ');
21 testComment(' foo bar baz ', '// foo bar baz ');
22
23 testComment('', '///');
24 testComment('', '/// ');
25 testComment(' ', '/// ');
26 testComment('foo bar baz', '///foo bar baz');
27 testComment('foo bar baz', '/// foo bar baz');
28 testComment('foo bar baz ', '/// foo bar baz ');
29 testComment(' foo bar baz ', '/// foo bar baz ');
30
31 testComment('', '/**/');
32 testComment('', '/* */');
33 testComment(' ', '/* */');
34 testComment('foo bar baz', '/*foo bar baz*/');
35 testComment('foo bar baz', '/* foo bar baz*/');
36 testComment('foo bar baz ', '/* foo bar baz */');
37 testComment(' foo bar baz ', '/* foo bar baz */');
38 testComment('foo\nbar\nbaz', '/*foo\nbar\nbaz*/');
39 testComment('foo\nbar\nbaz', '/* foo\nbar\nbaz*/');
40 testComment('foo \n bar \n baz ', '/* foo \n bar \n baz */');
41 testComment('foo\nbar\nbaz', '/* foo\n *bar\n *baz*/');
42 testComment('foo\nbar\nbaz', '/* foo\n * bar\n * baz*/');
43 testComment('foo \nbar \nbaz ', '/* foo \n * bar \n * baz */');
44 testComment('\nfoo\nbar\nbaz',
45 '''/*
46 * foo
47 * bar
48 * baz*/''');
49 testComment('\nfoo\nbar\nbaz\n',
50 '''/*
51 * foo
52 * bar
53 * baz
54 */''');
55
56 testComment('', '/***/');
57 testComment('', '/** */');
58 testComment(' ', '/** */');
59 testComment('foo bar baz', '/**foo bar baz*/');
60 testComment('foo bar baz', '/** foo bar baz*/');
61 testComment('foo bar baz ', '/** foo bar baz */');
62 testComment(' foo bar baz ', '/** foo bar baz */');
63 testComment('foo\nbar\nbaz', '/**foo\nbar\nbaz*/');
64 testComment('foo\nbar\nbaz', '/** foo\nbar\nbaz*/');
65 testComment('foo \n bar \n baz ', '/** foo \n bar \n baz */');
66 testComment('foo\nbar\nbaz', '/** foo\n *bar\n *baz*/');
67 testComment('foo\nbar\nbaz', '/** foo\n * bar\n * baz*/');
68 testComment('foo \nbar \nbaz ', '/** foo \n * bar \n * baz */');
69 testComment('\nfoo\nbar\nbaz',
70 '''/**
71 * foo
72 * bar
73 * baz*/''');
74 testComment('\nfoo\nbar\nbaz\n',
75 '''/**
76 * foo
77 * bar
78 * baz
79 */''');
80 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/quarantined/mirrors_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698