| 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 polymer.test.build.all_phases_test; | 5 library polymer.test.build.all_phases_test; |
| 6 | 6 |
| 7 import 'package:polymer/transformer.dart'; | 7 import 'package:polymer/transformer.dart'; |
| 8 import 'package:unittest/compact_vm_config.dart'; | 8 import 'package:unittest/compact_vm_config.dart'; |
| 9 | 9 |
| 10 import 'common.dart'; | 10 import 'common.dart'; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 String _sampleObservable(String className, String fieldName) => ''' | 191 String _sampleObservable(String className, String fieldName) => ''' |
| 192 library ${className}_$fieldName; | 192 library ${className}_$fieldName; |
| 193 import 'package:observe/observe.dart'; | 193 import 'package:observe/observe.dart'; |
| 194 | 194 |
| 195 class $className extends ObservableBase { | 195 class $className extends ObservableBase { |
| 196 @observable int $fieldName; | 196 @observable int $fieldName; |
| 197 $className(this.$fieldName); | 197 $className(this.$fieldName); |
| 198 } | 198 } |
| 199 '''; | 199 '''; |
| 200 | 200 |
| 201 String _sampleObservableOutput(String className, String fieldName) => ''' | 201 String _sampleObservableOutput(String className, String field) => |
| 202 library ${className}_$fieldName; | 202 "library ${className}_$field;\n" |
| 203 import 'package:observe/observe.dart'; | 203 "import 'package:observe/observe.dart';\n\n" |
| 204 | 204 "class $className extends ChangeNotifierBase {\n" |
| 205 class $className extends ChangeNotifierBase { | 205 " @observable int get $field => __\$$field; " |
| 206 int __\$$fieldName; | 206 "int __\$$field; " |
| 207 int get $fieldName => __\$$fieldName; | 207 "set $field(int value) { " |
| 208 set $fieldName(int value) { | 208 "__\$$field = notifyPropertyChange(#$field, __\$$field, value); " |
| 209 __\$$fieldName = notifyPropertyChange(const Symbol('$fieldName'), __\$$field
Name, value); | 209 "}\n" |
| 210 } | 210 " $className($field) : __\$$field = $field;\n" |
| 211 | 211 "}\n"; |
| 212 $className($fieldName) : __\$$fieldName = $fieldName; | |
| 213 } | |
| 214 '''; | |
| OLD | NEW |