Microlib: Disable feof function usage in tests

feof function is not supported in Microlib library. so disabling all the feof function usage in the green tea test.
pull/12111/head
Rajkumar Kanagaraj 2019-12-11 07:32:32 -08:00
parent 8fcfbe117f
commit 95f56bac30
1 changed files with 18 additions and 1 deletions

View File

@ -1027,9 +1027,11 @@ static void FS_fseek_beyond_empty_file_seek_set()
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
TEST_ASSERT_EQUAL(0, read_sz);
#if !defined(__MICROLIB)
// feof() always returns 0 because the EOF indicator is not supported by Microlib
res = feof(fd[0]);
TEST_ASSERT_NOT_EQUAL(0, res);
#endif
res = fclose(fd[0]);
TEST_ASSERT_EQUAL(0, res);
@ -1062,8 +1064,11 @@ static void FS_fseek_beyond_non_empty_file_seek_set()
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
TEST_ASSERT_EQUAL(0, read_sz);
#if !defined(__MICROLIB)
// feof() always returns 0 because the EOF indicator is not supported by Microlib
res = feof(fd[0]);
TEST_ASSERT_NOT_EQUAL(0, res);
#endif
res = fclose(fd[0]);
TEST_ASSERT_EQUAL(0, res);
@ -1147,8 +1152,11 @@ static void FS_fseek_beyond_empty_file_seek_cur()
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
TEST_ASSERT_EQUAL(0, read_sz);
#if !defined(__MICROLIB)
// feof() always returns 0 because the EOF indicator is not supported by Microlib
res = feof(fd[0]);
TEST_ASSERT_NOT_EQUAL(0, res);
#endif
res = fclose(fd[0]);
TEST_ASSERT_EQUAL(0, res);
@ -1181,8 +1189,11 @@ static void FS_fseek_beyond_non_empty_file_seek_cur()
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
TEST_ASSERT_EQUAL(0, read_sz);
#if !defined(__MICROLIB)
// feof() always returns 0 because the EOF indicator is not supported by Microlib
res = feof(fd[0]);
TEST_ASSERT_NOT_EQUAL(0, res);
#endif
res = fclose(fd[0]);
TEST_ASSERT_EQUAL(0, res);
@ -1266,8 +1277,11 @@ static void FS_fseek_beyond_empty_file_seek_end()
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
TEST_ASSERT_EQUAL(0, read_sz);
#if !defined(__MICROLIB)
// feof() always returns 0 because the EOF indicator is not supported by Microlib
res = feof(fd[0]);
TEST_ASSERT_NOT_EQUAL(0, res);
#endif
res = fclose(fd[0]);
TEST_ASSERT_EQUAL(0, res);
@ -1300,8 +1314,11 @@ static void FS_fseek_beyond_non_empty_file_seek_end()
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
TEST_ASSERT_EQUAL(0, read_sz);
#if !defined(__MICROLIB)
// feof() always returns 0 because the EOF indicator is not supported by Microlib
res = feof(fd[0]);
TEST_ASSERT_NOT_EQUAL(0, res);
#endif
res = fclose(fd[0]);
TEST_ASSERT_EQUAL(0, res);