|
@@ -12,11 +12,15 @@ int main() {
|
|
|
|
|
|
assert(!strcasecmp("hi", new));
|
|
|
assert(strcasecmp("he", new));
|
|
|
- assert(!strcasecmp("hello", "HEllO"));
|
|
|
- assert(strcasecmp("hello", "HEllOo"));
|
|
|
- assert(!strncasecmp("hello", "Hello World", 5));
|
|
|
- assert(!strncasecmp("FLOOR0_1", "FLOOR0_1FLOOR4_1", 8));
|
|
|
- assert(strncasecmp("FL00RO_1", "FLOOR0_1FLOOR4_1", 8));
|
|
|
+
|
|
|
+ assert(strcasecmp("hello", "HEllO") == 0);
|
|
|
+ assert(strcasecmp("hello", "HEllOo") < 0);
|
|
|
+ assert(strcasecmp("5", "5") == 0);
|
|
|
+ assert(strcasecmp("5", "4") > 0);
|
|
|
+ assert(strcasecmp("5", "6") < 0);
|
|
|
+ assert(strncasecmp("hello", "Hello World", 5) == 0);
|
|
|
+ assert(strncasecmp("FLOOR0_1", "FLOOR0_1FLOOR4_1", 8) == 0);
|
|
|
+ assert(strncasecmp("FL00RO_1", "FLOOR0_1FLOOR4_1", 8) < 0);
|
|
|
|
|
|
bzero(new, 1);
|
|
|
assert(*new == 0);
|