From 4d6970837e0a67a6c616a167f97cc2b81561411b Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sat, 31 Oct 2015 17:23:14 +0100 Subject: [PATCH] Speedup test cases by using scrypt test config --- test/filesystem/CryFsTest.cpp | 3 ++- test/filesystem/FileSystemTest.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/filesystem/CryFsTest.cpp b/test/filesystem/CryFsTest.cpp index cea3fa93..70a07eb4 100644 --- a/test/filesystem/CryFsTest.cpp +++ b/test/filesystem/CryFsTest.cpp @@ -9,6 +9,7 @@ #include "../../src/filesystem/CryOpenFile.h" #include "../testutils/MockConsole.h" #include "../../src/config/CryConfigLoader.h" +#include //TODO (whole project) Make constructors explicit when implicit construction not needed @@ -34,7 +35,7 @@ public: } CryConfigFile loadOrCreateConfig() { - return CryConfigLoader(mockConsole(), Random::PseudoRandom(), [] {return "mypassword";}, none).loadOrCreate(config.path()).value(); + return CryConfigLoader(mockConsole(), Random::PseudoRandom(), [] {return "mypassword";}, none).loadOrCreate(config.path()).value(); } unique_ref blockStore() { diff --git a/test/filesystem/FileSystemTest.cpp b/test/filesystem/FileSystemTest.cpp index 2552f3c6..12f027ae 100644 --- a/test/filesystem/FileSystemTest.cpp +++ b/test/filesystem/FileSystemTest.cpp @@ -5,6 +5,7 @@ #include "../../src/filesystem/CryDevice.h" #include "../../src/config/CryConfigLoader.h" #include "../testutils/MockConsole.h" +#include using cpputils::unique_ref; using cpputils::make_unique_ref; @@ -28,7 +29,7 @@ public: unique_ref createDevice() override { auto blockStore = cpputils::make_unique_ref(); auto config = CryConfigLoader(mockConsole(), Random::PseudoRandom(), [] {return "mypassword";}, none) - .loadOrCreate(configFile.path()).value(); + .loadOrCreate(configFile.path()).value(); return make_unique_ref(std::move(config), std::move(blockStore)); }