From 097cdf01d60fac82e0e7e76d21edbe279f7f0614 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 28 Apr 2017 20:37:49 +0200 Subject: [PATCH] test case for typed message --- common/serial/typed_message_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 common/serial/typed_message_test.go diff --git a/common/serial/typed_message_test.go b/common/serial/typed_message_test.go new file mode 100644 index 00000000..74da1b90 --- /dev/null +++ b/common/serial/typed_message_test.go @@ -0,0 +1,16 @@ +package serial_test + +import ( + "testing" + + . "v2ray.com/core/common/serial" + "v2ray.com/core/testing/assert" +) + +func TestGetInstance(t *testing.T) { + assert := assert.On(t) + + p, err := GetInstance("") + assert.Pointer(p).IsNil() + assert.Error(err).IsNotNil() +}