public void ADL_Debug_GetAllPrefixes_Test() { ADLLogger logger = new ADLLogger(InternalADLProjectDebugConfig.Settings, "UnitTest"); //Flag is required to find tags made up of unique masks(example: 2|8) Debug.PrefixLookupMode = PrefixLookupSettings.AddPrefixIfAvailable; logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); Assert.True(logger.GetAllPrefixes().Count == 3); logger.RemoveAllPrefixes(); logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); Assert.True(logger.GetAllPrefixes().Count == 3); }
public void ADL_Debug_GetAllPrefixes_Test() { ADLLogger logger = new ADLLogger("UnitTest"); //Flag is required to find tags made up of unique masks(example: 2|8) Debug.PrefixLookupMode = PrefixLookupSettings.Addprefixifavailable; logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); Assert.True(logger.GetAllPrefixes().Count == 3); logger.RemoveAllPrefixes(); Debug.AdlEnabled = false; logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); Assert.True(logger.GetAllPrefixes().Count == 3); Debug.AdlEnabled = true; }
public void ADL_Debug_GetPrefixMask_Test() { ADLLogger logger = new ADLLogger("UnitTest"); logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); if (logger.GetPrefixMask("Hello", out BitMask bm)) { Assert.True(bm == 1); } if (logger.GetPrefixMask("HELLO1", out bm)) { Assert.True(bm == 2); } if (logger.GetPrefixMask("HOLA2", out bm)) { Assert.True(bm == 4); } }
public void ADL_Debug_GetMaskPrefix_Test() { ADLLogger logger = new ADLLogger("UnitTest"); //Flag is required to find tags made up of unique masks(example: 2|8) Debug.PrefixLookupMode = PrefixLookupSettings.Addprefixifavailable; logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); BitMask bm = 2; Assert.True(logger.GetMaskPrefix(bm) == "HELLO1"); Debug.PrefixLookupMode = PrefixLookupSettings.Addprefixifavailable | PrefixLookupSettings.Onlyoneprefix; bm = 32; Assert.False(logger.GetMaskPrefix(bm) == "HELLO1"); Debug.PrefixLookupMode = PrefixLookupSettings.Addprefixifavailable | PrefixLookupSettings.Bakeprefixes | PrefixLookupSettings.Deconstructmasktofind; bm = 32; Assert.False(logger.GetMaskPrefix(bm) == "HELLO1"); }
public void ADL_Debug_GetMaskPrefix_Test() { ADLLogger logger = new ADLLogger(InternalADLProjectDebugConfig.Settings, "UnitTest"); //Flag is required to find tags made up of unique masks(example: 2|8) Debug.PrefixLookupMode = PrefixLookupSettings.AddPrefixIfAvailable; logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); BitMask bm = 2; Assert.True(logger.GetMaskPrefix(bm) == "HELLO1"); Debug.PrefixLookupMode = PrefixLookupSettings.AddPrefixIfAvailable | PrefixLookupSettings.OnlyOnePrefix; bm = 32; Assert.False(logger.GetMaskPrefix(bm) == "HELLO1"); Debug.PrefixLookupMode = PrefixLookupSettings.AddPrefixIfAvailable | PrefixLookupSettings.BakePrefixes | PrefixLookupSettings.DeconstructMaskToFind; bm = 32; Assert.False(logger.GetMaskPrefix(bm) == "HELLO1"); }