forked from ThrowTheSwitch/Ceedling
-
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.
[UT] Add unit tests to check :use_backtrace_gdb_reporter option
Add to assets test_example_file_sigsegv.c sigsegv test file
- Loading branch information
1 parent
7fa217d
commit 94cfcc9
Showing
4 changed files
with
71 additions
and
1 deletion.
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,16 @@ | ||
#include <signal.h> | ||
#include "unity.h" | ||
#include "example_file.h" | ||
|
||
|
||
void setUp(void) {} | ||
void tearDown(void) {} | ||
|
||
void test_add_numbers_adds_numbers(void) { | ||
TEST_ASSERT_EQUAL(2, add_numbers(1,1)); | ||
} | ||
|
||
void test_add_numbers_will_fail(void) { | ||
raise(SIGSEGV); | ||
TEST_ASSERT_EQUAL(2, add_numbers(2,2)); | ||
} |
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