(b *testing.B)
| 78 | } |
| 79 | |
| 80 | func BenchmarkCopyDeclarations(b *testing.B) { |
| 81 | env, err := NewEnv(containers.DefaultContainer, newTestRegistry(b)) |
| 82 | if err != nil { |
| 83 | b.Fatalf("NewEnv() failed: %v", err) |
| 84 | } |
| 85 | err = env.AddFunctions(stdlib.Functions()...) |
| 86 | if err != nil { |
| 87 | b.Fatalf("env.AddFunctions(stdlib.Functions()...) failed: %v", err) |
| 88 | } |
| 89 | for i := 0; i < b.N; i++ { |
| 90 | env.validatedDeclarations().Copy() |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | func newStdEnv(t *testing.T) *Env { |
| 95 | t.Helper() |
nothing calls this directly
no test coverage detected