Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: pkg/observe/test/transform_test.dart

Issue 29823005: fixes to polymer, gets tests back to a stable state (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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:barback/barback.dart'; 6 import 'package:barback/barback.dart';
7 import 'package:observe/transform.dart'; 7 import 'package:observe/transform.dart';
8 import 'package:unittest/compact_vm_config.dart'; 8 import 'package:unittest/compact_vm_config.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 18 matching lines...) Expand all
29 'extends ChangeNotifier implements Interface'); 29 'extends ChangeNotifier implements Interface');
30 _testClause('extends Observable implements Interface<T>', 30 _testClause('extends Observable implements Interface<T>',
31 'extends ChangeNotifier implements Interface<T>'); 31 'extends ChangeNotifier implements Interface<T>');
32 _testClause('extends Base with Observable implements Interface', 32 _testClause('extends Base with Observable implements Interface',
33 'extends Base with ChangeNotifier implements Interface'); 33 'extends Base with ChangeNotifier implements Interface');
34 _testClause( 34 _testClause(
35 'extends Base with Mixin, Observable implements I1, I2', 35 'extends Base with Mixin, Observable implements I1, I2',
36 'extends Base with Mixin, ChangeNotifier implements I1, I2'); 36 'extends Base with Mixin, ChangeNotifier implements I1, I2');
37 }); 37 });
38 38
39 group('adds "with ChangeNotifier" given', () {
40 _testClause('', 'extends ChangeNotifier');
41 _testClause('extends Base', 'extends Base with ChangeNotifier');
42 _testClause('extends Base<T>', 'extends Base<T> with ChangeNotifier');
43 _testClause('extends Base with Mixin',
44 'extends Base with Mixin, ChangeNotifier');
45 _testClause('extends Base with Mixin<T>',
46 'extends Base with Mixin<T>, ChangeNotifier');
47 _testClause('extends Base with Mixin, Mixin2',
48 'extends Base with Mixin, Mixin2, ChangeNotifier');
49 _testClause('implements Interface',
50 'extends ChangeNotifier implements Interface');
51 _testClause('implements Interface<T>',
52 'extends ChangeNotifier implements Interface<T>');
53 _testClause('extends Base implements Interface',
54 'extends Base with ChangeNotifier implements Interface');
55 _testClause('extends Base with Mixin implements Interface, Interface2',
56 'extends Base with Mixin, ChangeNotifier implements Interface, Interface 2');
Siggi Cherem (dart-lang) 2013/10/21 21:07:42 80
Jennifer Messerly 2013/10/21 21:42:56 Done.
57 });
58
39 group('fixes contructor calls ', () { 59 group('fixes contructor calls ', () {
40 _testInitializers('this.a', '(a) : __\$a = a'); 60 _testInitializers('this.a', '(a) : __\$a = a');
41 _testInitializers('{this.a}', '({a}) : __\$a = a'); 61 _testInitializers('{this.a}', '({a}) : __\$a = a');
42 _testInitializers('[this.a]', '([a]) : __\$a = a'); 62 _testInitializers('[this.a]', '([a]) : __\$a = a');
43 _testInitializers('this.a, this.b', '(a, b) : __\$a = a, __\$b = b'); 63 _testInitializers('this.a, this.b', '(a, b) : __\$a = a, __\$b = b');
44 _testInitializers('{this.a, this.b}', '({a, b}) : __\$a = a, __\$b = b'); 64 _testInitializers('{this.a, this.b}', '({a, b}) : __\$a = a, __\$b = b');
45 _testInitializers('[this.a, this.b]', '([a, b]) : __\$a = a, __\$b = b'); 65 _testInitializers('[this.a, this.b]', '([a, b]) : __\$a = a, __\$b = b');
46 _testInitializers('this.a, [this.b]', '(a, [b]) : __\$a = a, __\$b = b'); 66 _testInitializers('this.a, [this.b]', '(a, [b]) : __\$a = a, __\$b = b');
47 _testInitializers('this.a, {this.b}', '(a, {b}) : __\$a = a, __\$b = b'); 67 _testInitializers('this.a, {this.b}', '(a, {b}) : __\$a = a, __\$b = b');
48 }); 68 });
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 " Foo\n" 207 " Foo\n"
188 " get foo => __\$foo; Foo __\$foo/*D*/= 1; " 208 " get foo => __\$foo; Foo __\$foo/*D*/= 1; "
189 "${_makeSetter('Foo', 'foo')} " 209 "${_makeSetter('Foo', 'foo')} "
190 "@reflectable @$meta @otherMetadata Foo get bar => __\$bar; " 210 "@reflectable @$meta @otherMetadata Foo get bar => __\$bar; "
191 "Foo __\$bar =/*A*/2/*B*/; ${_makeSetter('Foo', 'bar')}\n" 211 "Foo __\$bar =/*A*/2/*B*/; ${_makeSetter('Foo', 'bar')}\n"
192 " @reflectable @$meta @otherMetadata Foo get quux => __\$quux; " 212 " @reflectable @$meta @otherMetadata Foo get quux => __\$quux; "
193 "Foo __\$quux/*C*/; ${_makeSetter('Foo', 'quux')}\n\n" 213 "Foo __\$quux/*C*/; ${_makeSetter('Foo', 'quux')}\n\n"
194 " @reflectable @$meta dynamic get baz => __\$baz; dynamic __\$baz; " 214 " @reflectable @$meta dynamic get baz => __\$baz; dynamic __\$baz; "
195 "${_makeSetter('dynamic', 'baz')}\n" 215 "${_makeSetter('dynamic', 'baz')}\n"
196 "}\n"; 216 "}\n";
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698