Skip to content

Use ASSERT_STREQ for testing ExtractSourceFromModule results#6600

Open
OPNA2608 wants to merge 1 commit intoKhronosGroup:mainfrom
OPNA2608:fix/test-objdump-streq
Open

Use ASSERT_STREQ for testing ExtractSourceFromModule results#6600
OPNA2608 wants to merge 1 commit intoKhronosGroup:mainfrom
OPNA2608:fix/test-objdump-streq

Conversation

@OPNA2608
Copy link
Copy Markdown

@OPNA2608 OPNA2608 commented Mar 16, 2026

In case of a mismatch, ASSERT_STREQ actually prints both strings. Example:

/build/source/test/tools/objdump/extract_source_test.cpp:223: Failure Expected equality of these values:
  resStr.c_str()
    Which is: "diovmoc etup}{)("
  "void compute(){}"

This makes it easier to see that SPIRV-Tools has a similar issue as KhronosGroup/glslang#4145, where parsing on big-endian gives either seemingly no/incomplete results, or results where strings are partially reversed.

In case of a mismatch, ASSERT_STREQ actually prints both strings. Example:

/build/source/test/tools/objdump/extract_source_test.cpp:223: Failure
Expected equality of these values:
  resStr.c_str()
    Which is: "diovmoc etup}{)("
  "void compute(){}"
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 16, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants