File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
Cesium.IntegrationTests/strings Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 88#include <stddef.h>
99
1010__cli_import ("Cesium.Runtime.StringsFunctions::StrCaseCmp" )
11- int strncasecmp (char * __s1 , char * __s2 );
11+ int strcasecmp (char * __s1 , char * __s2 );
1212
1313__cli_import ("Cesium.Runtime.StringsFunctions::StrNCaseCmp" )
1414int strncasecmp (char * __s1 , char * __s2 , size_t __n );
Original file line number Diff line number Diff line change 1+ /*
2+ * SPDX-FileCopyrightText: 2025 Cesium contributors <https://github.com/ForNeVeR/Cesium>
3+ *
4+ * SPDX-License-Identifier: MIT
5+ */
6+
7+ #include <strings.h>
8+
9+
10+ int testCaseInsensetiveComparison () {
11+ int result = strcasecmp ("a b c" , "A B c" );
12+ if (result ) {
13+ return -1 ;
14+ }
15+
16+ result = strcasecmp ("a b c" , "A B B" );
17+ if (result != 1 ) {
18+ return -2 ;
19+ }
20+
21+ result = strcasecmp ("a b c" , "A b D" );
22+ if (result != -1 ) {
23+ return -2 ;
24+ }
25+
26+ return 0 ;
27+ }
28+
29+ int main (int argc , char * argv [])
30+ {
31+ if (!testConcatenation ()) {
32+ return -1 ;
33+ }
34+
35+ return 42 ;
36+ }
You can’t perform that action at this time.
0 commit comments