this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fstream test: added test no. 3

+11
+11
tests/src/fstream.cpp
··· 9 9 void printFile(const char* path); 10 10 void test1(); 11 11 void test2(); 12 + void test3(); 12 13 13 14 char text[8001] = ""; 14 15 const char* file = "/tmp/__test123"; ··· 23 24 24 25 test1(); 25 26 test2(); 27 + test3(); 26 28 27 29 return 0; 28 30 } ··· 45 47 printf("Len %d\n", len); 46 48 out2.sputn(text, len); 47 49 out2.close(); 50 + 51 + printFile(file); 52 + } 53 + 54 + void test3() 55 + { 56 + std::ofstream of(file, std::ios_base::binary|std::ios_base::in|std::ios_base::out|std::ios_base::trunc); 57 + of.write(text, strlen(text)); 58 + of.close(); 48 59 49 60 printFile(file); 50 61 }