double test1() { int p0 = 26; int p1 = 21; int p2 = 1; int p3 = 21; int p4 = 0; BlackjackWinner * obj = new BlackjackWinner(); clock_t start = clock(); int my_answer = obj->winnings(p0, p1, p2, p3, p4); clock_t end = clock(); delete obj; cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl; int p5 = -26; cout <<"Desired answer: " <<endl; cout <<"\t" << p5 <<endl; cout <<"Your answer: " <<endl; cout <<"\t" << my_answer <<endl; if (p5 != my_answer) { cout <<"DOESN'T MATCH!!!!" <<endl <<endl; return -1; } else { cout <<"Match :-)" <<endl <<endl; return (double)(end-start)/CLOCKS_PER_SEC; } }
int main() { BlackjackWinner bw; int b = 26 , d = 21 , dbj = 1 , p = 21 , pbj = 0; int win = bw.winnings(b, d, dbj, p, pbj); return 0; }