Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / filesys / create.inc
diff --git a/src/tests/filesys/create.inc b/src/tests/filesys/create.inc
new file mode 100644 (file)
index 0000000..57858cb
--- /dev/null
@@ -0,0 +1,15 @@
+/* -*- c -*- */
+
+#include <syscall.h>
+#include "tests/lib.h"
+#include "tests/main.h"
+
+static char buf[TEST_SIZE];
+
+void
+test_main (void) 
+{
+  const char *filename = "blargle";
+  CHECK (create (filename, TEST_SIZE), "create \"%s\"", filename);
+  check_file (filename, buf, TEST_SIZE);
+}