Chromium Code Reviews| Index: sdk/lib/_internal/dartdoc/test/comment_map_test.dart | 
| diff --git a/sdk/lib/_internal/dartdoc/test/comment_map_test.dart b/sdk/lib/_internal/dartdoc/test/comment_map_test.dart | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..aa21b68a221ee55278cee81ba8fe3b53924de39e | 
| --- /dev/null | 
| +++ b/sdk/lib/_internal/dartdoc/test/comment_map_test.dart | 
| @@ -0,0 +1,38 @@ | 
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 
| +// for details. All rights reserved. Use of this source code is governed by a | 
| +// BSD-style license that can be found in the LICENSE file. | 
| + | 
| +/// Unit tests for comment map. | 
| +library commentMapTests; | 
| + | 
| +import 'dart:uri'; | 
| +import 'dart:mirrors'; | 
| + | 
| +import '../../compiler/implementation/scanner/scannerlib.dart' as dart2js; | 
| + | 
| +// TODO(rnystrom): Better path to unittest. | 
| +import '../../../../../pkg/unittest/lib/unittest.dart'; | 
| + | 
| +// TODO(rnystrom): Use "package:" URL (#4968). | 
| +part '../lib/src/dartdoc/comment_map.dart'; | 
| + | 
| +class FakeSourceLocation implements SourceLocation { | 
| + Uri get sourceUri => new Uri('file:///tmp/test.dart'); | 
| + int get offset => 63; | 
| + String get sourceText => """ | 
| + /// Testing | 
| 
 
Andrei Mouravski
2012/11/16 16:43:56
:] Add 2 more spaces before lines 23-26
It should
 
 | 
| + /// var testing = 'this is source code'; | 
| + get foo => 'bar'; | 
| +"""; | 
| +} | 
| + | 
| +main() { | 
| + test('triple slashed comments retain newlines', () { | 
| + Commentmap cm = new CommentMap(); | 
| + var comment = cm.find(new FakeSourceLocation()); | 
| + expect( | 
| + comment, | 
| + equals("Testing\n var testing = 'this is source code';") | 
| + ); | 
| + }); | 
| +} |