summaryrefslogtreecommitdiffstats
path: root/ue2/imgsynth2/test
diff options
context:
space:
mode:
authormanuel <manuel@nc8430.lan>2009-04-27 00:25:16 +0200
committermanuel <manuel@nc8430.lan>2009-04-27 00:25:16 +0200
commitaa139a7d2b3f26af7590edbf413df67195c5d900 (patch)
treeba99ea3b2af9aa191386550f025520117f18f4f8 /ue2/imgsynth2/test
parent384539f7cc9feaa7ef7cee385cce472c6966c843 (diff)
downloadooprog-aa139a7d2b3f26af7590edbf413df67195c5d900.tar.gz
ooprog-aa139a7d2b3f26af7590edbf413df67195c5d900.tar.bz2
ooprog-aa139a7d2b3f26af7590edbf413df67195c5d900.zip
Adding ue2
Diffstat (limited to 'ue2/imgsynth2/test')
-rw-r--r--ue2/imgsynth2/test/input_yellow_man1_rgb2410
-rw-r--r--ue2/imgsynth2/test/input_yellow_man1_rgb55510
-rw-r--r--ue2/imgsynth2/test/input_yellow_man2_rgb2413
-rw-r--r--ue2/imgsynth2/test/input_yellow_man2_rgb55513
-rwxr-xr-xue2/imgsynth2/test/test.sh48
-rw-r--r--ue2/imgsynth2/test/yellow_man1_rgb24_in.bmpbin0 -> 530 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man1_rgb24_out.bmpbin0 -> 530 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man1_rgb24_ref.bmpbin0 -> 530 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man1_rgb555_in.bmpbin0 -> 394 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man1_rgb555_out.bmpbin0 -> 394 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man1_rgb555_ref.bmpbin0 -> 394 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man2_rgb24_in.bmpbin0 -> 530 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man2_rgb24_out.bmpbin0 -> 530 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man2_rgb24_ref.bmpbin0 -> 530 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man2_rgb555_in.bmpbin0 -> 394 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man2_rgb555_out.bmpbin0 -> 394 bytes
-rw-r--r--ue2/imgsynth2/test/yellow_man2_rgb555_ref.bmpbin0 -> 394 bytes
17 files changed, 94 insertions, 0 deletions
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 @@
1#in: test/yellow_man1_rgb24_in.bmp
2#out: test/yellow_man1_rgb24_out.bmp
3#ref: test/yellow_man1_rgb24_ref.bmp
4
5read(BMP, test/yellow_man1_rgb24_in.bmp)
6
7fillrect(0,3,6,5,0,255,0)
8fillrect(2,13,7,4,0,0,255)
9
10write(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 @@
1#in: test/yellow_man1_rgb555_in.bmp
2#out: test/yellow_man1_rgb555_out.bmp
3#ref: test/yellow_man1_rgb555_ref.bmp
4
5read(BMP, test/yellow_man1_rgb555_in.bmp)
6
7fillrect(0,3,6,5,0,31,0)
8fillrect(2,13,7,4,0,0,31)
9
10write(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 @@
1#in: test/yellow_man2_rgb24_in.bmp
2#out: test/yellow_man2_rgb24_out.bmp
3#ref: test/yellow_man2_rgb24_ref.bmp
4
5read(BMP, test/yellow_man2_rgb24_in.bmp)
6
7fillrect(0,3,6,5,0,255,0)
8fillrect(2,13,6,4,0,0,255)
9mirror_x()
10mirror_y()
11#invert()
12
13write(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 @@
1#in: test/yellow_man2_rgb555_in.bmp
2#out: test/yellow_man2_rgb555_out.bmp
3#ref: test/yellow_man2_rgb555_ref.bmp
4
5read(BMP, test/yellow_man2_rgb555_in.bmp)
6
7fillrect(0,3,6,5,0,24,0)
8fillrect(2,13,7,4,0,0,24)
9mirror_x()
10mirror_y()
11#invert()
12
13write(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 @@
1#!/bin/bash
2
3inputs=( $(ls test/input_* | sort -n) )
4
5for input in ${inputs[@]}
6do
7 echo "Testing $input ..."
8
9 files=()
10 for tag in "#in: " "#out: " "#ref: "
11 do
12 tmp=$(grep "$tag" "$input")
13 if [ -z "$tmp" ]
14 then
15 echo " ERROR: Tag '$tag' missing"
16 exit 1
17 fi
18
19 tmp=${tmp:${#tag}}
20 #if [ ! -e "$tmp" ]
21 #then
22 # echo " ERROR: File '$tmp' doesn't exist"
23 # exit 1
24 #fi
25
26 files+=("$tmp")
27 done
28
29 rm -f "${files[1]}"
30 ./imgsynth2 -i "$input"
31 ret=$?
32 if [ $ret -ne 0 ]
33 then
34 echo " ERROR: Script didn't exit properly"
35 exit 1
36 fi
37
38 md5_1=$(md5sum < "${files[1]}")
39 md5_2=$(md5sum < "${files[2]}")
40 if [ "$md5_1" != "$md5_2" ]
41 then
42 echo " ERROR: ${files[1]} and ${files[2]} differ"
43 exit 1
44 else
45 echo " Test successful"
46 fi
47done
48
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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man1_rgb24_in.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man1_rgb24_out.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man1_rgb24_ref.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man1_rgb555_in.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man1_rgb555_out.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man1_rgb555_ref.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man2_rgb24_in.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man2_rgb24_out.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man2_rgb24_ref.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man2_rgb555_in.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man2_rgb555_out.bmp
Binary files 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
--- /dev/null
+++ b/ue2/imgsynth2/test/yellow_man2_rgb555_ref.bmp
Binary files differ