diff --git a/test/crypto/kdf/DerivedKeyTest.cpp b/test/crypto/kdf/DerivedKeyTest.cpp index 970e6428..838b2ddf 100644 --- a/test/crypto/kdf/DerivedKeyTest.cpp +++ b/test/crypto/kdf/DerivedKeyTest.cpp @@ -2,9 +2,7 @@ #include "../../../crypto/kdf/DerivedKey.h" #include "../../../data/DataFixture.h" -using namespace cryfs; -using cpputils::DataFixture; -using cpputils::Data; +using namespace cpputils; TEST(DerivedKeyTest, Config) { DerivedKey<32> key(DerivedKeyConfig(DataFixture::generate(32, 1), 1024, 8, 16), DataFixture::generateFixedSize<32>(2)); diff --git a/test/crypto/kdf/SCryptTest.cpp b/test/crypto/kdf/SCryptTest.cpp index f2247314..ccc364c2 100644 --- a/test/crypto/kdf/SCryptTest.cpp +++ b/test/crypto/kdf/SCryptTest.cpp @@ -2,7 +2,7 @@ #include "../../../crypto/kdf/Scrypt.h" #include "testutils/SCryptTestSettings.h" -using namespace cryfs; +using namespace cpputils; TEST(SCryptTest, GeneratedKeyIsReproductible_448) { auto created = SCrypt().generateKey<56, SCryptTestSettings>("mypassword"); diff --git a/test/data/FixedSizeDataTest.cpp b/test/data/FixedSizeDataTest.cpp index 9b4a75b9..ad03f366 100644 --- a/test/data/FixedSizeDataTest.cpp +++ b/test/data/FixedSizeDataTest.cpp @@ -14,7 +14,7 @@ using namespace cpputils; class FixedSizeDataTest: public Test { public: - static constexpr unsigned int SIZE = 16; + static constexpr size_t SIZE = 16; const string DATA1_AS_STRING = "1491BB4932A389EE14BC7090AC772972"; const string DATA2_AS_STRING = "272EE5517627CFA147A971A8E6E747E0"; @@ -24,14 +24,14 @@ public: FixedSizeDataTest() : DATA3_AS_BINARY(DataFixture::generate(SIZE, 1)), DATA4_AS_BINARY(DataFixture::generate(SIZE, 2)) {} - template + template void EXPECT_DATA_EQ(const Data &expected, const FixedSizeData &actual) { EXPECT_EQ(expected.size(), SIZE); EXPECT_EQ(0, std::memcmp(expected.data(), actual.data(), SIZE)); } }; -constexpr unsigned int FixedSizeDataTest::SIZE; +constexpr size_t FixedSizeDataTest::SIZE; TEST_F(FixedSizeDataTest, EqualsTrue) { FixedSizeData DATA1_1 = FixedSizeData::FromString(DATA1_AS_STRING); diff --git a/test/logging/LoggingTest.cpp b/test/logging/LoggingTest.cpp index 6e26280e..73f22420 100644 --- a/test/logging/LoggingTest.cpp +++ b/test/logging/LoggingTest.cpp @@ -68,9 +68,11 @@ void logAndExit(const string &message) { exit(1); } +using LoggingTest_DeathTest = LoggingTest; + // fork() only forks the main thread. This test ensures that logging doesn't depend on threads that suddenly aren't // there anymore after a fork(). -TEST_F(LoggingTest, LoggingAlsoWorksAfterFork) { +TEST_F(LoggingTest_DeathTest, LoggingAlsoWorksAfterFork) { setLogger(spdlog::stderr_logger_mt("StderrLogger")); EXPECT_EXIT( logAndExit("My log message"),