X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/48ca7f876fa5f45a34bfd2d63f1804e5cb5e6a2b..18cb23396ddc4f9f7759cb76a1dbfbc1d659e81b:/tests/test_conffiles.cpp diff --git a/tests/test_conffiles.cpp b/tests/test_conffiles.cpp index 897148f5..ef63a7a1 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,7 +62,7 @@ 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);