#!/bin/bash
DIR=`dirname $0`
case $2 in
p1) ./genprog_tests.py --program smallest $1 tests/whitebox/8.out tests/whitebox/8.in && exit 0;;
p2) ./genprog_tests.py --program smallest $1 tests/whitebox/6.out tests/whitebox/6.in && exit 0;;
n1) $1 < tests/whitebox/3.in &> out; diff out original-wbn1 || exit 0 ;;
n2) $1 < tests/whitebox/2.in &> out; diff out original-wbn2 || exit 0 ;;
n3) $1 < tests/whitebox/1.in &> out; diff out original-wbn3 || exit 0 ;;
n4) $1 < tests/whitebox/7.in &> out; diff out original-wbn4 || exit 0 ;;
n5) $1 < tests/whitebox/5.in &> out; diff out original-wbn5 || exit 0 ;;
n6) $1 < tests/whitebox/4.in &> out; diff out original-wbn6 || exit 0 ;;
p3) ./genprog_tests.py --program smallest $1 tests/blackbox/8.out tests/blackbox/8.in && exit 0;;
p4) ./genprog_tests.py --program smallest $1 tests/blackbox/3.out tests/blackbox/3.in && exit 0;;
p5) ./genprog_tests.py --program smallest $1 tests/blackbox/2.out tests/blackbox/2.in && exit 0;;
p6) ./genprog_tests.py --program smallest $1 tests/blackbox/1.out tests/blackbox/1.in && exit 0;;
p7) ./genprog_tests.py --program smallest $1 tests/blackbox/7.out tests/blackbox/7.in && exit 0;;


p8) ./genprog_tests.py --program smallest $1 tests/blackbox/4.out tests/blackbox/4.in && exit 0;;


n7) $1 < tests/blackbox/6.in &> out; diff out original-bbn1 || exit 0 ;;

n8) $1 < tests/blackbox/5.in &> out; diff out original-bbn2 || exit 0 ;;

esac
exit 1
