1
2
3
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_createUserStub():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14 session = ic.CSessionCtrl(connMgr)
15 session.begin_program()
16 tcCtrl = ic.CTestCaseController(connMgr, "main", "")
17
18 print("Creating empty user stub of function 'targetInit'...")
19 tcCtrl.createUserStub("targetInit", "")
20
21 print("Creating stub of function 'main', replaced by 'testCallStackIntVoid'...")
22 tcCtrl.createUserStub("main", "testCallStackIntVoid")
23
24 tcCtrl.init()
25 tcCtrl.destroy()
26
27
28if __name__ == "__main__":
29 test_createUserStub()