Skip to content

Commit

Permalink
added example test for mash usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyStiles committed Nov 21, 2023
1 parent 96b5cff commit 55523e0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions mash/example_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package mash_test

import (
"fmt"

"github.com/TimothyStiles/poly/mash"
)

func ExampleMash() {
fingerprint1 := mash.New(17, 10)
fingerprint1.Sketch("ATGCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGA")

fingerprint2 := mash.New(17, 9)
fingerprint2.Sketch("ATGCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGA")

distance := fingerprint1.Distance(fingerprint2)

fmt.Println(distance)

// Output:
// 0
}

0 comments on commit 55523e0

Please sign in to comment.