Skip to content

Commit

Permalink
Merge pull request #331 from gdt050579/dissasm_view
Browse files Browse the repository at this point in the history
temporarely fixed unit testing
  • Loading branch information
rzaharia authored Jul 28, 2024
2 parents 49790b7 + 89f727b commit e9a8f00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
BUILD_TYPE: RelWithDebInfo

jobs:
testing-win:
Expand Down
6 changes: 4 additions & 2 deletions GViewCore/src/View/DissasmViewer/tests_dissasmviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ class DissasmTestInstance
DissasmTestInstance(const unsigned char* binaryData, size_t binaryDataSize)
{
instance = nullptr;
assert(init(binaryData, binaryDataSize));
const bool initResult = init(binaryData, binaryDataSize);
assert(init_result);
}

bool init(const unsigned char* binaryData, size_t binaryDataSize)
Expand Down Expand Up @@ -345,7 +346,8 @@ class DissasmTestInstance
initData.visibleRows = 53;
initData.obj = obj;

assert(zone->InitZone(initData));
const bool initZoneResult = zone->InitZone(initData);
assert(initZoneResult);
}

bool CheckInternalTypes(uint32 zoneIndex, std::initializer_list<ZoneCheckData> zones)
Expand Down
3 changes: 2 additions & 1 deletion GViewCore/src/View/DissasmViewer/x86_x64/DissasmX86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,8 @@ bool Instance::DrawDissasmX86AndX64CodeZone(DrawLineInfo& dli, DissasmCodeZone*
}
DissasmAddColorsToInstruction(*asmCacheLine, chars, config, ColorMan.Colors, asmData, codePage, zone->cachedCodeOffsets[0].offset);
std::string comment;
assert(asmCacheLine->parent);
if (!asmCacheLine->parent)
return false;
if (asmCacheLine->parent && !asmCacheLine->parent->isCollapsed && asmCacheLine->parent->commentsData.GetComment(currentLine, comment)) {
uint32 diffLine = zone->asmPreCacheData.maxLineSize + textTotalColumnLength + commentPaddingLength;
if (config.ShowOnlyDissasm)
Expand Down

0 comments on commit e9a8f00

Please sign in to comment.