Skip to content

Commit

Permalink
More tests (#2)
Browse files Browse the repository at this point in the history
* test

* add googletest as submodule

* set v1.15.2 for googletest

* minimal dependencies for workflows

* add googletest-v1.15.2 as sources

* disable tests by default

* remove submodules update

* better tests
  • Loading branch information
ShipilovDmitry authored Oct 26, 2024
1 parent 8f3b10b commit b0d015d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/structarus/detail/utils.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "common/tar/detail/header.hpp"
#include "header.hpp"
#include "consts.hpp"

#include <algorithm>
Expand Down
8 changes: 7 additions & 1 deletion tests/tar/tar_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <gtest/gtest.h>

#include "include/structarus/detail/header.hpp"
#include "include/structarus/tar_creator.hpp"

using namespace tar;

Expand All @@ -24,3 +24,9 @@ TEST(TarHeader, BasicConstruction) {
EXPECT_EQ(header.prefix.size(), 155u);
EXPECT_EQ(header.padding.size(), 12u); // Adjusted size to match the actual padding size
}

TEST(Tar, Dummy) {
std::string result;
tar::Creator<std::ofstream> creator(result);
creator.addFile({"sqwoz", "bab"});
}

0 comments on commit b0d015d

Please sign in to comment.