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

Unified Diff: pkg/analyzer_plugin/test/utilities/range_factory_test.dart

Issue 2869083002: Convert server to use RangeFactory (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_plugin/test/utilities/range_factory_test.dart
diff --git a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
index df120d832238e15bd01c2595d19a1b90c46b855c..9a166f521b06b1724219ccd6b7dfe17b506b4f6b 100644
--- a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
@@ -76,6 +76,14 @@ class SourceRangesTest extends AbstractSingleUnitTest {
expect(range.nodes([]), new SourceRange(0, 0));
}
+ test_offsetBy() {
+ expect(range.offsetBy(new SourceRange(7, 3), 2), new SourceRange(9, 3));
+ }
+
+ test_offsetEndIndex() {
+ expect(range.offsetEndIndex(6, 11), new SourceRange(6, 5));
+ }
+
test_startEnd_nodeNode() async {
await resolveTestUnit(' main() {}');
FunctionDeclaration mainFunction = testUnit.declarations[0];

Powered by Google App Engine
This is Rietveld 408576698