private void OnEnable()
    {
        SCManagerProfiler.DoStartTestCase("EventTestCall");
        for (int i = 0; i < iTestCount; i++)
        {
            _EventTestCall();
        }
        SCManagerProfiler.DoFinishTestCase("EventTestCall");

        SCManagerProfiler.DoStartTestCase("CallBack");
        for (int i = 0; i < iTestCount; i++)
        {
            _CallBack();
        }
        SCManagerProfiler.DoFinishTestCase("CallBack");

        SCManagerProfiler.DoStartTestCase("SendMessage");
        for (int i = 0; i < iTestCount; i++)
        {
            SendMessage("TestCall");
        }
        SCManagerProfiler.DoFinishTestCase("SendMessage");

        SCManagerProfiler.DoPrintResult(false);
    }
示例#2
0
        public void Working_Test()
        {
            SCManagerProfiler.DoStartTestCase(nameof(Working_Test));

            CList_Enter_Stay_Exit <int> list = new CList_Enter_Stay_Exit <int>();

            int[] arrEmpty = new int[] { };
            int[] arrValue = new int[] { 0, 1, 3, 5 };
            list.AddEnter(arrValue);

            Assert.AreEqual(list.p_list_Enter.ToArray(), arrValue);
            Assert.AreEqual(list.p_list_Stay.ToArray(), arrValue);
            Assert.AreEqual(list.p_list_Exit.ToArray(), arrEmpty);

            arrValue = new int[] { 0 };
            int[] arrExit = new int[] { 1, 3, 5 };
            list.AddEnter(arrValue);

            Assert.AreEqual(list.p_list_Enter.ToArray(), arrEmpty);
            Assert.AreEqual(list.p_list_Stay.ToArray(), arrValue);
            Assert.AreEqual(list.p_list_Exit.ToArray(), arrExit);

            SCManagerProfiler.DoFinishTestCase(nameof(Working_Test));
            SCManagerProfiler.DoPrintResult(true);
        }
示例#3
0
        private void TestCase_Operator_2()
        {
            Debug.Log("Start TestCase_Operator_2");

            SCManagerProfiler.DoStartTestCase("Test");
            for (int i = 0; i < 1000; i++)
            {
                HugeNumber sHugeNum1 = new HugeNumber(1, HugeNumber.EUnit.None);
                HugeNumber sHugeNum2 = sHugeNum1 * 100000000;
                HugeNumber sHugeNum3 = new HugeNumber(1, HugeNumber.EUnit.G);

                sHugeNum3 += sHugeNum2;
                sHugeNum3 -= sHugeNum2;
            }
            SCManagerProfiler.DoFinishTestCase("Test");
            SCManagerProfiler.DoPrintResult(false);
        }
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            print("Test Setter Start");
            SCManagerProfiler.DoStartTestCase("mapInt_Setter");
            for (int i = 0; i < iTestCount; i++)
            {
                _mapInt[0] = i;
            }
            SCManagerProfiler.DoFinishTestCase("mapInt_Setter");

            SCManagerProfiler.DoStartTestCase("mapEnumNormal_Setter");
            for (int i = 0; i < iTestCount; i++)
            {
                _mapEnumNormal[ETestEnum.Test] = i;
            }
            SCManagerProfiler.DoFinishTestCase("mapEnumNormal_Setter");

            SCManagerProfiler.DoStartTestCase("mapEnumComparer_Setter");
            for (int i = 0; i < iTestCount; i++)
            {
                _mapEnumComparer[ETestEnum.Test] = i;
            }
            SCManagerProfiler.DoFinishTestCase("mapEnumComparer_Setter");

            SCManagerProfiler.DoStartTestCase("mapEnumCustom_Setter");
            for (int i = 0; i < iTestCount; i++)
            {
                _mapEnumCustom[ETestEnum.Test] = i;
            }
            SCManagerProfiler.DoFinishTestCase("mapEnumCustom_Setter");

            SCManagerProfiler.DoPrintResult(false);
        }

        if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            print("Test Getter Start");
            int iTestNum = 0;
            SCManagerProfiler.DoStartTestCase("mapInt_Getter");
            for (int i = 0; i < iTestCount; i++)
            {
                iTestNum = _mapInt[0];
            }
            SCManagerProfiler.DoFinishTestCase("mapInt_Getter");

            SCManagerProfiler.DoStartTestCase("mapEnumNormal_Getter");
            for (int i = 0; i < iTestCount; i++)
            {
                iTestNum = _mapEnumNormal[ETestEnum.Test];
            }
            SCManagerProfiler.DoFinishTestCase("mapEnumNormal_Getter");

            SCManagerProfiler.DoStartTestCase("mapEnumComparer_Getter");
            for (int i = 0; i < iTestCount; i++)
            {
                iTestNum = _mapEnumComparer[ETestEnum.Test];
            }
            SCManagerProfiler.DoFinishTestCase("mapEnumComparer_Getter");

            SCManagerProfiler.DoStartTestCase("mapEnumCustom_Getter");
            for (int i = 0; i < iTestCount; i++)
            {
                iTestNum = _mapEnumCustom[ETestEnum.Test];
            }
            SCManagerProfiler.DoFinishTestCase("mapEnumCustom_Getter");

            SCManagerProfiler.DoPrintResult(false);
        }
    }