Cleaned up repo
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
add_subdirectory(Unity)
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
add_executable(testing
|
||||
./test.cpp
|
||||
)
|
||||
set_target_properties(testing PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(testing unity)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//= History: KJC (12/29/00) - Genesis (from server.c) =
|
||||
//= HF (01/25/01) - Ported to multi-platform environment =
|
||||
//=============================================================================
|
||||
#define WIN // WIN for Windows environment, UNIX for BSD or LINUX env.
|
||||
#define UNIX // WIN for Windows environment, UNIX for BSD or LINUX env.
|
||||
|
||||
//----- Include files ---------------------------------------------------------
|
||||
#include <stdio.h> // Needed for printf()
|
||||
@@ -301,4 +301,4 @@ void child_proc(int server_s, int client_s)
|
||||
close(client_s);
|
||||
}
|
||||
#endif
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
int math();
|
||||
void test_math();
|
||||
void IsEqual(bool lhs, bool rhs);
|
||||
|
||||
int main() {
|
||||
test_math();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int math() {
|
||||
return 2+2;
|
||||
}
|
||||
|
||||
void test_math() {
|
||||
IsEqual(math(), 4);
|
||||
IsEqual(math(), 6);
|
||||
}
|
||||
|
||||
void IsEqual(bool lhs, bool rhs) {
|
||||
if (lhs == rhs) {
|
||||
std::cout << "Test Success" << std::endl;
|
||||
} else {
|
||||
std::cout << "Test Failure" << std::endl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user