From 0af087c120e0b978659e64468b89a7214d4b978b Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Mon, 2 Oct 2017 08:01:38 +0100 Subject: [PATCH] Fix clang warning --- test/cryfs/config/CryConfigLoaderTest.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/cryfs/config/CryConfigLoaderTest.cpp b/test/cryfs/config/CryConfigLoaderTest.cpp index ac109fee..401688d6 100644 --- a/test/cryfs/config/CryConfigLoaderTest.cpp +++ b/test/cryfs/config/CryConfigLoaderTest.cpp @@ -34,6 +34,11 @@ namespace boost { return stream << "CryConfigFile()"; } } +namespace cryfs { + inline ostream &operator<<(ostream &stream, const CryConfigLoader::ConfigLoadResult &) { + return stream << "ConfigLoadResult()"; + } +} #include class FakeRandomGenerator final : public cpputils::RandomGenerator { @@ -98,7 +103,7 @@ public: FakeRandomGenerator generator(Data::FromString(encKey)); auto loader = CryConfigLoader(console, generator, SCrypt::TestSettings, askPassword, askPassword, none, none, none); - loader.loadOrCreate(file.path()).value().configFile; + ASSERT_NE(boost::none, loader.loadOrCreate(file.path())); } void ChangeEncryptionKey(const string &encKey, const string& password = "mypassword") {