Compare commits
2 Commits
b4f015f501
...
ccf1397595
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccf1397595 | ||
|
|
6a09d81ae2 |
@@ -18,7 +18,8 @@ set(ChaosTests_SOURCE Hash/Md4HasherTests.cpp
|
|||||||
Cipher/Arc4GenTests.cpp
|
Cipher/Arc4GenTests.cpp
|
||||||
Cipher/Arc4CryptTests.cpp
|
Cipher/Arc4CryptTests.cpp
|
||||||
Cipher/DesCryptTests.cpp
|
Cipher/DesCryptTests.cpp
|
||||||
Service/SeArrayTests.cpp)
|
Service/SeArrayTests.cpp
|
||||||
|
Service/ChaosExceptionTests.cpp)
|
||||||
|
|
||||||
add_executable(ChaosTests ${ChaosTests_SOURCE})
|
add_executable(ChaosTests ${ChaosTests_SOURCE})
|
||||||
target_link_libraries(ChaosTests gtest gtest_main)
|
target_link_libraries(ChaosTests gtest gtest_main)
|
||||||
|
|||||||
32
ChaosTests/Service/ChaosExceptionTests.cpp
Normal file
32
ChaosTests/Service/ChaosExceptionTests.cpp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#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());
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user