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

Unified Diff: test/observable_transform_test.dart

Issue 22962005: Merge pull request #581 from kevmoo/polymer (Closed) Base URL: https://github.com/dart-lang/web-ui.git@polymer
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/css_test.dart ('k') | test/refactor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/observable_transform_test.dart
diff --git a/test/observable_transform_test.dart b/test/observable_transform_test.dart
deleted file mode 100644
index 373883ffed3084c1aac8291fd0194a671bc75b3a..0000000000000000000000000000000000000000
--- a/test/observable_transform_test.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-import 'package:polymer/src/dart_parser.dart';
-import 'package:polymer/src/messages.dart';
-import 'package:polymer/src/observable_transform.dart';
-
-main() {
- useCompactVMConfiguration();
-
- group('fixes contructor calls ', () {
- testInitializers('this.a', '(a) : __\$a = a');
- testInitializers('{this.a}', '({a}) : __\$a = a');
- testInitializers('[this.a]', '([a]) : __\$a = a');
- testInitializers('this.a, this.b', '(a, b) : __\$a = a, __\$b = b');
- testInitializers('{this.a, this.b}', '({a, b}) : __\$a = a, __\$b = b');
- testInitializers('[this.a, this.b]', '([a, b]) : __\$a = a, __\$b = b');
- testInitializers('this.a, [this.b]', '(a, [b]) : __\$a = a, __\$b = b');
- testInitializers('this.a, {this.b}', '(a, {b}) : __\$a = a, __\$b = b');
- });
-}
-
-testInitializers(String args, String expected) {
- test(args, () {
-
- var constructor = 'MyClass(';
-
- var code = '''
- class MyClass {
- @observable var a;
- @observable var b;
- MyClass($args);
- }''';
-
- var edit = transformObservables(parseDartCode('<test>', code, null),
- new Messages.silent());
- expect(edit, isNotNull);
- var output = (edit.commit()..build('<test>')).text;
-
- var begin = output.indexOf(constructor) + constructor.length - 1;
- var end = output.indexOf(';', begin);
- if (end == -1) end = output.length;
- var init = output.substring(begin, end).trim().replaceAll(' ', ' ');
-
- expect(init, expected);
- });
-}
« no previous file with comments | « test/css_test.dart ('k') | test/refactor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698