feat add sigslot test case
Some checks failed
linux-x64-gcc / linux-gcc (Debug) (push) Waiting to run
linux-x64-gcc / linux-gcc (Release) (push) Waiting to run
linux-arm-gcc / linux-gcc-arm (push) Failing after 1m54s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 1m51s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 23m27s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Has been cancelled
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Has been cancelled
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (pull_request) Failing after 3m0s
linux-arm-gcc / linux-gcc-armhf (pull_request) Failing after 1m56s
linux-arm-gcc / linux-gcc-arm (pull_request) Failing after 13m17s
linux-mips64-gcc / linux-gcc-mips64el (Release) (pull_request) Failing after 43m40s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (pull_request) Failing after 1h10m59s
linux-x64-gcc / linux-gcc (Debug) (pull_request) Failing after 1h10m55s
linux-x64-gcc / linux-gcc (Release) (pull_request) Failing after 1h10m53s
Some checks failed
linux-x64-gcc / linux-gcc (Debug) (push) Waiting to run
linux-x64-gcc / linux-gcc (Release) (push) Waiting to run
linux-arm-gcc / linux-gcc-arm (push) Failing after 1m54s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 1m51s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 23m27s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Has been cancelled
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Has been cancelled
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (pull_request) Failing after 3m0s
linux-arm-gcc / linux-gcc-armhf (pull_request) Failing after 1m56s
linux-arm-gcc / linux-gcc-arm (pull_request) Failing after 13m17s
linux-mips64-gcc / linux-gcc-mips64el (Release) (pull_request) Failing after 43m40s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (pull_request) Failing after 1h10m59s
linux-x64-gcc / linux-gcc (Debug) (pull_request) Failing after 1h10m55s
linux-x64-gcc / linux-gcc (Release) (pull_request) Failing after 1h10m53s
This commit is contained in:
parent
94f1572347
commit
67f44c0202
@ -188,6 +188,7 @@ if(SLED_BUILD_TESTS)
|
||||
src/sled/utility/move_on_copy_test.cc)
|
||||
sled_add_test(NAME sled_symbolize_test SRCS
|
||||
src/sled/debugging/symbolize_test.cc NO_MAIN)
|
||||
sled_add_test(NAME sled_sigslot_test SRCS src/sled/sigslot_test.cc)
|
||||
endif(SLED_BUILD_TESTS)
|
||||
|
||||
if(SLED_BUILD_FUZZ)
|
||||
|
16
src/sled/sigslot_test.cc
Normal file
16
src/sled/sigslot_test.cc
Normal file
@ -0,0 +1,16 @@
|
||||
#include <sled/sigslot.h>
|
||||
|
||||
struct DeleteSelf : public sigslot::has_slots<> {
|
||||
void DeleteThis() {
|
||||
delete this;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_SUITE("sigslot") {
|
||||
TEST_CASE("delete this") {
|
||||
DeleteSelf* d = new DeleteSelf();
|
||||
sigslot::signal0<> sig;
|
||||
sig.connect(d, &DeleteSelf::DeleteThis);
|
||||
sig.emit();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user