Exemplo n.º 1
0
        public void ADL_Debug_RemovePrefixForMask_Test()
        {
            ADLLogger logger = new ADLLogger("UnitTest");
            BitMask   bm     = new BitMask(2 | 8);

            logger.AddPrefixForMask(bm, "HELLO");
            logger.RemovePrefixForMask(bm);


            Debug.AdlEnabled = false;

            logger.AddPrefixForMask(bm, "AAA");
            logger.RemovePrefixForMask(bm);
            Debug.AdlEnabled = true;

            Assert.True(logger.GetAllPrefixes().Count == 0);
        }
Exemplo n.º 2
0
        public void ADL_Debug_RemoveAllPrefixes_Test()
        {
            ADLLogger logger = new ADLLogger("UnitTest");
            BitMask   bm     = new BitMask(2 | 8);

            logger.AddPrefixForMask(bm, "HELLO");
            logger.RemoveAllPrefixes();
            Assert.True(logger.GetAllPrefixes().Count == 0);
        }
Exemplo n.º 3
0
        public void ADL_Debug_RemoveAllPrefixes_Test()
        {
            ADLLogger logger = new ADLLogger(InternalADLProjectDebugConfig.Settings, "UnitTest");
            BitMask   bm     = new BitMask(2 | 8);

            logger.AddPrefixForMask(bm, "HELLO");
            logger.RemoveAllPrefixes();
            Assert.True(logger.GetAllPrefixes().Count == 0);
        }
Exemplo n.º 4
0
        public void ADL_Debug_AddPrefixForMask_Test()
        {
            //Flag is required to find tags made up of unique masks(example: 2|8)
            Debug.PrefixLookupMode =
                PrefixLookupSettings.AddPrefixIfAvailable | PrefixLookupSettings.DeconstructMaskToFind;

            ADLLogger logger = new ADLLogger(InternalADLProjectDebugConfig.Settings, "UnitTest");

            BitMask bm = new BitMask(2 | 8);

            logger.AddPrefixForMask(bm | 4, "Test");
            logger.AddPrefixForMask(bm | 4, "Test");
            logger.RemoveAllPrefixes();

            logger.AddPrefixForMask(bm, "HELLO");
            bool ret = logger.GetMaskPrefix(bm) == "HELLO";

            Assert.True(ret);
        }
Exemplo n.º 5
0
        public void ADL_Debug_AddPrefixForMask_Test()
        {
            //Flag is required to find tags made up of unique masks(example: 2|8)
            Debug.PrefixLookupMode =
                PrefixLookupSettings.Addprefixifavailable | PrefixLookupSettings.Deconstructmasktofind;

            ADLLogger logger = new ADLLogger("UnitTest");

            BitMask bm = new BitMask(2 | 8);

            Debug.AdlEnabled = false;
            logger.AddPrefixForMask(bm | 4, "Test");
            logger.AddPrefixForMask(bm | 4, "Test");
            logger.RemoveAllPrefixes();

            logger.AddPrefixForMask(bm, "HELLO");
            Debug.AdlEnabled = true;
            bool ret = logger.GetMaskPrefix(bm) == "HELLO";

            Assert.True(ret);
        }