OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /// Common input/output used by builder, parser and end2end tests | 5 /// Common input/output used by builder, parser and end2end tests |
6 library test.common; | 6 library test.common; |
7 | 7 |
8 import 'package:source_maps/source_maps.dart'; | 8 import 'package:source_maps/source_maps.dart'; |
9 import 'package:source_span/source_span.dart'; | 9 import 'package:source_span/source_span.dart'; |
10 import 'package:unittest/unittest.dart'; | 10 import 'package:test/test.dart'; |
11 | 11 |
12 /// Content of the source file | 12 /// Content of the source file |
13 const String INPUT = ''' | 13 const String INPUT = ''' |
14 /** this is a comment. */ | 14 /** this is a comment. */ |
15 int longVar1 = 3; | 15 int longVar1 = 3; |
16 | 16 |
17 // this is a comment too | 17 // this is a comment too |
18 int longName(int longVar2) { | 18 int longName(int longVar2) { |
19 return longVar1 + longVar2; | 19 return longVar1 + longVar2; |
20 } | 20 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 expect(span.end.line, inputSpan.end.line); | 98 expect(span.end.line, inputSpan.end.line); |
99 expect(span.end.column, inputSpan.end.column); | 99 expect(span.end.column, inputSpan.end.column); |
100 expect(span.end.offset, span.start.offset + inputSpan.text.length); | 100 expect(span.end.offset, span.start.offset + inputSpan.text.length); |
101 if (realOffsets) expect(span.end.offset, inputSpan.end.offset); | 101 if (realOffsets) expect(span.end.offset, inputSpan.end.offset); |
102 } else { | 102 } else { |
103 expect(span.end.offset, span.start.offset); | 103 expect(span.end.offset, span.start.offset); |
104 expect(span.end.line, span.start.line); | 104 expect(span.end.line, span.start.line); |
105 expect(span.end.column, span.start.column); | 105 expect(span.end.column, span.start.column); |
106 } | 106 } |
107 } | 107 } |
OLD | NEW |