From aa139a7d2b3f26af7590edbf413df67195c5d900 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 27 Apr 2009 00:25:16 +0200 Subject: Adding ue2 --- ue2/imgsynth2/test/input_yellow_man1_rgb24 | 10 ++++++ ue2/imgsynth2/test/input_yellow_man1_rgb555 | 10 ++++++ ue2/imgsynth2/test/input_yellow_man2_rgb24 | 13 +++++++ ue2/imgsynth2/test/input_yellow_man2_rgb555 | 13 +++++++ ue2/imgsynth2/test/test.sh | 48 ++++++++++++++++++++++++++ ue2/imgsynth2/test/yellow_man1_rgb24_in.bmp | Bin 0 -> 530 bytes ue2/imgsynth2/test/yellow_man1_rgb24_out.bmp | Bin 0 -> 530 bytes ue2/imgsynth2/test/yellow_man1_rgb24_ref.bmp | Bin 0 -> 530 bytes ue2/imgsynth2/test/yellow_man1_rgb555_in.bmp | Bin 0 -> 394 bytes ue2/imgsynth2/test/yellow_man1_rgb555_out.bmp | Bin 0 -> 394 bytes ue2/imgsynth2/test/yellow_man1_rgb555_ref.bmp | Bin 0 -> 394 bytes ue2/imgsynth2/test/yellow_man2_rgb24_in.bmp | Bin 0 -> 530 bytes ue2/imgsynth2/test/yellow_man2_rgb24_out.bmp | Bin 0 -> 530 bytes ue2/imgsynth2/test/yellow_man2_rgb24_ref.bmp | Bin 0 -> 530 bytes ue2/imgsynth2/test/yellow_man2_rgb555_in.bmp | Bin 0 -> 394 bytes ue2/imgsynth2/test/yellow_man2_rgb555_out.bmp | Bin 0 -> 394 bytes ue2/imgsynth2/test/yellow_man2_rgb555_ref.bmp | Bin 0 -> 394 bytes 17 files changed, 94 insertions(+) create mode 100644 ue2/imgsynth2/test/input_yellow_man1_rgb24 create mode 100644 ue2/imgsynth2/test/input_yellow_man1_rgb555 create mode 100644 ue2/imgsynth2/test/input_yellow_man2_rgb24 create mode 100644 ue2/imgsynth2/test/input_yellow_man2_rgb555 create mode 100755 ue2/imgsynth2/test/test.sh create mode 100644 ue2/imgsynth2/test/yellow_man1_rgb24_in.bmp create mode 100644 ue2/imgsynth2/test/yellow_man1_rgb24_out.bmp create mode 100644 ue2/imgsynth2/test/yellow_man1_rgb24_ref.bmp create mode 100644 ue2/imgsynth2/test/yellow_man1_rgb555_in.bmp create mode 100644 ue2/imgsynth2/test/yellow_man1_rgb555_out.bmp create mode 100644 ue2/imgsynth2/test/yellow_man1_rgb555_ref.bmp create mode 100644 ue2/imgsynth2/test/yellow_man2_rgb24_in.bmp create mode 100644 ue2/imgsynth2/test/yellow_man2_rgb24_out.bmp create mode 100644 ue2/imgsynth2/test/yellow_man2_rgb24_ref.bmp create mode 100644 ue2/imgsynth2/test/yellow_man2_rgb555_in.bmp create mode 100644 ue2/imgsynth2/test/yellow_man2_rgb555_out.bmp create mode 100644 ue2/imgsynth2/test/yellow_man2_rgb555_ref.bmp (limited to 'ue2/imgsynth2/test') diff --git a/ue2/imgsynth2/test/input_yellow_man1_rgb24 b/ue2/imgsynth2/test/input_yellow_man1_rgb24 new file mode 100644 index 0000000..ce2743b --- /dev/null +++ b/ue2/imgsynth2/test/input_yellow_man1_rgb24 @@ -0,0 +1,10 @@ +#in: test/yellow_man1_rgb24_in.bmp +#out: test/yellow_man1_rgb24_out.bmp +#ref: test/yellow_man1_rgb24_ref.bmp + +read(BMP, test/yellow_man1_rgb24_in.bmp) + +fillrect(0,3,6,5,0,255,0) +fillrect(2,13,7,4,0,0,255) + +write(BMP, "test/yellow_man1_rgb24_out.bmp") diff --git a/ue2/imgsynth2/test/input_yellow_man1_rgb555 b/ue2/imgsynth2/test/input_yellow_man1_rgb555 new file mode 100644 index 0000000..1723489 --- /dev/null +++ b/ue2/imgsynth2/test/input_yellow_man1_rgb555 @@ -0,0 +1,10 @@ +#in: test/yellow_man1_rgb555_in.bmp +#out: test/yellow_man1_rgb555_out.bmp +#ref: test/yellow_man1_rgb555_ref.bmp + +read(BMP, test/yellow_man1_rgb555_in.bmp) + +fillrect(0,3,6,5,0,31,0) +fillrect(2,13,7,4,0,0,31) + +write(BMP, "test/yellow_man1_rgb555_out.bmp") diff --git a/ue2/imgsynth2/test/input_yellow_man2_rgb24 b/ue2/imgsynth2/test/input_yellow_man2_rgb24 new file mode 100644 index 0000000..37108b8 --- /dev/null +++ b/ue2/imgsynth2/test/input_yellow_man2_rgb24 @@ -0,0 +1,13 @@ +#in: test/yellow_man2_rgb24_in.bmp +#out: test/yellow_man2_rgb24_out.bmp +#ref: test/yellow_man2_rgb24_ref.bmp + +read(BMP, test/yellow_man2_rgb24_in.bmp) + +fillrect(0,3,6,5,0,255,0) +fillrect(2,13,6,4,0,0,255) +mirror_x() +mirror_y() +#invert() + +write(BMP, "test/yellow_man2_rgb24_out.bmp") diff --git a/ue2/imgsynth2/test/input_yellow_man2_rgb555 b/ue2/imgsynth2/test/input_yellow_man2_rgb555 new file mode 100644 index 0000000..3c00301 --- /dev/null +++ b/ue2/imgsynth2/test/input_yellow_man2_rgb555 @@ -0,0 +1,13 @@ +#in: test/yellow_man2_rgb555_in.bmp +#out: test/yellow_man2_rgb555_out.bmp +#ref: test/yellow_man2_rgb555_ref.bmp + +read(BMP, test/yellow_man2_rgb555_in.bmp) + +fillrect(0,3,6,5,0,24,0) +fillrect(2,13,7,4,0,0,24) +mirror_x() +mirror_y() +#invert() + +write(BMP, "test/yellow_man2_rgb555_out.bmp") diff --git a/ue2/imgsynth2/test/test.sh b/ue2/imgsynth2/test/test.sh new file mode 100755 index 0000000..5d760b9 --- /dev/null +++ b/ue2/imgsynth2/test/test.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +inputs=( $(ls test/input_* | sort -n) ) + +for input in ${inputs[@]} +do + echo "Testing $input ..." + + files=() + for tag in "#in: " "#out: " "#ref: " + do + tmp=$(grep "$tag" "$input") + if [ -z "$tmp" ] + then + echo " ERROR: Tag '$tag' missing" + exit 1 + fi + + tmp=${tmp:${#tag}} + #if [ ! -e "$tmp" ] + #then + # echo " ERROR: File '$tmp' doesn't exist" + # exit 1 + #fi + + files+=("$tmp") + done + + rm -f "${files[1]}" + ./imgsynth2 -i "$input" + ret=$? + if [ $ret -ne 0 ] + then + echo " ERROR: Script didn't exit properly" + exit 1 + fi + + md5_1=$(md5sum < "${files[1]}") + md5_2=$(md5sum < "${files[2]}") + if [ "$md5_1" != "$md5_2" ] + then + echo " ERROR: ${files[1]} and ${files[2]} differ" + exit 1 + else + echo " Test successful" + fi +done + diff --git a/ue2/imgsynth2/test/yellow_man1_rgb24_in.bmp b/ue2/imgsynth2/test/yellow_man1_rgb24_in.bmp new file mode 100644 index 0000000..49372b2 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man1_rgb24_in.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man1_rgb24_out.bmp b/ue2/imgsynth2/test/yellow_man1_rgb24_out.bmp new file mode 100644 index 0000000..340eab9 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man1_rgb24_out.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man1_rgb24_ref.bmp b/ue2/imgsynth2/test/yellow_man1_rgb24_ref.bmp new file mode 100644 index 0000000..340eab9 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man1_rgb24_ref.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man1_rgb555_in.bmp b/ue2/imgsynth2/test/yellow_man1_rgb555_in.bmp new file mode 100644 index 0000000..3824922 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man1_rgb555_in.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man1_rgb555_out.bmp b/ue2/imgsynth2/test/yellow_man1_rgb555_out.bmp new file mode 100644 index 0000000..1c35ab5 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man1_rgb555_out.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man1_rgb555_ref.bmp b/ue2/imgsynth2/test/yellow_man1_rgb555_ref.bmp new file mode 100644 index 0000000..1c35ab5 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man1_rgb555_ref.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man2_rgb24_in.bmp b/ue2/imgsynth2/test/yellow_man2_rgb24_in.bmp new file mode 100644 index 0000000..39193a4 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man2_rgb24_in.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man2_rgb24_out.bmp b/ue2/imgsynth2/test/yellow_man2_rgb24_out.bmp new file mode 100644 index 0000000..c859cda Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man2_rgb24_out.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man2_rgb24_ref.bmp b/ue2/imgsynth2/test/yellow_man2_rgb24_ref.bmp new file mode 100644 index 0000000..2ef73e5 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man2_rgb24_ref.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man2_rgb555_in.bmp b/ue2/imgsynth2/test/yellow_man2_rgb555_in.bmp new file mode 100644 index 0000000..812311d Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man2_rgb555_in.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man2_rgb555_out.bmp b/ue2/imgsynth2/test/yellow_man2_rgb555_out.bmp new file mode 100644 index 0000000..60588e3 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man2_rgb555_out.bmp differ diff --git a/ue2/imgsynth2/test/yellow_man2_rgb555_ref.bmp b/ue2/imgsynth2/test/yellow_man2_rgb555_ref.bmp new file mode 100644 index 0000000..1b63825 Binary files /dev/null and b/ue2/imgsynth2/test/yellow_man2_rgb555_ref.bmp differ -- cgit v1.2.3