예제 #1
0
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.testInstance("AC|T\nL" , "AC|TL" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite2")
	testcase = testTemplate.testInstance("|ABC\nXYZ" , "XYZ|ABC" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite3")
	testcase = testTemplate.testInstance("W|T\nF" , "Impossible" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite4")
	testcase = testTemplate.testInstance("ABC|\nD" , "Impossible" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite5")
	testcase = testTemplate.testInstance("A|SD\nQWE" , "AQW|SDE" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("3 8" , "0" , "Smoke test case 1")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("3 9" , "0" , "Smoke test case 2")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("2 4" , "-1" , "Smoke test case 3")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("5 25" , "5" , "Smoke test case 4")
	defaultSuite.add(testCase)
	#testCase     = testTemplate.testInstance("7\n60 44 33 67 9 90 34" , "6159" , "Smoke test case 5")
	#defaultSuite.add(testCase)
	
	#length=random.randint(1,5)
	#length=10
	#arr=[]
	#input=str(length)+"\n"
	#for i in range(length):
	#	temp = random.randint(1,100)
	#	arr.append(temp)
	#for num in arr:
	#	input=input+str(num)+" "
	#output=str(solve(arr))
	#output=str(random.randint(1,100))
	
	#temp=random.randint(1,10)
	#testCase     = testTemplate.testInstance(str(temp), str(temp+1) , "Cross checking from soln")
	#defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite", 1)
    testCase = testTemplate.testInstance("1 10", "1 10 20",
                                         "Smoke test case 1")
    defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("100 200", "100 200 125",
                                         "Smoke test case 2")
    defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("201 210", "201 210 89",
                                         "Smoke test case 3")
    defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("900 1000", "900 1000 174",
                                         "Smoke test case 4")
    defaultSuite.add(testCase)
    '''
	for n in range(1):
		a=random.randint(1,500000)
		b=random.randint(500000,1000000)
		max=-1
		for i in range(a,b+1):
			if max < ans(i):
				max= ans(i)
		testCase   = testTemplate.testInstance(str(a)+" "+str(b) , str(a)+" "+str(b)+" "+str(max+1) , "Randomized Boundary test #"+str(n))
		defaultSuite.add(testCase)
	'''
    return defaultSuite
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance("1 3 4", "1.000000",
                                         "Smoke test case 1")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("2 2 3 1 4", "1.500000",
                                         "Smoke test case 2")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("2 2 4 2 2", "0.000000",
                                         "Smoke test case 3")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance(
        "15 1 1 1 1 2 2 2 3 3 3 4 4 5 5 5 1 1 2 2 2 3 3 3 3 4 4 6 6 6 6",
        "5.400000", "Smoke test case 3")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("2 1 1 3 3", "0.000000",
                                         "Smoke test case 5")
    defaultSuite.add(testCase)

    return defaultSuite
예제 #5
0
def getTests():
    tests = []

    suite = testTemplate.testSuite("Sample 1")
    testcase = testTemplate.testInstance("8\n2\n5\n7\n6\n9\n8\n4\n2", "5", "")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Sample 2")
    testcase = testTemplate.testInstance("8\n9\n1\n6\n2\n6\n5\n8\n3", "5", "")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom test 1")
    testcase = testTemplate.testInstance("2\n4\n5", "2", "")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom test 2")
    testcase = testTemplate.testInstance("2\n2\n5", "1", "")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom test 2")
    testcase = testTemplate.testInstance("4\n2\n4\n9\n20", "2", "")
    suite.add(testcase)
    tests.append(suite)

    return tests
def getTests():
    tests = []

    suite = testTemplate.testSuite("Sample Test Suite1")
    testcase = testTemplate.testInstance(
        "5 9\n0 1 1 1 1\n1 0 2 3 2\n1 1 0 4 1\n2 1 5 0 1\n4 2 3 4 0\n4 2 4 1 5 4 3 2 1",
        "5", "Sample 1")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom Test Suite")
    testcase = testTemplate.testInstance(
        "5 9\n0 1 1 1 1\n1 0 2 3 2\n1 1 0 4 1\n2 1 5 0 1\n4 2 3 4 0\n1 1 1 1 1 1 1 1 1",
        "0", "test case 1")
    suite.add(testcase)
    testcase = testTemplate.testInstance(
        "5 9\n0 1 1 1 1\n1 0 2 3 2\n1 1 0 4 1\n2 1 5 0 1\n4 2 3 4 0\n1 1 2 3 1 2 3 1 2",
        "0", "test case 2")
    suite.add(testcase)
    testcase = testTemplate.testInstance(
        "5 9\n0 1 1 1 1\n1 0 2 3 2\n1 1 0 4 1\n2 1 5 0 1\n4 2 3 4 0\n1 1 1 4 1 1 1 1 1",
        "2", "test case 3")
    suite.add(testcase)
    testcase = testTemplate.testInstance(
        "5 9\n0 1 1 1 1\n1 0 2 1 2\n1 1 0 4 1\n2 1 5 0 1\n4 2 3 4 0\n1 1 1 4 1 1 1 1 1",
        "1", "test case 4")
    suite.add(testcase)
    tests.append(suite)

    return tests
예제 #7
0
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance("3 8", "0", "Smoke test case 1")
    defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("3 9", "0", "Smoke test case 2")
    defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("2 4", "-1", "Smoke test case 3")
    defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("5 25", "5", "Smoke test case 4")
    defaultSuite.add(testCase)
    #testCase     = testTemplate.testInstance("7\n60 44 33 67 9 90 34" , "6159" , "Smoke test case 5")
    #defaultSuite.add(testCase)

    #length=random.randint(1,5)
    #length=10
    #arr=[]
    #input=str(length)+"\n"
    #for i in range(length):
    #	temp = random.randint(1,100)
    #	arr.append(temp)
    #for num in arr:
    #	input=input+str(num)+" "
    #output=str(solve(arr))
    #output=str(random.randint(1,100))

    #temp=random.randint(1,10)
    #testCase     = testTemplate.testInstance(str(temp), str(temp+1) , "Cross checking from soln")
    #defaultSuite.add(testCase)

    return defaultSuite
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")
    '''
	testCase     = testTemplate.testInstance("1 10 1 2 3 4 5 6 7 8 9 10" , "Array object successfully created" , "Creation of Array object.")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("2 7" , "Key successfully found at 6" , "COrrect search")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("2 11" , "Key not found" , "Incorrect search with greater key")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("2 0" , "Key not found" , "incorrect searcvh with smaller key.")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("3" , "Array object freed successfully." , "Array object freed successfully.")
	defaultSuite.add(testCase)
	'''
    len = random.randint(1, 1000000)
    inputStr = "1 " + str(len) + " "
    for i in range(len):
        inputStr = inputStr + str(i) + " "
    testCase = testTemplate.testInstance(inputStr,
                                         "Array object successfully created",
                                         "Creation of Array object.")
    defaultSuite.add(testCase)
    for i in range(830):
        n = random.randint(1, len)
        testCase = testTemplate.testInstance(
            "2 " + str(n), "Key successfully found at " + str(n),
            "COrrect search #" + str(i))
        defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("5", "Exiting programme.",
                                         "Exit condition.")
    defaultSuite.add(testCase)

    return defaultSuite
예제 #9
0
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
	testcase = testTemplate.testInstance(
'''
8
1 2 3 4 5 6 7 8
2 2
''' , "1 2 5 6 " , "sample1")
	suite.add(testcase)
	testcase = testTemplate.testInstance(
'''
10
1 2 3 4 5 6 7 8 9 10
3 2
''' , "1 2 3 6 7 8 " , "sample2")
	suite.add(testcase)
	testcase = testTemplate.testInstance(
'''
10
1 2 3 4 5 6 7 8 9 10
1 1
''' , "1 3 5 7 9 " , "sample3")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
	tests = []
	
	n=10
	suite=testTemplate.testSuite("Sample Test Suite1",header=str(n),footer="e")
	for i in range(n):
		testcase = testTemplate.testInstance("f "+str(i) , "Set:"+str(i)+" , Rank:1" , "Initialisation Test on "+str(i))
		suite.add(testcase)
	
	for i in range(0,n,2):
		testcase = testTemplate.testInstance("u "+str(i)+" "+str(i+1)+"\nf "+str(i) , "Set:"+str(i+1)+" , Rank:2" , "First Union Test on "+str(i)+","+str(i+1))
		suite.add(testcase)
		
		testcase = testTemplate.testInstance("f "+str(i+1) , "Set:"+str(i+1)+" , Rank:2" , " First Parent Test on "+str(i+1))
		suite.add(testcase)
	
	for i in range(0,n-4,4):
		testcase = testTemplate.testInstance("u "+str(i)+" "+str(i+3)+"\nf "+str(i) , "Set:"+str(i+3)+" , Rank:3" , "Second Union Test on "+str(i)+","+str(i+1))
		suite.add(testcase)
		
		testcase = testTemplate.testInstance("f "+str(i+2) , "Set:"+str(i+3)+" , Rank:3" , "Second Parent Test on "+str(i+1))
		suite.add(testcase)
	
	tests.append(suite)
	
	return tests
예제 #11
0
def getTests():
    tests = []

    suite = testTemplate.testSuite("Sample Test Suite1")
    testcase = testTemplate.testInstance("3\n3 1 5", "26", "sample")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Sample Test Suite2")
    testcase = testTemplate.testInstance("1\n10", "10", "sample")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom Test Suite1")
    testcase = testTemplate.testInstance("4\n3 1 5 1", "30", "custom")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom Test Suite2")
    testcase = testTemplate.testInstance("2\n3 1", "8", "custom")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom Test Suite3")
    testcase = testTemplate.testInstance("7\n3 1 2 4 5 6 7", "111", "custom")
    suite.add(testcase)
    tests.append(suite)

    return tests
예제 #12
0
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.testInstance('''
	5
	0 1 0 1 0''' , "3" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite2")
	testcase = testTemplate.testInstance('''
	5
	1 1 0 0 1''' , "4" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite3")
	testcase = testTemplate.testInstance('''
	2
	0 0''' , "0" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
예제 #13
0
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance(
        "4 10 0 6 2 3 6 0 2 3 3 1 0 2 3 3 2 0 0 2 2 7 2 0 1 2 2 2 0 5 7 2 5 0",
        "4 9", "Smoke test case 1")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance(
        "3 1 0 1 2 1 0 2 2 2 0 0 0 1 0 0 0 1 0 0", "-1", "Smoke test case 2")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance(
        "4 5 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 9 1 9 9 0 9 1 9 1 0 9 9 9 9 9",
        "3 3", "Smoke test case 3")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance(
        "3 5 0 0 0 0 0 0 0 0 0 0 5 4 5 0 6 4 6 0", "4 0", "Smoke test case 4")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance(
        "4 7 0 5 2 3 5 0 2 3 3 1 0 2 3 3 2 0 0 2 2 7 2 0 1 2 2 2 0 5 7 2 5 0",
        "6 6", "Smoke test case 5")
    defaultSuite.add(testCase)

    return defaultSuite
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.testInstance("3\n3 1 5" , "26" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite2")
	testcase = testTemplate.testInstance("1\n10" , "10" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Custom Test Suite1")
	testcase = testTemplate.testInstance("4\n3 1 5 1" , "30" , "custom")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Custom Test Suite2")
	testcase = testTemplate.testInstance("2\n3 1" , "8" , "custom")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Custom Test Suite3")
	testcase = testTemplate.testInstance("7\n3 1 2 4 5 6 7" , "111" , "custom")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance("1 3 5 7 9", "5 9 7 5 3 1 ",
                                         "Smoke test case 1")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("1 5 7 9", "3 9 5 1 ",
                                         "Smoke test case 2")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("1 5 7 9 10 11 13", "4 13 9 5 1 ",
                                         "Smoke test case 3")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("1 5 6 100", "0 ",
                                         "Smoke test case 4")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("1 99 2 4 3 5 96 6 88 77 7 9 8 10",
                                         "10 10 9 8 7 6 5 4 3 2 1 ",
                                         "Smoke test case 5")
    defaultSuite.add(testCase)

    return defaultSuite
예제 #16
0
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance("4 3 1 2 1 1 3 3 1 4 4", "3 1 4 0 ",
                                         "Smoke test case 1")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("8 4 3 5 4 3 7 6 2 8 8 1 8 1",
                                         "0 8 4 6 4 8 6 1 ",
                                         "Smoke test case 2")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("2 1 1 2 1", "0 1",
                                         "Smoke test case 3")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("2 1 1 2 2", "2 0",
                                         "Smoke test case 4")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("3 1 1 3 1", "0 1 1 ",
                                         "Smoke test case 5")
    defaultSuite.add(testCase)

    return defaultSuite
def getTests():
    tests = []

    suite = testTemplate.testSuite("Sample Test Suite1")
    testcase = testTemplate.testInstance("6\n4 1 7 8 3 8\n1", "3",
                                         "sample test case")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom Test Suite1")
    testcase = testTemplate.testInstance("6\n4 1 7 8 3 8\n2", "3",
                                         "Custom test case")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom Test Suite2")
    testcase = testTemplate.testInstance("6\n4 1 7 8 3 8\n4", "4",
                                         "Custom test case")
    suite.add(testcase)
    tests.append(suite)

    suite = testTemplate.testSuite("Custom Test Suite3")
    testcase = testTemplate.testInstance("6\n4 1 9 17 25 33\n4", "2",
                                         "Custom test case")
    suite.add(testcase)
    tests.append(suite)

    return tests
예제 #18
0
def getTests():

	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("1 5 2" , "1 6" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("2 20 8" , "2 63426" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("3 30 17" , "3 1861225" , "Smoke test case 3")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("4 40 24" , "4 168212501" , "Smoke test case 4")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("5 50 37" , "5 44874764" , "Smoke test case 5")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("6 60 52" , "6 160916" , "Smoke test case 6")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("7 70 59" , "7 22937308" , "Smoke test case 7")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("8 80 73" , "8 99167" , "Smoke test case 8")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("9 90 84" , "9 15476" , "Smoke test case 9")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("10 100 90" , "10 23076518" , "Smoke test case 10")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
    '''
	Default test suite to be returned byt getTests() method
	'''
    defaultSuite = testTemplate.testSuite("Default Test Suite")
    '''
	Following are the examples of hard coded test cases 
	To create testcase:
			testTemplate.testInstance(inputString,ExpectedOutput,Description of testcase)
	To add a testcase to test Suite:
			testSuiteObject.add(testCaseObject)
	'''
    testCase = testTemplate.testInstance("3", "4", "Smoke test case 1")
    defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("2", "3", "Smoke test case 2")
    defaultSuite.add(testCase)
    #testCase     = testTemplate.testInstance("2\n40 60 20 " , "2400" , "Smoke test case 2")
    #defaultSuite.add(testCase)
    #testCase     = testTemplate.testInstance("5\n40 60 20 9 10 " , "2870" , "Smoke test case 3")
    #defaultSuite.add(testCase)
    #testCase     = testTemplate.testInstance("3\n40 50 60" , "3400" , "Smoke test case 4")
    #defaultSuite.add(testCase)
    #testCase     = testTemplate.testInstance("7\n60 44 33 67 9 90 34" , "6159" , "Smoke test case 5")
    #defaultSuite.add(testCase)
    '''
	To add test cases with open ended expected outputs ( like those whose expected value lies within a 
	range or those where you need to manually see the output as it cannot be quantified), start the ExpectedOutput with a '?'
	'''
    #testCase     = testTemplate.testInstance("2" , "?should be in range[3,4)" , "Open test case 1")
    #defaultSuite.add(testCase)
    '''
	To add test cases where you want the output to match a regular expression, start the ExpectedOutput with a '~'
	'''
    testCase = testTemplate.testInstance(
        "2", "~\A\w* Cycle exists. Cycle: (\d\s)*", "Open test case 1")
    defaultSuite.add(testCase)
    '''
	Following is an example of test case generated using random numbers and bruteforce function solve
	The user can write the bruteforce function in this module and use that to automatically generate 
	as many test cases as possible.
	'''
    #length=random.randint(1,5)
    #length=10
    #arr=[]
    #input=str(length)+"\n"
    #for i in range(length):
    #	temp = random.randint(1,100)
    #	arr.append(temp)
    #for num in arr:
    #	input=input+str(num)+" "
    #output=str(solve(arr))
    #output=str(random.randint(1,100))

    #temp=random.randint(1,10)
    #testCase     = testTemplate.testInstance(str(temp), str(temp+1) , "Cross checking from soln")
    #defaultSuite.add(testCase)

    return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("a*b* aab" , "Matched" , "Smoke test case 1")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("a+b* a" , "Matched" , "Smoke test case 2")
	defaultSuite.add(testCase)

	return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("2 18 19" , "342" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("3 40 60 20" , "2400" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("5 5\n^^^^^\n^^^^^\n^^^^#\n^^^^^\n^^^^^" , "0" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("5 7\n^^#^^^^\n^^#^#^#\n#^^^^^^\n^^#^^#^\n^^^^^^^" , "1" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")
	
	testCase     = testTemplate.testInstance("5 1 5 3 9 4" , "14" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("5 1 2 3 4 5" , "9" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	return defaultSuite
예제 #24
0
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("5 5\nABCDE\nJIHGF\nABCCC\nDEFFF\nGGGGG" , "Case 1: 10" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("0 0\n" , "" , "end of test")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("1 10" , "46" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("100 777" , "8655" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("5 10 30 1 30 0 10 20 30 2 50 40 3 40 30 4" , "1 20 2 3 7" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("7 100 0 2 21 100 5 26 100 7 29 100 8 3 100 12 1 26 5 4 26 6" , "45 5 18 8 12 5 6" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	return defaultSuite
예제 #27
0
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance("10", "?", "Smoke test case 1")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("100", "?", "Smoke test case 2")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("500", "?", "Smoke test case 3")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("1000", "?", "Smoke test case 4")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("5000", "?", "Smoke test case 5")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("10000", "?", "Smoke test case 6")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("50000", "?", "Smoke test case 7")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("100000", "?", "Smoke test case 1")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("1", "$", "Graphical test case")
    defaultSuite.add(testCase)

    return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("10" , "?" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("100" , "?" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("500" , "?" , "Smoke test case 3")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("1000" , "?" , "Smoke test case 4")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("5000" , "?" , "Smoke test case 5")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("10000" , "?" , "Smoke test case 6")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("50000" , "?" , "Smoke test case 7")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("100000" , "?" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("1" , "$" , "Graphical test case")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
    tests = []

    suite = testTemplate.testSuite("Default Test Suite1")
    testcase = testTemplate.testInstance("1", "2", "#1")
    suite.add(testcase)
    testcase = testTemplate.testInstance("2", "3", "#2")
    suite.add(testcase)
    tests.append(suite)

    return tests
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance("a*b* aab", "Matched",
                                         "Smoke test case 1")
    defaultSuite.add(testCase)
    testCase = testTemplate.testInstance("a+b* a", "Matched",
                                         "Smoke test case 2")
    defaultSuite.add(testCase)

    return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite",1)
	testCase     = testTemplate.testInstance("10 15 0 1 0 2 0 3 1 3 1 4 2 5 2 9 3 6 4 7 4 8 5 8 5 9 6 7 6 9 7 8" , "~\A\w* Cycle exists. Cycle: (\d\s)*" , "Graph1")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("10 15 0 1 0 2 0 3 1 3 0 3 2 5 5 6 3 6 4 7 4 8 5 8 5 9 6 7 6 9 8 8" , "~\A\w* Cycle exists. Cycle: (\d\s)*" , "Graph1")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("10 15 0 1 1 2 1 3 0 3 0 4 2 5 2 9 3 6 4 7 4 8 5 8 5 9 6 7 6 9 7 8" , "~\A\w* Cycle exists. Cycle: (\d\s)*" , "Graph1")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("10 15 4 1 7 9 6 2 7 3 5 0 0 2 0 8 1 6 3 9 6 3 2 8 1 5 9 8 4 5 4 7" , "~\A\w* Cycle exists. Cycle: (\d\s)*" , "Graph1")
	defaultSuite.add(testCase)
	return defaultSuite
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
	testcase = testTemplate.testInstance("ask_not_what_your_country_can_do_for_you_ask_what_you_can_do_for_your_country ask_country" , "sk_not_what_your_c" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.testInstance("acbbaca aba" , "baca" , "sample2")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample test cases")
	testcase = testTemplate.testInstance("5\n31 41 59\n26 53 58\n97 93 23\n84 62 64\n33 83 27" , "342" , "sample #1")
	suite.add(testcase)
	testcase = testTemplate.testInstance("1\n1 1 1" , "1" , "sample #2")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")
	
	testCase     = testTemplate.testInstance("asdfghj qweasdfghjbnm" , "7" , "Smoke test 1")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("asdfgbcnn qweasdfghjbnm" , "5" , "Smoke test 2")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("asdfghjkl qwertyuiop" , "0" , "Smoke test 3")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Default Test Suite1")
	testcase = testTemplate.testInstance("1" , "2" , "#1")
	suite.add(testcase)
	testcase = testTemplate.testInstance("2" , "3" , "#2")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
    tests = []

    suite = testTemplate.testSuite("Sample Test Suite1", print_count=True)
    testcase = testTemplate.testInstance("4\n1 3\n2 6\n8 10\n15 18",
                                         "3\n1 6\n8 10\n15 18\n", "sample1")
    suite.add(testcase)
    testcase = testTemplate.testInstance("2\n1 4\n0 4", "1\n0 4", "sample2")
    suite.add(testcase)
    tests.append(suite)

    return tests
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance("5 1 5 3 9 4", "14",
                                         "Smoke test case 1")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance("5 1 2 3 4 5", "9",
                                         "Smoke test case 2")
    defaultSuite.add(testCase)

    return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("50 10 12 3 15 8 16 9 16 6 10 2 21 9 18 4 12 4 17 8 18 9 \n" , "49 26" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("50 10 13 8 19 10 16 8 12 9 10 2 12 8 13 5 15 5 11 7 16 2 \n" , "48 32" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("7 2  6 1  5 1 \n" , "5 1" , "Smoke test case 3")
	defaultSuite.add(testCase)
	
	return defaultSuite
예제 #39
0
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("3 1 2 3 4 5 6 7 8 9" , "3 6 9 2 5 8 1 4 7" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16" , "4 8 12 16 3 7 11 15 2 6 10 14 1 5 9 13" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25" , "5 10 15 20 25 4 9 14 19 24 3 8 13 18 23 2 7 12 17 22 1 6 11 16 21" , "Smoke test case 3")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")
	
	testCase     = testTemplate.testInstance("6 65 100 70 150 56 90 75 190 60 95 68 110" , "Solution is :  (75,190)  (70,150)  (68,110)  (65,100)  (60,95)  (56,90)" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("7 65 100 63 93 70 150 56 90 75 190 60 95 68 110" , "Solution is :  (75,190)  (70,150)  (68,110)  (65,100)  (60,95)  (56,90)" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("8 65 100 63 93 63 98 70 150 56 90 75 190 60 95 68 110" , "Solution is :  (75,190)  (70,150)  (68,110)  (65,100)  (63,98)  (63,93)  (60,95)  (56,90)" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Smoke test suite")
	testcase = testTemplate.testInstance("3\n1 2 3\n2 3 1\n3 1 2" , "3" , "sample")
	suite.add(testcase)
	testcase = testTemplate.testInstance("3\n1 2 3\n2 3 1\n1 3 2" , "3" , "anamoly")
	suite.add(testcase)
	testcase = testTemplate.testInstance("10 \n2 5 3 8 10 7 1 6 9 4\n1 2 3 4 5 6 7 8 9 10\n3 8 7 10 5 4 1 2 6 9" , "4" , "NKTEAM sample")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("2" , "3" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("8" , "153" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("12" , "2131" , "Smoke test case 3")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")

	testCase     = testTemplate.testInstance("10 2 5" , "6" , "Smoke test case 1")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("12 4 4" , "3" , "Smoke test case 2")
	defaultSuite.add(testCase)
	
	testCase     = testTemplate.testInstance("6 2 2 " , "5" , "Smoke test case 3")
	defaultSuite.add(testCase)
	
	return defaultSuite
def getTests():
    defaultSuite = testTemplate.testSuite("Default Test Suite")

    testCase = testTemplate.testInstance(
        "3 10\n#^^^^^#^##\n^^^^^^^^^^\n^^^^^^^^^#", "0", "Smoke test case 1")
    defaultSuite.add(testCase)

    testCase = testTemplate.testInstance(
        "7 10\n^^^^#^^^^#\n^^^^^^^^#^\n^^##^^#^^^\n#^^^^^^^#^\n^^#^^^^^^^\n^^^^#^^^^^\n^^^^^^^^^^",
        "3", "Smoke test case 2")
    defaultSuite.add(testCase)

    return defaultSuite
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Cases")
	testcase = testTemplate.testInstance("3\n1 1 1\n1 1 1\n1 1 1" , "6" , "Sample #1")
	suite.add(testcase)
	testcase = testTemplate.testInstance("11\n1 0 0 1 0 0 0 0 0 1 1 \n1 1 1 1 1 0 1 0 1 0 0 \n1 0 0 1 0 0 1 1 0 1 0 \n1 0 1 1 1 0 1 1 0 1 1 \n0 1 1 1 0 1 0 0 1 1 1 \n1 1 1 0 0 1 0 0 0 0 0 \n0 0 0 0 1 0 1 0 0 0 1 \n1 0 1 1 0 0 0 0 0 0 1 \n0 0 1 0 1 1 0 0 0 1 1 \n1 1 1 0 0 0 1 0 1 0 1 \n1 0 0 0 1 1 1 1 0 0 0" , "7588" , "Sample #2")
	suite.add(testcase)
	testcase = testTemplate.testInstance("11\n0 1 1 1 0 1 0 0 0 1 0 \n0 0 1 1 1 1 1 1 1 1 1 \n1 1 0 1 0 0 0 0 0 1 0 \n0 1 0 1 0 1 0 1 0 1 1 \n1 0 0 1 0 0 0 0 1 0 1 \n0 0 1 0 1 1 0 0 0 0 1 \n1 0 1 0 1 1 1 0 1 1 0 \n1 0 1 1 0 1 1 0 0 1 0 \n0 0 1 1 0 1 1 1 1 1 1 \n0 1 0 0 0 0 0 0 0 1 1 \n0 1 1 0 0 0 0 0 1 0 1 " , "7426" , "Sample #3")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample test cases")
	testcase = testTemplate.testInstance("AAA" , "4" , "sample #1")
	suite.add(testcase)
	testcase = testTemplate.testInstance("ABCDEFG" , "128" , "sample #2")
	suite.add(testcase)
	testcase = testTemplate.testInstance("CODECRAFT" , "496" , "sample #3")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
    tests = []

    suite = testTemplate.testSuite("Sample test cases")
    testcase = testTemplate.testInstance(
        "5\n31 41 59\n26 53 58\n97 93 23\n84 62 64\n33 83 27", "342",
        "sample #1")
    suite.add(testcase)
    testcase = testTemplate.testInstance("1\n1 1 1", "1", "sample #2")
    suite.add(testcase)
    tests.append(suite)

    return tests
def getTests():
	defaultSuite = testTemplate.testSuite("Default Test Suite")
	testCase     = testTemplate.testInstance("asdf afsdddsaf" , "4" , "Smoke test case 1")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("algorithm globalism" , "4" , "Smoke test case 2")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("asdf qwer" , "0" , "Boundary test case 1")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("asdf asdf" , "4" , "Boundary test case 2")
	defaultSuite.add(testCase)
	testCase     = testTemplate.testInstance("aaaa aaaa" , "4" , "Boundary test case 3")
	defaultSuite.add(testCase)
	return defaultSuite
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("nested dependency test")
	testcase = testTemplate.testInstance("1" , "D1 success fully called\nD2 success fully called" , "test case 1")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("direct dependency test")
	testcase = testTemplate.testInstance("2" , "D3 success fully called" , "test case 1")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample 1")
	testcase = testTemplate.testInstance("4 4\n1 1\n100 55 10 2\n20   10 90 1\n60   20 22 4\n1     30 70 5" , "Y 23" , "")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample 2")
	testcase = testTemplate.testInstance("2 2\n1 1\n1   55 \n20 10 " , "N" , "")
	suite.add(testcase)
	tests.append(suite)
	
	return tests