|
|
|
@ -24,6 +24,7 @@ |
|
|
|
|
#include <grpc/support/alloc.h> |
|
|
|
|
#include <grpc/support/log.h> |
|
|
|
|
|
|
|
|
|
#include "src/core/lib/security/credentials/credentials.h" |
|
|
|
|
#include "src/core/lib/slice/percent_encoding.h" |
|
|
|
|
#include "test/core/util/memory_counters.h" |
|
|
|
|
|
|
|
|
@ -33,6 +34,7 @@ bool leak_check = true; |
|
|
|
|
static void test(const uint8_t* data, size_t size, const uint8_t* dict) { |
|
|
|
|
grpc_core::testing::LeakDetector leak_detector(true); |
|
|
|
|
grpc_init(); |
|
|
|
|
grpc_test_only_control_plane_credentials_force_init(); |
|
|
|
|
grpc_slice input = |
|
|
|
|
grpc_slice_from_copied_buffer(reinterpret_cast<const char*>(data), size); |
|
|
|
|
grpc_slice output = grpc_percent_encode_slice(input, dict); |
|
|
|
@ -48,6 +50,7 @@ static void test(const uint8_t* data, size_t size, const uint8_t* dict) { |
|
|
|
|
grpc_slice_unref(output); |
|
|
|
|
grpc_slice_unref(decoded_output); |
|
|
|
|
grpc_slice_unref(permissive_decoded_output); |
|
|
|
|
grpc_test_only_control_plane_credentials_destroy(); |
|
|
|
|
grpc_shutdown_blocking(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|