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

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

Issue 2563463002: Fuchsia: dart:io Processes (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/socket_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:io"; 7 import "dart:io";
7 8
8 testAddressParse() async { 9 testAddressParse() async {
9 print(new InternetAddress("1.0.2.3").rawAddress); 10 print(new InternetAddress("1.0.2.3").rawAddress);
10 print(new InternetAddress("1.0.2.3").type); 11 print(new InternetAddress("1.0.2.3").type);
11 12
12 print(new InternetAddress("::1").rawAddress); 13 print(new InternetAddress("::1").rawAddress);
13 print(new InternetAddress("::1").type); 14 print(new InternetAddress("::1").type);
14 15
15 try { 16 try {
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 print('drain failed: $e'); 372 print('drain failed: $e');
372 } 373 }
373 } catch (e) { 374 } catch (e) {
374 // Lookup failed or connection failed. Don't report a failure. 375 // Lookup failed or connection failed. Don't report a failure.
375 print("SocketException: $e"); 376 print("SocketException: $e");
376 } finally { 377 } finally {
377 client.close(); 378 client.close();
378 } 379 }
379 } 380 }
380 381
382 Future testProcess() async {
383 Process p = await Process.start(Platform.executable, ["--version"]);
384 p.stderr.transform(UTF8.decoder).listen(print);
385 int code = await p.exitCode;
386 print("dart --version exited with code $code");
387 }
388
381 main() async { 389 main() async {
382 print("Hello, Fuchsia!"); 390 print("Hello, Fuchsia!");
383 391
384 print("testAddressParse"); 392 print("testAddressParse");
385 await testAddressParse(); 393 await testAddressParse();
386 print("testAddressParse done"); 394 print("testAddressParse done");
387 395
388 print("testSimpleBind"); 396 print("testSimpleBind");
389 await testSimpleBind(); 397 await testSimpleBind();
390 print("testSimpleBind done"); 398 print("testSimpleBind done");
(...skipping 11 matching lines...) Expand all
402 print("testSimpleReadWriteShutdown done"); 410 print("testSimpleReadWriteShutdown done");
403 411
404 print("testGoogleHttp"); 412 print("testGoogleHttp");
405 await testGoogleHttp(null, 'pass'); 413 await testGoogleHttp(null, 'pass');
406 print("testGoogleHttp done"); 414 print("testGoogleHttp done");
407 415
408 print("testGoogleHttps"); 416 print("testGoogleHttps");
409 await testGoogleHttps(null, 'pass'); 417 await testGoogleHttps(null, 'pass');
410 print("testGoogleHttps done"); 418 print("testGoogleHttps done");
411 419
420 print("testProcess");
421 await testProcess();
422 print("testProcess done");
423
412 print("Goodbyte, Fuchsia!"); 424 print("Goodbyte, Fuchsia!");
413 } 425 }
OLDNEW
« no previous file with comments | « runtime/bin/socket_fuchsia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698