Skip to content

Commit

Permalink
Add unit test for static_assert.h
Browse files Browse the repository at this point in the history
(cherry picked from commit 91e7f46)
  • Loading branch information
dhebbeker committed Nov 9, 2023
1 parent 7771cf3 commit 9a6d3fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ add_executable(etl_tests
test_state_chart_with_rvalue_data_parameter.cpp
test_state_chart_compile_time.cpp
test_state_chart_compile_time_with_data_parameter.cpp
test_static_assert.cpp
test_string_char.cpp
test_string_char_external_buffer.cpp
test_string_stream.cpp
Expand Down
1 change: 1 addition & 0 deletions test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ etl_test_sources = files(
'test_state_chart_with_rvalue_data_parameter.cpp',
'test_state_chart_compile_time.cpp',
'test_state_chart_compile_time_with_data_parameter.cpp',
'test_static_assert.cpp',
'test_string_char.cpp',
'test_string_char_external_buffer.cpp',
'test_string_stream.cpp',
Expand Down
15 changes: 15 additions & 0 deletions test/test_static_assert.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "unit_test_framework.h"

#include "etl/static_assert.h"

namespace
{
SUITE(test_static_assert)
{
//*************************************************************************
TEST(test_static_assert_2arguments)
{
ETL_STATIC_ASSERT(true, "condition must be true");
}
}
}

0 comments on commit 9a6d3fe

Please sign in to comment.