Paul Sajna 7 years ago
parent
commit
a24f537a38
3 changed files with 10 additions and 0 deletions
  1. 1 0
      tests/.gitignore
  2. 1 0
      tests/Makefile
  3. 8 0
      tests/stdlib/rand.c

+ 1 - 0
tests/.gitignore

@@ -28,6 +28,7 @@
 /stdlib/bsearch
 /stdlib/strtol
 /stdlib/a64l
+/stdlib/rand
 /string/strncmp
 /string/strcspn
 /string/strchr

+ 1 - 0
tests/Makefile

@@ -23,6 +23,7 @@ EXPECT_BINS=\
 	stdlib/bsearch \
 	stdlib/strtol \
 	stdlib/a64l \
+	stdlib/rand \
 	string/strncmp \
 	string/strcspn \
 	string/strchr \

+ 8 - 0
tests/stdlib/rand.c

@@ -0,0 +1,8 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(int argc, char** argv) {
+    printf("%d\n", rand());
+    srand(259);
+    printf("%d\n", rand());
+}