about summary refs log tree commit diff
path: root/structs_test.go
diff options
context:
space:
mode:
authorhanemile <hanemile@protonmail.com>2018-11-03 00:48:01 +0100
committerhanemile <hanemile@protonmail.com>2018-11-03 00:48:01 +0100
commit91003487acda056be18c9efecedd951ca9629f26 (patch)
treeddaf14a60346ce1fafd2fad7c172af4000304f2b /structs_test.go
parent6bc79c4fb9a3251a6c45932576c9c131c8c6efc3 (diff)
refactored some names, they are now being exported.
Diffstat (limited to 'structs_test.go')
-rw-r--r--structs_test.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/structs_test.go b/structs_test.go
index 66598bf..685557b 100644
--- a/structs_test.go
+++ b/structs_test.go
@@ -8,7 +8,7 @@ import (
 func TestQuadtree(t *testing.T) {
 	testQuadtree := quadtree{
 		nodeCapacity: 0,
-		boundary:     boundingBox{},
+		boundary:     BoundingBox{},
 		pointsSlice:  nil,
 		northWest:    nil,
 		northEast:    nil,
@@ -21,12 +21,12 @@ func TestQuadtree(t *testing.T) {
 
 // NewQuadTree test
 func TestNewQuadtree(t *testing.T) {
-	var boundary = boundingBox{
+	var boundary = BoundingBox{
 		center:        Coord{0, 0},
 		halfDimension: 3,
 	}
 
-	var newQuadtree = *newQuadtree(boundary, 0)
+	var newQuadtree = *NewQuadtree(boundary, 0)
 
 	t.Log(newQuadtree)
 }
@@ -49,7 +49,7 @@ func TestNewCoord(t *testing.T) {
 }
 
 func TestBoundingBox(t *testing.T) {
-	var newBoundingBox = boundingBox{
+	var newBoundingBox = BoundingBox{
 		center: Coord{
 			x: 1,
 			y: 2,
@@ -62,7 +62,7 @@ func TestBoundingBox(t *testing.T) {
 
 func TestInsideOf(t *testing.T) {
 	var testCoordinate = Coord{0, 0}
-	var testQuadTree = newQuadtree(boundingBox{
+	var testQuadTree = NewQuadtree(BoundingBox{
 		center: Coord{
 			x: 0,
 			y: 0,
@@ -74,7 +74,7 @@ func TestInsideOf(t *testing.T) {
 	t.Log(isInsideOf)
 }
 
-// Test the newBoundingBox function
+// Test the NewBoundingBox function
 func TestNewBoundingBox(t *testing.T) {
 
 	// Initialize some values that are needed
@@ -82,19 +82,19 @@ func TestNewBoundingBox(t *testing.T) {
 	var newHalfDimension float64 = 3
 
 	// Initialize the bounding box using the values above
-	var newBoundingBox = newBoundingBox(newCenter, newHalfDimension)
+	var newBoundingBox = NewBoundingBox(newCenter, newHalfDimension)
 
-	// Print the newBoundingBox
+	// Print the NewBoundingBox
 	t.Log(newBoundingBox)
 }
 
 func TestSubdivide(t *testing.T) {
-	var boundary = boundingBox{
+	var boundary = BoundingBox{
 		center:        Coord{0, 0},
 		halfDimension: 3,
 	}
 
-	var newQuadtree = *newQuadtree(boundary, 0)
+	var newQuadtree = *NewQuadtree(boundary, 0)
 
 	newQuadtree.subdivide()
 
@@ -106,20 +106,20 @@ func TestSubdivide(t *testing.T) {
 
 }
 
-// test the insert function
+// test the Insert function
 func TestInsert(t *testing.T) {
 	// Define a new quadtree-root-boundary
-	var boundary = boundingBox{
+	var boundary = BoundingBox{
 		center:        Coord{0, 0},
 		halfDimension: 3,
 	}
 
 	// create a new quadtree using the boundary
-	var newQuadtree = *newQuadtree(boundary, 0)
+	var newQuadtree = *NewQuadtree(boundary, 0)
 
-	// Define a star and insert it into the quadtree
+	// Define a star and Insert it into the quadtree
 	singleCoord := Coord{0.5, 0.5}
-	newQuadtree.insert(singleCoord)
+	newQuadtree.Insert(singleCoord)
 
 	// Print the stuff generated
 	t.Logf("Complete Tree: %v\n", newQuadtree.northEast.southWest.southWest.northEast)