Example #1
0
        public void CreateSortedVersionDictionary_BadVersionRange_ThrowsException()
        {
            var versionList = new PropertiesDictionary();

            versionList.Add("8.0.0.0 - 1.0.0.0", (CompilerMitigations.D2GuardSpecLoadAvailable).ToString());

            Assert.Throws <InvalidOperationException>(() => EnableSpectreMitigations.CreateSortedVersionDictionary(versionList));
        }
Example #2
0
        public void CreateSortedVersionDictionary_ParsesAsExpected()
        {
            PropertiesDictionary versionList = this.GenerateMachineFamilyData();

            CompilerVersionToMitigation[] result = EnableSpectreMitigations.CreateSortedVersionDictionary(versionList);

            this.ValidateResultFromFakeTestData(result);
        }
Example #3
0
        public void CreateSortedVersionDictionary_OverlappingVersionRange_ThrowsException(string firstRange, string secondRange)
        {
            var versionList = new PropertiesDictionary();

            versionList.Add(firstRange, (CompilerMitigations.D2GuardSpecLoadAvailable).ToString());
            versionList.Add(secondRange, (CompilerMitigations.QSpectreAvailable).ToString());

            Assert.Throws <InvalidOperationException>(() => EnableSpectreMitigations.CreateSortedVersionDictionary(versionList));
        }