Table of Contents

Class ScalarAssertions

Namespace
TUnit.Assertions.Extensions
Assembly
MathAssertions.TUnit.dll
public static class ScalarAssertions
Inheritance
ScalarAssertions
Inherited Members

Methods

HasRoundtripIdentity(IAssertionSource<double>, Func<double, double>, Func<double, double>, double, string?, string?, string?)

Generated extension method for HasRoundtripIdentity

public static Double_HasRoundtripIdentity_FuncDoubleDouble_FuncDoubleDouble_Double_Assertion HasRoundtripIdentity(this IAssertionSource<double> source, Func<double, double> forward, Func<double, double> inverse, double tolerance, string? forwardExpression = null, string? inverseExpression = null, string? toleranceExpression = null)

Parameters

source IAssertionSource<double>
forward Func<double, double>
inverse Func<double, double>
tolerance double
forwardExpression string
inverseExpression string
toleranceExpression string

Returns

Double_HasRoundtripIdentity_FuncDoubleDouble_FuncDoubleDouble_Double_Assertion

IsApproximatelyEqualTo(IAssertionSource<double>, double, double, string?, string?)

Generated extension method for IsApproximatelyEqualTo

public static Double_IsApproximatelyEqualTo_Double_Double_Assertion IsApproximatelyEqualTo(this IAssertionSource<double> source, double expected, double tolerance, string? expectedExpression = null, string? toleranceExpression = null)

Parameters

source IAssertionSource<double>
expected double
tolerance double
expectedExpression string
toleranceExpression string

Returns

Double_IsApproximatelyEqualTo_Double_Double_Assertion

IsApproximatelyEqualTo(IAssertionSource<float>, float, float, string?, string?)

Generated extension method for IsApproximatelyEqualTo

public static Float_IsApproximatelyEqualTo_Float_Float_Assertion IsApproximatelyEqualTo(this IAssertionSource<float> source, float expected, float tolerance, string? expectedExpression = null, string? toleranceExpression = null)

Parameters

source IAssertionSource<float>
expected float
tolerance float
expectedExpression string
toleranceExpression string

Returns

Float_IsApproximatelyEqualTo_Float_Float_Assertion

IsCloseInUlpsTo(IAssertionSource<double>, double, long, string?, string?)

Generated extension method for IsCloseInUlpsTo

public static Double_IsCloseInUlpsTo_Double_Long_Assertion IsCloseInUlpsTo(this IAssertionSource<double> source, double expected, long ulpDistance, string? expectedExpression = null, string? ulpDistanceExpression = null)

Parameters

source IAssertionSource<double>
expected double
ulpDistance long
expectedExpression string
ulpDistanceExpression string

Returns

Double_IsCloseInUlpsTo_Double_Long_Assertion

IsCloseInUlpsTo(IAssertionSource<float>, float, int, string?, string?)

Generated extension method for IsCloseInUlpsTo

public static Float_IsCloseInUlpsTo_Float_Int_Assertion IsCloseInUlpsTo(this IAssertionSource<float> source, float expected, int ulpDistance, string? expectedExpression = null, string? ulpDistanceExpression = null)

Parameters

source IAssertionSource<float>
expected float
ulpDistance int
expectedExpression string
ulpDistanceExpression string

Returns

Float_IsCloseInUlpsTo_Float_Int_Assertion

IsNonNegativeFinite(IAssertionSource<double>)

Generated extension method for IsNonNegativeFinite

public static Double_IsNonNegativeFinite_Assertion IsNonNegativeFinite(this IAssertionSource<double> source)

Parameters

source IAssertionSource<double>

Returns

Double_IsNonNegativeFinite_Assertion

IsPercentage(IAssertionSource<double>)

Generated extension method for IsPercentage

public static Double_IsPercentage_Assertion IsPercentage(this IAssertionSource<double> source)

Parameters

source IAssertionSource<double>

Returns

Double_IsPercentage_Assertion

IsProbability(IAssertionSource<double>)

Generated extension method for IsProbability

public static Double_IsProbability_Assertion IsProbability(this IAssertionSource<double> source)

Parameters

source IAssertionSource<double>

Returns

Double_IsProbability_Assertion

IsRelativelyAndAbsolutelyCloseTo(IAssertionSource<double>, double, double, double, string?, string?, string?)

Generated extension method for IsRelativelyAndAbsolutelyCloseTo

public static Double_IsRelativelyAndAbsolutelyCloseTo_Double_Double_Double_Assertion IsRelativelyAndAbsolutelyCloseTo(this IAssertionSource<double> source, double expected, double relativeTolerance, double absoluteTolerance, string? expectedExpression = null, string? relativeToleranceExpression = null, string? absoluteToleranceExpression = null)

Parameters

source IAssertionSource<double>
expected double
relativeTolerance double
absoluteTolerance double
expectedExpression string
relativeToleranceExpression string
absoluteToleranceExpression string

Returns

Double_IsRelativelyAndAbsolutelyCloseTo_Double_Double_Double_Assertion