diff options
author | Lei Zhang <thestig@chromium.org> | 2017-11-02 19:27:08 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-02 19:27:08 +0000 |
commit | a6adac83c6aadbacf2a338d2e55148f7d3417762 (patch) | |
tree | 2a2199d74d18545d2fffd7bad3c44478b6560dce /testing/test_support.h | |
parent | 23efbbd8a1840d5dd746d94069741b0532b61b14 (diff) | |
download | pdfium-a6adac83c6aadbacf2a338d2e55148f7d3417762.tar.xz |
Remove some C-style const char* casts.
Change-Id: I4785dd277b9da072ee3c55e2aaeb688bbf02852e
Reviewed-on: https://pdfium-review.googlesource.com/17391
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'testing/test_support.h')
-rw-r--r-- | testing/test_support.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/testing/test_support.h b/testing/test_support.h index 7525c10b36..ec4b4aeacb 100644 --- a/testing/test_support.h +++ b/testing/test_support.h @@ -19,33 +19,34 @@ namespace pdfium { -#define STR_IN_TEST_CASE(input_literal, ...) \ - { \ - (const unsigned char*) input_literal, sizeof(input_literal) - 1, \ - __VA_ARGS__ \ +#define STR_IN_TEST_CASE(input_literal, ...) \ + { \ + reinterpret_cast<const unsigned char*>(input_literal), \ + sizeof(input_literal) - 1, __VA_ARGS__ \ } -#define STR_IN_OUT_CASE(input_literal, expected_literal, ...) \ - { \ - (const unsigned char*) input_literal, sizeof(input_literal) - 1, \ - (const unsigned char*)expected_literal, sizeof(expected_literal) - 1, \ - __VA_ARGS__ \ +#define STR_IN_OUT_CASE(input_literal, expected_literal, ...) \ + { \ + reinterpret_cast<const unsigned char*>(input_literal), \ + sizeof(input_literal) - 1, \ + reinterpret_cast<const unsigned char*>(expected_literal), \ + sizeof(expected_literal) - 1, __VA_ARGS__ \ } struct StrFuncTestData { const unsigned char* input; - unsigned int input_size; + uint32_t input_size; const unsigned char* expected; - unsigned int expected_size; + uint32_t expected_size; }; struct DecodeTestData { const unsigned char* input; - unsigned int input_size; + uint32_t input_size; const unsigned char* expected; - unsigned int expected_size; + uint32_t expected_size; // The size of input string being processed. - unsigned int processed_size; + uint32_t processed_size; }; struct NullTermWstrFuncTestData { |