use autotool's check target to do regression test.

add a TestResult class.