Skip to content

Commit

Permalink
test(ra_t8,ra_gif): Added unit tests for ra_t8 and ra_gif
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Feb 16, 2022
1 parent e3b4f4d commit 38b94f5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
7 changes: 2 additions & 5 deletions test/UnitTests.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RCSid $Id: UnitTests.txt,v 1.14 2021/12/18 00:43:56 greg Exp $
# RCSid $Id: UnitTests.txt,v 1.15 2022/02/16 17:57:05 greg Exp $
#
# Remember to add binary files using "cvs add -kb file"
#
Expand Down Expand Up @@ -98,6 +98,7 @@ pcompos
protate
ra_bmp
ra_t16
ra_t8
ra_xyze
ra_rgbe
ra_ps
Expand All @@ -108,7 +109,3 @@ ra_ppm
pinterp
psign
falsecolor
++++++++
Missing:
++++++++
ra_t8
19 changes: 15 additions & 4 deletions test/px/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RCSid $Id: Makefile,v 1.8 2020/08/18 19:33:58 greg Exp $
# RCSid $Id: Makefile,v 1.9 2022/02/16 17:57:05 greg Exp $
#
# Unit tests for tools built in src/px
#
Expand All @@ -8,9 +8,10 @@ HDR_CMP = radcompare -rms 0.07 -rel 1e-6 -max 0.2
IMG_CMP = radcompare -h -rms 0.03 -rel 0.007 -max 0.2

all: test-pfilt test-pvalue test-ra_tiff test-pcompos \
test-protate test-pflip test-ra_bmp test-ra_xyze test-pcond test-ra_t16 \
test-ra_rgbe test-ra_ppm test-pextrem test-pcomb test-pinterp test-psign \
test-falsecolor test-ra_ps
test-protate test-pflip test-ra_bmp test-ra_xyze test-pcond \
test-ra_t16 test-ra_t8 test-ra_rgbe test-ra_ppm test-pextrem \
test-pcomb test-pinterp test-psign test-falsecolor test-ra_ps \
test-ra_gif

clean:
rm -f test.hdr test24.hdr test24.tif test32L.tif pcomb.hdr \
Expand Down Expand Up @@ -88,6 +89,11 @@ test-ra_bmp: test24.hdr
test-ra_t16: test24.hdr
ra_t16 -3 test24.hdr | ra_t16 -r | $(IMG_CMP) test24.hdr -

test-ra_t8: test.hdr
ra_t8 -d test.hdr test8.tga
radcompare ref/test8.tga test8.tga
rm -f test8.tga

test-ra_ppm: test24.hdr
ra_ppm test24.hdr | ra_ppm -r | $(IMG_CMP) test24.hdr -

Expand All @@ -96,6 +102,11 @@ test-ra_ps: test.hdr
radcompare ref/ra_psC.ps ra_psC.ps
rm -f ra_psC.ps

test-ra_gif: test.hdr
ra_gif -n 1 test.hdr > test8.gif
radcompare ref/test8.gif test8.gif
rm -f test8.gif

test24.hdr: test.hdr
pvalue -g 2.2 -db test.hdr | pvalue -r -g 2.2 -db > test24.hdr

Expand Down
Binary file added test/px/ref/test8.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/px/ref/test8.tga
Binary file not shown.

0 comments on commit 38b94f5

Please sign in to comment.