-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
44f58c1
commit 5859156
Showing
4 changed files
with
42 additions
and
4 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
21 changes: 21 additions & 0 deletions
21
wasi-emscripten-host/src/linuxTest/kotlin/linux/LinuxEntropySourceTest.kt
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,21 @@ | ||
/* | ||
* Copyright 2024, the wasm-sqlite-open-helper project authors and contributors. Please see the AUTHORS file | ||
* for details. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package ru.pixnews.wasm.sqlite.open.helper.host.linux | ||
|
||
import assertk.assertThat | ||
import assertk.assertions.isFalse | ||
import kotlin.test.Test | ||
|
||
class LinuxEntropySourceTest { | ||
@Test | ||
@Suppress("MagicNumber") | ||
fun entropy_source_should_work() { | ||
val entropy = LinuxEntropySource.generateEntropy(102400) | ||
// XXX may be a more appropriate test | ||
assertThat(entropy.all { it == 0.toByte() }).isFalse() | ||
} | ||
} |