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

Side by Side Diff: tests/compiler/dart2js/interpolation_folding_test.dart

Issue 13493011: Fix some tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 'package:expect/expect.dart';
5 import 'compiler_helper.dart'; 6 import 'compiler_helper.dart';
6 7
7 // Tests for 8 // Tests for
8 const String TEST_1 = r""" 9 const String TEST_1 = r"""
9 foo() { 10 foo() {
10 int a = 120; 11 int a = 120;
11 String b = 'hello'; 12 String b = 'hello';
12 return 'u${a}v${b}w'; 13 return 'u${a}v${b}w';
13 } 14 }
14 """; 15 """;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 check(TEST_2, r'"xxxxxyyyyy"'); 49 check(TEST_2, r'"xxxxxyyyyy"');
49 50
50 // 1. No merging of fragments that are multi-use. Prevents exponential code 51 // 1. No merging of fragments that are multi-use. Prevents exponential code
51 // and keeps author's manual CSE. 52 // and keeps author's manual CSE.
52 // 2. Know string values require no stringification. 53 // 2. Know string values require no stringification.
53 check(TEST_3, r'return b + "x" + b'); 54 check(TEST_3, r'return b + "x" + b');
54 55
55 // Known int value can be formatted directly. 56 // Known int value can be formatted directly.
56 check(TEST_4, r'return "" + b.length'); 57 check(TEST_4, r'return "" + b.length');
57 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698