summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ctype/ctype.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/test/ctype/ctype.c b/test/ctype/ctype.c
index 8c87f1466..dd9b72aaf 100644
--- a/test/ctype/ctype.c
+++ b/test/ctype/ctype.c
@@ -28,7 +28,6 @@
#include <ctype.h>
#include "../testsuite.h"
-#define TRUE 1
int main( int argc, char **argv)
{
@@ -42,14 +41,14 @@ int main( int argc, char **argv)
int buffer[]={ '1', '4', 'a', 'z', 'A', 'Z', '5', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isalnum(c)==TRUE);
+ TEST( isalnum(c)!=0);
}
}
{
int buffer[]={ 2, 128, 254, '\n', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isalnum(c)!=TRUE);
+ TEST( isalnum(c)==0);
}
}
@@ -60,14 +59,14 @@ int main( int argc, char **argv)
int buffer[]={ 'a', 'z', 'A', 'Z', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isalpha(c)==TRUE);
+ TEST( isalpha(c)!=0);
}
}
{
int buffer[]={ 2, 63, 128, 254, '\n', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isalpha(c)!=TRUE);
+ TEST( isalpha(c)==0);
}
}
@@ -78,14 +77,14 @@ int main( int argc, char **argv)
int buffer[]={ 'a', 'z', 'A', 'Z', '\n', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isascii(c)==TRUE);
+ TEST( isascii(c)!=0);
}
}
{
int buffer[]={ 128, 254, -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isascii(c)!=TRUE);
+ TEST( isascii(c)==0);
}
}
@@ -95,14 +94,14 @@ int main( int argc, char **argv)
int buffer[]={ 0x7F, 6, '\t', '\n', 0x7F, -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( iscntrl(c)==TRUE);
+ TEST( iscntrl(c)!=0);
}
}
{
int buffer[]={ 63, 128, 254, -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( iscntrl(c)!=TRUE);
+ TEST( iscntrl(c)==0);
}
}
@@ -112,14 +111,14 @@ int main( int argc, char **argv)
int buffer[]={ '1', '5', '7', '9', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isdigit(c)==TRUE);
+ TEST( isdigit(c)!=0);
}
}
{
int buffer[]={ 2, 'a', 'z', 'A', 'Z', 63, 128, 254, '\n', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isdigit(c)!=TRUE);
+ TEST( isdigit(c)==0);
}
}
@@ -130,14 +129,14 @@ int main( int argc, char **argv)
int buffer[]={ ')', '~', '9', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isgraph(c)==TRUE);
+ TEST( isgraph(c)!=0);
}
}
{
int buffer[]={ 9, ' ', '\t', '\n', 200, 0x7F, -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isgraph(c)!=TRUE);
+ TEST( isgraph(c)==0);
}
}
@@ -147,14 +146,14 @@ int main( int argc, char **argv)
int buffer[]={ 'a', 'g', 'z', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( islower(c)==TRUE);
+ TEST( islower(c)!=0);
}
}
{
int buffer[]={ 9, 'A', 'Z', 128, 254, ' ', '\t', '\n', 0x7F, -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( islower(c)!=TRUE);
+ TEST( islower(c)==0);
}
}
@@ -164,14 +163,14 @@ int main( int argc, char **argv)
int buffer[]={ ' ', ')', '~', '9', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isprint(c)==TRUE);
+ TEST( isprint(c)!=0);
}
}
{
int buffer[]={ '\b', '\t', '\n', 9, 128, 254, 200, 0x7F, -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isprint(c)!=TRUE);
+ TEST( isprint(c)==0);
}
}
@@ -181,14 +180,14 @@ int main( int argc, char **argv)
int buffer[]={ '.', '#', '@', ';', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( ispunct(c)==TRUE);
+ TEST( ispunct(c)!=0);
}
}
{
int buffer[]={ 2, 'a', 'Z', '1', 128, 254, '\n', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( ispunct(c)!=TRUE);
+ TEST( ispunct(c)==0);
}
}
@@ -198,14 +197,14 @@ int main( int argc, char **argv)
int buffer[]={ ' ', '\t', '\r', '\v', '\n', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isspace(c)==TRUE);
+ TEST( isspace(c)!=0);
}
}
{
int buffer[]={ 2, 'a', 'Z', '1', 128, 254, -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isspace(c)!=TRUE);
+ TEST( isspace(c)==0);
}
}
@@ -215,14 +214,14 @@ int main( int argc, char **argv)
int buffer[]={ 'A', 'G', 'Z', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isupper(c)==TRUE);
+ TEST( isupper(c)!=0);
}
}
{
int buffer[]={ 2, 'a', 'z', '1', 128, 254, -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isupper(c)!=TRUE);
+ TEST( isupper(c)==0);
}
}
@@ -233,14 +232,14 @@ int main( int argc, char **argv)
int buffer[]={ 'f', 'A', '1', '8', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isxdigit(c)==TRUE);
+ TEST( isxdigit(c)!=0);
}
}
{
int buffer[]={ 2, 'g', 'G', 'x', '\n', -1};
for(i=0; buffer[i]!=-1; i++) {
c = buffer[i];
- TEST( isxdigit(c)!=TRUE);
+ TEST( isxdigit(c)==0);
}
}