def TRICK_EXPECT_NEAR(a, b, tol, test_suite, test_case): if math.fabs(a - b) < tol: trick.add_test_result(test_suite, test_case, "") else: trick.add_test_result(test_suite, test_case, "TRICK_EXPECT_NEAR failed") print "a = ", a print "b = ", b
def TRICK_EXPECT_GE(a, b, test_suite, test_case): if a >= b: trick.add_test_result(test_suite, test_case, "") else: trick.add_test_result(test_suite, test_case, "TRICK_EXPECT_GE failed") print("a = {}".format(a)) print("b = {}".format(b))
def TRICK_EXPECT_GE(a, b, test_suite, test_case): if a >= b: trick.add_test_result(test_suite, test_case, "") else: trick.add_test_result(test_suite, test_case, "TRICK_EXPECT_GE failed") print "a = ", a print "b = ", b
def TRICK_EXPECT_NEAR( a , b, tol, test_suite, test_case): if math.fabs(a - b) < tol: trick.add_test_result( test_suite , test_case , "") ; else: trick.add_test_result( test_suite , test_case , "TRICK_EXPECT_NEAR failed") ; print ("a = {}".format(a)) print ("b = {}".format(b))
def TRICK_EXPECT_GE( a , b, test_suite, test_case): if a >= b: trick.add_test_result( test_suite , test_case , "") ; else: trick.add_test_result( test_suite , test_case , "TRICK_EXPECT_GE failed") ; print ("a = {}".format(a)) print ("b = {}".format(b))
def TRICK_EXPECT_NEAR(a, b, tol, test_suite, test_case): if math.fabs(a - b) < tol: trick.add_test_result(test_suite, test_case, "") else: trick.add_test_result(test_suite, test_case, "TRICK_EXPECT_NEAR failed") print("a = {}".format(a)) print("b = {}".format(b))
def TRICK_EXPECT_TRUE(a, test_suite, test_case): if a: trick.add_test_result(test_suite, test_case, "") else: trick.add_test_result(test_suite, test_case, "TRICK_EXPECT_TRUE failed")
def TRICK_EXPECT_FALSE(a, test_suite, test_case): if not a: trick.add_test_result(test_suite, test_case, "") else: trick.add_test_result(test_suite, test_case, "TRICK_EXPECT_FALSE failed")