Browse Source

Renamed utils to util

Benton Edmondson 2 years ago
parent
commit
5b2de620ee
4 changed files with 16 additions and 16 deletions
  1. 2 2
      gemtext/gemtext_test.go
  2. 11 11
      hypertext/hypertext_test.go
  3. 2 2
      plaintext/plaintext_test.go
  4. 1 1
      util/util.go

+ 2 - 2
gemtext/gemtext_test.go

@@ -3,7 +3,7 @@ package gemtext
 import (
 	"testing"
 	"mimicry/style"
-	"mimicry/utils"
+	"mimicry/util"
 )
 
 func TestBasic(t *testing.T) {
@@ -34,5 +34,5 @@ func TestBasic(t *testing.T) {
 		style.LinkBlock("http://example.org/") + "\n\n" +
 		style.CodeBlock("code block\nhere")
 
-	utils.AssertEqual(expected, output, t)
+	util.AssertEqual(expected, output, t)
 }

+ 11 - 11
hypertext/hypertext_test.go

@@ -3,7 +3,7 @@ package hypertext
 import (
 	"testing"
 	"mimicry/style"
-	"mimicry/utils"
+	"mimicry/util"
 )
 
 func TestMergeText(t *testing.T) {
@@ -11,25 +11,25 @@ func TestMergeText(t *testing.T) {
 	rhs0 := "back"
 	output0 := mergeText(lhs0, rhs0)
 	expected0 := "frontback"
-	utils.AssertEqual(expected0, output0, t)
+	util.AssertEqual(expected0, output0, t)
 
 	lhs1 := "front     "
 	rhs1 := "   back"
 	output1 := mergeText(lhs1, rhs1)
 	expected1 := "front back"
-	utils.AssertEqual(expected1, output1, t)
+	util.AssertEqual(expected1, output1, t)
 
 	lhs2 := "front     "
 	rhs2 := " \n  back"
 	output2 := mergeText(lhs2, rhs2)
 	expected2 := "front\nback"
-	utils.AssertEqual(expected2, output2, t)
+	util.AssertEqual(expected2, output2, t)
 
 	lhs3 := "front    \n\n\n "
 	rhs3 := " \n  back"
 	output3 := mergeText(lhs3, rhs3)
 	expected3 := "front\n\nback"
-	utils.AssertEqual(expected3, output3, t)
+	util.AssertEqual(expected3, output3, t)
 }
 
 func TestStyles(t *testing.T) {
@@ -44,7 +44,7 @@ func TestStyles(t *testing.T) {
 		style.Underline("u") +
 		style.Highlight("mark")
 
-	utils.AssertEqual(expected, output, t)
+	util.AssertEqual(expected, output, t)
 }
 
 func TestSurroundingBlocks(t *testing.T) {
@@ -58,7 +58,7 @@ func TestSurroundingBlocks(t *testing.T) {
 in ` + style.Highlight("the") + ` middle
 
 last`
-	utils.AssertEqual(expected, output, t)
+	util.AssertEqual(expected, output, t)
 }
 
 func TestAdjacentBlocks(t *testing.T) {
@@ -70,7 +70,7 @@ func TestAdjacentBlocks(t *testing.T) {
 	expected := `first
 
 second`
-	utils.AssertEqual(expected, output, t)
+	util.AssertEqual(expected, output, t)
 }
 
 func TestPoetry(t *testing.T) {
@@ -84,7 +84,7 @@ at those annoying birds
 
 and that they heard`
 
-	utils.AssertEqual(expected, output, t)
+	util.AssertEqual(expected, output, t)
 }
 
 func TestPreservation(t *testing.T) {
@@ -99,7 +99,7 @@ func TestPreservation(t *testing.T) {
 
 
  far down`)
-	utils.AssertEqual(expected, output, t)
+	util.AssertEqual(expected, output, t)
 }
 
 func TestNestedBlocks(t *testing.T) {
@@ -115,5 +115,5 @@ func TestNestedBlocks(t *testing.T) {
 	expected := `Once a timid child
 
 ` + style.LinkBlock("https://i.snap.as/P8qpdMbM.jpg")
-	utils.AssertEqual(expected, output, t)
+	util.AssertEqual(expected, output, t)
 }

+ 2 - 2
plaintext/plaintext_test.go

@@ -3,7 +3,7 @@ package plaintext
 import (
 	"testing"
 	"mimicry/style"
-	"mimicry/utils"
+	"mimicry/util"
 )
 
 func TestBasic(t *testing.T) {
@@ -25,5 +25,5 @@ Note the warning in <` +
 		style.Link("http://www.ics.uci.edu/pub/ietf/uri/historical.html#WARNING") +
 		`>.`
 
-	utils.AssertEqual(expected, output, t)
+	util.AssertEqual(expected, output, t)
 }

+ 1 - 1
utils/utils.go → util/util.go

@@ -1,4 +1,4 @@
-package utils
+package util
 
 import (
 	"testing"