aboutsummaryrefslogtreecommitdiff
path: root/pipe/pipe_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pipe/pipe_test.go')
-rw-r--r--pipe/pipe_test.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/pipe/pipe_test.go b/pipe/pipe_test.go
index e71b05b..950d039 100644
--- a/pipe/pipe_test.go
+++ b/pipe/pipe_test.go
@@ -20,12 +20,12 @@ func createCountPipe() <-chan int {
return cout
}
-func multiply(in int) int {
- return in * Multiplier
+func multiply(in int) (int, error) {
+ return in * Multiplier, nil
}
-func devide(in int) int {
- return in / Multiplier
+func devide(in int) (int, error) {
+ return in / Multiplier, nil
}
func TestProc(t *testing.T) {
@@ -81,13 +81,14 @@ func createBuffers() []*buffer {
return buffers
}
-func multiplyBuffer(in *buffer) *buffer {
+func multiplyBuffer(in *buffer) (*buffer, error) {
in.value = in.value * Multiplier
- return in
+ return in, nil
}
-func devideBuffer(in *buffer) {
+func devideBuffer(in *buffer) error {
in.value = in.value / Multiplier
+ return nil
}
func TestTailProc(t *testing.T) {