| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 part of observable_tests; | 5 part of observable_tests; |
| 6 | 6 |
| 7 testObservableValue() { | 7 testObservableValue() { |
| 8 test('ObservableValue', () { | 8 test('ObservableValue', () { |
| 9 final value = new ObservableValue<String>('initial'); | 9 final value = new ObservableValue<String>('initial'); |
| 10 expect(value.value, equals('initial')); | 10 expect(value.value, equals('initial')); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 bool called = false; | 35 bool called = false; |
| 36 value.addChangeListener((summary) { called = true; }); | 36 value.addChangeListener((summary) { called = true; }); |
| 37 | 37 |
| 38 // Set it to the same value. | 38 // Set it to the same value. |
| 39 value.value = 'foo'; | 39 value.value = 'foo'; |
| 40 | 40 |
| 41 // Should not have gotten an event. | 41 // Should not have gotten an event. |
| 42 expect(called, isFalse); | 42 expect(called, isFalse); |
| 43 }); | 43 }); |
| 44 } | 44 } |
| OLD | NEW |