mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 05:53:39 +00:00
Fix linker errors for runtime.vgetrandom and crypto/internal/sysrand.fatal
This commit is contained in:
@@ -4,6 +4,8 @@ package os_smoke_test
|
||||
// Intended to catch build tag mistakes affecting bare metal targets.
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
@@ -25,3 +27,10 @@ func TestFmt(t *testing.T) {
|
||||
t.Errorf("printf returned %d, expected 14", n)
|
||||
}
|
||||
}
|
||||
|
||||
// Regression test for https://github.com/tinygo-org/tinygo/issues/4921
|
||||
func TestRand(t *testing.T) {
|
||||
if _, err := rsa.GenerateKey(rand.Reader, 2048); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user