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

Unified Diff: test/transformer_test.dart

Issue 951463004: support more types of expressions (Closed) Base URL: git@github.com:dart-lang/static-init.git@master
Patch Set: update pubspec/changelog Created 5 years, 10 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
« lib/build/initializer_plugin.dart ('K') | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/transformer_test.dart
diff --git a/test/transformer_test.dart b/test/transformer_test.dart
index 12e32598bc594aa0cb9ac468cdad074d8f39e614..ba873f8b3135a9ce5fb2d586ef767528e8436308 100644
--- a/test/transformer_test.dart
+++ b/test/transformer_test.dart
@@ -124,11 +124,22 @@ void dartEntryPointTests() {
@DynamicInit(null)
@DynamicInit(1)
@DynamicInit(1.1)
+ @DynamicInit('foo-\$x\${y}')
+ @DynamicInit(1 + 2)
+ @DynamicInit(1.0 + 0.2)
+ @DynamicInit(1 == 1)
@NamedArgInit(1, name: 'Bill')
library web_foo;
import 'package:test_initializers/common.dart';
import 'foo.dart';
+
+ const x = 'x';
+ const y = 'y';
+
+ class MyConst {
+ const MyConst;
+ }
''',
'a|web/foo.dart': '''
library foo;
@@ -161,6 +172,10 @@ void dartEntryPointTests() {
new InitEntry(const i1.DynamicInit(null), const LibraryIdentifier(#web_foo, null, 'index.dart')),
new InitEntry(const i1.DynamicInit(1), const LibraryIdentifier(#web_foo, null, 'index.dart')),
new InitEntry(const i1.DynamicInit(1.1), const LibraryIdentifier(#web_foo, null, 'index.dart')),
+ new InitEntry(const i1.DynamicInit('foo-xy'), const LibraryIdentifier(#web_foo, null, 'index.dart')),
+ new InitEntry(const i1.DynamicInit(3), const LibraryIdentifier(#web_foo, null, 'index.dart')),
+ new InitEntry(const i1.DynamicInit(1.2), const LibraryIdentifier(#web_foo, null, 'index.dart')),
+ new InitEntry(const i1.DynamicInit(true), const LibraryIdentifier(#web_foo, null, 'index.dart')),
new InitEntry(const i1.NamedArgInit(1, name: 'Bill'), const LibraryIdentifier(#web_foo, null, 'index.dart')),
]);
« lib/build/initializer_plugin.dart ('K') | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698