winIDEA SDK
test_create_user_stub.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
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
15 tcCtrl = ic.CTestCaseController(connMgr, "main", "")
16
17 print("Creating empty user stub of function 'target_init'...")
18 tcCtrl.createUserStub("target_init", "")
19
20 print("Creating stub of function 'main', replaced by 'get_random'...")
21 tcCtrl.createUserStub("main", "get_random")
22
23 tcCtrl.init()
24 tcCtrl.destroy()
25
26
27if __name__ == "__main__":
28 test_createUserStub()