Skip to content

Commit

Permalink
xtesting: rm -rf [ci-base]
Browse files Browse the repository at this point in the history
useless
  • Loading branch information
nhooyr committed Jan 4, 2023
1 parent ed6213c commit 0956d77
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 39 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ own repo from this collection we will. Feel free to open an issue to request.
<!-- toc -->
- <a href="#diff" id="toc-diff">./diff</a>
- <a href="#assert" id="toc-assert">./assert</a>
- <a href="#xtesting" id="toc-xtesting">./xtesting</a>
- <a href="#xdefer" id="toc-xdefer">./xdefer</a>
- <a href="#cmdlog" id="toc-cmdlog">./cmdlog</a>
- <a href="#xterm" id="toc-xterm">./xterm</a>
Expand Down Expand Up @@ -45,10 +44,6 @@ beautiful diffs.

note: `TestdataJSON` is extremely useful.

### [./xtesting](./xtesting)

xtesting provides non assertion testing helpers. Currently only `RunCases`.

![example output](./diff/example.png)

- Strings
Expand Down
18 changes: 9 additions & 9 deletions cmdlog/cmdlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"oss.terrastruct.com/util-go/assert"
"oss.terrastruct.com/util-go/cmdlog"
"oss.terrastruct.com/util-go/xos"
"oss.terrastruct.com/util-go/xtesting"
)

func TestLogger(t *testing.T) {
Expand Down Expand Up @@ -144,18 +143,19 @@ yes %d`, 3, 4)
},
}

var xtca []xtesting.Case
ctx := context.Background()
for _, tc := range tca {
tc := tc
xtca = append(xtca, xtesting.Case{
Name: tc.name,
Run: func(t *testing.T, ctx context.Context) {
env := xos.NewEnv(nil)
tc.run(t, ctx, env)
},
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

ctx, cancel := context.WithCancel(ctx)
defer cancel()

env := xos.NewEnv(nil)
tc.run(t, ctx, env)
})
}
xtesting.RunCases(t, context.Background(), xtca)
}

func testLogger(l *cmdlog.Logger) {
Expand Down
25 changes: 0 additions & 25 deletions xtesting/cases.go

This file was deleted.

0 comments on commit 0956d77

Please sign in to comment.