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

Unified Diff: tests/compiler/dart2js/kernel/expressions_test.dart

Issue 2357513005: kernel->ssa: support string concatenations/interpolations (Closed)
Patch Set: fix Created 4 years, 3 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
Index: tests/compiler/dart2js/kernel/expressions_test.dart
diff --git a/tests/compiler/dart2js/kernel/expressions_test.dart b/tests/compiler/dart2js/kernel/expressions_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7074c4cabd717f09f75015983660148b5905d31c
--- /dev/null
+++ b/tests/compiler/dart2js/kernel/expressions_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2016, 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:test/test.dart';
+
+import 'helper.dart' show check;
+
+main() {
+ group('string literals', () {
+ test('juxtaposition', () {
+ return check('main() { return "abc" "def"; }');
+ });
+ test('literal interpolation', () {
+ return check('main() { return "abc\${1}def"; }');
+ });
+ test('complex interpolation', () {
+ String code = '''
+foo() => 1;
+main() => "abc\${foo()}"
+ "\${foo()}def";''';
+ return check(code);
+ });
+ });
+}
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_string_builder.dart ('k') | tests/compiler/dart2js/kernel/literals_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698