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

Side by Side Diff: dart/tests/standalone/io/file_constructor_test.dart

Issue 10983066: Minor improvement to File diagnostics (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added a test 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
« no previous file with comments | « dart/runtime/bin/file_impl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:io';
6
7 void main() {
8 bool developerMode = false;
9 assert(developerMode = true);
10 new File('blåbærgrød');
Mads Ager (google) 2012/09/28 09:48:56 This line and the next should be removed.
ahe 2012/09/28 10:42:57 Why?
Mads Ager (google) 2012/09/28 11:05:42 I was thinking that it was redundant because of al
11 new File('foo.txt');
12 try {
13 new File(null);
14 Expect.fail('ArgumentError expected.');
15 } on ArgumentError catch(e) {
16 // Expected.
17 }
18 try {
19 new File(1);
20 Expect.fail('Error expected.');
21 } on ArgumentError catch(e) {
22 if (developerMode) throw;
23 } on TypeError catch(e) {
24 if (!developerMode) throw;
25 }
26 }
OLDNEW
« no previous file with comments | « dart/runtime/bin/file_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698