Skip to content

Assertion interface refactor - #140

Merged
KStocky merged 47 commits into
mainfrom
AssertionInterfaceRefactor
Aug 3, 2026
Merged

Assertion interface refactor#140
KStocky merged 47 commits into
mainfrom
AssertionInterfaceRefactor

Conversation

@KStocky

@KStocky KStocky commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Huge refactor to support multiple assertion libraries.

There are docs on how to take advantage of this new facility to provide your own HLSL assertion library

KStocky added 30 commits August 3, 2026 19:29
Derived class is the one that depends on the assertion framework
… be an object. It just needs to be move only
… instead templating the mock interface. Neat
…s... and also binding to references of the base type... Which is a bit rubbish but I can't think of a good way around it until I have reflection...
…opy and pasted mapping types in place of a mapping template
…at is expected to happen in this part of the interface.

ReadbackResults implied that the buffers should be readback to the CPU at that point but that is not the case.
…an actually do readbacks.

Add Engine parameter to ProcesReadbacks function so that interfaces can actually process the readbacks.
KStocky added 11 commits August 3, 2026 19:31
…o that they can support byte readers if they wish. This means that the concept of byte readers is removed from both the driver and the fixture, but can still be implemented by implementations of the interface
…lso template the test driver run function and the results struct.
… work. This could be useful in defining how people choose what assertion interface to use in their tests
…This then injects what framework to use in tests.
…e assertion library include to shaders compiled with that interface.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Test Results

   134 files  + 2     134 suites  +2   30s ⏱️ -2s
 7 066 tests  - 15   7 066 ✅  - 15  0 💤 ±0  0 ❌ ±0 
22 938 runs   - 10  22 938 ✅  - 10  0 💤 ±0  0 ❌ ±0 

Results for commit 8882701. ± Comparison against base commit 361cc6b.

This pull request removes 30 and adds 15 tests. Note that renamed tests count towards both.
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - Macros - SCENARIO/GIVEN_ScenarioWithDispatchThreadId_WHEN_Ran_THEN_IdIsInt3
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - Macros - SCENARIO/GIVEN_ScenarioWithIntId_WHEN_Ran_THEN_IdIsInt
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - ThreadIdRegistrationTests/GIVEN_ThreadIDGivenAsUint_WHEN_ThreadIDQueried_THEN_RegisteredThreadIdIsCorrect
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and multi dim threadId
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and multi dim threadId/When: results streamed
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and multi dim threadId/When: results streamed/Then: Output is as expected
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and single threadId
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and single threadId/When: results streamed
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and single threadId/When: results streamed/Then: Output is as expected
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: No thread id type and non zero id
…
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - Macro-expanded include
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - Macros - SCENARIO/GIVEN_ScenarioWithDispatchThreadId_WHEN_Ran_THEN_IdAsExpected
ShaderTestFrameworkTests.exe.global ‑ Scenario: AssertionInterfaceTests - Assertion library virtual path is forwarded to shaders
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and threadId
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and threadId/When: results streamed
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and threadId/When: results streamed/Then: Output is as expected
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: non zero x thread id
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: non zero x thread id/When: Processed
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: non zero x thread id/When: Processed/Then: Results has expected sub strings
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: non zero xyz thread id
…

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Test Results

   134 files  + 2     134 suites  +2   31s ⏱️ -1s
 7 066 tests  - 15   7 066 ✅  - 15  0 💤 ±0  0 ❌ ±0 
22 938 runs   - 10  22 938 ✅  - 10  0 💤 ±0  0 ❌ ±0 

Results for commit e219eb7. ± Comparison against base commit 361cc6b.

This pull request removes 30 and adds 15 tests. Note that renamed tests count towards both.
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - Macros - SCENARIO/GIVEN_ScenarioWithDispatchThreadId_WHEN_Ran_THEN_IdIsInt3
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - Macros - SCENARIO/GIVEN_ScenarioWithIntId_WHEN_Ran_THEN_IdIsInt
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - ThreadIdRegistrationTests/GIVEN_ThreadIDGivenAsUint_WHEN_ThreadIDQueried_THEN_RegisteredThreadIdIsCorrect
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and multi dim threadId
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and multi dim threadId/When: results streamed
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and multi dim threadId/When: results streamed/Then: Output is as expected
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and single threadId
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and single threadId/When: results streamed
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and single threadId/When: results streamed/Then: Output is as expected
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: No thread id type and non zero id
…
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - Macro-expanded include
ShaderTestFrameworkTests.exe.ShaderTestFixtureBaseFixture ‑ HLSLFrameworkTests - Macros - SCENARIO/GIVEN_ScenarioWithDispatchThreadId_WHEN_Ran_THEN_IdAsExpected
ShaderTestFrameworkTests.exe.global ‑ Scenario: AssertionInterfaceTests - Assertion library virtual path is forwarded to shaders
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and threadId
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and threadId/When: results streamed
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - TestRunResults - Stream Operator/Given: Failed Asserts with no data/And given: single assert with no sections and no strings and threadId/When: results streamed/Then: Output is as expected
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: non zero x thread id
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: non zero x thread id/When: Processed
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: non zero x thread id/When: Processed/Then: Results has expected sub strings
ShaderTestFrameworkTests.exe.global ‑ Scenario: TestDataBufferProcessorTests - ThreadInfoToString/Given: non zero xyz thread id
…

♻️ This comment has been updated with latest results.

@KStocky
KStocky merged commit 5057d0b into main Aug 3, 2026
7 checks passed
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.

1 participant