about summary refs log tree commit diff
path: root/structs_test.go
diff options
context:
space:
mode:
authorhanemile <hanemile@protonmail.com>2018-11-03 17:51:37 +0100
committerhanemile <hanemile@protonmail.com>2018-11-03 17:51:37 +0100
commit1ecde651aec890c30bcbc3db79ce202fc323266e (patch)
tree8649d03a16bf0e9ad15ec1d149c2bbb135267539 /structs_test.go
parente2751726e199f5b50d702a61672c037be96a2673 (diff)
moved the ExampleNewCoord function to the test file.
Diffstat (limited to 'structs_test.go')
-rw-r--r--structs_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/structs_test.go b/structs_test.go
index 108cbc3..ceeace7 100644
--- a/structs_test.go
+++ b/structs_test.go
@@ -1,6 +1,7 @@
 package quadtree
 
 import (
+	"fmt"
 	"testing"
 )
 
@@ -125,3 +126,8 @@ func TestInsert(t *testing.T) {
 	// Print the stuff generated
 	t.Logf("Complete Tree: %v\n", newQuadtree.northEast.southWest.southWest.northEast)
 }
+
+func ExampleNewCoord() {
+	fmt.Println(NewCoord(1, 1))
+	// Output: {1, 1}
+}