TestRaise.cpp 338 B

1234567891011121314151617
  1. /*
  2. * Copyright (c) 2021, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibTest/TestCase.h>
  7. #include <signal.h>
  8. TEST_CASE(raise)
  9. {
  10. EXPECT_CRASH_WITH_SIGNAL("This should raise a SIGUSR1 signal", SIGUSR1, [] {
  11. raise(SIGUSR1);
  12. return Test::Crash::Failure::DidNotCrash;
  13. });
  14. }