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

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

Issue 11726005: Dartdoc comments retrieved as metadata through dart2js mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « tests/compiler/dart2js/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 '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util. dart';
8
9 testComment(String strippedText, String commentText) {
10 Expect.stringEquals(strippedText, stripComment(commentText));
11 }
12
13 void main() {
14 testComment('', '//');
15 testComment('', '// ');
16 testComment(' ', '// ');
17 testComment('foo bar baz', '//foo bar baz');
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
22 testComment('', '///');
23 testComment('', '/// ');
24 testComment(' ', '/// ');
25 testComment('foo bar baz', '///foo bar baz');
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
30 testComment('', '/**/');
31 testComment('', '/* */');
32 testComment(' ', '/* */');
33 testComment('foo bar baz', '/*foo bar baz*/');
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\nbar\nbaz', '/*foo\nbar\nbaz*/');
38 testComment('foo\nbar\nbaz', '/* foo\nbar\nbaz*/');
39 testComment('foo \n bar \n baz ', '/* foo \n bar \n baz */');
40 testComment('foo\nbar\nbaz', '/* 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('\nfoo\nbar\nbaz',
44 '''/*
45 * foo
46 * bar
47 * baz*/''');
48 testComment('\nfoo\nbar\nbaz\n',
49 '''/*
50 * foo
51 * bar
52 * baz
53 */''');
54
55 testComment('', '/***/');
56 testComment('', '/** */');
57 testComment(' ', '/** */');
58 testComment('foo bar baz', '/**foo bar baz*/');
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\nbar\nbaz', '/**foo\nbar\nbaz*/');
63 testComment('foo\nbar\nbaz', '/** foo\nbar\nbaz*/');
64 testComment('foo \n bar \n baz ', '/** foo \n bar \n baz */');
65 testComment('foo\nbar\nbaz', '/** 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('\nfoo\nbar\nbaz',
69 '''/**
70 * foo
71 * bar
72 * baz*/''');
73 testComment('\nfoo\nbar\nbaz\n',
74 '''/**
75 * foo
76 * bar
77 * baz
78 */''');
79 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mirrors_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698