Show / Hide Table of Contents

Class Assert

Inheritance
Object
Assert
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine.Assertions
Assembly: UnityEngine.dll
Syntax
public static class Assert

Fields

| Improve this Doc View Source

raiseExceptions

Declaration
public static bool raiseExceptions
Field Value
Type Description
Boolean

Methods

| Improve this Doc View Source

AreApproximatelyEqual(Single, Single)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreApproximatelyEqual(float expected, float actual)
Parameters
Type Name Description
Single expected
Single actual
| Improve this Doc View Source

AreApproximatelyEqual(Single, Single, Single)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreApproximatelyEqual(float expected, float actual, float tolerance)
Parameters
Type Name Description
Single expected
Single actual
Single tolerance
| Improve this Doc View Source

AreApproximatelyEqual(Single, Single, Single, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreApproximatelyEqual(float expected, float actual, float tolerance, string message)
Parameters
Type Name Description
Single expected
Single actual
Single tolerance
String message
| Improve this Doc View Source

AreApproximatelyEqual(Single, Single, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreApproximatelyEqual(float expected, float actual, string message)
Parameters
Type Name Description
Single expected
Single actual
String message
| Improve this Doc View Source

AreEqual(Byte, Byte)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(byte expected, byte actual)
Parameters
Type Name Description
Byte expected
Byte actual
| Improve this Doc View Source

AreEqual(Byte, Byte, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(byte expected, byte actual, string message)
Parameters
Type Name Description
Byte expected
Byte actual
String message
| Improve this Doc View Source

AreEqual(Char, Char)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(char expected, char actual)
Parameters
Type Name Description
Char expected
Char actual
| Improve this Doc View Source

AreEqual(Char, Char, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(char expected, char actual, string message)
Parameters
Type Name Description
Char expected
Char actual
String message
| Improve this Doc View Source

AreEqual(Int16, Int16)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(short expected, short actual)
Parameters
Type Name Description
Int16 expected
Int16 actual
| Improve this Doc View Source

AreEqual(Int16, Int16, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(short expected, short actual, string message)
Parameters
Type Name Description
Int16 expected
Int16 actual
String message
| Improve this Doc View Source

AreEqual(Int32, Int32)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(int expected, int actual)
Parameters
Type Name Description
Int32 expected
Int32 actual
| Improve this Doc View Source

AreEqual(Int32, Int32, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(int expected, int actual, string message)
Parameters
Type Name Description
Int32 expected
Int32 actual
String message
| Improve this Doc View Source

AreEqual(Int64, Int64)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(long expected, long actual)
Parameters
Type Name Description
Int64 expected
Int64 actual
| Improve this Doc View Source

AreEqual(Int64, Int64, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(long expected, long actual, string message)
Parameters
Type Name Description
Int64 expected
Int64 actual
String message
| Improve this Doc View Source

AreEqual(SByte, SByte)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(sbyte expected, sbyte actual)
Parameters
Type Name Description
SByte expected
SByte actual
| Improve this Doc View Source

AreEqual(SByte, SByte, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(sbyte expected, sbyte actual, string message)
Parameters
Type Name Description
SByte expected
SByte actual
String message
| Improve this Doc View Source

AreEqual(UInt16, UInt16)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(ushort expected, ushort actual)
Parameters
Type Name Description
UInt16 expected
UInt16 actual
| Improve this Doc View Source

AreEqual(UInt16, UInt16, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(ushort expected, ushort actual, string message)
Parameters
Type Name Description
UInt16 expected
UInt16 actual
String message
| Improve this Doc View Source

AreEqual(UInt32, UInt32)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(uint expected, uint actual)
Parameters
Type Name Description
UInt32 expected
UInt32 actual
| Improve this Doc View Source

AreEqual(UInt32, UInt32, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(uint expected, uint actual, string message)
Parameters
Type Name Description
UInt32 expected
UInt32 actual
String message
| Improve this Doc View Source

AreEqual(UInt64, UInt64)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(ulong expected, ulong actual)
Parameters
Type Name Description
UInt64 expected
UInt64 actual
| Improve this Doc View Source

AreEqual(UInt64, UInt64, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(ulong expected, ulong actual, string message)
Parameters
Type Name Description
UInt64 expected
UInt64 actual
String message
| Improve this Doc View Source

AreEqual(Object, Object, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual(Object expected, Object actual, string message)
Parameters
Type Name Description
Object expected
Object actual
String message
| Improve this Doc View Source

AreEqual<T>(T, T)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual<T>(T expected, T actual)
Parameters
Type Name Description
T expected
T actual
Type Parameters
Name Description
T
| Improve this Doc View Source

AreEqual<T>(T, T, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual<T>(T expected, T actual, string message)
Parameters
Type Name Description
T expected
T actual
String message
Type Parameters
Name Description
T
| Improve this Doc View Source

AreEqual<T>(T, T, String, IEqualityComparer<T>)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreEqual<T>(T expected, T actual, string message, IEqualityComparer<T> comparer)
Parameters
Type Name Description
T expected
T actual
String message
IEqualityComparer<T> comparer
Type Parameters
Name Description
T
| Improve this Doc View Source

AreNotApproximatelyEqual(Single, Single)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotApproximatelyEqual(float expected, float actual)
Parameters
Type Name Description
Single expected
Single actual
| Improve this Doc View Source

AreNotApproximatelyEqual(Single, Single, Single)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotApproximatelyEqual(float expected, float actual, float tolerance)
Parameters
Type Name Description
Single expected
Single actual
Single tolerance
| Improve this Doc View Source

AreNotApproximatelyEqual(Single, Single, Single, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotApproximatelyEqual(float expected, float actual, float tolerance, string message)
Parameters
Type Name Description
Single expected
Single actual
Single tolerance
String message
| Improve this Doc View Source

AreNotApproximatelyEqual(Single, Single, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotApproximatelyEqual(float expected, float actual, string message)
Parameters
Type Name Description
Single expected
Single actual
String message
| Improve this Doc View Source

AreNotEqual(Byte, Byte)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(byte expected, byte actual)
Parameters
Type Name Description
Byte expected
Byte actual
| Improve this Doc View Source

AreNotEqual(Byte, Byte, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(byte expected, byte actual, string message)
Parameters
Type Name Description
Byte expected
Byte actual
String message
| Improve this Doc View Source

AreNotEqual(Char, Char)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(char expected, char actual)
Parameters
Type Name Description
Char expected
Char actual
| Improve this Doc View Source

AreNotEqual(Char, Char, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(char expected, char actual, string message)
Parameters
Type Name Description
Char expected
Char actual
String message
| Improve this Doc View Source

AreNotEqual(Int16, Int16)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(short expected, short actual)
Parameters
Type Name Description
Int16 expected
Int16 actual
| Improve this Doc View Source

AreNotEqual(Int16, Int16, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(short expected, short actual, string message)
Parameters
Type Name Description
Int16 expected
Int16 actual
String message
| Improve this Doc View Source

AreNotEqual(Int32, Int32)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(int expected, int actual)
Parameters
Type Name Description
Int32 expected
Int32 actual
| Improve this Doc View Source

AreNotEqual(Int32, Int32, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(int expected, int actual, string message)
Parameters
Type Name Description
Int32 expected
Int32 actual
String message
| Improve this Doc View Source

AreNotEqual(Int64, Int64)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(long expected, long actual)
Parameters
Type Name Description
Int64 expected
Int64 actual
| Improve this Doc View Source

AreNotEqual(Int64, Int64, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(long expected, long actual, string message)
Parameters
Type Name Description
Int64 expected
Int64 actual
String message
| Improve this Doc View Source

AreNotEqual(SByte, SByte)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(sbyte expected, sbyte actual)
Parameters
Type Name Description
SByte expected
SByte actual
| Improve this Doc View Source

AreNotEqual(SByte, SByte, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(sbyte expected, sbyte actual, string message)
Parameters
Type Name Description
SByte expected
SByte actual
String message
| Improve this Doc View Source

AreNotEqual(UInt16, UInt16)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(ushort expected, ushort actual)
Parameters
Type Name Description
UInt16 expected
UInt16 actual
| Improve this Doc View Source

AreNotEqual(UInt16, UInt16, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(ushort expected, ushort actual, string message)
Parameters
Type Name Description
UInt16 expected
UInt16 actual
String message
| Improve this Doc View Source

AreNotEqual(UInt32, UInt32)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(uint expected, uint actual)
Parameters
Type Name Description
UInt32 expected
UInt32 actual
| Improve this Doc View Source

AreNotEqual(UInt32, UInt32, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(uint expected, uint actual, string message)
Parameters
Type Name Description
UInt32 expected
UInt32 actual
String message
| Improve this Doc View Source

AreNotEqual(UInt64, UInt64)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(ulong expected, ulong actual)
Parameters
Type Name Description
UInt64 expected
UInt64 actual
| Improve this Doc View Source

AreNotEqual(UInt64, UInt64, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(ulong expected, ulong actual, string message)
Parameters
Type Name Description
UInt64 expected
UInt64 actual
String message
| Improve this Doc View Source

AreNotEqual(Object, Object, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(Object expected, Object actual, string message)
Parameters
Type Name Description
Object expected
Object actual
String message
| Improve this Doc View Source

AreNotEqual<T>(T, T)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual<T>(T expected, T actual)
Parameters
Type Name Description
T expected
T actual
Type Parameters
Name Description
T
| Improve this Doc View Source

AreNotEqual<T>(T, T, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual<T>(T expected, T actual, string message)
Parameters
Type Name Description
T expected
T actual
String message
Type Parameters
Name Description
T
| Improve this Doc View Source

AreNotEqual<T>(T, T, String, IEqualityComparer<T>)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual<T>(T expected, T actual, string message, IEqualityComparer<T> comparer)
Parameters
Type Name Description
T expected
T actual
String message
IEqualityComparer<T> comparer
Type Parameters
Name Description
T
| Improve this Doc View Source

IsFalse(Boolean)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsFalse(bool condition)
Parameters
Type Name Description
Boolean condition
| Improve this Doc View Source

IsFalse(Boolean, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsFalse(bool condition, string message)
Parameters
Type Name Description
Boolean condition
String message
| Improve this Doc View Source

IsNotNull(Object, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsNotNull(Object value, string message)
Parameters
Type Name Description
Object value
String message
| Improve this Doc View Source

IsNotNull<T>(T)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsNotNull<T>(T value)
    where T : class
Parameters
Type Name Description
T value
Type Parameters
Name Description
T
| Improve this Doc View Source

IsNotNull<T>(T, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsNotNull<T>(T value, string message)
    where T : class
Parameters
Type Name Description
T value
String message
Type Parameters
Name Description
T
| Improve this Doc View Source

IsNull(Object, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsNull(Object value, string message)
Parameters
Type Name Description
Object value
String message
| Improve this Doc View Source

IsNull<T>(T)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsNull<T>(T value)
    where T : class
Parameters
Type Name Description
T value
Type Parameters
Name Description
T
| Improve this Doc View Source

IsNull<T>(T, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsNull<T>(T value, string message)
    where T : class
Parameters
Type Name Description
T value
String message
Type Parameters
Name Description
T
| Improve this Doc View Source

IsTrue(Boolean)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsTrue(bool condition)
Parameters
Type Name Description
Boolean condition
| Improve this Doc View Source

IsTrue(Boolean, String)

Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsTrue(bool condition, string message)
Parameters
Type Name Description
Boolean condition
String message
  • Improve this Doc
  • View Source
Back to top Generated by DocFX