From 8e5b23f2568edc02d29a8f22ed07f0eb75a457e4 Mon Sep 17 00:00:00 2001 From: Leonardo Luz Almeida Date: Thu, 18 Jul 2024 22:08:11 -0400 Subject: [PATCH] feat: identifier support for subtests (#93) * fix(sub-tests): supports subtests with an identifier * chore: add tests folder --------- Co-authored-by: Florent Cigolotti --- tests/go.mod | 3 +++ tests/subtest_bar_test.go | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/go.mod create mode 100644 tests/subtest_bar_test.go diff --git a/tests/go.mod b/tests/go.mod new file mode 100644 index 0000000..ce0eeb2 --- /dev/null +++ b/tests/go.mod @@ -0,0 +1,3 @@ +module github.com/leoluz/nvim-dap-go + +go 1.22.2 diff --git a/tests/subtest_bar_test.go b/tests/subtest_bar_test.go new file mode 100644 index 0000000..6627856 --- /dev/null +++ b/tests/subtest_bar_test.go @@ -0,0 +1,12 @@ +package tests + +import ( + "testing" +) + +// https://github.com/leoluz/nvim-dap-go/pull/82 +func TestWithSubTests(t *testing.T) { + t.Run("subtest with function literal", func(t *testing.T) { t.Fail() }) + myFunc := func(t *testing.T) { t.FailNow() } + t.Run("subtest with identifier", myFunc) +}