Skip to content

Add HU-05 vector AST round-trip regression test - #7

Open
ericsmcr wants to merge 1 commit into
cenfosoft:mainfrom
ericsmcr:feature/HU-05
Open

ericsmcr wants to merge 1 commit into
cenfosoft:mainfrom
ericsmcr:feature/HU-05

Conversation

@ericsmcr

Copy link
Copy Markdown

Summary

Adds explicit HU-05 regression coverage for vector AST round-trips in T-SQL 160 and 170.

The test verifies the complete cycle:

AST -> SQL generator -> parser -> SQL generator

Seven existing vector SQL scripts are covered, and the generated output is compared against the existing baselines.

Implementation

  • Added Hu05VectorAstGeneratorReparseIsIdempotent.
  • Covered seven vector scripts for T-SQL 160 and 170.
  • Verified that the generated SQL can be parsed again.
  • Verified that the second generated SQL matches the first generated SQL.
  • Verified the existing baselines.
  • No production parser, grammar, AST, or generator code was changed.

TDD Evidence

Targeted HU-05 test

image

Full test suite

image

RED

Before this test was added, there was no explicit HU-05 regression test covering the seven vector AST round-trip cases as one acceptance criterion.

The existing implementation already supported the behavior, so no production defect was found to fix. Therefore, no failing test result will be fabricated.

GREEN

Targeted HU-05 test:

  • 1 passed
  • 0 failed

Full test suite:

  • 1177 passed
  • 0 failed
  • 0 skipped
  • Target framework: .NET 8

Commands executed:

dotnet test -f net8.0 \
  --filter "FullyQualifiedName~Hu05VectorAstGeneratorReparseIsIdempotent" \
  Test/SqlDom/UTSqlScriptDom.csproj \
  -c Debug

dotnet test -f net8.0 \
  Test/SqlDom/UTSqlScriptDom.csproj \
  -c Debug

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