Skip to content

Commit

Permalink
Removes MemoryType.Strict and Safe tests from TreeDictionary
Browse files Browse the repository at this point in the history
Strict and Safe have not been implemented yet in TreeDictionary as well
as in RedBlackTree. An exception is risen on purpose if those two data
structures are tried to be used with such memory model. Thus unit tests
have been removed
  • Loading branch information
Giovanni Campo committed Feb 28, 2016
1 parent c5bc045 commit d588571
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions C5.Tests/hashing/TreeDictionaryTests.cs
Expand Up @@ -23,16 +23,6 @@ public void TreeDictionaryBug_no_42()
[TestCase(MemoryType.Normal, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Normal, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Normal, 5, 50, Description = "Five Times")]
[TestCase(MemoryType.Safe, 1, 10, Description = "Once")]
[TestCase(MemoryType.Safe, 2, 20, Description = "Twice")]
[TestCase(MemoryType.Safe, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Safe, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Safe, 5, 50, Description = "Five Times")]
[TestCase(MemoryType.Strict, 1, 10, Description = "Once")]
[TestCase(MemoryType.Strict, 2, 20, Description = "Twice")]
[TestCase(MemoryType.Strict, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Strict, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Strict, 5, 50, Description = "Five Times")]
public void Values_works_multiple_times(MemoryType memoryType, int numberOfIterations, int expectedResult)
{
var dictionary = new TreeDictionary<string, int>(memoryType) { { "One", 1 }, { "Two", 2 }, { "Three", 3 }, { "Four", 4 } };
Expand All @@ -54,16 +44,6 @@ public void Values_works_multiple_times(MemoryType memoryType, int numberOfItera
[TestCase(MemoryType.Normal, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Normal, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Normal, 5, 50, Description = "Five Times")]
[TestCase(MemoryType.Safe, 1, 10, Description = "Once")]
[TestCase(MemoryType.Safe, 2, 20, Description = "Twice")]
[TestCase(MemoryType.Safe, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Safe, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Safe, 5, 50, Description = "Five Times")]
[TestCase(MemoryType.Strict, 1, 10, Description = "Once")]
[TestCase(MemoryType.Strict, 2, 20, Description = "Twice")]
[TestCase(MemoryType.Strict, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Strict, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Strict, 5, 50, Description = "Five Times")]
public void Keys_works_multiple_times(MemoryType memoryType, int numberOfIterations, int expectedResult)
{
var dictionary = new TreeDictionary<int, string>(memoryType) { { 1, "One" }, { 2, "Two" }, { 3, "Three" }, { 4, "Four" } };
Expand All @@ -85,16 +65,6 @@ public void Keys_works_multiple_times(MemoryType memoryType, int numberOfIterati
[TestCase(MemoryType.Normal, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Normal, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Normal, 5, 50, Description = "Five Times")]
[TestCase(MemoryType.Safe, 1, 10, Description = "Once")]
[TestCase(MemoryType.Safe, 2, 20, Description = "Twice")]
[TestCase(MemoryType.Safe, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Safe, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Safe, 5, 50, Description = "Five Times")]
[TestCase(MemoryType.Strict, 1, 10, Description = "Once")]
[TestCase(MemoryType.Strict, 2, 20, Description = "Twice")]
[TestCase(MemoryType.Strict, 3, 30, Description = "Thrice")]
[TestCase(MemoryType.Strict, 4, 40, Description = "Four Times")]
[TestCase(MemoryType.Strict, 5, 50, Description = "Five Times")]
public void KeyValuePairs_works_multiple_times(MemoryType memoryType, int numberOfIterations, int expectedResult)
{
var dictionary = new TreeDictionary<int, int>(memoryType) { { 1, -1 }, { 2, -2 }, { 3, -3 }, { 4, -4 } };
Expand Down

0 comments on commit d588571

Please sign in to comment.