Rename folly command line argument injection related stuff

This commit is contained in:
gvolfing 2022-08-19 10:20:47 +02:00
parent f9044dc6d1
commit 667275479d
3 changed files with 7 additions and 5 deletions

View File

@ -16,7 +16,9 @@ namespace clahelper {
inline std::string g_command_line_arg;
}
class MyTestEnvironment : public testing::Environment {
class InjectedClaEnvironment : public testing::Environment {
public:
explicit MyTestEnvironment(const std::string &command_line_arg) { clahelper::g_command_line_arg = command_line_arg; }
explicit InjectedClaEnvironment(const std::string &command_line_arg) {
clahelper::g_command_line_arg = command_line_arg;
}
};

View File

@ -12,14 +12,14 @@
#include <gtest/gtest.h>
#include <utils/logging.hpp>
#include "coward_the_cowardly_dog.h"
#include "cla_helper.hpp"
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
std::string command_line_arg(argv[0]);
testing::InitGoogleTest(&argc, argv);
testing::AddGlobalTestEnvironment(new MyTestEnvironment(command_line_arg));
testing::AddGlobalTestEnvironment(new InjectedClaEnvironment(command_line_arg));
memgraph::logging::RedirectToStderr();
spdlog::set_level(spdlog::level::trace);

View File

@ -25,7 +25,7 @@
#include "io/thrift/thrift_transport.hpp"
#include "coward_the_cowardly_dog.h"
#include "cla_helper.hpp"
using namespace memgraph::io;