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

Unified Diff: tests/lib/platform/path_separator_test.dart

Issue 36883005: Add fields to platform library, implement them on runtime dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address all comments Created 7 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 side-by-side diff with in-line comments
Download patch
Index: tests/lib/platform/path_separator_test.dart
diff --git a/tests/language/list_tracer_call_last_test.dart b/tests/lib/platform/path_separator_test.dart
similarity index 53%
copy from tests/language/list_tracer_call_last_test.dart
copy to tests/lib/platform/path_separator_test.dart
index dbaf1360ce5144e2afbb1cc6c13199f2b4f281f6..f40c941498ff4be4dac3b88312d04b0da8a30113 100644
--- a/tests/language/list_tracer_call_last_test.dart
+++ b/tests/lib/platform/path_separator_test.dart
@@ -2,12 +2,14 @@
// 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.
-// dart2js used to fail this test, by inferring that `a.last()`
-// returns the element type of the `a` list.
+import "dart:platform" as platform;
+
+import "package:unittest/unittest.dart";
main() {
- var a = [() => 123];
- if (a.last() is! num) {
- throw 'Test failed';
+ if (platform.isWindows) {
+ expect(platform.pathSeparator, '\\');
+ } else {
+ expect(platform.pathSeparator, '/');
}
}

Powered by Google App Engine
This is Rietveld 408576698