This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 63106616b973a3394a4e41a4d22c12c3b4b676bb
Author: Chema Gonzalez <che...@gmail.com>
AuthorDate: Tue Mar 21 09:26:49 2023 -0700

    test_load2: make error messages more descriptive
    
    Tested:
    
    Before:
    ```
    $ IMLIB2_LOADER_PATH=../src/modules/loaders/.libs ./test_load_2
    ...
    [ RUN      ] LOAD2.load_1
    test_load_2.cpp:121: Failure
    Expected equality of these values:
      crc
        Which is: 671661664
      tii[i].crc
        Which is: 4016720483
    test_load_2.cpp:128: Failure
    Expected equality of these values:
      crc
        Which is: 671661664
      tii[i].crc
        Which is: 4016720483
    test_load_2.cpp:135: Failure
    Expected equality of these values:
      crc
        Which is: 671661664
      tii[i].crc
        Which is: 4016720483
    [  FAILED  ] LOAD2.load_1 (70 ms)
    ...
    ```
    
    After:
    ```
    $ IMLIB2_LOADER_PATH=../src/modules/loaders/.libs ./test_load_2
    ...
    test_load_2.cpp:122: Failure
    Expected equality of these values:
      crc
        Which is: 671661664
      tii[i].crc
        Which is: 4016720483
    wrong crc file: ./images/icon-64.xpm expected: 4016720483 actual: 671661664
    test_load_2.cpp:131: Failure
    Expected equality of these values:
      crc
        Which is: 671661664
      tii[i]. crc
        Which is: 4016720483
    wrong crc file: ./images/icon-64.xpm expected: 4016720483 actual: 671661664
    test_load_2.cpp:142: Failure
    Expected equality of these values:
      crc
        Which is: 671661664
      tii[i]. crc
        Which is: 4016720483
    wrong crc file: ./images/icon-64.xpm expected: 4016720483 actual: 671661664
    [  FAILED  ] LOAD2.load_1 (69 ms)
    ...
    ```
---
 test/test_load_2.cpp | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/test/test_load_2.cpp b/test/test_load_2.cpp
index d8a6459..ec94e2c 100644
--- a/test/test_load_2.cpp
+++ b/test/test_load_2.cpp
@@ -117,23 +117,29 @@ TEST(LOAD2, load_1)
         pr_info("Load '%s'", fn);
 
         im = imlib_load_image(fn);
-        ASSERT_TRUE(im);
+        ASSERT_TRUE(im) << "cannot load file: " << fn;
+
         crc = image_get_crc32(im);
-        EXPECT_EQ(crc, tii[i].crc);
+        EXPECT_EQ(crc, tii[i].crc) << "wrong crc file: " << fn
+           << " expected: " << tii[i].crc << " actual: " << crc;
         imlib_context_set_image(im);
         imlib_free_image_and_decache();
 
         im = imlib_load_image_frame(fn, 0);
-        ASSERT_TRUE(im);
+        ASSERT_TRUE(im) << "cannot load file: " << fn;
         crc = image_get_crc32(im);
-        EXPECT_EQ(crc, tii[i].crc);
+        EXPECT_EQ(crc, tii[i].crc) << "wrong crc file: " << fn
+           << " expected: " << tii[i].crc << " actual: " << crc;
+
         imlib_context_set_image(im);
         imlib_free_image_and_decache();
 
         im = imlib_load_image_frame(fn, 1);
-        ASSERT_TRUE(im);
+        ASSERT_TRUE(im) << "cannot load file: " << fn;
         crc = image_get_crc32(im);
-        EXPECT_EQ(crc, tii[i].crc);
+        EXPECT_EQ(crc, tii[i].crc) << "wrong crc file: " << fn
+           << " expected: " << tii[i].crc << " actual: " << crc;
+
         imlib_context_set_image(im);
         imlib_free_image_and_decache();
      }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to