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

Side by Side Diff: sdk/lib/_internal/dartdoc/test/comment_map_test.dart

Issue 11358134: Fix for triple-slash dartdocs (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Indent multi-line string 2 more spaces. Created 8 years, 1 month 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 | « sdk/lib/_internal/dartdoc/lib/src/dartdoc/comment_map.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) 2012, 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 /// Unit tests for comment map.
6 library commentMapTests;
7
8 import 'dart:uri';
9 import 'dart:mirrors';
10
11 import '../../compiler/implementation/scanner/scannerlib.dart' as dart2js;
12
13 // TODO(rnystrom): Better path to unittest.
14 import '../../../../../pkg/unittest/lib/unittest.dart';
15
16 // TODO(rnystrom): Use "package:" URL (#4968).
17 part '../lib/src/dartdoc/comment_map.dart';
18
19 class FakeSourceLocation implements SourceLocation {
20 Uri get sourceUri => new Uri('file:///tmp/test.dart');
21 int get offset => 69;
22 String get sourceText => """
23 /// Testing
24 /// var testing = 'this is source code';
25 get foo => 'bar';
26 """;
27 }
28
29 main() {
30 test('triple slashed comments retain newlines', () {
31 Commentmap cm = new CommentMap();
32 var comment = cm.find(new FakeSourceLocation());
33 expect(
34 comment,
35 equals("Testing\n var testing = 'this is source code';")
36 );
37 });
38 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/src/dartdoc/comment_map.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698