refactor
This commit is contained in:
@ -23,7 +23,8 @@
|
|||||||
|
|
||||||
#include "app_config.hpp"
|
#include "app_config.hpp"
|
||||||
#include "utils/collection.hpp"
|
#include "utils/collection.hpp"
|
||||||
#include "utils/file_utils.hpp"
|
#include "utils/common.hpp"
|
||||||
|
#include "utils/file.hpp"
|
||||||
#include "utils/path.hpp"
|
#include "utils/path.hpp"
|
||||||
#include "utils/string.hpp"
|
#include "utils/string.hpp"
|
||||||
#include "utils/utils.hpp"
|
#include "utils/utils.hpp"
|
||||||
|
@ -374,8 +374,8 @@ TEST(ring_buffer_open_file, read_full_file) {
|
|||||||
auto hash1 = utils::file::file(download_source_path).sha256();
|
auto hash1 = utils::file::file(download_source_path).sha256();
|
||||||
auto hash2 = utils::file::file(dest_path).sha256();
|
auto hash2 = utils::file::file(dest_path).sha256();
|
||||||
|
|
||||||
EXPERT_TRUE(hash1.has_value());
|
EXPECT_TRUE(hash1.has_value());
|
||||||
EXPERT_TRUE(hash2.has_value());
|
EXPECT_TRUE(hash2.has_value());
|
||||||
if (hash1.has_value() && hash2.has_value()) {
|
if (hash1.has_value() && hash2.has_value()) {
|
||||||
EXPECT_STREQ(hash1.value().c_str(), hash2.value().c_str());
|
EXPECT_STREQ(hash1.value().c_str(), hash2.value().c_str());
|
||||||
}
|
}
|
||||||
@ -439,8 +439,8 @@ TEST(ring_buffer_open_file, read_full_file_in_reverse) {
|
|||||||
auto hash1 = utils::file::file(download_source_path).sha256();
|
auto hash1 = utils::file::file(download_source_path).sha256();
|
||||||
auto hash2 = utils::file::file(dest_path).sha256();
|
auto hash2 = utils::file::file(dest_path).sha256();
|
||||||
|
|
||||||
EXPERT_TRUE(hash1.has_value());
|
EXPECT_TRUE(hash1.has_value());
|
||||||
EXPERT_TRUE(hash2.has_value());
|
EXPECT_TRUE(hash2.has_value());
|
||||||
if (hash1.has_value() && hash2.has_value()) {
|
if (hash1.has_value() && hash2.has_value()) {
|
||||||
EXPECT_STREQ(hash1.value().c_str(), hash2.value().c_str());
|
EXPECT_STREQ(hash1.value().c_str(), hash2.value().c_str());
|
||||||
}
|
}
|
||||||
@ -505,8 +505,8 @@ TEST(ring_buffer_open_file, read_full_file_in_partial_chunks) {
|
|||||||
auto hash1 = utils::file::file(download_source_path).sha256();
|
auto hash1 = utils::file::file(download_source_path).sha256();
|
||||||
auto hash2 = utils::file::file(dest_path).sha256();
|
auto hash2 = utils::file::file(dest_path).sha256();
|
||||||
|
|
||||||
EXPERT_TRUE(hash1.has_value());
|
EXPECT_TRUE(hash1.has_value());
|
||||||
EXPERT_TRUE(hash2.has_value());
|
EXPECT_TRUE(hash2.has_value());
|
||||||
if (hash1.has_value() && hash2.has_value()) {
|
if (hash1.has_value() && hash2.has_value()) {
|
||||||
EXPECT_STREQ(hash1.value().c_str(), hash2.value().c_str());
|
EXPECT_STREQ(hash1.value().c_str(), hash2.value().c_str());
|
||||||
}
|
}
|
||||||
@ -576,8 +576,8 @@ TEST(ring_buffer_open_file, read_full_file_in_partial_chunks_in_reverse) {
|
|||||||
auto hash1 = utils::file::file(download_source_path).sha256();
|
auto hash1 = utils::file::file(download_source_path).sha256();
|
||||||
auto hash2 = utils::file::file(dest_path).sha256();
|
auto hash2 = utils::file::file(dest_path).sha256();
|
||||||
|
|
||||||
EXPERT_TRUE(hash1.has_value());
|
EXPECT_TRUE(hash1.has_value());
|
||||||
EXPERT_TRUE(hash2.has_value());
|
EXPECT_TRUE(hash2.has_value());
|
||||||
if (hash1.has_value() && hash2.has_value()) {
|
if (hash1.has_value() && hash2.has_value()) {
|
||||||
EXPECT_STREQ(hash1.value().c_str(), hash2.value().c_str());
|
EXPECT_STREQ(hash1.value().c_str(), hash2.value().c_str());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user