commit
This commit is contained in:
77
Assets/Tests/Editor/TestBitWise.cs
Normal file
77
Assets/Tests/Editor/TestBitWise.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Assets.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestBitWise
|
||||
{
|
||||
[Test]
|
||||
[TestCaseSource(typeof(BitwiseCase), "BitwiseCombination")]
|
||||
public void TestBitwiseCombination(int n, int p, HashSet<long> expected)
|
||||
{
|
||||
HashSet<long> output = BitWise.GetAllPermutation(n, p);
|
||||
Assert.IsTrue(output.SetEquals(expected));
|
||||
}
|
||||
}
|
||||
|
||||
public class BitwiseCase
|
||||
{
|
||||
public static IEnumerable BitwiseCombination
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
3,
|
||||
5,
|
||||
new HashSet<long>()
|
||||
{
|
||||
0b11100,
|
||||
0b11010,
|
||||
0b10110,
|
||||
0b01110,
|
||||
0b11001,
|
||||
0b10101,
|
||||
0b01101,
|
||||
0b10011,
|
||||
0b01011,
|
||||
0b00111,
|
||||
}
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
1,
|
||||
1,
|
||||
new HashSet<long>()
|
||||
{
|
||||
0b001
|
||||
}
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
2,
|
||||
3,
|
||||
new HashSet<long>()
|
||||
{
|
||||
0b011,
|
||||
0b110,
|
||||
0b101
|
||||
}
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
2,
|
||||
4,
|
||||
new HashSet<long>()
|
||||
{
|
||||
0b0011,
|
||||
0b0101,
|
||||
0b1001,
|
||||
0b0110,
|
||||
0b1010,
|
||||
0b1100
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
2
Assets/Tests/Editor/TestBitWise.cs.meta
Normal file
2
Assets/Tests/Editor/TestBitWise.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82274463f1eeb5a4daa090c4c6de1d51
|
||||
76
Assets/Tests/Editor/TestChampionUtils.cs
Normal file
76
Assets/Tests/Editor/TestChampionUtils.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Assets.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestChampionUtils
|
||||
{
|
||||
[Test]
|
||||
[TestCaseSource(typeof(ChampionCase), "championsEnum")]
|
||||
public void TestIntChampion(long champlong)
|
||||
{
|
||||
var champs = ChampionUtils.FromLong(champlong);
|
||||
long output = ChampionUtils.ToLong(champs);
|
||||
Assert.IsTrue(champlong == output);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCaseSource(typeof(ChampionCase), "championsNth")]
|
||||
public void TestGetNthChampion(long champlons, int n, long expected)
|
||||
{
|
||||
long output = ChampionUtils.GetNthChampion(champlons, n);
|
||||
Assert.IsTrue(output == expected);
|
||||
}
|
||||
}
|
||||
|
||||
public class ChampionCase
|
||||
{
|
||||
public static IEnumerable championsEnum
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return 1223456L;
|
||||
yield return 3422L;
|
||||
yield return 97352L;
|
||||
yield return 67855324254L;
|
||||
yield return 432742125L;
|
||||
yield return 76578256785L;
|
||||
yield return 12345678912345678L;
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable championsNth
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(ChampionsEnum.ASHE),
|
||||
0,
|
||||
ChampionUtils.ToLong(ChampionsEnum.ASHE)
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(ChampionsEnum.SMOLDER),
|
||||
0,
|
||||
ChampionUtils.ToLong(ChampionsEnum.SMOLDER)
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() { ChampionsEnum.AHRI }),
|
||||
0,
|
||||
ChampionUtils.ToLong(ChampionsEnum.AHRI)
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() {
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.POPPY,
|
||||
ChampionsEnum.SORAKA,
|
||||
ChampionsEnum.HWEI }),
|
||||
1,
|
||||
ChampionUtils.ToLong(ChampionsEnum.SORAKA)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Tests/Editor/TestChampionUtils.cs.meta
Normal file
2
Assets/Tests/Editor/TestChampionUtils.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a66db3ba63d3984aa0460ad3ec3852a
|
||||
168
Assets/Tests/Editor/TestTraitsMapping.cs
Normal file
168
Assets/Tests/Editor/TestTraitsMapping.cs
Normal file
@@ -0,0 +1,168 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Assets.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestTraitsMapping
|
||||
{
|
||||
[Test]
|
||||
[TestCaseSource(typeof(TraitsMappingCase), "ChampCombination")]
|
||||
public void TestChampCombination(
|
||||
long mandatoryChamps,
|
||||
long possibleChamps,
|
||||
int n,
|
||||
List<long> expected
|
||||
)
|
||||
{
|
||||
List<long> output = TraitsMapping.GenerateCombinations(
|
||||
mandatoryChamps,
|
||||
possibleChamps,
|
||||
n
|
||||
);
|
||||
foreach (long champ in expected)
|
||||
{
|
||||
Assert.IsTrue(output.Contains(champ));
|
||||
}
|
||||
|
||||
foreach (long champ in output)
|
||||
{
|
||||
Assert.IsTrue(expected.Contains(champ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TraitsMappingCase
|
||||
{
|
||||
public static IEnumerable ChampCombination
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() { ChampionsEnum.ELISE }),
|
||||
3,
|
||||
new List<long>()
|
||||
{
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.ELISE,
|
||||
}
|
||||
),
|
||||
}
|
||||
);
|
||||
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.CASSIOPEIA,
|
||||
ChampionsEnum.EZREAL
|
||||
}
|
||||
),
|
||||
5,
|
||||
new List<long>()
|
||||
{
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.CASSIOPEIA
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.EZREAL
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.CASSIOPEIA,
|
||||
ChampionsEnum.EZREAL
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.CASSIOPEIA,
|
||||
ChampionsEnum.EZREAL
|
||||
}
|
||||
),
|
||||
}
|
||||
);
|
||||
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() { ChampionsEnum.ELISE }),
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() { ChampionsEnum.AHRI }),
|
||||
1,
|
||||
new List<long>()
|
||||
{
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() { ChampionsEnum.ELISE }),
|
||||
}
|
||||
);
|
||||
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.POPPY,
|
||||
ChampionsEnum.SORAKA,
|
||||
ChampionsEnum.HWEI,
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>() { ChampionsEnum.SMOLDER, ChampionsEnum.XERATH }
|
||||
),
|
||||
4,
|
||||
new List<long>()
|
||||
{
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.POPPY,
|
||||
ChampionsEnum.SORAKA,
|
||||
ChampionsEnum.HWEI,
|
||||
}
|
||||
),
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Tests/Editor/TestTraitsMapping.cs.meta
Normal file
2
Assets/Tests/Editor/TestTraitsMapping.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfc2ba87bb8472c4d9164a522a57147f
|
||||
@@ -8,37 +8,26 @@ namespace Assets.Data
|
||||
public class TestTraitsUtils
|
||||
{
|
||||
[Test]
|
||||
[TestCaseSource(typeof(BinaryCases), "EmblemsSynergies")]
|
||||
[TestCaseSource(typeof(TraitTestCases), "EmblemsSynergies")]
|
||||
public void TestMergeEmblems(
|
||||
Dictionary<TraitsEnum, int> emblem,
|
||||
Dictionary<TraitsEnum, int> synergies,
|
||||
Dictionary<TraitsEnum, int> expected
|
||||
Dictionary<int, int> emblem,
|
||||
Dictionary<int, int> synergies,
|
||||
Dictionary<int, int> expected
|
||||
)
|
||||
{
|
||||
var output = TraitsMapping.MergeEmblems(emblem, synergies);
|
||||
foreach (KeyValuePair<TraitsEnum, int> pair in expected)
|
||||
foreach (KeyValuePair<int, int> pair in expected)
|
||||
{
|
||||
Assert.IsTrue(output[pair.Key] == pair.Value);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCaseSource(typeof(BinaryCases), "ActiveTraits")]
|
||||
public void TestActiveSynergyFilter(
|
||||
Dictionary<TraitsEnum, int> synergies,
|
||||
HashSet<TraitsEnum> expected
|
||||
)
|
||||
[TestCaseSource(typeof(TraitTestCases), "ActiveTraits")]
|
||||
public void TestActiveSynergyFilter(Dictionary<int, int> synergies, int expected)
|
||||
{
|
||||
var output = TraitsMapping.FilterActiveTraits(synergies);
|
||||
foreach (TraitsEnum trait in expected)
|
||||
{
|
||||
Assert.IsTrue(expected.Contains(trait));
|
||||
}
|
||||
|
||||
foreach (TraitsEnum trait in output)
|
||||
{
|
||||
Assert.IsTrue(output.Contains(trait));
|
||||
}
|
||||
int output = TraitsMapping.FilterActiveTraits(synergies);
|
||||
Assert.IsTrue(Equals(output, expected));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -46,68 +35,94 @@ namespace Assets.Data
|
||||
{
|
||||
foreach (var champTraits in TraitsMapping.ChampsTraits)
|
||||
{
|
||||
foreach (var trait in champTraits.Value)
|
||||
var champion = champTraits.Key;
|
||||
var traits = TraitUtils.FromInt(champTraits.Value);
|
||||
foreach (var trait in traits)
|
||||
{
|
||||
Assert.IsTrue(TraitsMapping.TraitsChamp[trait].Contains(champTraits.Key));
|
||||
var allChampofTrait = TraitsMapping.TraitsChamp[(int)trait];
|
||||
HashSet<ChampionsEnum> champions = ChampionUtils.FromLong(allChampofTrait);
|
||||
Assert.IsTrue(
|
||||
ChampionUtils.ContainsChampion(
|
||||
allChampofTrait,
|
||||
champion
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var traitChamps in TraitsMapping.TraitsChamp)
|
||||
foreach (var traitChamp in TraitsMapping.TraitsChamp)
|
||||
{
|
||||
foreach (var champ in traitChamps.Value)
|
||||
var trait = traitChamp.Key;
|
||||
var champions = ChampionUtils.FromLong(traitChamp.Value);
|
||||
foreach (var champion in champions)
|
||||
{
|
||||
Assert.IsTrue(TraitsMapping.ChampsTraits[champ].Contains(traitChamps.Key));
|
||||
var allTraitsOfChamp = TraitsMapping.ChampsTraits[(long)champion];
|
||||
Assert.IsTrue(
|
||||
TraitUtils.ContainsTrait(
|
||||
allTraitsOfChamp,
|
||||
trait
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCaseSource(typeof(BinaryCases), "con")]
|
||||
public void TestChampionCombination(HashSet<ChampionsEnum> champList, int compositionSize, int expectedCombinationCount)
|
||||
[TestCaseSource(typeof(TraitTestCases), "traitsEnum")]
|
||||
public void TestIntTrait(int traitInt)
|
||||
{
|
||||
var combination = TraitsMapping.GetChampionSubsets(champList, compositionSize);
|
||||
Assert.IsTrue(combination.Count == expectedCombinationCount);
|
||||
var traits = TraitUtils.FromInt(traitInt);
|
||||
long output = TraitUtils.ToInt(traits);
|
||||
Assert.IsTrue(traitInt == output);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCaseSource(typeof(TraitTestCases), "traitsToInt")]
|
||||
public void TestTraitToInt(HashSet<TraitsEnum> traits, int expectedInt)
|
||||
{
|
||||
int output = TraitUtils.ToInt(traits);
|
||||
Assert.IsTrue(output == expectedInt);
|
||||
}
|
||||
}
|
||||
|
||||
public class BinaryCases
|
||||
public class TraitTestCases
|
||||
{
|
||||
public static IEnumerable EmblemsSynergies
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<TraitsEnum, int> { { TraitsEnum.ARCANA, 1 } },
|
||||
new Dictionary<TraitsEnum, int> { { TraitsEnum.ARCANA, 1 } },
|
||||
new Dictionary<TraitsEnum, int> { { TraitsEnum.ARCANA, 2 } }
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.ARCANA, 1 } },
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.ARCANA, 1 } },
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.ARCANA, 2 } }
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<TraitsEnum, int>
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ TraitsEnum.ARCANA, 1 },
|
||||
{ TraitsEnum.DRAGON, 2 },
|
||||
{ TraitsEnum.FROST, 3 },
|
||||
{ TraitsEnum.HONEYMANCY, 4 },
|
||||
{ TraitsEnum.PYRO, 5 },
|
||||
{ TraitsEnum.WARRIOR, 6 },
|
||||
{ (int)TraitsEnum.ARCANA, 1 },
|
||||
{ (int)TraitsEnum.DRAGON, 2 },
|
||||
{ (int)TraitsEnum.FROST, 3 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 4 },
|
||||
{ (int)TraitsEnum.PYRO, 5 },
|
||||
{ (int)TraitsEnum.WARRIOR, 6 },
|
||||
},
|
||||
new Dictionary<TraitsEnum, int>
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ TraitsEnum.ARCANA, 1 },
|
||||
{ TraitsEnum.DRAGON, 2 },
|
||||
{ TraitsEnum.FROST, 3 },
|
||||
{ TraitsEnum.HONEYMANCY, 4 },
|
||||
{ TraitsEnum.PYRO, 5 },
|
||||
{ TraitsEnum.WARRIOR, 6 },
|
||||
{ (int)TraitsEnum.ARCANA, 1 },
|
||||
{ (int)TraitsEnum.DRAGON, 2 },
|
||||
{ (int)TraitsEnum.FROST, 3 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 4 },
|
||||
{ (int)TraitsEnum.PYRO, 5 },
|
||||
{ (int)TraitsEnum.WARRIOR, 6 },
|
||||
},
|
||||
new Dictionary<TraitsEnum, int>
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ TraitsEnum.ARCANA, 2 },
|
||||
{ TraitsEnum.DRAGON, 4 },
|
||||
{ TraitsEnum.FROST, 6 },
|
||||
{ TraitsEnum.HONEYMANCY, 8 },
|
||||
{ TraitsEnum.PYRO, 10 },
|
||||
{ TraitsEnum.WARRIOR, 12 },
|
||||
{ (int)TraitsEnum.ARCANA, 2 },
|
||||
{ (int)TraitsEnum.DRAGON, 4 },
|
||||
{ (int)TraitsEnum.FROST, 6 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 8 },
|
||||
{ (int)TraitsEnum.PYRO, 10 },
|
||||
{ (int)TraitsEnum.WARRIOR, 12 },
|
||||
}
|
||||
);
|
||||
/*
|
||||
@@ -145,41 +160,107 @@ namespace Assets.Data
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<TraitsEnum, int>
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ TraitsEnum.ARCANA, 1 },
|
||||
{ TraitsEnum.DRAGON, 2 },
|
||||
{ TraitsEnum.FROST, 3 },
|
||||
{ TraitsEnum.HONEYMANCY, 4 },
|
||||
{ TraitsEnum.PYRO, 1 },
|
||||
{ TraitsEnum.WARRIOR, 1 },
|
||||
{ (int)TraitsEnum.ARCANA, 1 },
|
||||
{ (int)TraitsEnum.DRAGON, 2 },
|
||||
{ (int)TraitsEnum.FROST, 3 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 4 },
|
||||
{ (int)TraitsEnum.PYRO, 1 },
|
||||
{ (int)TraitsEnum.WARRIOR, 1 },
|
||||
},
|
||||
TraitUtils.ToInt(
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.DRAGON,
|
||||
TraitsEnum.FROST,
|
||||
TraitsEnum.HONEYMANCY
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ (int)TraitsEnum.ARCANA, 5 },
|
||||
{ (int)TraitsEnum.FROST, 2 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 7 },
|
||||
{ (int)TraitsEnum.PYRO, 4 },
|
||||
{ (int)TraitsEnum.WARRIOR, 3 },
|
||||
},
|
||||
TraitUtils.ToInt(
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.ARCANA,
|
||||
TraitsEnum.HONEYMANCY,
|
||||
TraitsEnum.PYRO,
|
||||
TraitsEnum.WARRIOR,
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable traitsEnum
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return 156;
|
||||
yield return 621;
|
||||
yield return 123456;
|
||||
yield return 5;
|
||||
yield return 4194303; // max value
|
||||
yield return 4194302;
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable traitsToInt
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.ARCANA,
|
||||
TraitsEnum.DRAGON
|
||||
},
|
||||
1<<0 | 1<<2
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.ARCANA,
|
||||
TraitsEnum.DRAGON,
|
||||
TraitsEnum.FROST,
|
||||
TraitsEnum.HONEYMANCY,
|
||||
TraitsEnum.PYRO,
|
||||
}
|
||||
);
|
||||
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<TraitsEnum, int>
|
||||
{
|
||||
{ TraitsEnum.ARCANA, 5 },
|
||||
{ TraitsEnum.FROST, 2 },
|
||||
{ TraitsEnum.HONEYMANCY, 7 },
|
||||
{ TraitsEnum.PYRO, 4 },
|
||||
{ TraitsEnum.WARRIOR, 3 },
|
||||
TraitsEnum.WARRIOR
|
||||
},
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.ARCANA,
|
||||
TraitsEnum.HONEYMANCY,
|
||||
TraitsEnum.PYRO,
|
||||
TraitsEnum.WARRIOR,
|
||||
}
|
||||
);
|
||||
1<<0 | 1<<2 | 1<<6 | 1<<7 | 1<<9 | 1<<22
|
||||
);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.ARCANA},1 << 0);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.CHRONO},1 << 1);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.DRAGON},1 << 2);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.DRUID},1 << 3);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.ELDRICHT},1 << 4);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.FAERIE},1 << 5);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.FROST},1 << 6);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.HONEYMANCY},1 << 7);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.PORTAL},1 << 8);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.PYRO},1 << 9);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.SUGARCRAFT},1 << 10);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.WITCHCRAFT},1 << 11);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.BASTION},1 << 12);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.BLASTER},1 << 13);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.HUNTER},1 << 14);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.INCANTATOR},1 << 15);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.MAGE},1 << 16);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.MULTISTRIKER},1 << 17);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.PRESERVER},1 << 18);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.SCHOLAR},1 << 19);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.SHAPESHIFTER},1 << 20);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.VANGUARD},1 << 21);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.WARRIOR},1 << 22);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user