aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-04-13 17:13:16 +0200
committerRon Evans <[email protected]>2019-04-13 20:55:56 +0200
commit7de3d4be2bb96f35bce2570aa000b1c3ea7e8f29 (patch)
tree73abdc805db264d8f068396f5ca688fd95ef023d /testdata
parent02ecab833f68467a1ea1126b9e21e10475a43a8a (diff)
downloadtinygo-7de3d4be2bb96f35bce2570aa000b1c3ea7e8f29.tar.gz
tinygo-7de3d4be2bb96f35bce2570aa000b1c3ea7e8f29.zip
all: support interface asserts in interp
This adds support for the math/rand package.
Diffstat (limited to 'testdata')
-rw-r--r--testdata/stdlib.go3
-rw-r--r--testdata/stdlib.txt1
2 files changed, 4 insertions, 0 deletions
diff --git a/testdata/stdlib.go b/testdata/stdlib.go
index 29c9c9e10..2996cdb29 100644
--- a/testdata/stdlib.go
+++ b/testdata/stdlib.go
@@ -2,6 +2,7 @@ package main
import (
"fmt"
+ "math/rand"
"os"
)
@@ -9,4 +10,6 @@ func main() {
fmt.Println("stdin: ", os.Stdin.Fd())
fmt.Println("stdout:", os.Stdout.Fd())
fmt.Println("stderr:", os.Stderr.Fd())
+
+ fmt.Println("pseudorandom number:", rand.Int31())
}
diff --git a/testdata/stdlib.txt b/testdata/stdlib.txt
index 3db2f1874..27f48238b 100644
--- a/testdata/stdlib.txt
+++ b/testdata/stdlib.txt
@@ -1,3 +1,4 @@
stdin: 0
stdout: 1
stderr: 2
+pseudorandom number: 1298498081