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

Unified Diff: tests/standalone/src/io/ListOutputStreamTest.dart

Issue 9653026: Add writeString method to OutputStream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 8 years, 9 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
« no previous file with comments | « tests/standalone/src/io/HttpTest.dart ('k') | tests/standalone/src/io/StringStreamTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/ListOutputStreamTest.dart
diff --git a/tests/standalone/src/io/ListOutputStreamTest.dart b/tests/standalone/src/io/ListOutputStreamTest.dart
index cb6ceacb9ebca1a59caf83dd4ed2ae7e4b271a4b..aadf60f90b88d8d7401651a32bf7395afa708ef4 100644
--- a/tests/standalone/src/io/ListOutputStreamTest.dart
+++ b/tests/standalone/src/io/ListOutputStreamTest.dart
@@ -85,9 +85,34 @@ void testListOutputStream2() {
donePort.receive((x,y) => donePort.close());
}
+void testListOutputStream3() {
+ OutputStream stream = new ListOutputStream();
+ ReceivePort donePort = new ReceivePort();
+ void onNoPendingWrites() {
+ stream.writeString("abcdABCD");
+ stream.writeString("abcdABCD", Encoding.UTF_8);
+ stream.writeString("abcdABCD", Encoding.ISO_8859_1);
+ stream.writeString("abcdABCD", Encoding.ASCII);
+ stream.writeString("æøå", Encoding.UTF_8);
+ stream.close();
+ }
+
+ void onClosed() {
+ var contents = stream.contents();
+ Expect.equals(38, contents.length);
+ donePort.toSendPort().send(null);
+ }
+
+ stream.onNoPendingWrites = onNoPendingWrites;
+ stream.onClosed = onClosed;
+
+ donePort.receive((x,y) => donePort.close());
+}
+
main() {
testEmptyListOutputStream1();
testEmptyListOutputStream2();
testListOutputStream1();
testListOutputStream2();
+ testListOutputStream3();
}
« no previous file with comments | « tests/standalone/src/io/HttpTest.dart ('k') | tests/standalone/src/io/StringStreamTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698