docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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(int, int)

    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
    int expected

    The expected value.

    int actual

    The actual value.

    AreNotEqual(bool, bool)

    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
    bool expected

    The expected value.

    bool actual

    The actual value.

    In This Article
    • AreNotEqual<T>(T, T)
    • AreNotEqual<T>(T, T, string)
    • AreNotEqual(int, int)
    • AreNotEqual(bool, bool)
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)