@@ -821,5 +821,71 @@ public void IsNullOrEmpty_Accept_Null_Ustring_Arg ()
821821 Assert . False ( string . IsNullOrEmpty ( ustr . ToString ( ) ) ) ;
822822 Assert . False ( ustring . IsNullOrEmpty ( ustr ) ) ;
823823 }
824+
825+ [ Test ]
826+ public void Operator_Equal_Ustring_Versus_String ( )
827+ {
828+ ustring ? ustr = null ;
829+ string ? str = null ;
830+ Assert . True ( ustr == str ) ;
831+ Assert . True ( str == ustr ) ;
832+ Assert . True ( ustr == null ) ;
833+ Assert . True ( str == null ) ;
834+ Assert . False ( ustr == "" ) ;
835+ Assert . False ( str == "" ) ;
836+
837+ ustr = "" ;
838+ str = "" ;
839+ Assert . True ( ustr == str ) ;
840+ Assert . True ( str == ustr ) ;
841+ Assert . False ( ustr == null ) ;
842+ Assert . False ( str == null ) ;
843+ Assert . True ( ustr == "" ) ;
844+ Assert . True ( str == "" ) ;
845+
846+ ustr = " " ;
847+ str = " " ;
848+ Assert . True ( ustr == str ) ;
849+ Assert . True ( str == ustr ) ;
850+ Assert . False ( ustr == null ) ;
851+ Assert . False ( str == null ) ;
852+ Assert . False ( ustr == "" ) ;
853+ Assert . False ( str == "" ) ;
854+ Assert . True ( ustr == " " ) ;
855+ Assert . True ( str == " " ) ;
856+ }
857+
858+ [ Test ]
859+ public void Operator_Not_Equal_Ustring_Versus_String ( )
860+ {
861+ ustring ? ustr = null ;
862+ string ? str = null ;
863+ Assert . False ( ustr != str ) ;
864+ Assert . False ( str != ustr ) ;
865+ Assert . False ( ustr != null ) ;
866+ Assert . False ( str != null ) ;
867+ Assert . True ( ustr != "" ) ;
868+ Assert . True ( str != "" ) ;
869+
870+ ustr = "" ;
871+ str = "" ;
872+ Assert . False ( ustr != str ) ;
873+ Assert . False ( str != ustr ) ;
874+ Assert . True ( ustr != null ) ;
875+ Assert . True ( str != null ) ;
876+ Assert . False ( ustr != "" ) ;
877+ Assert . False ( str != "" ) ;
878+
879+ ustr = " " ;
880+ str = " " ;
881+ Assert . False ( ustr != str ) ;
882+ Assert . False ( str != ustr ) ;
883+ Assert . True ( ustr != null ) ;
884+ Assert . True ( str != null ) ;
885+ Assert . True ( ustr != "" ) ;
886+ Assert . True ( str != "" ) ;
887+ Assert . False ( ustr != " " ) ;
888+ Assert . False ( str != " " ) ;
889+ }
824890 }
825891}
0 commit comments