diff options
author | crupest <crupest@outlook.com> | 2022-05-10 19:18:32 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-05-10 19:18:32 +0800 |
commit | 891bf38d8580b83cdf6ae315cb2650dae7d79006 (patch) | |
tree | 3e7714df65147489c88dfc00a656339b29097d90 /test/common/platform/unix/UnixFileStreamTest.cpp | |
parent | b846a16e42b30418fe91ba3f06771fad57100624 (diff) | |
download | cru-891bf38d8580b83cdf6ae315cb2650dae7d79006.tar.gz cru-891bf38d8580b83cdf6ae315cb2650dae7d79006.tar.bz2 cru-891bf38d8580b83cdf6ae315cb2650dae7d79006.zip |
...
Diffstat (limited to 'test/common/platform/unix/UnixFileStreamTest.cpp')
-rw-r--r-- | test/common/platform/unix/UnixFileStreamTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/common/platform/unix/UnixFileStreamTest.cpp b/test/common/platform/unix/UnixFileStreamTest.cpp index 1ae8c48e..b9ff40da 100644 --- a/test/common/platform/unix/UnixFileStreamTest.cpp +++ b/test/common/platform/unix/UnixFileStreamTest.cpp @@ -1,12 +1,12 @@ #include "cru/common/io/OpenFileFlag.h" #include "cru/common/platform/unix/UnixFileStream.h" -#include <gtest/gtest.h> +#include <catch2/catch_test_macros.hpp> #include <cstdio> #include <filesystem> -TEST(UnixFileStream, Work) { +TEST_CASE("UnixFileStream Work", "[stream]") { using namespace cru; using namespace cru::io; using namespace cru::platform::unix; @@ -25,8 +25,8 @@ TEST(UnixFileStream, Work) { UnixFileStream file2(path, OpenFileFlags::Read); auto buffer = std::make_unique<std::byte[]>(3); file2.Read(buffer.get(), 3); - ASSERT_EQ(std::string_view(reinterpret_cast<const char*>(buffer.get()), 3), - "abc"); + REQUIRE(std::string_view(reinterpret_cast<const char*>(buffer.get()), 3) == + "abc"); file2.Close(); std::filesystem::remove(temp_file_path); |