Skip to content

Commit

Permalink
Merge branch 'ThrowTheSwitch:master' into dev/gen-testrunner-use-begi…
Browse files Browse the repository at this point in the history
…n-end-macro
  • Loading branch information
andre-lei authored May 3, 2024
2 parents c3a3843 + 1d28a99 commit 35229fd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Checks out repository under $GITHUB_WORKSPACE
- name: Checkout Latest Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

# Run Tests
- name: Run All Unit Tests
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unity Test ![CI][]

__Copyright (c) 2007 - 2023 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
__Copyright (c) 2007 - 2024 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__

Welcome to the Unity Test Project, one of the main projects of ThrowTheSwitch.org.
Unity Test is a unit testing framework built for C, with a focus on working with embedded toolchains.
Expand Down
2 changes: 1 addition & 1 deletion auto/run_test.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE line_num)
{
Unity.CurrentTestName = name;
Unity.CurrentTestLineNumber = line_num;
Unity.CurrentTestLineNumber = (UNITY_UINT) line_num;
#ifdef UNITY_USE_COMMAND_LINE_ARGS
if (!UnityTestMatches())
return;
Expand Down
4 changes: 2 additions & 2 deletions src/unity.c
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ int UnityParseOptions(int argc, char** argv)
}

/*-----------------------------------------------*/
int IsStringInBiggerString(const char* longstring, const char* shortstring)
static int IsStringInBiggerString(const char* longstring, const char* shortstring)
{
const char* lptr = longstring;
const char* sptr = shortstring;
Expand Down Expand Up @@ -2396,7 +2396,7 @@ int IsStringInBiggerString(const char* longstring, const char* shortstring)
}

/*-----------------------------------------------*/
int UnityStringArgumentMatches(const char* str)
static int UnityStringArgumentMatches(const char* str)
{
int retval;
const char* ptr1;
Expand Down
10 changes: 5 additions & 5 deletions src/unity_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -875,11 +875,11 @@ int UnityTestMatches(void);
* Test Asserts
*-------------------------------------------------------*/

#define UNITY_TEST_ASSERT(condition, line, message) do { if (condition) { /* nothing*/ } else { UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), (message)); } } while (0)
#define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)(line), (message))
#define UNITY_TEST_ASSERT_NOT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) != NULL), (UNITY_LINE_TYPE)(line), (message))
#define UNITY_TEST_ASSERT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) == 0), (UNITY_LINE_TYPE)(line), (message))
#define UNITY_TEST_ASSERT_NOT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) != 0), (UNITY_LINE_TYPE)(line), (message))
#define UNITY_TEST_ASSERT(condition, line, message) do { if (condition) { /* nothing*/ } else { UNITY_TEST_FAIL((line), (message)); } } while (0)
#define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (line), (message))
#define UNITY_TEST_ASSERT_NOT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) != NULL), (line), (message))
#define UNITY_TEST_ASSERT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) == 0), (line), (message))
#define UNITY_TEST_ASSERT_NOT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) != 0), (line), (message))

#define UNITY_TEST_ASSERT_EQUAL_INT(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
#define UNITY_TEST_ASSERT_EQUAL_INT8(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
Expand Down
2 changes: 1 addition & 1 deletion test/tests/test_unity_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void)
startFlushSpy();
savedGetFlushSpyCalls = getFlushSpyCalls();
UnityConcludeTest();
TEST_ASSERT_EQUAL(0, savedGetFlushSpyCalls);
endPutcharSpy();
TEST_ASSERT_EQUAL(0, savedGetFlushSpyCalls);
TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures);
#if defined(UNITY_OUTPUT_FLUSH) && defined(UNITY_OUTPUT_FLUSH_HEADER_DECLARATION)
TEST_ASSERT_EQUAL(1, getFlushSpyCalls());
Expand Down

0 comments on commit 35229fd

Please sign in to comment.