summaryrefslogtreecommitdiff
path: root/internal/rtree/shared_test.go
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2023-04-17 13:28:47 +0200
committerSandro Jäckel <sandro.jaeckel@sap.com>2023-04-17 14:54:52 +0200
commit72c757b7a44dc5d19d821f7c2fa36bb082e4f2e3 (patch)
treeaa14acc93110f363b54eaa0218b9c0e25ee545dc /internal/rtree/shared_test.go
parentbe0e424eecec3fec19ba3518f8fd1bb07b6908dc (diff)
downloadgofu-72c757b7a44dc5d19d821f7c2fa36bb082e4f2e3.tar.gz
Save rtree with go 1.20
Diffstat (limited to 'internal/rtree/shared_test.go')
-rw-r--r--internal/rtree/shared_test.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/internal/rtree/shared_test.go b/internal/rtree/shared_test.go
index 6720b1c..bd8c238 100644
--- a/internal/rtree/shared_test.go
+++ b/internal/rtree/shared_test.go
@@ -34,7 +34,7 @@ import (
yaml "gopkg.in/yaml.v2"
)
-//Path to a directory where tests can put their index files.
+// Path to a directory where tests can put their index files.
var indexTmpDir = filepath.Join(os.TempDir(), fmt.Sprintf("rtree-test-%d", os.Getpid()))
func TestMain(m *testing.M) {
@@ -56,8 +56,8 @@ func TestMain(m *testing.M) {
os.Exit(exitCode)
}
-//Test describes a call to Main(), the environment that's given to it, and the
-//assertions that are checked after the call returns.
+// Test describes a call to Main(), the environment that's given to it, and the
+// assertions that are checked after the call returns.
type Test struct {
Args []string
Input string
@@ -137,11 +137,11 @@ type RecordedCommand struct {
Fails bool
}
-//Recorded is a shortcut function for initializing a []RecordedCommand. It
-//splits each line on whitespace to obtain the command line of that command,
-//and recognizes a leading "@/some/path" to set the workdir.
+// Recorded is a shortcut function for initializing a []RecordedCommand. It
+// splits each line on whitespace to obtain the command line of that command,
+// and recognizes a leading "@/some/path" to set the workdir.
//
-//This function can only be used for RecordedCommands without output that do not fail.
+// This function can only be used for RecordedCommands without output that do not fail.
func Recorded(lines ...string) (cs []RecordedCommand) {
cs = make([]RecordedCommand, len(lines))
for idx, line := range lines {
@@ -155,11 +155,11 @@ func Recorded(lines ...string) (cs []RecordedCommand) {
return
}
-//CommandSimulator implements the cli.CommandRunner interface (via its Next
-//method). When a cli.Command is given to Next(), it is matched with the next
-//command in the .Cmd list, and the result from that RecordedCommand is
-//returned. If the given Command is different from the one expected (or if the
-//.Cmd list has been exhausted), an error is returned.
+// CommandSimulator implements the cli.CommandRunner interface (via its Next
+// method). When a cli.Command is given to Next(), it is matched with the next
+// command in the .Cmd list, and the result from that RecordedCommand is
+// returned. If the given Command is different from the one expected (or if the
+// .Cmd list has been exhausted), an error is returned.
type CommandSimulator struct {
Cmd []RecordedCommand
idx int