CodeQL library for C#
codeql/csharp-all 0.9.1 (changelog, source)
Search

Module Assertions

Provides classes for assertions.

Import path

import semmle.code.csharp.commons.Assertions

Predicates

isExprInAssertion

Holds if expression e appears in an assertion.

Classes

AssertMethod

An assertion method.

Assertion

An assertion, that is, a call to an assertion method.

AssertionFailure

An entity that describes how an assertion may fail.

BooleanAssertMethod

A Boolean assertion method.

FailingAssertion

A trivially failing assertion, for example Debug.Assert(false).

ForwarderAssertMethod

A method that forwards to another assertion method.

ForwarderBooleanAssertMethod

A method that forwards to a Boolean assertion method.

ForwarderNullnessAssertMethod

A method that forwards to a nullness assertion method.

NUnitAssertFalseMethod

An NUnit negated assertion method.

NUnitAssertMethod

An NUnit assertion method.

NUnitAssertNonNullMethod

An NUnit non-null assertion method.

NUnitAssertNullMethod

An NUnit null assertion method.

NUnitAssertTrueMethod

An NUnit assertion method.

NullnessAssertMethod

A nullness assertion method.

SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertFalseMethod

A method with a parameter that is annotated with System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(true).

SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertTrueMethod

A method with a parameter that is annotated with System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(false).

SystemDiagnosticsContractAssertTrueMethod

A System.Diagnostics.Contracts.Contract assertion method.

SystemDiagnosticsDebugAssertTrueMethod

A System.Diagnostics.Debug assertion method.

VSTestAssertFalseMethod

A Visual Studio negated assertion method.

VSTestAssertNonNullMethod

A Visual Studio non-null assertion method.

VSTestAssertNullMethod

A Visual Studio null assertion method.

VSTestAssertTrueMethod

A Visual Studio assertion method.