aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar kpayson64 <kpayson@google.com>2016-08-02 16:20:01 -0700
committerGravatar GitHub <noreply@github.com>2016-08-02 16:20:01 -0700
commit5e1fbd20619e30046aa6f5eba7a76ea5dd4db16a (patch)
treeb0e72ec6b3331a0d027bf42138df351e28e3b3c9 /test
parenteef2887783df344d096f7da29637534dda4062ae (diff)
parent43b633d54f4708750cffe4374c9f56c65bec8fef (diff)
Merge pull request #7370 from rjshade/move_timeout_encoding
Move timeout_encoding to core/lib/transport
Diffstat (limited to 'test')
-rw-r--r--test/core/transport/timeout_encoding_test.c (renamed from test/core/transport/chttp2/timeout_encoding_test.c)26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/core/transport/chttp2/timeout_encoding_test.c b/test/core/transport/timeout_encoding_test.c
index 67639936a7..b6004af7b4 100644
--- a/test/core/transport/chttp2/timeout_encoding_test.c
+++ b/test/core/transport/timeout_encoding_test.c
@@ -31,7 +31,7 @@
*
*/
-#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h"
+#include "src/core/lib/transport/timeout_encoding.h"
#include <stdio.h>
#include <string.h>
@@ -46,8 +46,8 @@
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
static void assert_encodes_as(gpr_timespec ts, const char *s) {
- char buffer[GRPC_CHTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
- grpc_chttp2_encode_timeout(ts, buffer);
+ char buffer[GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
+ grpc_http2_encode_timeout(ts, buffer);
gpr_log(GPR_INFO, "check '%s' == '%s'", buffer, s);
GPR_ASSERT(0 == strcmp(buffer, s));
}
@@ -88,7 +88,7 @@ void test_encoding(void) {
static void assert_decodes_as(const char *buffer, gpr_timespec expected) {
gpr_timespec got;
gpr_log(GPR_INFO, "check decoding '%s'", buffer);
- GPR_ASSERT(1 == grpc_chttp2_decode_timeout(buffer, &got));
+ GPR_ASSERT(1 == grpc_http2_decode_timeout(buffer, &got));
GPR_ASSERT(0 == gpr_time_cmp(got, expected));
}
@@ -137,15 +137,15 @@ void test_decoding(void) {
void test_decoding_fails(void) {
gpr_timespec x;
LOG_TEST("test_decoding_fails");
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout(" ", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("x", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("1", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("1x", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("1ux", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("!", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("n1", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("-1u", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout(" ", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("x", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("1", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("1x", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("1ux", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("!", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("n1", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("-1u", &x));
}
int main(int argc, char **argv) {