Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / filesys / extended / grow-tell.c
1 #include <syscall.h>
2 #include "tests/filesys/seq-test.h"
3 #include "tests/lib.h"
4 #include "tests/main.h"
5
6 static char buf[2134];
7
8 static size_t
9 return_block_size (void) 
10 {
11   return 37;
12 }
13
14 static void
15 check_tell (int fd, long ofs) 
16 {
17   long pos = tell (fd);
18   if (pos != ofs)
19     fail ("file position not updated properly: should be %ld, actually %ld",
20           ofs, pos);
21 }
22
23 void
24 test_main (void) 
25 {
26   seq_test ("foobar",
27             buf, sizeof buf, 0,
28             return_block_size, check_tell);
29 }