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

Side by Side Diff: tests/language/symbol_literal_test.dart

Issue 2765693002: Update all tests (Closed)
Patch Set: Created 3 years, 9 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
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 // Test symbol literals. 5 // Test symbol literals.
6 6
7 library symbol_literal_test; 7 library symbol_literal_test;
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 10
(...skipping 24 matching lines...) Expand all
35 check(const Symbol("=="), #==); 35 check(const Symbol("=="), #==);
36 check(const Symbol("=="), # ==); 36 check(const Symbol("=="), # ==);
37 check(const Symbol("a.toString"), #a.toString); 37 check(const Symbol("a.toString"), #a.toString);
38 38
39 Expect.equals(1, testSwitch(#abc)); 39 Expect.equals(1, testSwitch(#abc));
40 40
41 const m = const <Symbol, int>{#A:0, #B:1}; 41 const m = const <Symbol, int>{#A:0, #B:1};
42 Expect.equals(1, m[#B]); 42 Expect.equals(1, m[#B]);
43 43
44 // Tries to call the symbol literal #a.toString 44 // Tries to call the symbol literal #a.toString
45 Expect.throws(() => #a.toString(), (e) => e is NoSuchMethodError); /// 01: sta tic type warning 45 Expect.throws(() => #a.toString(), (e) => e is NoSuchMethodError); //# 01: sta tic type warning
46 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698