-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Undefined and null values support (#248)
--------- Co-authored-by: Konstantin Chukharev <[email protected]>
- Loading branch information
1 parent
464fee8
commit 9fab1d1
Showing
13 changed files
with
220 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.usvm.samples | ||
|
||
import org.jacodb.ets.model.EtsScene | ||
import org.jacodb.ets.utils.loadEtsFileAutoConvert | ||
import org.junit.jupiter.api.RepeatedTest | ||
import org.usvm.api.TSObject | ||
import org.usvm.util.TSMethodTestRunner | ||
import org.usvm.util.getResourcePath | ||
|
||
class Null : TSMethodTestRunner() { | ||
|
||
override val scene = run { | ||
val name = "Null.ts" | ||
val path = getResourcePath("/samples/$name") | ||
val file = loadEtsFileAutoConvert(path) | ||
EtsScene(listOf(file)) | ||
} | ||
|
||
@RepeatedTest(20) | ||
fun testIsNull() { | ||
val method = getMethod("Null", "isNull") | ||
discoverProperties<TSObject, TSObject.TSNumber>( | ||
method, | ||
{ a, r -> a is TSObject.TSNull && r.number == 1.0 }, | ||
{ a, r -> a !is TSObject.TSNull && r.number == 2.0 }, | ||
) | ||
} | ||
} |
Oops, something went wrong.