crt: Rewrite t_intrinc with proper assertions

The previous test only exercised InterlockedIncrement and
InterlockedDecrement, used printf for output, and never returned a
failure exit code, making it useless as an automated test.

Replace it with a proper test that covers InterlockedIncrement,
InterlockedDecrement, InterlockedExchange, InterlockedExchangeAdd,
InterlockedCompareExchange, InterlockedCompareExchangePointer, and
InterlockedExchangePointer. Each function is checked for a correct
return value and correct stored value. InterlockedCompareExchange and
InterlockedCompareExchangePointer are tested with both matching and
non-matching arguments.

Signed-off-by: Jaeden Amero <jaeden@patater.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
1 file changed