2016-11-19 09:55:41 +00:00
|
|
|
#include "test.h"
|
|
|
|
|
|
|
|
int csa(int i)
|
|
|
|
{
|
|
|
|
switch (i)
|
|
|
|
{
|
|
|
|
case 2: return 2;
|
|
|
|
case 3: return 3;
|
|
|
|
case 4: return 4;
|
|
|
|
default: return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-28 01:09:16 +00:00
|
|
|
/* Bypasses the CRT, so there's no stdio. */
|
2016-11-19 09:55:41 +00:00
|
|
|
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();
|
2018-01-28 01:09:16 +00:00
|
|
|
}
|