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

Side by Side Diff: dart/pkg/intl/test/find_default_locale_standalone_test.dart

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library find_default_locale_browser_test; 5 #library('find_default_locale_browser_test');
6 6
7 import '../lib/intl.dart'; 7 #import('../lib/intl.dart');
8 import '../lib/intl_standalone.dart'; 8 #import('../lib/intl_standalone.dart');
9 import '../../unittest/unittest.dart'; 9 #import('../../unittest/unittest.dart');
10 10
11 main() { 11 main() {
12 test("Find system locale standalone", () { 12 test("Find system locale standalone", () {
13 // TODO (alanknight): This only verifies that we found some locale. We 13 // TODO (alanknight): This only verifies that we found some locale. We
14 // should find a way to force the system locale before the test is run 14 // should find a way to force the system locale before the test is run
15 // and then verify that it's actually the correct value. 15 // and then verify that it's actually the correct value.
16 Intl.systemLocale = "xx_YY"; 16 Intl.systemLocale = "xx_YY";
17 var callback = expectAsync1(verifyLocale); 17 var callback = expectAsync1(verifyLocale);
18 findSystemLocale().then(callback); 18 findSystemLocale().then(callback);
19 }); 19 });
20 } 20 }
21 21
22 verifyLocale(_) { 22 verifyLocale(_) {
23 expect(Intl.systemLocale, isNot(equals("xx_YY"))); 23 expect(Intl.systemLocale, isNot(equals("xx_YY")));
24 var pattern = new RegExp(r"\w\w_[A-Z0-9]+"); 24 var pattern = new RegExp(r"\w\w_[A-Z0-9]+");
25 var match = pattern.hasMatch(Intl.systemLocale); 25 var match = pattern.hasMatch(Intl.systemLocale);
26 expect(match, isTrue); 26 expect(match, isTrue);
27 } 27 }
OLDNEW
« no previous file with comments | « dart/pkg/intl/test/find_default_locale_browser_test.dart ('k') | dart/pkg/intl/test/intl_message_basic_example_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698