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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user