1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-08 02:05:31 -05:00

add assertions for net utilities

This commit is contained in:
Darien Raymond
2015-12-02 15:19:39 +00:00
parent 0a2e4343bc
commit 091f047ebb
7 changed files with 114 additions and 37 deletions

View File

@@ -1,6 +1,7 @@
package assert
import (
"github.com/v2ray/v2ray-core/common/serial"
v2testing "github.com/v2ray/v2ray-core/testing"
)
@@ -14,6 +15,10 @@ func NewSubject() *Subject {
}
}
func (subject *Subject) Fail(displayString string, verb string, other serial.String) {
subject.FailWithMessage("Not true that " + displayString + " " + verb + " <" + other.String() + ">.")
}
func (subject *Subject) FailWithMessage(message string) {
v2testing.Fail(message)
}