Skip to content

test: functional coverage for semantics, constants, and language surface - #60

Merged
rieske merged 4 commits into
masterfrom
test/functional-coverage-gaps
Jul 23, 2026
Merged

test: functional coverage for semantics, constants, and language surface#60
rieske merged 4 commits into
masterfrom
test/functional-coverage-gaps

Conversation

@rieske

@rieske rieske commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add black-box functional tests for previously unexercised language-level behavior (no backend/unit coupling).
  • Cover global constant evaluation (char escapes, unary fold), semantic diagnostics (arity, lvalues, voids, name conflicts, array forms), default-int definitions, pointer-returning functions, multi-declarators, and clear “not implemented” contracts.

Test plan

  • ctest -L functional (all shards) passes locally
  • CI build + serial tests + Coveralls upload on this PR

Add black-box SourceProgram tests for previously unexercised behavior:
character-escape and unary constant folding in globals, semantic error
diagnostics (arity, lvalues, voids, conflicts, arrays), default-int
definitions, pointer-returning functions, multi-declarators, and clear
failure contracts for unimplemented constructs.
@mergify

mergify Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@coveralls

coveralls commented Jul 23, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 92.316% (+1.2%) from 91.09% — test/functional-coverage-gaps into master

rieske added 3 commits July 23, 2026 21:01
Address review feedback: put diagnostics in a parameterized SemanticError
catalog with precise message oracles, move legal language forms into
LanguageSurfaceTest, collapse global constant-fold cases, drop coverage-paint
tests, and sanitize SourceProgram basenames for gtest parameterized names.
The catalog restructure dropped eight covered lines in ContextualSyntaxNodeBuilder
(floatType and decl_specs-only declaration). Re-add language-surface contracts
that exercise those productions without reintroducing them as ExpressionTest junk.
Format PR test sources with the repo .clang-format. Extend the semantic
error catalog and language surface suite with multi-type-specifiers,
function-pointer declarators, invalid char-escape / non-foldable unary
global inits, pointer subscript codegen rejection, and brace initializers.
@rieske
rieske merged commit 075b832 into master Jul 23, 2026
4 checks passed
@rieske
rieske deleted the test/functional-coverage-gaps branch July 23, 2026 18:22
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.

2 participants