38 #include <gtest/gtest.h>
49 TEST(AtomicioTest, AtomicReadBigBuffer)
54 std::string file_contents =
"This is just some test data to ensure that we"
55 " can read correctly from a file.";
57 fputs(file_contents.c_str(), file);
67 for (
unsigned int i = 0;
i < size;
i++) {
76 TEST(AtomicioTest, AtomicReadSmallBuffer)
81 std::string file_contents =
"This is just some test data to ensure that we"
82 " can read correctly from a file.";
84 fputs(file_contents.c_str(), file);
94 for (
unsigned int i = 0;
i < size;
i++) {
102 TEST(AtomicioTest, AtomicWrite)
107 std::string file_contents =
"This is just some test data to ensure that we"
108 " can write correctly to a file.";
111 file_contents.c_str(),
112 file_contents.size());
119 for (
unsigned int i = 0; (
c = fgetc(file)) != EOF;
i++) {