yaffs Have revised and checked each test in quick tests.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_lseek_EBADF.c
index 06d97646df8d0165fd0eee160cdf3e905bb07b94..c6f4264e345944d0d862ab3f9e97ab7abccd14ed 100644 (file)
 #include "test_yaffs_lseek_EBADF.h"
 
 
-int test_yaffs_lseek_EBADF(void){
+int test_yaffs_lseek_EBADF(void)
+{
        int error_code=0;
        int output=yaffs_lseek(-1, 0, SEEK_SET);
+
        if (output<0){
                error_code=yaffs_get_error();
-               //printf("EISDIR def %d, Error code %d\n", ENOTDIR,error_code);
                if (abs(error_code)==EBADF){
                        return 1;
-               }
-               else {
-                       printf("different error than expected\n");
+               } else {
+                       print_message("different error than expected\n", 2);
                        return -1;
                }
-       }
-       else {
-               printf("lseeked to a negative position\n");
+       } else {
+               print_message("lseeked to a negative position\n", 2);
+               return -1;
        }
 }
 
-int test_yaffs_lseek_EBADF_clean(void){
+int test_yaffs_lseek_EBADF_clean(void)
+{
        return 1;       
 }