| 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 library eval_test; | 5 library eval_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:polymer_expressions/eval.dart'; | 9 import 'package:polymer_expressions/eval.dart'; |
| 10 import 'package:polymer_expressions/filter.dart'; | 10 import 'package:polymer_expressions/filter.dart'; |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 }); | 322 }); |
| 323 | 323 |
| 324 }); | 324 }); |
| 325 | 325 |
| 326 } | 326 } |
| 327 | 327 |
| 328 class Foo extends Object with ChangeNotifierMixin { | 328 class Foo extends Object with ChangeNotifierMixin { |
| 329 String _name; | 329 String _name; |
| 330 String get name => _name; | 330 String get name => _name; |
| 331 void set name(String n) { | 331 void set name(String n) { |
| 332 _name = notifyPropertyChange(const Symbol('name'), _name, n); | 332 _name = notifyPropertyChange(#name, _name, n); |
| 333 } | 333 } |
| 334 | 334 |
| 335 int age; | 335 int age; |
| 336 Foo child; | 336 Foo child; |
| 337 List<int> items; | 337 List<int> items; |
| 338 | 338 |
| 339 Foo({name, this.age, this.child, this.items}) : _name = name; | 339 Foo({name, this.age, this.child, this.items}) : _name = name; |
| 340 | 340 |
| 341 int x() => age * age; | 341 int x() => age * age; |
| 342 } | 342 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 return Future.wait([future, new Future(() { | 390 return Future.wait([future, new Future(() { |
| 391 expect(passed, true, reason: "Didn't receive a change notification on $s"); | 391 expect(passed, true, reason: "Didn't receive a change notification on $s"); |
| 392 })]); | 392 })]); |
| 393 } | 393 } |
| 394 | 394 |
| 395 // Regression test from https://code.google.com/p/dart/issues/detail?id=13459 | 395 // Regression test from https://code.google.com/p/dart/issues/detail?id=13459 |
| 396 class WordElement extends ObservableBase { | 396 class WordElement extends ObservableBase { |
| 397 @observable List chars1 = 'abcdefg'.split(''); | 397 @observable List chars1 = 'abcdefg'.split(''); |
| 398 List filteredList(List original) => [original[0], original[1]]; | 398 List filteredList(List original) => [original[0], original[1]]; |
| 399 } | 399 } |
| OLD | NEW |