docs.unity3d.com
    Show / Hide Table of Contents

    Class SelfLog.Assert.TestScope

    Test scope that can be used to set expectations of what could/must be in SelfLog

    Inheritance
    Object
    SelfLog.Assert.TestScope
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Logging.Internal.Debug
    Syntax
    public class TestScope : IDisposable

    Constructors

    TestScope(Allocator)

    Constructor of the test scope. SelfLog must be enabled

    Declaration
    public TestScope(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

    Allocator for internal expected message list

    Properties

    IsCreated

    True if created

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    Boolean

    Methods

    CheckMessage(FixedString4096Bytes)

    Checks if this message is expected

    Declaration
    [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
    public void CheckMessage(FixedString4096Bytes message)
    Parameters
    Type Name Description
    FixedString4096Bytes message

    The message to check

    Dispose()

    End of the scope, checks all the expected messages. See IDisposable

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()

    ExpectErrorThatContains(FixedString4096Bytes)

    Expecting to have a message

    Declaration
    [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
    public void ExpectErrorThatContains(FixedString4096Bytes expected)
    Parameters
    Type Name Description
    FixedString4096Bytes expected

    Message that is expected in SelfLog

    ExpectingOutOfMemory()

    Out of memory message is expected

    Declaration
    [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
    public void ExpectingOutOfMemory()
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023