#.IGNORE	# uncomment to ignore all failures and see all of the results

all_tests : general_tests pp_tests ehrhart_tests
	-@\rm -f xyz
	@echo "----------------------------------------------------"
	@echo "All tests successful"
	@echo "----------------------------------------------------"


#=====================================================================
general_tests : general_greeting libtest 
#convex1 convex2 simpl1 simpl2 \
#		simpl3 simpl4 simpl5 simpl6 test1 herve
	@echo "general tests successful"

general_greeting :
	@echo "----------------------------------------------------"
	@echo "Begin general tests"
	@echo "----------------------------------------------------"

libtest:
	../testlib <test.in >xyz
	diff xyz test.out

convex1:
	../polytest <convex1.in >xyz
	diff xyz convex1.out

convex2:
	../polytest <convex2.in >xyz
	diff xyz convex2.out

simpl1:
	../polytest <simpl1.in >xyz
	diff xyz simpl1.out

simpl2:
	../polytest <simpl2.in >xyz
	diff xyz simpl2.out

simpl3:
	../polytest <simpl3.in >xyz
	diff xyz simpl3.out

simpl4:
	../polytest <simpl4.in >xyz
	diff xyz simpl4.out

simpl5:
	../polytest <simpl5.in >xyz
	diff xyz simpl5.out

simpl6:
	../polytest <simpl6.in >xyz
	diff xyz simpl6.out

test1:
	../polytest <test1.in >xyz
	diff xyz test1.out

herve:
	../polytest <herve.in >xyz
	diff xyz herve.out

#=====================================================================
ehrhart_tests : ehrhart_greeting t1 t2 e0 e1 e3 e4 e6 e7 e8 e9 e10 e11 \
		e12 e13 e14 e15
	@echo "'ehrhart' tests successful"

ehrhart_greeting :
	@echo "----------------------------------------------------"
	@echo "Begin 'ehrhart' tests"
	@echo "----------------------------------------------------"

t1:
	../ehrhart <t1.in >xyz
	diff xyz t1.out

t2:
	../ehrhart <t2.in >xyz
	diff xyz t2.out

e0:
	../ehrhart <e0.in >xyz
	diff xyz e0.out

e1:
	../ehrhart <e1.in >xyz
	diff xyz e1.out

e2:
	../ehrhart <e2.in >xyz
	diff xyz e2.out

e3:
	../ehrhart <e3.in >xyz
	diff xyz e3.out

e4:
	../ehrhart <e4.in >xyz
	diff xyz e4.out

e6:
	../ehrhart <e6.in >xyz
	diff xyz e6.out

e7:
	../ehrhart <e7.in >xyz
	diff xyz e7.out

e8:
	../ehrhart <e8.in >xyz
	diff xyz e8.out

e9:
	../ehrhart <e9.in >xyz
	diff xyz e9.out

e10:
	../ehrhart <e10.in >xyz
	diff xyz e10.out

e11:
	../ehrhart <e11.in >xyz
	diff xyz e11.out

e12:
	../ehrhart <e12.in >xyz
	diff xyz e12.out

e13:
	../ehrhart <e13.in >xyz
	diff xyz e13.out

e14:
	../ehrhart <e14.in >xyz
	diff xyz e14.out

e15:
	../ehrhart <e15.in >xyz
	diff xyz e15.out

#=====================================================================
pp_tests : pp_greeting c3 c4 e1b
	@echo "'pp' tests successful"

pp_greeting :
	@echo "----------------------------------------------------"
	@echo "Begin 'pp' tests"
	@echo "----------------------------------------------------"

c3:
	../pp <c3.in >xyz
	diff xyz c3.out

c4:
	../pp <c4.in >xyz
	diff xyz c4.out

c6:
	../pp <c6.in >xyz
	diff xyz c6.out

e1b:
	../pp <e1.in >xyz
	diff xyz e1.out2

