1*** Test Cases ***
2Should Get Simple Symbol
3    Execute Command               include @scripts/single-node/miv.resc
4    ${addr}=  Execute Command     sysbus GetSymbolAddress "main"
5    Should Be Equal As Numbers    0x8000097C  ${addr.strip()}
6
7Should Get Simple Symbol By Index
8    Execute Command               include @scripts/single-node/miv.resc
9    ${addr}=  Execute Command     sysbus GetSymbolAddress "main" 0
10    Should Be Equal As Numbers    0x8000097C  ${addr.strip()}
11
12Should Get Complex Symbol By Index
13    Execute Command               include @scripts/single-node/miv.resc
14    ${addr}=  Execute Command     sysbus GetSymbolAddress "__compound_literal.3" 0
15    Should Be Equal As Numbers    0x8004004C  ${addr.strip()}
16    ${addr}=  Execute Command     sysbus GetSymbolAddress "__compound_literal.3" 1
17    Should Be Equal As Numbers    0x80040078  ${addr.strip()}
18
19Should Error On Wrong Index
20    Execute Command               include @scripts/single-node/miv.resc
21    Run Keyword And Expect Error  *Wrong index*   Execute Command  sysbus GetSymbolAddress "main" 1
22
23Should Ask For Index
24    Execute Command               include @scripts/single-node/miv.resc
25    Run Keyword And Expect Error  *Found 4 possible addresses*   Execute Command  sysbus GetSymbolAddress "__compound_literal.3"
26
27Should Get Simple Symbol From Python
28    Execute Command               include @scripts/single-node/miv.resc
29    ${addr}=  Execute Command     python "print(hex(self.Machine.SystemBus.GetSymbolAddress('main')))"
30    Should Be Equal               0x8000097cL  ${addr.strip()}
31
32Should Get Simple Symbol By Index From Python
33    Execute Command               include @scripts/single-node/miv.resc
34    ${addr}=  Execute Command     python "print(hex(self.Machine.SystemBus.GetSymbolAddress('main', 0)))"
35    Should Be Equal               0x8000097cL  ${addr.strip()}
36
37Should Get Complex Symbol By Index From Python
38    Execute Command               include @scripts/single-node/miv.resc
39    ${addr}=  Execute Command     python "print(hex(self.Machine.SystemBus.GetSymbolAddress('__compound_literal.3', 0)))"
40    Should Be Equal               0x8004004cL  ${addr.strip()}
41    ${addr}=  Execute Command     python "print(hex(self.Machine.SystemBus.GetSymbolAddress('__compound_literal.3', 1)))"
42    Should Be Equal               0x80040078L  ${addr.strip()}
43
44Should Error On Wrong Index From Python
45    Execute Command               include @scripts/single-node/miv.resc
46    Run Keyword And Expect Error  *Wrong index*   Execute Command  python "print(hex(self.Machine.SystemBus.GetSymbolAddress('main', 1)))"
47
48Should Ask For Index From Python
49    Execute Command               include @scripts/single-node/miv.resc
50    Run Keyword And Expect Error  *Found 4 possible addresses*   Execute Command  python "print(hex(self.Machine.SystemBus.GetSymbolAddress('__compound_literal.3')))"
51