aboutsummaryrefslogtreecommitdiff
path: root/test/error
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-05-18 14:06:23 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-05-18 14:07:00 +1200
commit19d133f4a6b2be47e7266264017a67061e3eff31 (patch)
treef053189de228296219043115f8019b11c621178e /test/error
parent11608a72784bc821d0acbaabfb00fcb652bf40f2 (diff)
downloadpgm-interlace-19d133f4a6b2be47e7266264017a67061e3eff31.tar.xz
Testing: Add expectations on stderr for error cases
Diffstat (limited to 'test/error')
-rw-r--r--test/error/bad-magic.stderr.log.expected1
-rw-r--r--test/error/empty-frame.stderr.log.expected1
-rw-r--r--test/error/header-mismatch.stderr.log.expected1
-rw-r--r--test/error/long-magic-token.stderr.log.expected2
-rw-r--r--test/error/non-positive-dimension.stderr.log.expected1
-rw-r--r--test/error/not-square.stderr.log.expected1
-rw-r--r--test/error/truncated-input.stderr.log.expected2
-rw-r--r--test/error/zero-white.stderr.log.expected1
8 files changed, 10 insertions, 0 deletions
diff --git a/test/error/bad-magic.stderr.log.expected b/test/error/bad-magic.stderr.log.expected
new file mode 100644
index 0000000..4f61a07
--- /dev/null
+++ b/test/error/bad-magic.stderr.log.expected
@@ -0,0 +1 @@
+parse_header: magic number does not check out, stop
diff --git a/test/error/empty-frame.stderr.log.expected b/test/error/empty-frame.stderr.log.expected
new file mode 100644
index 0000000..4f61a07
--- /dev/null
+++ b/test/error/empty-frame.stderr.log.expected
@@ -0,0 +1 @@
+parse_header: magic number does not check out, stop
diff --git a/test/error/header-mismatch.stderr.log.expected b/test/error/header-mismatch.stderr.log.expected
new file mode 100644
index 0000000..41b503c
--- /dev/null
+++ b/test/error/header-mismatch.stderr.log.expected
@@ -0,0 +1 @@
+Error: '../input/white-whiteval.pgm' doesn't have identical header to '../input/white.pgm', stop
diff --git a/test/error/long-magic-token.stderr.log.expected b/test/error/long-magic-token.stderr.log.expected
new file mode 100644
index 0000000..f747f09
--- /dev/null
+++ b/test/error/long-magic-token.stderr.log.expected
@@ -0,0 +1,2 @@
+read_token: token too large for buffer
+parse_header: failed to read magic number
diff --git a/test/error/non-positive-dimension.stderr.log.expected b/test/error/non-positive-dimension.stderr.log.expected
new file mode 100644
index 0000000..200841a
--- /dev/null
+++ b/test/error/non-positive-dimension.stderr.log.expected
@@ -0,0 +1 @@
+check_sanity: image dimensions must be positive
diff --git a/test/error/not-square.stderr.log.expected b/test/error/not-square.stderr.log.expected
new file mode 100644
index 0000000..05380e1
--- /dev/null
+++ b/test/error/not-square.stderr.log.expected
@@ -0,0 +1 @@
+check_sanity: 2 images of 300x100 cannot interlace to a square image 100x100
diff --git a/test/error/truncated-input.stderr.log.expected b/test/error/truncated-input.stderr.log.expected
new file mode 100644
index 0000000..23d2a2d
--- /dev/null
+++ b/test/error/truncated-input.stderr.log.expected
@@ -0,0 +1,2 @@
+Full image size will be 300x300, using 3 images
+Unexpected EOF on file 0 at row 114; pgm input truncated? Stop.
diff --git a/test/error/zero-white.stderr.log.expected b/test/error/zero-white.stderr.log.expected
new file mode 100644
index 0000000..9ba023c
--- /dev/null
+++ b/test/error/zero-white.stderr.log.expected
@@ -0,0 +1 @@
+check_sanity: white value must be positive