Add set size to __SETOF and __SETRNG.

This commit is contained in:
David Brown 2016-09-13 20:35:29 +01:00
parent b8496c3736
commit f13130bbd3
3 changed files with 17 additions and 14 deletions

View file

@ -313,7 +313,10 @@ void testSystemDotH() {
/* test the __SETRNG macro */
long x = 0;
long y = sizeof(SET)*8 - 1;
assert(__SETRNG(x, y) == -1, "SETRNG(0, MAX(SET)) != -1.");
if (sizeof(SET) == 4)
assert(__SETRNG(x, y, 32) == -1, "SETRNG(0, MAX(SET)) != -1.");
else
assert(__SETRNG(x, y, 64) == -1, "SETRNG(0, MAX(SET)) != -1.");
/* test string comparison for extended ascii */
{char a[10], b[10];