diff --git a/spec/fixtures/comment/package_input.go b/spec/fixtures/comment/package_input.go new file mode 100644 index 0000000..06ab7d0 --- /dev/null +++ b/spec/fixtures/comment/package_input.go @@ -0,0 +1 @@ +package main diff --git a/spec/fixtures/comment/package_output.go b/spec/fixtures/comment/package_output.go new file mode 100644 index 0000000..66d106a --- /dev/null +++ b/spec/fixtures/comment/package_output.go @@ -0,0 +1,2 @@ +// Package main provides main +package main diff --git a/spec/fixtures/tests/add_function_input.go b/spec/fixtures/tests/add_function_input.go new file mode 100644 index 0000000..86d26e0 --- /dev/null +++ b/spec/fixtures/tests/add_function_input.go @@ -0,0 +1,5 @@ +package for_test + +func Add(x, y int) int { + return 2 + x + y +} diff --git a/spec/fixtures/tests/add_function_output.go b/spec/fixtures/tests/add_function_output.go new file mode 100644 index 0000000..846d465 --- /dev/null +++ b/spec/fixtures/tests/add_function_output.go @@ -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)) + }) + } +} diff --git a/spec/integration/comment_test.lua b/spec/integration/comment_test.lua index da85496..8276688 100644 --- a/spec/integration/comment_test.lua +++ b/spec/integration/comment_test.lua @@ -5,34 +5,23 @@ local T = MiniTest.new_set { hooks = { post_once = child.stop, pre_case = function() + MiniTest.skip "This module should be fixed first" child.restart { "-u", t.mininit_path } end, }, } T["comment"] = MiniTest.new_set {} -T["comment"]["should add comment to package"] = function() - MiniTest.skip "come back daddy" -end +T["comment"]["should add comment to package"] = function() end -T["comment"]["should add comment to struct"] = function() - MiniTest.skip "come back daddy" -end +T["comment"]["should add comment to struct"] = function() end -T["comment"]["should add comment to function"] = function() - MiniTest.skip "come back daddy" -end +T["comment"]["should add comment to function"] = function() end -T["comment"]["should add comment to method"] = function() - MiniTest.skip "come back daddy" -end +T["comment"]["should add comment to method"] = function() end -T["comment"]["should add comment to interface"] = function() - MiniTest.skip "come back daddy" -end +T["comment"]["should add comment to interface"] = function() end -T["comment"]["otherwise should add // above cursor"] = function() - MiniTest.skip "come back daddy" -end +T["comment"]["otherwise should add // above cursor"] = function() end return T