Changeset 92809 in vbox for trunk/src/VBox/Disassembler/testcase/tstDisasm-1.cpp
- Timestamp:
- Dec 8, 2021 10:50:51 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/testcase/tstDisasm-1.cpp
r82968 r92809 42 42 for (size_t off = 0; off < cbInstrs;) 43 43 { 44 DISSTATE Dis; 45 uint32_t cb = 1; 46 #ifndef DIS_CORE_ONLY 44 47 uint32_t const cErrBefore = RTTestIErrorCount(); 45 uint32_t cb = 1;46 DISSTATE Dis;47 48 char szOutput[256] = {0}; 48 49 int rc = DISInstrToStr(&pabInstrs[off], enmDisCpuMode, &Dis, &cb, szOutput, sizeof(szOutput)); … … 84 85 RTTESTI_CHECK_MSG(cbOnly == cb, ("%#x vs %#x\n", cbOnly, cb)); 85 86 87 #else /* DIS_CORE_ONLY */ 88 int rc = DISInstr(&pabInstrs[off], enmDisCpuMode, &Dis, &cb); 89 RTTESTI_CHECK_RC(rc, VINF_SUCCESS); 90 RTTESTI_CHECK(cb == Dis.cbInstr); 91 #endif /* DIS_CORE_ONLY */ 92 86 93 off += cb; 87 94 } … … 145 152 RTTESTI_CHECK_MSG((cb2 = DISGetParamSize(&Dis, &Dis.Param1)) == s_gInstrs[i].cbParam1, 146 153 ("%u: %#x vs %#x\n", i , cb2, s_gInstrs[i].cbParam1)); 154 #ifndef DIS_CORE_ONLY 147 155 RTTESTI_CHECK_MSG((cb2 = DISGetParamSize(&Dis, &Dis.Param2)) == s_gInstrs[i].cbParam2, 148 156 ("%u: %#x vs %#x (%s)\n", i , cb2, s_gInstrs[i].cbParam2, Dis.pCurInstr->pszOpcode)); 157 #else 158 RTTESTI_CHECK_MSG((cb2 = DISGetParamSize(&Dis, &Dis.Param2)) == s_gInstrs[i].cbParam2, 159 ("%u: %#x vs %#x\n", i , cb2, s_gInstrs[i].cbParam2)); 160 #endif 149 161 RTTESTI_CHECK_MSG((cb2 = DISGetParamSize(&Dis, &Dis.Param3)) == s_gInstrs[i].cbParam3, 150 162 ("%u: %#x vs %#x\n", i , cb2, s_gInstrs[i].cbParam3));
Note:
See TracChangeset
for help on using the changeset viewer.