mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-23 14:09:11 -04:00
Shorten StringLiteral
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func StringLiteral(value string) *StringSubject {
|
||||
return String(serial.StringLiteral((value)))
|
||||
return String(serial.StringT((value)))
|
||||
}
|
||||
|
||||
func String(value serial.String) *StringSubject {
|
||||
@@ -30,13 +30,13 @@ func (subject *StringSubject) DisplayString() string {
|
||||
|
||||
func (subject *StringSubject) Equals(expectation string) {
|
||||
if subject.value.String() != expectation {
|
||||
subject.Fail(subject.DisplayString(), "is equal to", serial.StringLiteral(expectation))
|
||||
subject.Fail(subject.DisplayString(), "is equal to", serial.StringT(expectation))
|
||||
}
|
||||
}
|
||||
|
||||
func (subject *StringSubject) NotEquals(expectation string) {
|
||||
if subject.value.String() == expectation {
|
||||
subject.Fail(subject.DisplayString(), "is not equal to ", serial.StringLiteral(expectation))
|
||||
subject.Fail(subject.DisplayString(), "is not equal to ", serial.StringT(expectation))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user