From a1fcf02abfe7761588f30d13e0d1a1a7381773af Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Sat, 25 Jul 2020 16:28:11 +0000 Subject: [PATCH] remove old plan code --- tea/plan.go | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 tea/plan.go diff --git a/tea/plan.go b/tea/plan.go deleted file mode 100644 index 000eba9..0000000 --- a/tea/plan.go +++ /dev/null @@ -1,42 +0,0 @@ -package tea - -import "testing" - -type step struct { - Test - name string - next *step - skip bool -} - -func (s *step) run(t *testing.T) { - name := "" - for s := s; s != nil; s = s.next { - name += s.name - if s.next != nil { - name += "/" - } - } - t.Run(name, func(t *testing.T) { - for s := s; s != nil; s = s.next { - s.Test.Run(t) - } - }) -} - -func (t *Tree) plan() []step { - if len(t.children) == 0 { - s := &step{Test: t.Test, name: parseName(t.Test)} - for t.parent != nil { - t = t.parent - s = &step{Test: t.Test, name: parseName(t.Test), next: s} - } - return []step{*s} - } - - var steps []step - for _, child := range t.children { - steps = append(steps, child.plan()...) - } - return steps -}