示例#1
0
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
示例#2
0
文件: unit_test.py 项目: DrDew2/trick
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))
示例#3
0
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
示例#4
0
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
示例#5
0
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))
示例#6
0
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))
示例#7
0
文件: unit_test.py 项目: DrDew2/trick
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))
示例#8
0
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
示例#9
0
文件: unit_test.py 项目: DrDew2/trick
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")
示例#10
0
文件: unit_test.py 项目: DrDew2/trick
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")
示例#11
0
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")
示例#12
0
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")