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

Side by Side Diff: tests/standalone/src/SocketExceptionTest.dart

Issue 8318009: Update the streams interfaces (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from ager@ Created 9 years, 1 month 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 | « tests/standalone/src/ProcessStdoutTest.dart ('k') | tests/standalone/src/StringStreamTest.dart » ('j') | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Tests socket exceptions. 5 // Tests socket exceptions.
6 6
7 class SocketExceptionTest { 7 class SocketExceptionTest {
8 8
9 static final PORT = 0; 9 static final PORT = 0;
10 static final HOST = "127.0.0.1"; 10 static final HOST = "127.0.0.1";
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } catch (SocketIOException ex) { 86 } catch (SocketIOException ex) {
87 exceptionCaught = true; 87 exceptionCaught = true;
88 } catch (Exception ex) { 88 } catch (Exception ex) {
89 wrongExceptionCaught = true; 89 wrongExceptionCaught = true;
90 } 90 }
91 Expect.equals(true, exceptionCaught); 91 Expect.equals(true, exceptionCaught);
92 Expect.equals(true, !wrongExceptionCaught); 92 Expect.equals(true, !wrongExceptionCaught);
93 exceptionCaught = false; 93 exceptionCaught = false;
94 try { 94 try {
95 List<int> buffer = new List<int>(42); 95 List<int> buffer = new List<int>(42);
96 bool readDone = input.read(buffer, 0, 12, null); 96 bool readDone = input.readInto(buffer, 0, 12);
97 } catch (SocketIOException ex) { 97 } catch (SocketIOException ex) {
98 exceptionCaught = true; 98 exceptionCaught = true;
99 } catch (Exception ex) { 99 } catch (Exception ex) {
100 wrongExceptionCaught = true; 100 wrongExceptionCaught = true;
101 } 101 }
102 Expect.equals(true, exceptionCaught); 102 Expect.equals(true, exceptionCaught);
103 Expect.equals(true, !wrongExceptionCaught); 103 Expect.equals(true, !wrongExceptionCaught);
104 exceptionCaught = false; 104 exceptionCaught = false;
105 try { 105 try {
106 List<int> buffer = new List<int>(42); 106 List<int> buffer = new List<int>(42);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 static void testMain() { 179 static void testMain() {
180 serverSocketExceptionTest(); 180 serverSocketExceptionTest();
181 clientSocketExceptionTest(); 181 clientSocketExceptionTest();
182 indexOutOfRangeExceptionTest(); 182 indexOutOfRangeExceptionTest();
183 } 183 }
184 } 184 }
185 185
186 main() { 186 main() {
187 SocketExceptionTest.testMain(); 187 SocketExceptionTest.testMain();
188 } 188 }
OLDNEW
« no previous file with comments | « tests/standalone/src/ProcessStdoutTest.dart ('k') | tests/standalone/src/StringStreamTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698