{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method AddConditionalIgnoreMapping | Test Framework | 2.0.1-exp.2
docs.unity3d.com
"{0}"의 검색 결과

    목차 표시/숨기기

    Method AddConditionalIgnoreMapping

    AddConditionalIgnoreMapping(string, bool)

    Adds a flag indicating whether tests with the same key should be ignored.

    선언
    public static void AddConditionalIgnoreMapping(string key, bool value)
    파라미터
    타입 이름 설명
    string key

    The key to ignore tests for.

    bool value

    A boolean value indicating whether the tests should be ignored.

    예

    An example in which tests are ignored in the Mac editor only.

    using UnityEditor;
    using NUnit.Framework;
    using UnityEngine.TestTools;
    
    [InitializeOnLoad]
    public class OnLoad
    {
        static OnLoad()
        {
            var editorIsOSX = false;
            #if UNITY_EDITOR_OSX
            editorIsOSX = true;
            #endif
    
            ConditionalIgnoreAttribute.AddConditionalIgnoreMapping("IgnoreInMacEditor", editorIsOSX);
        }
    }
    
    public class MyTestClass
    {
        [Test, ConditionalIgnore("IgnoreInMacEditor", "Ignored on Mac editor.")]
        public void TestNeverRunningInMacEditor()
        {
            Assert.Pass();
        }
    }
    문서 개요
    맨 위로
    Copyright © 2023 Unity Technologies — 상표 및 이용약관
    • 법률정보
    • 개인정보처리방침
    • 쿠키
    • 내 개인정보 판매 금지
    • Your Privacy Choices (Cookie Settings)