X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/48ca7f876fa5f45a34bfd2d63f1804e5cb5e6a2b..611c8051a2ae58a1c306675c8250865e12563834:/tests/test_conffiles.cpp diff --git a/tests/test_conffiles.cpp b/tests/test_conffiles.cpp index 897148f5..5936ad36 100644 --- a/tests/test_conffiles.cpp +++ b/tests/test_conffiles.cpp @@ -3,9 +3,9 @@ #include #include -#include +#include "tut/tut.hpp" -#include "conffiles.h" +#include "stg/conffiles.h" namespace tut { @@ -28,9 +28,11 @@ namespace tut ensure_equals("Correct construction", cf.Error(), 0); - ensure_equals("Correct writing 'a' string", cf.WriteString("a", "a-string"), 0); - ensure_equals("Correct writing 'b' integer (0)", cf.WriteInt("b", 0), 0); - ensure_equals("Correct writing 'e' double (2.718281828)", cf.WriteDouble("e", 2.718281828), 0); + cf.WriteString("a", "a-string"); + cf.WriteInt("b", 0); + cf.WriteDouble("e", 2.718281828); + + ensure_equals("Correct data flushing", cf.Flush(), 0); } { @@ -60,9 +62,9 @@ namespace tut set_test_name("Check empty lines and comments"); { - ofstream f("/tmp/test.cf"); + std::ofstream f("/tmp/test.cf"); - ensure("Correct construction (part 3)", f); + ensure("Correct construction (part 3)", static_cast(f)); f << "\n" << "a=a-string# a string\n"