Skip to main content
Source: AL0041AotTestMustReturnIntAnalyzer.cs

Description

Methods decorated with [AotTest] or [TrimTest] attributes must return int as their exit code. The test harness expects an integer return value to determine success or failure.

Bad Code

Good Code

Properties

  • Category: Usage
  • Severity: Error
  • Enabled by default: True
  • Code fix available: False

Configuration

Notes

  • AOT/Trim tests run as separate processes
  • Exit code determines pass/fail status
  • Convention: return 100 for success (see AL0042)