mirror of
https://github.com/ennorehling/cutest.git
synced 2024-12-22 07:52:21 +00:00
add cmake configuration
This commit is contained in:
parent
c4e7ef9755
commit
d00bb596fa
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*~
|
@ -5,7 +5,7 @@
|
|||||||
CuSuite* CuGetSuite();
|
CuSuite* CuGetSuite();
|
||||||
CuSuite* CuStringGetSuite();
|
CuSuite* CuStringGetSuite();
|
||||||
|
|
||||||
void RunAllTests(void)
|
int RunAllTests(void)
|
||||||
{
|
{
|
||||||
CuString *output = CuStringNew();
|
CuString *output = CuStringNew();
|
||||||
CuSuite* suite = CuSuiteNew();
|
CuSuite* suite = CuSuiteNew();
|
||||||
@ -17,9 +17,10 @@ void RunAllTests(void)
|
|||||||
CuSuiteSummary(suite, output);
|
CuSuiteSummary(suite, output);
|
||||||
CuSuiteDetails(suite, output);
|
CuSuiteDetails(suite, output);
|
||||||
printf("%s\n", output->buffer);
|
printf("%s\n", output->buffer);
|
||||||
|
return suite->failCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
RunAllTests();
|
return RunAllTests();
|
||||||
}
|
}
|
||||||
|
10
CMakeLists.txt
Normal file
10
CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
project (cutest C)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
add_library (cutest CuTest.c)
|
||||||
|
|
||||||
|
add_executable (AllTests AllTests.c CuTestTest.c)
|
||||||
|
target_link_libraries (AllTests cutest)
|
||||||
|
|
||||||
|
add_test (cutest AllTests)
|
Loading…
Reference in New Issue
Block a user