Changeset 41716 in vbox for trunk/src/VBox/Disassembler/DisasmTest.cpp
- Timestamp:
- Jun 14, 2012 5:58:39 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 78524
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmTest.cpp
r41715 r41716 21 21 #include <VBox/dis.h> 22 22 #include <iprt/test.h> 23 #include <iprt/ asm.h>23 #include <iprt/ctype.h> 24 24 #include <iprt/string.h> 25 #include < VBox/err.h>25 #include <iprt/err.h> 26 26 27 27 … … 46 46 int rc = DISInstrToStr(&pabInstrs[off], enmDisCpuMode, &Cpu, &cb, szOutput, sizeof(szOutput)); 47 47 48 49 48 RTTESTI_CHECK_RC(rc, VINF_SUCCESS); 50 49 RTTESTI_CHECK(cb == Cpu.opsize); 51 50 RTTESTI_CHECK(cb > 0); 52 51 RTTESTI_CHECK(cb <= 16); 52 RTStrStripR(szOutput); 53 RTTESTI_CHECK(szOutput[0]); 54 if (szOutput[0]) 55 { 56 char *pszBytes = strchr(szOutput, '['); 57 RTTESTI_CHECK(pszBytes); 58 if (pszBytes) 59 { 60 RTTESTI_CHECK(pszBytes[-1] == ' '); 61 RTTESTI_CHECK(RT_C_IS_XDIGIT(pszBytes[1])); 62 RTTESTI_CHECK(pszBytes[cb * 3] == ']'); 63 RTTESTI_CHECK(pszBytes[cb * 3 + 1] == ' '); 64 65 size_t cch = strlen(szOutput); 66 RTTESTI_CHECK(szOutput[cch - 1] != ','); 67 } 68 } 53 69 if (cErrBefore != RTTestIErrorCount()) 54 RTTestIFailureDetails("rc=%Rrc, off=%#x (%u) cbInstr=%u enmDisCpuMode=%d ",70 RTTestIFailureDetails("rc=%Rrc, off=%#x (%u) cbInstr=%u enmDisCpuMode=%d\n", 55 71 rc, off, Cpu.opsize, enmDisCpuMode); 56 RTTestIPrintf(RTTESTLVL_ALWAYS, "%s ", szOutput);72 RTTestIPrintf(RTTESTLVL_ALWAYS, "%s\n", szOutput); 57 73 off += cb; 58 74 }
Note:
See TracChangeset
for help on using the changeset viewer.