test: the gopher.comment is not yet ready even to be tested
This commit is contained in:
parent
b379c62b02
commit
1939f3af3d
5 changed files with 41 additions and 18 deletions
1
spec/fixtures/comment/package_input.go
vendored
Normal file
1
spec/fixtures/comment/package_input.go
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
package main
|
||||||
2
spec/fixtures/comment/package_output.go
vendored
Normal file
2
spec/fixtures/comment/package_output.go
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
// Package main provides main
|
||||||
|
package main
|
||||||
5
spec/fixtures/tests/add_function_input.go
vendored
Normal file
5
spec/fixtures/tests/add_function_input.go
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
package for_test
|
||||||
|
|
||||||
|
func Add(x, y int) int {
|
||||||
|
return 2 + x + y
|
||||||
|
}
|
||||||
26
spec/fixtures/tests/add_function_output.go
vendored
Normal file
26
spec/fixtures/tests/add_function_output.go
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
package for_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"gotest.tools/v3/assert"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestAdd(t *testing.T) {
|
||||||
|
type args struct {
|
||||||
|
x int
|
||||||
|
y int
|
||||||
|
}
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
args args
|
||||||
|
want int
|
||||||
|
}{
|
||||||
|
// TODO: Add test cases.
|
||||||
|
}
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
assert.Equal(t, tt.want, Add(tt.args.x, tt.args.y))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,34 +5,23 @@ local T = MiniTest.new_set {
|
||||||
hooks = {
|
hooks = {
|
||||||
post_once = child.stop,
|
post_once = child.stop,
|
||||||
pre_case = function()
|
pre_case = function()
|
||||||
|
MiniTest.skip "This module should be fixed first"
|
||||||
child.restart { "-u", t.mininit_path }
|
child.restart { "-u", t.mininit_path }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
T["comment"] = MiniTest.new_set {}
|
T["comment"] = MiniTest.new_set {}
|
||||||
|
|
||||||
T["comment"]["should add comment to package"] = function()
|
T["comment"]["should add comment to package"] = function() end
|
||||||
MiniTest.skip "come back daddy"
|
|
||||||
end
|
|
||||||
|
|
||||||
T["comment"]["should add comment to struct"] = function()
|
T["comment"]["should add comment to struct"] = function() end
|
||||||
MiniTest.skip "come back daddy"
|
|
||||||
end
|
|
||||||
|
|
||||||
T["comment"]["should add comment to function"] = function()
|
T["comment"]["should add comment to function"] = function() end
|
||||||
MiniTest.skip "come back daddy"
|
|
||||||
end
|
|
||||||
|
|
||||||
T["comment"]["should add comment to method"] = function()
|
T["comment"]["should add comment to method"] = function() end
|
||||||
MiniTest.skip "come back daddy"
|
|
||||||
end
|
|
||||||
|
|
||||||
T["comment"]["should add comment to interface"] = function()
|
T["comment"]["should add comment to interface"] = function() end
|
||||||
MiniTest.skip "come back daddy"
|
|
||||||
end
|
|
||||||
|
|
||||||
T["comment"]["otherwise should add // above cursor"] = function()
|
T["comment"]["otherwise should add // above cursor"] = function() end
|
||||||
MiniTest.skip "come back daddy"
|
|
||||||
end
|
|
||||||
|
|
||||||
return T
|
return T
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue