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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. 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 // Test that unused static consts are not emitted. 4 // Test that unused static consts are not emitted.
5 5
6 import "package:expect/expect.dart";
6 import 'compiler_helper.dart'; 7 import 'compiler_helper.dart';
7 8
8 const String TEST_GUIDE = r""" 9 const String TEST_GUIDE = r"""
9 class Guide { 10 class Guide {
10 static const LTUAE = 42; 11 static const LTUAE = 42;
11 static const TITLE = 'Life, the Universe and Everything'; 12 static const TITLE = 'Life, the Universe and Everything';
12 } 13 }
13 14
14 main() { 15 main() {
15 return "${Guide.LTUAE}, ${Guide.TITLE}"; 16 return "${Guide.LTUAE}, ${Guide.TITLE}";
16 } 17 }
17 """; 18 """;
18 19
19 main() { 20 main() {
20 String generated = compileAll(TEST_GUIDE); 21 String generated = compileAll(TEST_GUIDE);
21 Expect.isTrue(generated.contains("42")); 22 Expect.isTrue(generated.contains("42"));
22 Expect.isFalse(generated.contains("TITLE")); 23 Expect.isFalse(generated.contains("TITLE"));
23 } 24 }
24 25
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/deprecated_features_test.dart ('k') | tests/compiler/dart2js/erroneous_element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698