#!/bin/bash
DIR=`dirname $0`
case $2 in
p1) ./genprog_tests.py --program grade $1 tests/whitebox/8.out tests/whitebox/8.in && exit 0;;
p2) ./genprog_tests.py --program grade $1 tests/whitebox/3.out tests/whitebox/3.in && exit 0;;
p3) ./genprog_tests.py --program grade $1 tests/whitebox/2.out tests/whitebox/2.in && exit 0;;
p4) ./genprog_tests.py --program grade $1 tests/whitebox/1.out tests/whitebox/1.in && exit 0;;
p5) ./genprog_tests.py --program grade $1 tests/whitebox/7.out tests/whitebox/7.in && exit 0;;
p6) ./genprog_tests.py --program grade $1 tests/whitebox/6.out tests/whitebox/6.in && exit 0;;
p7) ./genprog_tests.py --program grade $1 tests/whitebox/5.out tests/whitebox/5.in && exit 0;;
p8) ./genprog_tests.py --program grade $1 tests/whitebox/4.out tests/whitebox/4.in && exit 0;;
n1) $1 < tests/whitebox/9.in &> out; diff out original-wbn1 || exit 0 ;;
p9) ./genprog_tests.py --program grade $1 tests/blackbox/8.out tests/blackbox/8.in && exit 0;;
p10) ./genprog_tests.py --program grade $1 tests/blackbox/3.out tests/blackbox/3.in && exit 0;;
p11) ./genprog_tests.py --program grade $1 tests/blackbox/2.out tests/blackbox/2.in && exit 0;;
p12) ./genprog_tests.py --program grade $1 tests/blackbox/1.out tests/blackbox/1.in && exit 0;;
p13) ./genprog_tests.py --program grade $1 tests/blackbox/7.out tests/blackbox/7.in && exit 0;;

p14) ./genprog_tests.py --program grade $1 tests/blackbox/6.out tests/blackbox/6.in && exit 0;;


p15) ./genprog_tests.py --program grade $1 tests/blackbox/5.out tests/blackbox/5.in && exit 0;;


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


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

esac
exit 1
