Home
last modified time | relevance | path

Searched refs:testFile (Results 1 – 3 of 3) sorted by relevance

/kernel/liteos_a/testsuites/unittest/libc/io/full/
DIt_stdio_fputws_001.cpp42 FILE *testFile; in Testcase() local
51 testFile = fopen(pathname, "a"); in Testcase()
53 ICUNIT_GOTO_NOT_EQUAL(testFile, NULL, testFile, EXIT); in Testcase()
54 fseek(testFile, 0, SEEK_END); in Testcase()
55 nPos = (unsigned int)ftell(testFile); in Testcase()
57 nRet = fputws(srcStr, testFile); in Testcase()
60 if ((nPos + 5) != (unsigned int)ftell(testFile)) { // 5, expect position offset in Testcase()
63 fclose(testFile); in Testcase()
65 testFile = fopen(pathname, "r"); in Testcase()
66 ICUNIT_GOTO_NOT_EQUAL(testFile, NULL, testFile, EXIT); in Testcase()
[all …]
DIt_stdio_fwprintf_001.cpp44 FILE *testFile = NULL; in Testcase() local
51 testFile = fopen(pathname, "w+"); in Testcase()
52 ICUNIT_GOTO_NOT_EQUAL(testFile, NULL, testFile, EXIT); in Testcase()
54 nPos = (unsigned int)ftell(testFile); in Testcase()
56 nRet = fwprintf(testFile, L"hello world %d", 666); // 666, for test, print to testFile in Testcase()
59 if ((nPos + 15) != (unsigned int)ftell(testFile)) { // 15, total write size in Testcase()
62 fclose(testFile); in Testcase()
64 testFile = fopen(pathname, "r"); in Testcase()
65 ICUNIT_GOTO_NOT_EQUAL(testFile, NULL, testFile, EXIT); in Testcase()
67 p = fgetws(tarStr, 16, testFile); // 16, read size,total write and '\0' in Testcase()
[all …]
DIt_stdio_getc_unlocked_001.cpp41 FILE *testFile = NULL; in Testcase() local
49 testFile = fopen(pathname, "w+"); in Testcase()
50 ICUNIT_ASSERT_NOT_EQUAL(testFile, NULL, LOS_NOK); in Testcase()
51 ret = fputs("0123456789abcdefghijklmnopqrstuvwxyz", testFile); in Testcase()
53 fclose(testFile); in Testcase()
55 testFile = fopen(pathname, "r"); in Testcase()
56 ICUNIT_GOTO_NOT_EQUAL(testFile, NULL, testFile, EXIT); in Testcase()
58 nPos = ftell(testFile); in Testcase()
60 ch = getc_unlocked(testFile); in Testcase()
63 if ((nPos + sizeof(char)) != (unsigned int)ftell(testFile)) { in Testcase()
[all …]