Procházet zdrojové kódy

test case for typed message

Darien Raymond před 8 roky
rodič
revize
097cdf01d6
1 změnil soubory, kde provedl 16 přidání a 0 odebrání
  1. 16 0
      common/serial/typed_message_test.go

+ 16 - 0
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()
+}