mirror of https://github.com/odrling/Aegisub
Fix test compilation
This commit is contained in:
parent
2de5396f7a
commit
b9509289aa
|
@ -10,6 +10,8 @@ LDFLAGS += -Wl,-rpath $(CURDIR)/../libaegisub $(LDFLAGS_ICONV)
|
|||
CPPFLAGS += -I../src/include -I../libaegisub/include $(CFLAGS_ICONV) -I${GTEST_ROOT} -I${GTEST_ROOT}/include -I./support $(CPPFLAGS_BOOST)
|
||||
CXXFLAGS += -Wno-unused-value -Wno-sign-compare
|
||||
|
||||
PRECOMPILED_HEADER_NAME = ../libaegisub/lagi_pre.h
|
||||
|
||||
ifeq (yes, $(BUILD_DARWIN))
|
||||
LDFLAGS += -framework ApplicationServices -framework Foundation
|
||||
endif
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <libaegisub/dispatch.h>
|
||||
#include <libaegisub/fs.h>
|
||||
#include <libaegisub/log.h>
|
||||
#include <libaegisub/util.h>
|
||||
#include <libaegisub/make_unique.h>
|
||||
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <cstdlib>
|
||||
|
@ -29,7 +29,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
int retval;
|
||||
agi::log::log = new agi::log::LogSink;
|
||||
agi::log::log->Subscribe(agi::util::make_unique<agi::log::JsonEmitter>("./"));
|
||||
agi::log::log->Subscribe(agi::make_unique<agi::log::JsonEmitter>("./"));
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
srand(time(nullptr));
|
||||
|
|
|
@ -154,8 +154,6 @@ static void insert_combo(Hotkey::HotkeyMap &hm, const char *ctx, const char *cmd
|
|||
hm.insert(make_pair(std::string(cmd), Combo(ctx, cmd, keys)));
|
||||
}
|
||||
|
||||
static void set_var(bool *b) { *b = true; }
|
||||
|
||||
TEST(lagi_hotkey, set_hotkey_map) {
|
||||
agi::fs::Remove("data/hotkey_tmp");
|
||||
{
|
||||
|
@ -168,7 +166,7 @@ TEST(lagi_hotkey, set_hotkey_map) {
|
|||
insert_combo(hm, "Default", "cmd2", 2, "Shift", "C");
|
||||
|
||||
bool listener_called = false;
|
||||
h.AddHotkeyChangeListener(set_var, &listener_called);
|
||||
h.AddHotkeyChangeListener([&] { listener_called = true; });
|
||||
|
||||
h.SetHotkeyMap(hm);
|
||||
EXPECT_TRUE(listener_called);
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
//
|
||||
// Aegisub Project http://www.aegisub.org/
|
||||
|
||||
#include "../../libaegisub/config.h"
|
||||
|
||||
#include <libaegisub/util.h>
|
||||
|
||||
#include "main.h"
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
//
|
||||
// Aegisub Project http://www.aegisub.org/
|
||||
|
||||
#include "../../libaegisub/config.h"
|
||||
|
||||
#include <libaegisub/util.h>
|
||||
|
||||
#include "main.h"
|
||||
|
|
Loading…
Reference in New Issue