// Copyright Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #include #include #include #include "GenericContextFixture.hpp" #include "SimpleFixture.hpp" #include "SourceMatcher.hpp" using namespace rocRoller; namespace rocRollerTest { class ErrorTest : public SimpleFixture { }; class ErrorFixtureTest : public GenericContextFixture { }; using ErrorFixtureDeathTest = ErrorFixtureTest; TEST_F(ErrorFixtureDeathTest, BreakOnAssertFatal) { (void)(::testing::GTEST_FLAG(death_test_style) = "threadsafe"); Settings::getInstance()->set(Settings::BreakOnThrow, true); EXPECT_DEATH({ AssertFatal(0 == 1); }, ""); } TEST_F(ErrorFixtureDeathTest, BreakOnThrow) { (void)(::testing::GTEST_FLAG(death_test_style) = "threadsafe"); Settings::getInstance()->set(Settings::BreakOnThrow, true); EXPECT_DEATH({ Throw("Error"); }, ""); } }