コード例 #1
0
ファイル: ws_test.go プロジェクト: kildevaeld/projects
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package ws

import (
	"testing"

	"github.com/kildevaeld/projects/Godeps/_workspace/src/github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "ws://127.0.0.1:3395/mysock")

func TestWebsockListenAndAccept(t *testing.T) {
	tt.TestListenAndAccept(t)
}

func TestWebsockDuplicateListen(t *testing.T) {
	tt.TestDuplicateListen(t)
}

func TestWebsockConnRefused(t *testing.T) {
	tt.TestConnRefused(t)
}

func TestWebsockSendRecv(t *testing.T) {
	tt.TestSendRecv(t)
コード例 #2
0
ファイル: inproc_test.go プロジェクト: kildevaeld/projects
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package inproc

import (
	"testing"

	"github.com/kildevaeld/projects/Godeps/_workspace/src/github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "inproc://testname")

func TestInpListenAndAccept(t *testing.T) {
	tt.TestListenAndAccept(t)
}

func TestInpDuplicateListen(t *testing.T) {
	tt.TestDuplicateListen(t)
}

func TestInpConnRefused(t *testing.T) {
	tt.TestConnRefused(t)
}

func TestInpSendRecv(t *testing.T) {
	tt.TestSendRecv(t)
コード例 #3
0
ファイル: tls_test.go プロジェクト: kildevaeld/projects
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package tlstcp

import (
	"testing"

	"github.com/kildevaeld/projects/Godeps/_workspace/src/github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "tls+tcp://127.0.0.1:3334")

func TestTLSListenAndAccept(t *testing.T) {
	tt.TestListenAndAccept(t)
}

func TestTLSDuplicateListen(t *testing.T) {
	tt.TestDuplicateListen(t)
}

func TestTLSConnRefused(t *testing.T) {
	tt.TestConnRefused(t)
}

func TestTLSSendRecv(t *testing.T) {
	tt.TestSendRecv(t)
コード例 #4
0
ファイル: ipc_test.go プロジェクト: kildevaeld/projects
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package ipc

import (
	"runtime"
	"testing"

	"github.com/kildevaeld/projects/Godeps/_workspace/src/github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "ipc:///tmp/test1234")

func TestIpcListenAndAccept(t *testing.T) {
	switch runtime.GOOS {
	case "windows":
		t.Skip("IPC not supported on Windows")
	case "plan9":
		t.Skip("IPC not supported on Plan9")
	default:
		tt.TestListenAndAccept(t)
	}
}

func TestIpcDuplicateListen(t *testing.T) {
	switch runtime.GOOS {
	case "windows":