mirror of
https://github.com/cc65/cc65.git
synced 2024-12-28 06:30:16 +00:00
14 lines
211 B
C
14 lines
211 B
C
|
#include "unittest.h"
|
||
|
|
||
|
char test[1];
|
||
|
char *dst = &test[0];
|
||
|
|
||
|
TEST
|
||
|
{
|
||
|
char src = 0;
|
||
|
*dst = (src == 0) ? 42 : src;
|
||
|
|
||
|
ASSERT_AreEqual(42, *dst, "%u", "Incorrect ternary expression evaluation!");
|
||
|
}
|
||
|
ENDTEST
|