def deleteRowsRange(startindex, count, experror): i = startindex while i < startindex + count: tcpsock.send(interpreter.deleterow(ROWNAME_BASE + str(i))) obj = tcpsock.receive() interpreter.printdeleterowanswer(obj) errorcheck.checkerrorcode(experror, obj) i = i + 1
def createTestrows(count, type, maxitems, experror): i = 0 while i < count: tcpsock.send( interpreter.createrow(ROWNAME_BASE + str(i), type, maxitems)) obj = tcpsock.receive() interpreter.printcreaterowanswer(obj) errorcheck.checkerrorcode(experror, obj) i = i + 1
def addItemsNumberIncreasing(index, type, increment, start, count, experror): i = 0 while i < count: tcpsock.send( interpreter.additem(ROWNAME_BASE + str(index), type, start + (i * increment))) obj = tcpsock.receive() interpreter.printadditemanswer(obj) errorcheck.checkerrorcode(experror, obj) i = i + 1
def addItemsStringIncreasing(index, increment, start, count, experror): i = 0 while i < count: tcpsock.send( interpreter.additem(ROWNAME_BASE + str(index), 'string', TEST_STRING + str((start + i * increment)))) obj = tcpsock.receive() interpreter.printadditemanswer(obj) errorcheck.checkerrorcode(experror, obj) i = i + 1
def addItemsBoolToggling(index, type, start, count, experror): i = 0 state = start while i < count: tcpsock.send( interpreter.additem(ROWNAME_BASE + str(index), type, state)) obj = tcpsock.receive() interpreter.printadditemanswer(obj) errorcheck.checkerrorcode(experror, obj) i = i + 1 state = not state
def readRowBytes(index, experror, expstart, explength): tcpsock.send(interpreter.readrow(ROWNAME_BASE + str(index), 'bytes')) obj = tcpsock.receive() interpreter.printreadrowanswer(obj) errorcheck.checkerrorcode(experror, obj) errorcheck.checksbytes(expstart, explength, obj)
def readRowString(index, experror, expstart, expincrement): tcpsock.send(interpreter.readrow(ROWNAME_BASE + str(index), 'string')) obj = tcpsock.receive() interpreter.printreadrowanswer(obj) errorcheck.checkerrorcode(experror, obj) errorcheck.checkstrings(TEST_STRING, expstart, expincrement, obj)
def readRowBool(index, experror, expstart): tcpsock.send(interpreter.readrow(ROWNAME_BASE + str(index), 'bool')) obj = tcpsock.receive() interpreter.printreadrowanswer(obj) errorcheck.checkerrorcode(experror, obj) errorcheck.checkbooltoggle(expstart, obj)
def readRowNumber(index, type, experror, expstart, expincrement): tcpsock.send(interpreter.readrow(ROWNAME_BASE + str(index), type)) obj = tcpsock.receive() interpreter.printreadrowanswer(obj) errorcheck.checkerrorcode(experror, obj) errorcheck.checknumbers(expstart, expincrement, obj)
def clearAll(experror): tcpsock.send(interpreter.clearall()) obj = tcpsock.receive() interpreter.printclearallanswer(obj) errorcheck.checkerrorcode(experror, obj)
def getRowCount(experror, expcount): tcpsock.send(interpreter.getrowcount()) obj = tcpsock.receive() interpreter.printrowcountanswer(obj) errorcheck.checkerrorcode(experror, obj) errorcheck.checkrowcount(expcount, obj)