-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
Binary file added
BIN
+280 Bytes
packages/shacl-validator-py/src/rdfc_shacl/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file added
BIN
+2.63 KB
packages/shacl-validator-py/src/rdfc_shacl/__pycache__/validator.cpython-312.pyc
Binary file not shown.
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,29 @@ | ||
package extensions | ||
|
||
import kotlin.test.Test | ||
import kotlin.test.assertEquals | ||
import kotlinx.coroutines.channels.Channel | ||
import kotlinx.coroutines.channels.ReceiveChannel | ||
import kotlinx.coroutines.channels.SendChannel | ||
import kotlinx.coroutines.runBlocking | ||
import technology.idlab.extensions.map | ||
|
||
class ChannelTest { | ||
@Test | ||
fun mapIntToString() = runBlocking { | ||
val channel: Channel<String> = Channel(Channel.UNLIMITED) | ||
|
||
// Map to the correct types using mapper function. | ||
val sender: SendChannel<Int> = channel.map(this) { it.toString() } | ||
val receiver: ReceiveChannel<String> = channel | ||
|
||
sender.send(1) | ||
sender.send(2) | ||
sender.send(3) | ||
sender.close() | ||
|
||
assertEquals("1", receiver.receive()) | ||
assertEquals("2", receiver.receive()) | ||
assertEquals("3", receiver.receive()) | ||
} | ||
} |
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,32 @@ | ||
package extensions | ||
|
||
import java.io.File | ||
import kotlin.test.Test | ||
import kotlin.test.assertEquals | ||
import technology.idlab.extensions.rawPath | ||
|
||
class FileTest { | ||
@Test | ||
fun empty() { | ||
val file = File("") | ||
assertEquals("", file.rawPath()) | ||
} | ||
|
||
@Test | ||
fun slashes() { | ||
val file = File("/////") | ||
assertEquals("/", file.rawPath()) | ||
} | ||
|
||
@Test | ||
fun filePrefix() { | ||
val file = File("file:/home/admin") | ||
assertEquals("/home/admin", file.rawPath()) | ||
} | ||
|
||
@Test | ||
fun filePrefixDoubleSlash() { | ||
val file = File("file://home/admin") | ||
assertEquals("/home/admin", file.rawPath()) | ||
} | ||
} |