@@ -762,7 +762,7 @@ func doMKeyExists(key any, a []any) {
762
762
// are used to override the auto-generated assert violation message.
763
763
func NotEmpty (obj string , a ... any ) {
764
764
if obj == "" {
765
- doEmpty ( "string " , "not " , a )
765
+ doNamed ( "not " , "string" , "empty " , a )
766
766
}
767
767
}
768
768
@@ -774,15 +774,10 @@ func NotEmpty(obj string, a ...any) {
774
774
// are used to override the auto-generated assert violation message.
775
775
func Empty (obj string , a ... any ) {
776
776
if obj != "" {
777
- doEmpty ( " string" , "" , a )
777
+ doNamed ( "" , " string" , "empty " , a )
778
778
}
779
779
}
780
780
781
- func doEmpty (tname , notStr string , a []any ) {
782
- defMsg := fmt .Sprintf (assertionMsg + ": %s should %sbe empty" , tname , notStr )
783
- current ().reportAssertionFault (1 , defMsg , a )
784
- }
785
-
786
781
// SEmpty asserts that the slice is empty. If it is NOT, it panics/errors
787
782
// (according the current Asserter) with the auto-generated message. You can
788
783
// append the generated got-want message by using optional message arguments.
0 commit comments