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

Unified Diff: mojo/go/tests/system_test.go

Issue 1374463002: Remove support for "all or none" two-phase data pipe read/write. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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
Index: mojo/go/tests/system_test.go
diff --git a/mojo/go/tests/system_test.go b/mojo/go/tests/system_test.go
index 9ed5f4c47733a68294d5347e9a86a14273b58d6f..c4880660f5dae9849c91983cdff057b50ba0b641 100644
--- a/mojo/go/tests/system_test.go
+++ b/mojo/go/tests/system_test.go
@@ -205,9 +205,9 @@ func TestDataPipe(t *testing.T) {
// Test two-phase read/write.
// Writing.
kHello = []byte("Hello, world!")
- r, buf := hp.BeginWriteData(len(kHello), system.MOJO_WRITE_DATA_FLAG_NONE)
+ r, buf := hp.BeginWriteData(system.MOJO_WRITE_DATA_FLAG_NONE)
if r != system.MOJO_RESULT_OK {
- t.Fatalf("Failed BeginWriteData on hp:%v numBytes:%d", r, len(kHello))
+ t.Fatalf("Failed BeginWriteData on hp:%v", r)
}
if len(buf) < len(kHello) {
t.Fatalf("Buffer size(%d) should be at least %d", len(buf), len(kHello))
@@ -226,8 +226,8 @@ func TestDataPipe(t *testing.T) {
if r, _ = hc.Wait(system.MOJO_HANDLE_SIGNAL_READABLE, system.MOJO_DEADLINE_INDEFINITE); r != system.MOJO_RESULT_OK {
t.Fatalf("hc should be readable after EndWriteData on hp:%v", r)
}
- if r, buf = hc.BeginReadData(len(kHello), system.MOJO_READ_DATA_FLAG_NONE); r != system.MOJO_RESULT_OK {
- t.Fatalf("Failed BeginReadData on hc:%v numBytes:%d", r, len(kHello))
+ if r, buf = hc.BeginReadData(system.MOJO_READ_DATA_FLAG_NONE); r != system.MOJO_RESULT_OK {
+ t.Fatalf("Failed BeginReadData on hc:%v", r)
}
if len(buf) != len(kHello) {
t.Fatalf("Buffer size(%d) should be equal to %d", len(buf), len(kHello))

Powered by Google App Engine
This is Rietveld 408576698