Module Assertions

Provides classes for assertions.

Import path

semmle.code.csharp.commons.Assertions

Predicates

isExprInAssertion

Holds if expression e appears in an assertion.

Classes

AssertFalseMethod

A negated assertion method.

AssertMethod

An assertion method.

AssertNonNullMethod

A non-null assertion method.

AssertNullMethod

A null assertion method.

AssertTrueMethod

A positive assertion method.

Assertion

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

FailingAssertion

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

ForwarderAssertFalseMethod

A method that forwards to a negated assertion method.

ForwarderAssertMethod

A method that forwards to another assertion method.

ForwarderAssertNonNullMethod

A method that forwards to a non-null assertion method.

ForwarderAssertNullMethod

A method that forwards to a null assertion method.

ForwarderAssertTrueMethod

A method that forwards to a positive 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.