core/crypto: Add has_rand_bytes
This allows runtime detection as to if `rand_bytes` is supported or not, and lets us enable the test-case on all of the supported targets.
This commit is contained in:
1 parent
a43a5b053c
commit
b155fdf8c9
8 files changed
+35
-1
No files matched your search
@@ -347,7 +347,7 @@ test_x25519 :: proc(t: ^testing.T) {
|
||||
test_rand_bytes :: proc(t: ^testing.T) {
|
||||
tc.log(t, "Testing rand_bytes")
|
||||
|
||||
if ODIN_OS != .Linux {
|
||||
if !crypto.has_rand_bytes() {
|
||||
tc.log(t, "rand_bytes not supported - skipping")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user