-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in Unity unit testing to Makefile and c files that implements …
…tests (#69)
- Loading branch information
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "unity.h" | ||
|
||
void test_can_handler(void) | ||
{ | ||
//TEST_ASSERT_NOT_NULL(getFunction(0x2010)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "unity.h" | ||
#include "cerberus_test.h" | ||
|
||
void setUp(void) { | ||
// set stuff up here | ||
} | ||
|
||
void tearDown(void) { | ||
// clean stuff up here | ||
} | ||
|
||
int main(void) { | ||
UNITY_BEGIN(); | ||
RUN_TEST(test_can_handler); | ||
return UNITY_END(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef CERBERUS_TEST_H | ||
#define CERBERUS_TEST_H | ||
|
||
/* | ||
* ************** NOTE ************** | ||
* These test files are specifically | ||
* for unit tests, developers can | ||
* make sure that specific functions | ||
* and APIs meet requirements set out. | ||
* This should NOT be used for actually | ||
* simulating drivers and hardware, | ||
* that is what we are using Renode for | ||
*/ | ||
|
||
void test_can_handler(void); | ||
|
||
#endif // CERBERUS_TEST_H |