mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
8fcfbe117f
commit
95f56bac30
|
@ -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]);
|
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, read_sz);
|
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]);
|
res = feof(fd[0]);
|
||||||
TEST_ASSERT_NOT_EQUAL(0, res);
|
TEST_ASSERT_NOT_EQUAL(0, res);
|
||||||
|
#endif
|
||||||
|
|
||||||
res = fclose(fd[0]);
|
res = fclose(fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, res);
|
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]);
|
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, read_sz);
|
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]);
|
res = feof(fd[0]);
|
||||||
TEST_ASSERT_NOT_EQUAL(0, res);
|
TEST_ASSERT_NOT_EQUAL(0, res);
|
||||||
|
#endif
|
||||||
|
|
||||||
res = fclose(fd[0]);
|
res = fclose(fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, res);
|
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]);
|
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, read_sz);
|
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]);
|
res = feof(fd[0]);
|
||||||
TEST_ASSERT_NOT_EQUAL(0, res);
|
TEST_ASSERT_NOT_EQUAL(0, res);
|
||||||
|
#endif
|
||||||
|
|
||||||
res = fclose(fd[0]);
|
res = fclose(fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, res);
|
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]);
|
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, read_sz);
|
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]);
|
res = feof(fd[0]);
|
||||||
TEST_ASSERT_NOT_EQUAL(0, res);
|
TEST_ASSERT_NOT_EQUAL(0, res);
|
||||||
|
#endif
|
||||||
|
|
||||||
res = fclose(fd[0]);
|
res = fclose(fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, res);
|
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]);
|
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, read_sz);
|
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]);
|
res = feof(fd[0]);
|
||||||
TEST_ASSERT_NOT_EQUAL(0, res);
|
TEST_ASSERT_NOT_EQUAL(0, res);
|
||||||
|
#endif
|
||||||
|
|
||||||
res = fclose(fd[0]);
|
res = fclose(fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, res);
|
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]);
|
int read_sz = fread(read_buf, sizeof(char), sizeof(read_buf), fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, read_sz);
|
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]);
|
res = feof(fd[0]);
|
||||||
TEST_ASSERT_NOT_EQUAL(0, res);
|
TEST_ASSERT_NOT_EQUAL(0, res);
|
||||||
|
#endif
|
||||||
|
|
||||||
res = fclose(fd[0]);
|
res = fclose(fd[0]);
|
||||||
TEST_ASSERT_EQUAL(0, res);
|
TEST_ASSERT_EQUAL(0, res);
|
||||||
|
|
Loading…
Reference in New Issue