comparison OrthancFramework/UnitTestsSources/FrameworkTests.cpp @ 4186:e99d1ad11cfe

fix build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 14 Sep 2020 19:27:55 +0200
parents bf7b9edf6b81
children a38376b80cd1
comparison
equal deleted inserted replaced
4185:b289a1234822 4186:e99d1ad11cfe
601 ASSERT_EQ(0, memcmp(s.c_str(), h.c_str(), s.size())); 601 ASSERT_EQ(0, memcmp(s.c_str(), h.c_str(), s.size()));
602 } 602 }
603 603
604 std::string u; 604 std::string u;
605 ASSERT_THROW(SystemToolbox::ReadFile(u, path.c_str()), OrthancException); 605 ASSERT_THROW(SystemToolbox::ReadFile(u, path.c_str()), OrthancException);
606
607 {
608 TemporaryFile tmp;
609 std::string s = "Hello";
610 SystemToolbox::WriteFile(s, tmp.GetPath(), true /* call fsync() */);
611 std::string t;
612 SystemToolbox::ReadFile(t, tmp.GetPath());
613 ASSERT_EQ(s, t);
614 }
606 } 615 }
607 616
608 617
609 TEST(Toolbox, FileBuffer) 618 TEST(Toolbox, FileBuffer)
610 { 619 {