13 #include <gtest/gtest.h> 16 #include "../../include/ecl/streams/file_streams.hpp" 34 TEST(OFileStreamTests,construct) {
36 EXPECT_TRUE(ostream.device().open());
39 TEST(OFileStreamTests,writeChar) {
43 ostream <<
'c' <<
'\n';
51 TEST(OFileStreamTests,writeCharString) {
63 TEST(OFileStreamTests,writeString) {
67 string dude(
"dude_string\n");
76 TEST(OFileStreamTests,writeIntegralTypes) {
81 ostream << si <<
'\n';
87 ostream << ll <<
'\n';
88 unsigned short us = 5;
89 ostream << us <<
'\n';
91 ostream << ui <<
'\n';
92 unsigned long ul = 77;
93 ostream << ul <<
'\n';
94 unsigned long long ull = 8888;
95 ostream << ull <<
'\n';
96 ostream << 77 <<
'\n';
104 TEST(OFileStreamTests,writeBool) {
109 ostream << test <<
'\n';
110 ostream <<
false <<
'\n';
118 TEST(OFileStreamTests,writeFloatTypes) {
124 ostream << f <<
'\n';
125 ostream << d <<
'\n';
137 int main(
int argc,
char** argv) {
138 testing::InitGoogleTest(&argc,argv);
139 return RUN_ALL_TESTS();
int main(int argc, char **argv)
TEST(OFileStreamTests, construct)
A text streaming interface.
Convenience class for OFile TextStream definitions.