Skip to content

Commit c9ba7f3

Browse files
added example test for mash usage. (#404)
1 parent 489cf97 commit c9ba7f3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

mash/example_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package mash_test
2+
3+
import (
4+
"fmt"
5+
6+
"github.com/TimothyStiles/poly/mash"
7+
)
8+
9+
func ExampleMash() {
10+
fingerprint1 := mash.New(17, 10)
11+
fingerprint1.Sketch("ATGCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGA")
12+
13+
fingerprint2 := mash.New(17, 9)
14+
fingerprint2.Sketch("ATGCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGA")
15+
16+
distance := fingerprint1.Distance(fingerprint2)
17+
18+
fmt.Println(distance)
19+
20+
// Output:
21+
// 0
22+
}

0 commit comments

Comments
 (0)