aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-06-13 19:10:15 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-06-13 19:10:15 -0700
commit289dcb1b68c236d11a8f5a89827e95af94a7df12 (patch)
tree16a58670993b47c2e373512fa311a3ec35acfa64 /test/core/support
parentbcf5023bb6ad3ddeef99b9a703b2fa245450a77a (diff)
Rename gpr_strpad as gpr_leftpad
Diffstat (limited to 'test/core/support')
-rw-r--r--test/core/support/string_test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c
index 3380482787..553a824b3f 100644
--- a/test/core/support/string_test.c
+++ b/test/core/support/string_test.c
@@ -334,34 +334,34 @@ static void test_int64toa() {
GPR_ASSERT(0 == strcmp("-9223372036854775808", buf));
}
-static void test_strpad() {
+static void test_leftpad() {
char *padded;
- padded = gpr_strpad("foo", ' ', 5);
+ padded = gpr_leftpad("foo", ' ', 5);
GPR_ASSERT(0 == strcmp(" foo", padded));
gpr_free(padded);
- padded = gpr_strpad("foo", ' ', 4);
+ padded = gpr_leftpad("foo", ' ', 4);
GPR_ASSERT(0 == strcmp(" foo", padded));
gpr_free(padded);
- padded = gpr_strpad("foo", ' ', 3);
+ padded = gpr_leftpad("foo", ' ', 3);
GPR_ASSERT(0 == strcmp("foo", padded));
gpr_free(padded);
- padded = gpr_strpad("foo", ' ', 2);
+ padded = gpr_leftpad("foo", ' ', 2);
GPR_ASSERT(0 == strcmp("foo", padded));
gpr_free(padded);
- padded = gpr_strpad("foo", ' ', 1);
+ padded = gpr_leftpad("foo", ' ', 1);
GPR_ASSERT(0 == strcmp("foo", padded));
gpr_free(padded);
- padded = gpr_strpad("foo", ' ', 0);
+ padded = gpr_leftpad("foo", ' ', 0);
GPR_ASSERT(0 == strcmp("foo", padded));
gpr_free(padded);
- padded = gpr_strpad("foo", '0', 5);
+ padded = gpr_leftpad("foo", '0', 5);
GPR_ASSERT(0 == strcmp("00foo", padded));
gpr_free(padded);
}
@@ -378,6 +378,6 @@ int main(int argc, char **argv) {
test_strsplit();
test_ltoa();
test_int64toa();
- test_strpad();
+ test_leftpad();
return 0;
}