@@ -72,16 +72,15 @@ public static void Operators()
7272 var result = new Result < int > ( 10 ) ;
7373 if ( result ) { }
7474 else Fail ( "Unexpected Result state" ) ;
75- if ( ! result ) Fail ( "Unexpected Result state" ) ;
75+ False ( ! result ) ;
7676 Equal ( 10 , ( int ) result ) ;
7777 Equal ( "10" , result . ToString ( ) ) ;
7878 Optional < int > opt = result ;
7979 Equal ( 10 , opt ) ;
8080 Equal ( 10 , result . OrInvoke ( static ( ) => 20 ) ) ;
8181 result = new Result < int > ( new Exception ( ) ) ;
8282 if ( result ) Fail ( "Unexpected Result state" ) ;
83- if ( ! result ) { }
84- else Fail ( "Unexpected Result state" ) ;
83+ True ( ! result ) ;
8584 Equal ( 20 , result . OrInvoke ( static ( ) => 20 ) ) ;
8685 opt = result ;
8786 False ( opt . HasValue ) ;
@@ -93,16 +92,15 @@ public static void Operators2()
9392 var result = new Result < int , EnvironmentVariableTarget > ( 10 ) ;
9493 if ( result ) { }
9594 else Fail ( "Unexpected Result state" ) ;
96- if ( ! result ) Fail ( "Unexpected Result state" ) ;
95+ False ( ! result ) ;
9796 Equal ( 10 , ( int ) result ) ;
9897 Equal ( "10" , result . ToString ( ) ) ;
9998 Optional < int > opt = result ;
10099 Equal ( 10 , opt ) ;
101100 Equal ( 10 , result . OrInvoke ( static ( ) => 20 ) ) ;
102101 result = new Result < int , EnvironmentVariableTarget > ( EnvironmentVariableTarget . Machine ) ;
103102 if ( result ) Fail ( "Unexpected Result state" ) ;
104- if ( ! result ) { }
105- else Fail ( "Unexpected Result state" ) ;
103+ True ( ! result ) ;
106104 Equal ( 20 , result . OrInvoke ( static ( ) => 20 ) ) ;
107105 opt = result ;
108106 False ( opt . HasValue ) ;
0 commit comments