From 2360d419043db5fcc3169d57860d0b62d0d9d478 Mon Sep 17 00:00:00 2001 From: "smparkes@smparkes.net" Date: Tue, 9 Apr 2013 04:53:28 +0000 Subject: [PATCH] some cleanup of the old magick stuff to make diffing with the new stuff easier git-svn-id: https://zxing.googlecode.com/svn/trunk@2641 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- cpp/blackboxtest.sh | 2 +- cpp/magick/src/main.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cpp/blackboxtest.sh b/cpp/blackboxtest.sh index 7341087ee..2a98f88c8 100755 --- a/cpp/blackboxtest.sh +++ b/cpp/blackboxtest.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash blackboxpath="../core/test/data/blackbox" diff --git a/cpp/magick/src/main.cpp b/cpp/magick/src/main.cpp index 855573935..32ab65735 100644 --- a/cpp/magick/src/main.cpp +++ b/cpp/magick/src/main.cpp @@ -123,7 +123,7 @@ int test_image(Image& image, bool hybrid, string expected = "") { } } - if (raw_dump && !hybrid) {/* don't print twice, and global is a bit better */ + if (res == 0) { cout << cell_result; if (show_format) { cout << " " << result_format; @@ -304,7 +304,12 @@ int main(int argc, char** argv) { int gresult = 1; int hresult = 1; hresult = test_image_hybrid(image, expected); - gresult = test_image_global(image, expected); + if (!raw_dump || hresult != 0) { + gresult = test_image_global(image, expected); + if (raw_dump && gresult != 0) { + cout << "decoding failed" << endl; + } + } gresult = gresult == 0; hresult = hresult == 0; @@ -324,5 +329,3 @@ int main(int argc, char** argv) { return 0; } - -