🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
375 B

#include <gtest/gtest.h>
#include <entt/core/attribute.h>
#include <entt/signal/emitter.hpp>
#include "types.h"
ENTT_API void emit(test_emitter &);
TEST(Lib, Emitter) {
test_emitter emitter;
int value{};
ASSERT_EQ(value, 0);
emitter.once<message>([&](message msg, test_emitter &) { value = msg.payload; });
emit(emitter);
ASSERT_EQ(value, 42);
}