github.com/gdamore/mangos@v1.4.0/transport/ipc/ipc_test.go (about)

     1  // Copyright 2018 The Mangos Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use file except in compliance with the License.
     5  // You may obtain a copy of the license at
     6  //
     7  //    http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package ipc
    16  
    17  import (
    18  	"runtime"
    19  	"testing"
    20  
    21  	"nanomsg.org/go-mangos/test"
    22  )
    23  
    24  var tt = test.NewTranTest(NewTransport(), "ipc://test1234")
    25  
    26  func TestIpcListenAndAccept(t *testing.T) {
    27  	switch runtime.GOOS {
    28  	case "plan9":
    29  		t.Skip("IPC not supported on Plan9")
    30  	default:
    31  		tt.TestListenAndAccept(t)
    32  	}
    33  }
    34  
    35  func TestIpcDuplicateListen(t *testing.T) {
    36  	switch runtime.GOOS {
    37  	case "plan9":
    38  		t.Skip("IPC not supported on Plan9")
    39  	default:
    40  		tt.TestDuplicateListen(t)
    41  	}
    42  }
    43  
    44  func TestIpcConnRefused(t *testing.T) {
    45  	switch runtime.GOOS {
    46  	case "plan9":
    47  		t.Skip("IPC not supported on Plan9")
    48  	default:
    49  		tt.TestConnRefused(t)
    50  	}
    51  }
    52  
    53  func TestIpcSendRecv(t *testing.T) {
    54  	switch runtime.GOOS {
    55  	case "plan9":
    56  		t.Skip("IPC not supported on Plan9")
    57  	default:
    58  		tt.TestSendRecv(t)
    59  	}
    60  }
    61  
    62  func TestIpcAll(t *testing.T) {
    63  	switch runtime.GOOS {
    64  	case "plan9":
    65  		t.Skip("IPC not supported on Plan9")
    66  	default:
    67  		tt.TestAll(t)
    68  	}
    69  }