Skip to content

Commit

Permalink
remove deprecated code from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed Aug 9, 2024
1 parent d00fb76 commit dc05803
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions examples/simple/simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@ func TestCounter(t *testing.T) {
// counterTestAndSubtest increment counter every non cached call
// and cache result for top level test and all of subtests
func counterTestAndSubtest(e fixenv.Env) int {
return fixenv.Cache(e, "", &fixenv.FixtureOptions{
Scope: fixenv.ScopeTestAndSubtests,
}, func() (res int, err error) {
return fixenv.CacheResult(e, func() (*fixenv.GenericResult[int], error) {
globalTestAndSubtestCounter++
e.T().Logf("increment globalTestAndSubtestCounter to: ")
return globalTestAndSubtestCounter, nil
})
return fixenv.NewGenericResult(globalTestAndSubtestCounter), nil
}, fixenv.CacheOptions{Scope: fixenv.ScopeTestAndSubtests})
}

func TestTestAndSubtestCounter(t *testing.T) {
Expand Down

0 comments on commit dc05803

Please sign in to comment.