DryChem 1.0.0
A generic, compile-time C++ toolbox with no dependencies for the modern computational chemistry project.
Loading...
Searching...
No Matches
testErrorTraits.hpp
Go to the documentation of this file.
1// Copyright (c) 2020-2025 Cody R. Drisko. All rights reserved.
2// Licensed under the MIT License. See the LICENSE file in the project root for more information.
3//
4// Name: testErrorTraits.hpp
5// Author: crdrisko
6// Date: 08/26/2020-14:36:00
7// Description: Provides ~100% unit test coverage over all type traits associated with error and exception handling
8
9#ifndef DRYCHEM_COMMON_UTILITIES_LIBS_ERRORS_TESTS_TESTTRAITS_TESTERRORTRAITS_HPP
10#define DRYCHEM_COMMON_UTILITIES_LIBS_ERRORS_TESTS_TESTTRAITS_TESTERRORTRAITS_HPP
11
13#include <gtest/gtest.h>
14
15GTEST_TEST(testErrorTraits, isFatalIsFalseWhenTemplateParameterIsWarning)
16{
17 ASSERT_FALSE(DryChem::is_fatal<DryChem::ErrorSeverity::Warning>::value);
18 ASSERT_FALSE(DryChem::is_fatal_v<DryChem::ErrorSeverity::Warning>);
19}
20
21GTEST_TEST(testErrorTraits, isFatalIsTrueWhenTemplateParameterIsFatal)
22{
23 ASSERT_TRUE(DryChem::is_fatal<DryChem::ErrorSeverity::Fatal>::value);
24 ASSERT_TRUE(DryChem::is_fatal_v<DryChem::ErrorSeverity::Fatal>);
25}
26
27#endif
GTEST_TEST(testErrorTraits, isFatalIsFalseWhenTemplateParameterIsWarning)
Definition testErrorTraits.hpp:15