-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrumbra_test.go
More file actions
47 lines (36 loc) · 762 Bytes
/
Copy pathstrumbra_test.go
File metadata and controls
47 lines (36 loc) · 762 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
43
44
45
46
47
package strumbra
import "testing"
func TestEqualDifferentString(t *testing.T) {
t.Parallel()
a, err := New("hello")
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
b, err := New("world")
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if a.Equals(b) {
t.Fatal("expected strings to be different.")
}
if b.Equals(a) {
t.Fatal("expected strings to be different.")
}
}
func TestEqualSameString(t *testing.T) {
t.Parallel()
a, err := New("")
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
b, err := New("")
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if !a.Equals(b) {
t.Fatal("expected strings to be the same.")
}
if !b.Equals(a) {
t.Fatal("expected strings to be the same.")
}
}