/* * Copyright (c) 2018-2020, Andreas Kling * Copyright (c) 2019-2020, Shannon Booth * Copyright (c) 2021, Brian Gianforaro * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Test { class Crash { public: enum class RunType { UsingChildProcess, UsingCurrentProcess, }; enum class Failure { DidNotCrash, UnexpectedError, }; Crash(String test_type, Function crash_function); bool run(RunType run_type = RunType::UsingChildProcess); private: String m_type; Function m_crash_function; }; }