1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +00:00

LibTest: Add EXPECT_CRASH_WITH_SIGNAL

This commit is contained in:
Michel Hermier 2021-12-17 18:12:47 +01:00 committed by Brian Gianforcaro
parent b1b94692e6
commit 4c6e826c05
6 changed files with 52 additions and 8 deletions

View file

@ -26,7 +26,9 @@ public:
UnexpectedError,
};
Crash(String test_type, Function<Crash::Failure()> crash_function);
static constexpr int ANY_SIGNAL = -1;
Crash(String test_type, Function<Crash::Failure()> crash_function, int crash_signal = ANY_SIGNAL);
bool run(RunType run_type = RunType::UsingChildProcess);
@ -36,6 +38,7 @@ private:
String m_type;
Function<Crash::Failure()> m_crash_function;
int m_crash_signal;
};
}