b38fcdded3
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.
66 lines
2 KiB
C
66 lines
2 KiB
C
#include "test.h"
|
|
|
|
/* Constants in globals to defeat constant folding. */
|
|
int one = 1;
|
|
int zero = 0;
|
|
|
|
/* Bypasses the CRT, so there's no stdio. */
|
|
void _m_a_i_n(void)
|
|
{
|
|
ASSERT(zero == zero);
|
|
ASSERT(one != zero);
|
|
ASSERT(zero < one);
|
|
ASSERT(zero <= one);
|
|
ASSERT(zero <= zero);
|
|
ASSERT(one > zero);
|
|
ASSERT(one >= zero);
|
|
ASSERT(one >= one);
|
|
|
|
ASSERT(zero == 0);
|
|
ASSERT(one != 0);
|
|
ASSERT(zero < 1);
|
|
ASSERT(zero <= 1);
|
|
ASSERT(zero <= 0);
|
|
ASSERT(one > 0);
|
|
ASSERT(one >= 0);
|
|
ASSERT(one >= 1);
|
|
|
|
ASSERT(0 == zero);
|
|
ASSERT(1 != zero);
|
|
ASSERT(0 < one);
|
|
ASSERT(0 <= one);
|
|
ASSERT(0 <= zero);
|
|
ASSERT(1 > zero);
|
|
ASSERT(1 >= zero);
|
|
ASSERT(1 >= one);
|
|
|
|
ASSERT((unsigned int)zero == (unsigned int)zero);
|
|
ASSERT((unsigned int)one != (unsigned int)zero);
|
|
ASSERT((unsigned int)zero < (unsigned int)one);
|
|
ASSERT((unsigned int)zero <= (unsigned int)one);
|
|
ASSERT((unsigned int)zero <= (unsigned int)zero);
|
|
ASSERT((unsigned int)one > (unsigned int)zero);
|
|
ASSERT((unsigned int)one >= (unsigned int)zero);
|
|
ASSERT((unsigned int)one >= (unsigned int)one);
|
|
|
|
ASSERT((unsigned int)zero == (unsigned int)0);
|
|
ASSERT((unsigned int)one != (unsigned int)0);
|
|
ASSERT((unsigned int)zero < (unsigned int)1);
|
|
ASSERT((unsigned int)zero <= (unsigned int)1);
|
|
ASSERT((unsigned int)zero <= (unsigned int)0);
|
|
ASSERT((unsigned int)one > (unsigned int)0);
|
|
ASSERT((unsigned int)one >= (unsigned int)0);
|
|
ASSERT((unsigned int)one >= (unsigned int)1);
|
|
|
|
ASSERT((unsigned int)0 == (unsigned int)zero);
|
|
ASSERT((unsigned int)1 != (unsigned int)zero);
|
|
ASSERT((unsigned int)0 < (unsigned int)one);
|
|
ASSERT((unsigned int)0 <= (unsigned int)one);
|
|
ASSERT((unsigned int)0 <= (unsigned int)zero);
|
|
ASSERT((unsigned int)1 > (unsigned int)zero);
|
|
ASSERT((unsigned int)1 >= (unsigned int)zero);
|
|
ASSERT((unsigned int)1 >= (unsigned int)one);
|
|
|
|
finished();
|
|
}
|