Fix compiler error in test cases on Mac OS X

This commit is contained in:
Sebastian Messmer 2016-02-13 20:42:28 +01:00
parent 2b9469cd20
commit c0d0efd058
8 changed files with 9 additions and 10 deletions

View File

@ -2,7 +2,6 @@
#include <cryfs/config/CryConfigFile.h> #include <cryfs/config/CryConfigFile.h>
#include <cpp-utils/tempfile/TempFile.h> #include <cpp-utils/tempfile/TempFile.h>
#include <boost/optional/optional_io.hpp>
using namespace cryfs; using namespace cryfs;
using cpputils::TempFile; using cpputils::TempFile;
@ -17,10 +16,11 @@ namespace bf = boost::filesystem;
namespace boost { namespace boost {
inline std::ostream &operator<<(std::ostream &out, const CryConfigFile &file) { inline std::ostream &operator<<(std::ostream &out, const CryConfigFile &file) {
UNUSED(file); UNUSED(file);
out << "ConfigFile"; out << "ConfigFile()";
return out; return out;
} }
} }
#include <boost/optional/optional_io.hpp>
class CryConfigFileTest: public ::testing::Test { class CryConfigFileTest: public ::testing::Test {
public: public:

View File

@ -4,7 +4,6 @@
#include <cpp-utils/tempfile/TempFile.h> #include <cpp-utils/tempfile/TempFile.h>
#include <cpp-utils/random/Random.h> #include <cpp-utils/random/Random.h>
#include <cpp-utils/crypto/symmetric/ciphers.h> #include <cpp-utils/crypto/symmetric/ciphers.h>
#include <boost/optional/optional_io.hpp>
using cpputils::unique_ref; using cpputils::unique_ref;
using cpputils::make_unique_ref; using cpputils::make_unique_ref;
@ -25,6 +24,7 @@ namespace boost {
return stream << "CryConfigFile()"; return stream << "CryConfigFile()";
} }
} }
#include <boost/optional/optional_io.hpp>
//TODO Test loading with same/different --cipher argument //TODO Test loading with same/different --cipher argument

View File

@ -2,7 +2,6 @@
#include <cryfs/config/crypto/CryConfigEncryptorFactory.h> #include <cryfs/config/crypto/CryConfigEncryptorFactory.h>
#include <cpp-utils/crypto/symmetric/ciphers.h> #include <cpp-utils/crypto/symmetric/ciphers.h>
#include <cpp-utils/data/DataFixture.h> #include <cpp-utils/data/DataFixture.h>
#include <cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h>
using cpputils::SCrypt; using cpputils::SCrypt;
using cpputils::AES256_GCM; using cpputils::AES256_GCM;
@ -18,7 +17,7 @@ namespace boost {
return stream << "CryConfigEncryptor::Decrypted()"; return stream << "CryConfigEncryptor::Decrypted()";
} }
} }
#include <cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h>
class CryConfigEncryptorFactoryTest: public ::testing::Test { class CryConfigEncryptorFactoryTest: public ::testing::Test {
public: public:

View File

@ -1,7 +1,6 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <cpp-utils/data/DataFixture.h> #include <cpp-utils/data/DataFixture.h>
#include <cpp-utils/crypto/symmetric/ciphers.h> #include <cpp-utils/crypto/symmetric/ciphers.h>
#include <boost/optional/optional_io.hpp>
#include <cryfs/config/crypto/CryConfigEncryptor.h> #include <cryfs/config/crypto/CryConfigEncryptor.h>
using std::ostream; using std::ostream;
@ -24,6 +23,7 @@ namespace boost {
return stream << "CryConfigEncryptor::Decrypted()"; return stream << "CryConfigEncryptor::Decrypted()";
} }
} }
#include <boost/optional/optional_io.hpp>
class CryConfigEncryptorTest: public ::testing::Test { class CryConfigEncryptorTest: public ::testing::Test {
public: public:

View File

@ -2,7 +2,6 @@
#include <cryfs/config/crypto/inner/ConcreteInnerEncryptor.h> #include <cryfs/config/crypto/inner/ConcreteInnerEncryptor.h>
#include <cpp-utils/crypto/symmetric/ciphers.h> #include <cpp-utils/crypto/symmetric/ciphers.h>
#include <cpp-utils/data/DataFixture.h> #include <cpp-utils/data/DataFixture.h>
#include <boost/optional/optional_io.hpp>
using std::ostream; using std::ostream;
using boost::none; using boost::none;
@ -21,6 +20,7 @@ namespace boost {
return stream << "cpputils::Data()"; return stream << "cpputils::Data()";
} }
} }
#include <boost/optional/optional_io.hpp>
class ConcreteInnerEncryptorTest : public ::testing::Test { class ConcreteInnerEncryptorTest : public ::testing::Test {
public: public:

View File

@ -1,6 +1,5 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <cpp-utils/data/DataFixture.h> #include <cpp-utils/data/DataFixture.h>
#include <boost/optional/optional_io.hpp>
#include <cryfs/config/crypto/inner/InnerConfig.h> #include <cryfs/config/crypto/inner/InnerConfig.h>
using cpputils::Data; using cpputils::Data;
@ -15,6 +14,7 @@ namespace boost {
return stream << "InnerConfig(" << config.cipherName << ", [data])"; return stream << "InnerConfig(" << config.cipherName << ", [data])";
} }
} }
#include <boost/optional/optional_io.hpp>
TEST(InnerConfigTest, SomeValues) { TEST(InnerConfigTest, SomeValues) {
Data serialized = InnerConfig{"myciphername", DataFixture::generate(1024)}.serialize(); Data serialized = InnerConfig{"myciphername", DataFixture::generate(1024)}.serialize();

View File

@ -1,6 +1,5 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <cpp-utils/data/DataFixture.h> #include <cpp-utils/data/DataFixture.h>
#include <boost/optional/optional_io.hpp>
#include <cryfs/config/crypto/outer/OuterConfig.h> #include <cryfs/config/crypto/outer/OuterConfig.h>
using cpputils::Data; using cpputils::Data;
@ -16,6 +15,7 @@ namespace boost {
return stream << "OuterConfig()"; return stream << "OuterConfig()";
} }
} }
#include <boost/optional/optional_io.hpp>
class OuterConfigTest: public ::testing::Test { class OuterConfigTest: public ::testing::Test {
public: public:

View File

@ -2,7 +2,6 @@
#include <cryfs/config/crypto/outer/OuterEncryptor.h> #include <cryfs/config/crypto/outer/OuterEncryptor.h>
#include <cpp-utils/crypto/symmetric/ciphers.h> #include <cpp-utils/crypto/symmetric/ciphers.h>
#include <cpp-utils/data/DataFixture.h> #include <cpp-utils/data/DataFixture.h>
#include <boost/optional/optional_io.hpp>
using std::ostream; using std::ostream;
using boost::none; using boost::none;
@ -19,6 +18,7 @@ namespace boost {
return stream << "cpputils::Data()"; return stream << "cpputils::Data()";
} }
} }
#include <boost/optional/optional_io.hpp>
class OuterEncryptorTest : public ::testing::Test { class OuterEncryptorTest : public ::testing::Test {
public: public: