Files
chaos/ChaosTests/Service/ChaosExceptionTests.cpp
T
hashlag 88bcbb5514
Chaos Ci / test (push) Successful in 2m57s
Chaos Ci / benchmark (push) Successful in 1m47s
Improve #include formatting in tests.
2026-08-02 03:25:00 +03:00

34 lines
643 B
C++

#include <gtest/gtest.h>
#include <string>
#include "Service/ChaosException.hpp"
using namespace Chaos::Service;
TEST(ChaosExceptionTests, RvalueRefCtorTest)
{
try
{
throw ChaosException("everything's alright :D");
}
catch (const ChaosException & ex)
{
ASSERT_EQ("everything's alright :D", ex.GetMessage());
}
}
TEST(ChaosExceptionTests, ConstLvalueRefCtorTest)
{
const std::string message = "everything's alright :D";
try
{
throw ChaosException(message);
}
catch (const ChaosException & ex)
{
ASSERT_EQ("everything's alright :D", ex.GetMessage());
}
}