Method AreNotEqual
AreNotEqual<T>(T, T)
Assert that two values are not equal to each other, according to their type's definition of equality. Throws an exception if the assertion fails.
Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual<T>(T expected, T actual)
where T : IEquatable<T>
Parameters
| Type | Name | Description |
|---|---|---|
| T | expected | The expected value. |
| T | actual | The actual value. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the values to test. |
AreNotEqual<T>(T, T, String)
Assert that two values are not equal to each other, according to their type's definition of equality. Throws an exception if the assertion fails.
Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual<T>(T expected, T actual, string message)
where T : IEquatable<T>
Parameters
| Type | Name | Description |
|---|---|---|
| T | expected | The expected value. |
| T | actual | The actual value. |
| String | message | If the assertion fails, this message will be logged. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the values to test. |
AreNotEqual(Int32, Int32)
Assert that two 32-bit integer values are not equal to each other. Throws an exception if the assertion fails.
Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(int expected, int actual)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | expected | The expected value. |
| Int32 | actual | The actual value. |
AreNotEqual(Boolean, Boolean)
Assert that two IntPtr values are not equal to each other. Throws an exception if the assertion fails.
Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void AreNotEqual(bool expected, bool actual)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | expected | The expected value. |
| Boolean | actual | The actual value. |