-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest2.cs
More file actions
42 lines (30 loc) · 834 Bytes
/
Copy pathTest2.cs
File metadata and controls
42 lines (30 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using RosettaOne;
namespace UnitTest
{
[TestClass]
public sealed class Test2
{
[TestMethod]
public void TestFive()
{
int maxSize = 1000;
BTree t = new BTree();
DateTime dtBTreeStart = DateTime.Now;
for (int i = 0; i < maxSize; i++)
{
t.Add(i);
}
t.WriteToFile("a.txt");
BTree t2 = new BTree();
t2.ReadFile("a.txt");
for (int i = 0; i < maxSize; i++)
{
Assert.IsTrue(t2.Exists(i));
}
Console.WriteLine("height " + t.GetHeight());
Console.WriteLine("height " + t2.GetHeight());
t.Clear();
t2.Clear();
}
}
}