Skip to content

Commit dc85cd7

Browse files
authored
Execution Tests: Fix bug parsing bools in TableParameterHandler (#7701)
This PR fixes a bug in the Exec tests utility TableParamaterHandler which parses TAEF metadata which has either been populated via an xml file or TAEF macros. There was a bug when parsing a TableParameter::BOOL a string was being passed to TryGetValue instead of a bool. The first argument to TryGetValue is the name of the parameter and the second is a reference to the variable to store the value. How tested: I'm adding a test that's using the handler to retrieve a bool value. I confirmed that it's working now.
1 parent efc9302 commit dc85cd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/clang/unittests/HLSLExec/TableParameterHandler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ HRESULT TableParameterHandler::ParseTableRow() {
129129
if (FAILED(WEX::TestExecution::TestData::TryGetValue(table[i].m_name,
130130
table[i].m_int32)) &&
131131
table[i].m_required) {
132-
// TryGetValue does not suppport reading from int16
132+
// TryGetValue does not suppport reading from int8
133133
hlsl_test::LogErrorFmt(L"Failed to get %s", table[i].m_name);
134134
return E_FAIL;
135135
}
@@ -179,8 +179,8 @@ HRESULT TableParameterHandler::ParseTableRow() {
179179
break;
180180
case TableParameter::BOOL:
181181
if (FAILED(WEX::TestExecution::TestData::TryGetValue(table[i].m_name,
182-
table[i].m_str)) &&
183-
table[i].m_bool) {
182+
table[i].m_bool)) &&
183+
table[i].m_required) {
184184
hlsl_test::LogErrorFmt(L"Failed to get %s", table[i].m_name);
185185
return E_FAIL;
186186
}

0 commit comments

Comments
 (0)