File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1609,8 +1609,8 @@ void UnityAssertEqualString(const char* expected,
1609
1609
}
1610
1610
}
1611
1611
else
1612
- { /* handle case of one pointers being null ( if both null, test should pass) */
1613
- if (expected != actual )
1612
+ { /* fail if either null but not if both */
1613
+ if (expected || actual )
1614
1614
{
1615
1615
Unity .CurrentTestFailed = 1 ;
1616
1616
}
@@ -1649,8 +1649,8 @@ void UnityAssertEqualStringLen(const char* expected,
1649
1649
}
1650
1650
}
1651
1651
else
1652
- { /* handle case of one pointers being null ( if both null, test should pass) */
1653
- if (expected != actual )
1652
+ { /* fail if either null but not if both */
1653
+ if (expected || actual )
1654
1654
{
1655
1655
Unity .CurrentTestFailed = 1 ;
1656
1656
}
You can’t perform that action at this time.
0 commit comments