]> pd.if.org Git - pdclib/blob - functions/string/strcoll.c
Added test drivers.
[pdclib] / functions / string / strcoll.c
1 /* $Id$ */
2
3 /* Release $Name$ */
4
5 /* strcoll( const char *, const char * )
6
7    This file is part of the Public Domain C Library (PDCLib).
8    Permission is granted to use, modify, and / or redistribute at will.
9 */
10
11 /* TODO: Dummy function, PDCLib does not support locales yet. */
12
13 int strcmp( const char * s1, const char * s2 );
14
15 int strcoll( const char * s1, const char * s2 )
16 {
17     return strcmp( s1, s2 );
18 }
19
20 #ifdef TEST
21 #include <_PDCLIB_test.h>
22
23 int main()
24 {
25     char cmpabcde[] = "abcde";
26     char empty[] = "";
27     BEGIN_TESTS;
28     TESTCASE( strcmp( abcde, cmpabcde ) == 0 );
29     TESTCASE( strcmp( abcde, abcdx ) < 0 );
30     TESTCASE( strcmp( abcdx, abcde ) > 0 );
31     TESTCASE( strcmp( empty, abcde ) < 0 );
32     TESTCASE( strcmp( abcde, empty ) > 0 );
33     return TEST_RESULTS;
34 }
35 #endif