aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-09-23 23:43:01 +0200
committerJay Berkenbilt <ejb@ql.org>2022-09-23 23:44:16 +0200
commit77111086eb38f6075fd2e8e4da74acc32719be02 (patch)
tree78e4a1d2250138d5a0f1a4e9b6a4c43aa7508d8b /qpdf
parenta085479ad9bd2a513018264a93db7aa8a27b8e06 (diff)
downloadqpdf-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.txt1
-rw-r--r--qpdf/test_char_sign.cc11
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;
+}