Skip to content

Commit ceb3e1a

Browse files
committed
[SM6.10][LinAlg][HLK] Small test cleanups
1 parent 80ffa2e commit ceb3e1a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

tools/clang/unittests/HLSLExec/LinAlgTests.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "HlslExecTestUtils.h"
2626

27+
#include <climits>
2728
#include <optional>
2829
#include <sstream>
2930
#include <string>
@@ -154,14 +155,20 @@ static void compileShader(dxc::SpecificDllLoader &DxcSupport,
154155
WArgStorage.push_back(std::wstring(Tok.begin(), Tok.end()));
155156

156157
std::vector<LPCWSTR> WArgPtrs;
157-
for (const auto &A : WArgStorage)
158+
std::wstringstream LogFlags;
159+
LogFlags << L"Compiling with flags:";
160+
for (const auto &A : WArgStorage) {
158161
WArgPtrs.push_back(A.c_str());
162+
LogFlags << L" " << A;
163+
}
159164

160165
DxcBuffer Buf = {};
161166
Buf.Ptr = SourceBlob->GetBufferPointer();
162167
Buf.Size = SourceBlob->GetBufferSize();
163168
Buf.Encoding = DXC_CP_UTF8;
164169

170+
hlsl_test::LogCommentFmt(LogFlags.str().c_str());
171+
165172
CComPtr<IDxcResult> Result;
166173
VERIFY_SUCCEEDED(Compiler->Compile(&Buf, WArgPtrs.data(),
167174
static_cast<UINT32>(WArgPtrs.size()),
@@ -292,6 +299,9 @@ class DxilConf_SM610_LinAlg {
292299
bool VerboseLogging = false;
293300
bool Initialized = false;
294301
std::optional<D3D12SDKSelector> D3D12SDK;
302+
303+
WEX::TestExecution::SetVerifyOutput VerifyOutput{
304+
WEX::TestExecution::VerifyOutputSettings::LogOnlyFailures};
295305
};
296306

297307
/// Creates the device and setups the test scenario with the following variants
@@ -523,6 +533,7 @@ static void runSplatStore(ID3D12Device *Device,
523533
ExpectedFloats.assign(NumElements, FillValue);
524534
break;
525535
case ComponentType::I32:
536+
VERIFY_IS_TRUE(FillValue < static_cast<float>(INT_MAX), "FillValue too large to cast to int32_t");
526537
ExpectedInts.assign(NumElements, static_cast<int32_t>(FillValue));
527538
break;
528539
default:

0 commit comments

Comments
 (0)