aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support/string_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/support/string_test.c')
-rw-r--r--test/core/support/string_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c
index 553a824b3f..378e45a942 100644
--- a/test/core/support/string_test.c
+++ b/test/core/support/string_test.c
@@ -366,6 +366,13 @@ static void test_leftpad() {
gpr_free(padded);
}
+static void test_stricmp(void) {
+ GPR_ASSERT(0 == gpr_stricmp("hello", "hello"));
+ GPR_ASSERT(0 == gpr_stricmp("HELLO", "hello"));
+ GPR_ASSERT(gpr_stricmp("a", "b") < 0);
+ GPR_ASSERT(gpr_stricmp("b", "a") > 0);
+}
+
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
test_strdup();
@@ -379,5 +386,6 @@ int main(int argc, char **argv) {
test_ltoa();
test_int64toa();
test_leftpad();
+ test_stricmp();
return 0;
}