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

Side by Side Diff: runtime/tests/vm/dart/hello_fuchsia_test.dart

Issue 2579483002: Fuchsia: Directory listing (Closed)
Patch Set: Format Created 4 years 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
« no previous file with comments | « runtime/bin/directory_fuchsia.cc ('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
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import "dart:async"; 5 import "dart:async";
6 import "dart:convert"; 6 import "dart:convert";
7 import "dart:io"; 7 import "dart:io";
8 8
9 testAddressParse() async { 9 testAddressParse() async {
10 print(new InternetAddress("1.0.2.3").rawAddress); 10 print(new InternetAddress("1.0.2.3").rawAddress);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 } 380 }
381 381
382 Future testProcess() async { 382 Future testProcess() async {
383 Process p = await Process.start(Platform.executable, ["--version"]); 383 Process p = await Process.start(Platform.executable, ["--version"]);
384 p.stderr.transform(UTF8.decoder).listen(print); 384 p.stderr.transform(UTF8.decoder).listen(print);
385 int code = await p.exitCode; 385 int code = await p.exitCode;
386 print("dart --version exited with code $code"); 386 print("dart --version exited with code $code");
387 } 387 }
388 388
389 Future testLs(String path) async {
390 Stream<FileSystemEntity> stream = (new Directory(path)).list();
391 await for (FileSystemEntity fse in stream) {
392 print(fse.path);
393 }
394 }
395
389 main() async { 396 main() async {
390 print("Hello, Fuchsia!"); 397 print("Hello, Fuchsia!");
391 398
392 print("testAddressParse"); 399 print("testAddressParse");
393 await testAddressParse(); 400 await testAddressParse();
394 print("testAddressParse done"); 401 print("testAddressParse done");
395 402
396 print("testSimpleBind"); 403 print("testSimpleBind");
397 await testSimpleBind(); 404 await testSimpleBind();
398 print("testSimpleBind done"); 405 print("testSimpleBind done");
(...skipping 11 matching lines...) Expand all
410 print("testSimpleReadWriteShutdown done"); 417 print("testSimpleReadWriteShutdown done");
411 418
412 print("testGoogleHttp"); 419 print("testGoogleHttp");
413 await testGoogleHttp(null, 'pass'); 420 await testGoogleHttp(null, 'pass');
414 print("testGoogleHttp done"); 421 print("testGoogleHttp done");
415 422
416 print("testGoogleHttps"); 423 print("testGoogleHttps");
417 await testGoogleHttps(null, 'pass'); 424 await testGoogleHttps(null, 'pass');
418 print("testGoogleHttps done"); 425 print("testGoogleHttps done");
419 426
427 print("lsTest");
428 await testLs("/");
429 print("lsTest done");
430
420 print("testProcess"); 431 print("testProcess");
421 await testProcess(); 432 await testProcess();
422 print("testProcess done"); 433 print("testProcess done");
423 434
424 print("Goodbyte, Fuchsia!"); 435 print("Goodbyte, Fuchsia!");
425 } 436 }
OLDNEW
« no previous file with comments | « runtime/bin/directory_fuchsia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698