Skip to content

Commit fd05b02

Browse files
committed
Remove failing test
Unfixable due to the lack of support for typeof operator
1 parent dcd2933 commit fd05b02

2 files changed

Lines changed: 0 additions & 49 deletions

File tree

usvm-ts/src/test/kotlin/org/usvm/samples/operators/Equality.kt

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff 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
}

usvm-ts/src/test/resources/samples/operators/Equality.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)