Skip to content

Commit

Permalink
add unit test for static allocation component
Browse files Browse the repository at this point in the history
  • Loading branch information
QuangHaiNguyen committed Mar 6, 2024
1 parent 0fd77f1 commit eda562e
Show file tree
Hide file tree
Showing 6 changed files with 465 additions and 437 deletions.
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ if(ENABLE_EZ_LINKEDLIST)
add_subdirectory(utilities/linked_list)
endif()

if(ENABLE_EZ_STATIC_ALLOC)
add_subdirectory(utilities/static_alloc)
endif()

# End of file
5 changes: 5 additions & 0 deletions tests/utilities/linked_list/unittest_ez_linked_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ TEST_TEAR_DOWN(ez_linked_list)
TEST_GROUP_RUNNER(ez_linked_list)
{
RUN_TEST_CASE(ez_linked_list, Test_Macro);
RUN_TEST_CASE(ez_linked_list, LinkedList_InsertNewHead);
RUN_TEST_CASE(ez_linked_list, LinkedList_UnlinkCurrentHead);
RUN_TEST_CASE(ez_linked_list, ezmLL_IsNodeInList);
RUN_TEST_CASE(ez_linked_list, Unlink_node);
RUN_TEST_CASE(ez_linked_list, ezmLL_AppendNode);
}


Expand Down
55 changes: 55 additions & 0 deletions tests/utilities/static_alloc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# ----------------------------------------------------------------------------
# Author: Hai Nguyen
# Name: ez_static_alloc_test
# License: This file is published under the license described in LICENSE.md
# Description: Cmake file for static_alloc component
# ----------------------------------------------------------------------------

add_executable(ez_static_alloc_test)

message(STATUS "**********************************************************")
message(STATUS "* Generating ez_static_alloc_test build files")
message(STATUS "**********************************************************")


# Source files ---------------------------------------------------------------
target_sources(ez_static_alloc_test
PRIVATE
unittest_ez_static_alloc.c
)


# Definitions ----------------------------------------------------------------
target_compile_definitions(ez_static_alloc_test
PUBLIC
# Please add definitions here
)


# Include directory -----------------------------------------------------------
target_include_directories(ez_static_alloc_test
PUBLIC
# Please add private folders here
PRIVATE
# Please add private folders here
INTERFACE
# Please add interface folders here
)


# Link libraries -------------------------------------------------------------
target_link_libraries(ez_static_alloc_test
PUBLIC
# Please add public libraries
PRIVATE
unity
easy_embedded_lib
INTERFACE
# Please add interface libraries
)

add_test(NAME ez_static_alloc_test
COMMAND ez_static_alloc_test
)

# End of file
Loading

0 comments on commit eda562e

Please sign in to comment.