This is an archive of the discontinued LLVM Phabricator instance.

[scudo][tests] Ensure test assertions have matching type
AbandonedPublic

Authored by ddcc on Mar 16 2022, 2:08 PM.

Details

Summary

gtest-like testers may use template deduction to select the correct overload, but type promotion is not considered when performing template substitution, so ensure both arguments have matching type

Diff Detail

Event Timeline

ddcc created this revision.Mar 16 2022, 2:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2022, 2:08 PM
ddcc requested review of this revision.Mar 16 2022, 2:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2022, 2:08 PM
vitalybuka added inline comments.Mar 24 2022, 12:06 PM
compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
142

code looks less readable with unnecessary casts like this

compiler-rt/lib/scudo/standalone/tests/list_test.cpp
96

Are we going to have mismatch 32/64 here?

ddcc added a comment.Mar 25 2022, 4:54 PM

Hmmm yeah this is pretty ugly, I'll look into changing the test matcher template instead.

ddcc abandoned this revision.Mar 25 2022, 4:54 PM