Fixed Unity
This commit is contained in:
+4
-3
@@ -1,7 +1,8 @@
|
||||
add_subdirectory(Unity)
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
find_package(unity REQUIRED)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||
add_executable(testing
|
||||
./test.cpp
|
||||
test.cpp
|
||||
../src/algorithm.cpp
|
||||
)
|
||||
set_target_properties(testing PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(testing unity)
|
||||
|
||||
-1
Submodule test/Unity deleted from 2775e1b058
+13
-9
@@ -1,15 +1,19 @@
|
||||
#include "unity.h"
|
||||
#include "unity_internals.h"
|
||||
#include <unity/unity.h>
|
||||
#include <unity/unity_internals.h>
|
||||
#include "../src/algorithm.hpp"
|
||||
|
||||
void setUp() { }
|
||||
void tearDown() { }
|
||||
void setUp() { ; }
|
||||
void tearDown() { ; }
|
||||
|
||||
void test_SUCCESS(void)
|
||||
Graph testGraph;
|
||||
|
||||
void test_AllVerticesAdded(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(4, 2+2);
|
||||
testGraph = ReadInGraph("test/input/graphPosLittle");
|
||||
TEST_ASSERT_EQUAL_INT(10, testGraph.nodeCount);
|
||||
}
|
||||
|
||||
void test_FAILURE(void)
|
||||
void test_AllEdgesAdded(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(4, 2+3);
|
||||
}
|
||||
@@ -17,8 +21,8 @@ void test_FAILURE(void)
|
||||
int main(void)
|
||||
{
|
||||
UNITY_BEGIN();
|
||||
RUN_TEST(test_SUCCESS);
|
||||
RUN_TEST(test_FAILURE);
|
||||
RUN_TEST(test_AllVerticesAdded);
|
||||
RUN_TEST(test_AllEdgesAdded);
|
||||
return UNITY_END();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user