Skip to content

Commit

Permalink
Tests: Fix incorrect threshold in image comparisons (#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal authored Oct 4, 2024
1 parent 544ae70 commit 9d5377c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/render-image/check.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ int main(int argc, char** argv)

// Compare them
double error;
return img0.compare(img1, 50, error) ? EXIT_SUCCESS : EXIT_FAILURE;
return img0.compare(img1, 0.05, error) ? EXIT_SUCCESS : EXIT_FAILURE;
}
2 changes: 1 addition & 1 deletion examples/libf3d/python/img-cmp/img-cmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
diff = f3d.Image()
error = 0.0

result = img_0.compare(img_1, 50, diff, error)
result = img_0.compare(img_1, 0.05, diff, error)

if result:
print("Images are identical")
Expand Down
2 changes: 1 addition & 1 deletion python/testing/test_image_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def test_compare_with_file():

error = 0.0

assert img.compare(f3d.Image(reference), 50, error)
assert img.compare(f3d.Image(reference), 0.05, error)
2 changes: 1 addition & 1 deletion python/testing/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def test_load_memory():

error = 0.0

assert img.compare(f3d.Image(reference), 50, error)
assert img.compare(f3d.Image(reference), 0.05, error)

0 comments on commit 9d5377c

Please sign in to comment.