forked from dafny-lang/dafny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DafnyProjectTest.cs
40 lines (33 loc) · 995 Bytes
/
DafnyProjectTest.cs
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
using Microsoft.Dafny;
namespace DafnyCore.Test;
public class DafnyProjectTest {
[Fact]
public void Equality() {
var randomFileName = Path.GetTempFileName();
var first = new DafnyProject() {
Uri = new Uri(randomFileName, UriKind.Absolute),
Includes = new[] { "a", "a2" },
Excludes = new[] { "b", "b2" },
Options = new Dictionary<string, object>() {
{ "c", "d" },
{ "e", "f" }
}
};
var second = new DafnyProject() {
Uri = new Uri(randomFileName, UriKind.Absolute),
Includes = new[] { "a2", "a" },
Excludes = new[] { "b2", "b" },
Options = new Dictionary<string, object>() {
{ "e", "f" },
{ "c", "d" },
}
};
Assert.Equal(first, second);
first.Options.Add("k", "1, 2, 3");
second.Options.Add("k", "1, 2, 3");
Assert.Equal(first, second);
first.Options.Add("m", "1, 2, 3");
second.Options.Add("m", "3, 2, 1");
Assert.NotEqual(first, second);
}
}