| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'package:observe/observe.dart'; | 6 import 'package:observe/observe.dart'; |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
| 8 import 'package:observe/src/path_observer.dart' | 8 import 'package:observe/src/path_observer.dart' |
| 9 show getSegmentsOfPropertyPathForTesting, | 9 show getSegmentsOfPropertyPathForTesting, |
| 10 observerSentinelForTesting; | 10 observerSentinelForTesting; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 expectPath('opt0', 'opt0', 1, [#opt0]); | 65 expectPath('opt0', 'opt0', 1, [#opt0]); |
| 66 // Dart note: Modified to avoid a private Dart symbol: | 66 // Dart note: Modified to avoid a private Dart symbol: |
| 67 expectPath(r'$foo.$bar.baz_', r'$foo.$bar.baz_', 3, | 67 expectPath(r'$foo.$bar.baz_', r'$foo.$bar.baz_', 3, |
| 68 [#$foo, #$bar, #baz_]); | 68 [#$foo, #$bar, #baz_]); |
| 69 // Dart note: this test is different because we treat ["baz"] always as a | 69 // Dart note: this test is different because we treat ["baz"] always as a |
| 70 // indexing operation. | 70 // indexing operation. |
| 71 expectPath('foo["baz"]', 'foo.baz', 2, [#foo, #baz]); | 71 expectPath('foo["baz"]', 'foo.baz', 2, [#foo, #baz]); |
| 72 expectPath('foo["b\\"az"]', 'foo["b\\"az"]', 2, [#foo, 'b"az']); | 72 expectPath('foo["b\\"az"]', 'foo["b\\"az"]', 2, [#foo, 'b"az']); |
| 73 expectPath("foo['b\\'az']", 'foo["b\'az"]', 2, [#foo, "b'az"]); | 73 expectPath("foo['b\\'az']", 'foo["b\'az"]', 2, [#foo, "b'az"]); |
| 74 expectPath([#a, #b], 'a.b', 2, [#a, #b]); | 74 expectPath([#a, #b], 'a.b', 2, [#a, #b]); |
| 75 expectPath([], '', 0, []); |
| 75 | 76 |
| 76 expectPath('.', '<invalid path>', 0); | 77 expectPath('.', '<invalid path>', 0); |
| 77 expectPath(' . ', '<invalid path>', 0); | 78 expectPath(' . ', '<invalid path>', 0); |
| 78 expectPath('..', '<invalid path>', 0); | 79 expectPath('..', '<invalid path>', 0); |
| 79 expectPath('a[4', '<invalid path>', 0); | 80 expectPath('a[4', '<invalid path>', 0); |
| 80 expectPath('a.b.', '<invalid path>', 0); | 81 expectPath('a.b.', '<invalid path>', 0); |
| 81 expectPath('a,b', '<invalid path>', 0); | 82 expectPath('a,b', '<invalid path>', 0); |
| 82 expectPath('a["foo]', '<invalid path>', 0); | 83 expectPath('a["foo]', '<invalid path>', 0); |
| 83 expectPath('[0x04]', '<invalid path>', 0); | 84 expectPath('[0x04]', '<invalid path>', 0); |
| 84 expectPath('[0foo]', '<invalid path>', 0); | 85 expectPath('[0foo]', '<invalid path>', 0); |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 @observable var c; | 737 @observable var c; |
| 737 | 738 |
| 738 WatcherModel(); | 739 WatcherModel(); |
| 739 } | 740 } |
| 740 | 741 |
| 741 class Foo { | 742 class Foo { |
| 742 var value; | 743 var value; |
| 743 Foo(this.value); | 744 Foo(this.value); |
| 744 String toString() => 'Foo$value'; | 745 String toString() => 'Foo$value'; |
| 745 } | 746 } |
| OLD | NEW |