| Index: dart/tests/try/source_update_test.dart
|
| diff --git a/dart/tests/try/source_update_test.dart b/dart/tests/try/source_update_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1ea94cad3b311a2b90dd1f6f5552865627291929
|
| --- /dev/null
|
| +++ b/dart/tests/try/source_update_test.dart
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2014, 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.
|
| +
|
| +// SharedOptions=--package-root=sdk/lib/_internal/
|
| +
|
| +import 'test_try.dart';
|
| +
|
| +InteractionContext interaction;
|
| +
|
| +void main() {
|
| + interaction = mockTryDartInteraction();
|
| +
|
| + runTests(<TestCase>[
|
| +
|
| + new TestCase('Test setting full source', () {
|
| + clearEditorPaneWithoutNotifications();
|
| + mainEditorPane.appendText('Foo\nBar');
|
| + }, () {
|
| + expectSource('Foo\nBar');
|
| + }),
|
| +
|
| + new TestCase('Test modifying a single line', () {
|
| + Element lastLine = mainEditorPane.lastChild;
|
| + lastLine.appendText('Baz');
|
| + }, () {
|
| + expectSource('Foo\nBarBaz');
|
| + }),
|
| +
|
| + ]);
|
| +}
|
| +
|
| +void expectSource(String expected) {
|
| + String actualSource = interaction.currentCompilationUnit.content;
|
| + Expect.stringEquals(expected, actualSource);
|
| +}
|
|
|