Module ComparisonTest

Provides classes for capturing various ways of performing comparison tests.

Import path

semmle.code.csharp.commons.ComparisonTest

Imports

csharp

The default C# QL library.

Classes

CompareMethodCallComparisonTest

A comparison test using a Compare method call, for example comparer.Compare(x, y).

CompareToCallComparisonTest

A comparison test using a CompareTo method call, for example x.CompareTo(y).

CompareWithConstantComparisonTest

A comparison test comparing the result of a comparator invocation with an integer constant. For example, 0 = x.CompareTo(y) is an equality test between x and y.

ComparisonKind

A comparison kind. Either equality, inequality, less than, less than or equals, or ternary comparison.

ComparisonOperationComparisonTest

A comparison test using a comparison operator, for example x == y.

ComparisonTest

A comparison test between two expressions.

EqualsCallComparisonTest

A comparison test using an Equals method call, for example x.Equals(y).

OperatorCallComparisonTest

A comparison test using a user-defined comparison operator, for example this == other on line 3 in

StaticEqualsCallComparisonTest

A comparison test using a static Equals or ReferenceEquals method call, for example object.Equals(x, y).