File tree Expand file tree Collapse file tree
kotlin/org/usvm/samples/operators
resources/samples/operators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,29 +181,4 @@ class Equality : TsMethodTestRunner() {
181181 )
182182 )
183183 }
184-
185- @Test
186- fun `test eqAnyWithNull` () {
187- val method = getMethod(" eqAnyWithNull" )
188- discoverProperties<TsTestValue , TsTestValue .TsNumber >(
189- method,
190- { a, r ->
191- (r eq 1 ) && (a is TsTestValue .TsNull )
192- },
193- { a, r ->
194- (r eq 2 ) && (a is TsTestValue .TsUndefined )
195- },
196- { a, r ->
197- (r eq 5 ) && (a !is TsTestValue .TsNull )
198- },
199- { a, r ->
200- (r eq 10 ) && (a !is TsTestValue .TsNull ) && (a !is TsTestValue .TsUndefined )
201- },
202- invariants = arrayOf(
203- { _, r -> r.number > 0 },
204- { a, r -> if (r eq 1 ) a is TsTestValue .TsNull else true },
205- { a, r -> if (r eq 2 ) a is TsTestValue .TsUndefined else true },
206- )
207- )
208- }
209184}
Original file line number Diff line number Diff line change @@ -76,28 +76,4 @@ class Equality {
7676 if ( undefined == null ) return 1 ;
7777 return - 1 ; // unreachable
7878 }
79-
80- eqAnyWithNull ( a : any ) : number {
81- if ( typeof a === "object" ) {
82- // Note: `a == null` is true when `a` is null or undefined,
83- // but here `a` cannot be undefined because `typeof undefined` is "undefined".
84- // Thus, `a == null` is true only if `a === null`.
85- if ( a == null ) {
86- if ( a === null ) return 1 ; // null
87- return - 1 ; // unreachable
88- }
89- return 5 ; // non-null object
90- }
91- if ( typeof a === "undefined" ) {
92- // Note: `a == null` is true when `a` is null or undefined,
93- // but here `a` cannot be null because `typeof null` is "object".
94- // Thus, `a == null` is true only if `a === undefined`.
95- if ( a == null ) {
96- if ( a === undefined ) return 2 ; // undefined
97- return - 1 ; // unreachable
98- }
99- return - 1 ; // unreachable
100- }
101- return 100 ; // non-object, non-undefined
102- }
10379}
You can’t perform that action at this time.
0 commit comments