GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unit test builds emit nullable-reference and assertion-style warnings · Issue #7438 · thomhurst/TUnit

Unit test builds emit nullable-reference and assertion-style warnings #7438

New issue
Copy link
New issue
Copy link
Closed
#7670
Closed
Unit test builds emit nullable-reference and assertion-style warnings#7438
#7670
Copy link
Labels
P3Low: cleanup, minor enhancement, or rare edge casebugSomething isn't workingin-progressWork is in progress

Description

@thomhurst
thomhurst
opened on Nov 3, 2026
Issue body actions

Summary

Building the unit test project emits nullable-reference and assertion-style warnings from its test sources. These diagnostics obscure new warnings during validation. The test project should build without these warnings.

Reproduction

On main at d87516c, run:

dotnet test --project tests/TUnit.UnitTests --framework net10.0 --treenode-filter '/*/*/ParallelMapTests/*'

The original report used ClassRowCleanupTests on #7417 at 02d1090. That class is not on this main revision; ParallelMapTests is present and building it compiles the unit-test project sources. #7417 is context, not a prerequisite.

Expected and actual

Expected: no nullable-reference or assertion-style warnings in unit-test source files.

Actual: CS8602 in ParallelMapTests.cs:105; CS8619 in PlaywrightVideoTests.cs:81,91 and PlaywrightTraceContextTests.cs:169; CS8604 in PropertyDataSourceInjectionTests.cs:161; TUnitAssertions0005 in EmptyDataSourceTests.cs, DependencyResolutionFailureTests.cs and LogSinkRouterTests.cs; TUnitAssertions0014/0015 in GenericTestGenerationTests.cs and EngineCancellationTokenTests.cs.

The relevant nullable code in ParallelMapTests and PlaywrightVideoTests is also present on main at d87516c. Analyzer and migration-project warnings are separately tracked in #7410; source-generator snapshot test warnings are #7428.

Acceptance criteria

  • Remove the reported CS8602, CS8619, CS8604, TUnitAssertions0005, TUnitAssertions0014 and TUnitAssertions0015 diagnostics from tests/TUnit.UnitTests without suppressing them.
  • Preserve the affected tests' assertions and behavior, including intentional failure fixtures.
  • Build the unit-test project and run the affected test classes with targeted filters; confirm these diagnostics are absent. Warnings in other projects remain tracked separately in Analyzer and code-fixer projects emit release-tracking and nullable build warnings #7410 and Core generator snapshot tests emit nullable and constant-assertion warnings #7428.

Environment

.NET SDK 10.0.403, macOS arm64. Observed while validating #7417; the changed cleanup tests introduce none of these warnings.

Please correct these unit-test diagnostics while preserving the tests' behavior.

Activity

  1. thomhurst commented on Nov 3, 2026

    @thomhurst
    thomhurst
    on Nov 3, 2026
    OwnerAuthor
    More actions

    Triaged against origin/main at d87516c. The reported nullable and assertion patterns remain in the source; no closing PR or native dependencies were found. Updated the reproduction to use ParallelMapTests, which exists on main, and added acceptance criteria. The original ClassRowCleanupTests filter belongs to #7417; that PR is not a prerequisite. No build or tests were run during this source-only triage.

  2. github-actions
    added
    bugSomething isn't working
    P3Low: cleanup, minor enhancement, or rare edge case
    on Nov 3, 2026
  3. thomhurst
    added
    in-progressWork is in progress
    on Nov 5, 2026
  4. thomhurst
    added a commit that references this issue on Nov 5, 2026

    Remove unit-test nullable and assertion diagnostics (#7438) (#7670)

    5a18e53
  5. thomhurst
    closed this as completedin #7670on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: cleanup, minor enhancement, or rare edge casebugSomething isn't workingin-progressWork is in progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.