ack/tests/plat/csa_e.c
George Koehler b38fcdded3 Add tests for clearing BSS, copying C structs.
The new tests are bss_e.c, structcopy_e.c.  We do clear the BSS before
calling _m_a_i_n, so fix the comments in the other tests.
2018-01-27 20:09:16 -05:00

27 lines
435 B
C

#include "test.h"
int csa(int i)
{
switch (i)
{
case 2: return 2;
case 3: return 3;
case 4: return 4;
default: return 0;
}
}
/* Bypasses the CRT, so there's no stdio. */
void _m_a_i_n(void)
{
ASSERT(csa(0) == 0);
ASSERT(csa(1) == 0);
ASSERT(csa(2) == 2);
ASSERT(csa(3) == 3);
ASSERT(csa(4) == 4);
ASSERT(csa(5) == 0);
ASSERT(csa(6) == 0);
finished();
}