Skip to content

Commit

Permalink
Remove the emulator.WithRuntime() config
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Sep 27, 2023
1 parent 4c30151 commit 252a387
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
3 changes: 0 additions & 3 deletions test/emulator_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ func NewEmulatorBackend(
fileResolver FileResolver,
stdlibHandler stdlib.StandardLibraryHandler,
coverageReport *runtime.CoverageReport,
testRuntime runtime.Runtime,
) *EmulatorBackend {
logCollectionHook := newLogCollectionHook()
var blockchain *emulator.Blockchain
Expand All @@ -155,12 +154,10 @@ func NewEmulatorBackend(
blockchain = newBlockchain(
logCollectionHook,
emulator.WithCoverageReport(coverageReport),
emulator.WithRuntime(testRuntime),
)
} else {
blockchain = newBlockchain(
logCollectionHook,
emulator.WithRuntime(testRuntime),
)
}
clock := newSystemClock()
Expand Down
2 changes: 0 additions & 2 deletions test/test_framework_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func NewTestFrameworkProvider(
fileResolver FileResolver,
stdlibHandler stdlib.StandardLibraryHandler,
coverageReport *runtime.CoverageReport,
testRuntime runtime.Runtime,
) stdlib.TestFramework {
return &TestFrameworkProvider{
fileResolver: fileResolver,
Expand All @@ -80,7 +79,6 @@ func NewTestFrameworkProvider(
fileResolver,
stdlibHandler,
coverageReport,
testRuntime,
),
}
}
6 changes: 2 additions & 4 deletions test/test_framework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3116,8 +3116,7 @@ func TestReplacingImports(t *testing.T) {
func TestReplaceImports(t *testing.T) {
t.Parallel()

runtime := runtime.NewInterpreterRuntime(runtime.Config{})
emulatorBackend := NewEmulatorBackend(nil, nil, nil, runtime)
emulatorBackend := NewEmulatorBackend(nil, nil, nil)
emulatorBackend.contracts = map[string]common.Address{
"C1": {0, 0, 0, 0, 0, 0, 0, 1},
"C2": {0, 0, 0, 0, 0, 0, 0, 2},
Expand Down Expand Up @@ -3270,8 +3269,7 @@ func TestServiceAccount(t *testing.T) {
t.Run("retrieve from EmulatorBackend", func(t *testing.T) {
t.Parallel()

testRuntime := runtime.NewInterpreterRuntime(runtime.Config{})
emulatorBackend := NewEmulatorBackend(nil, nil, nil, testRuntime)
emulatorBackend := NewEmulatorBackend(nil, nil, nil)

serviceAccount, err := emulatorBackend.ServiceAccount()

Expand Down
1 change: 0 additions & 1 deletion test/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ func (r *TestRunner) parseCheckAndInterpret(script string) (*interpreter.Program
r.fileResolver,
env,
r.coverageReport,
r.testRuntime,
)
backend, ok := r.testFramework.EmulatorBackend().(*EmulatorBackend)
if !ok {
Expand Down

0 comments on commit 252a387

Please sign in to comment.