Did some tweaks to the CMakeLists
This commit is contained in:
@ -1,6 +1,28 @@
|
||||
file(GLOB_RECURSE SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
add_executable(tests ${SRCS})
|
||||
target_link_libraries(tests game unity)
|
||||
# Definitions
|
||||
|
||||
add_test(tests tests)
|
||||
# Libraries
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
unity
|
||||
)
|
||||
|
||||
# Sources
|
||||
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
|
||||
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
)
|
||||
|
||||
# Includes
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
#include <unity.h>
|
||||
#include <poker/poker.h>
|
||||
#include <poker/player.h>
|
||||
#include <poker/dealer.h>
|
||||
|
||||
int test_dealer_h();
|
@ -88,7 +88,7 @@ void test_pokerPotAddPlayer_should_AddAPlayer(void) {
|
||||
TEST_ASSERT_EQUAL_UINT8(0x00, pot->players[1]);
|
||||
}
|
||||
|
||||
void test_pokerPotGetSumOfChipsForPlayer_should_SumPlayersPotsChips(){
|
||||
void test_pokerPotGetSumOfChipsForPlayer_should_SumPlayersPotsChips(void){
|
||||
poker_t poker;
|
||||
uint8_t p0i, p1i;
|
||||
pokerplayer_t *p0;
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include <unity.h>
|
||||
#include <poker/poker.h>
|
||||
#include <poker/winner.h>
|
||||
|
||||
int test_winner_h();
|
Reference in New Issue
Block a user