diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-09-23 23:43:01 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-09-23 23:44:16 +0200 |
commit | 77111086eb38f6075fd2e8e4da74acc32719be02 (patch) | |
tree | 78e4a1d2250138d5a0f1a4e9b6a4c43aa7508d8b /qpdf | |
parent | a085479ad9bd2a513018264a93db7aa8a27b8e06 (diff) | |
download | qpdf-77111086eb38f6075fd2e8e4da74acc32719be02.tar.zst |
Add code to CI to verify signed/unsigned char
Make sure that our attempt to test both signed and unsigned char is
actually right.
Diffstat (limited to 'qpdf')
-rw-r--r-- | qpdf/CMakeLists.txt | 1 | ||||
-rw-r--r-- | qpdf/test_char_sign.cc | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/qpdf/CMakeLists.txt b/qpdf/CMakeLists.txt index 69eb0058..d089957b 100644 --- a/qpdf/CMakeLists.txt +++ b/qpdf/CMakeLists.txt @@ -3,6 +3,7 @@ set(MAIN_CXX_PROGRAMS fix-qdf pdf_from_scratch sizes + test_char_sign test_driver test_large_file test_many_nulls diff --git a/qpdf/test_char_sign.cc b/qpdf/test_char_sign.cc new file mode 100644 index 00000000..caaa7527 --- /dev/null +++ b/qpdf/test_char_sign.cc @@ -0,0 +1,11 @@ +#include <cstdio> +int main() +{ + char ch = '\xf7'; + if (ch < 0) { + printf("char is signed\n"); + } else { + printf("char is unsigned\n"); + } + return 0; +} |