Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose CoverageReport through Emulator interface #362

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ import (
"context"
"errors"
"fmt"
"github.com/logrusorgru/aurora"
"strings"
"sync"
"time"

"github.com/logrusorgru/aurora"

"github.com/onflow/cadence"
"github.com/onflow/cadence/runtime"
"github.com/onflow/cadence/runtime/common"
Expand Down
6 changes: 6 additions & 0 deletions server/backend/emulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package backend

import (
"github.com/onflow/cadence/runtime"
"github.com/onflow/cadence/runtime/interpreter"
emulator "github.com/onflow/flow-emulator"
sdk "github.com/onflow/flow-go-sdk"
Expand All @@ -29,9 +30,14 @@ import (

// Emulator defines the method set of an emulated blockchain.
type Emulator interface {
// Debugger
SetDebugger(*interpreter.Debugger)
EndDebugging()

// CoverageReport
CoverageReport() *runtime.CoverageReport
SetCoverageReport(coverageReport *runtime.CoverageReport)

AddTransaction(tx sdk.Transaction) error
ExecuteNextTransaction() (*types.TransactionResult, error)
ExecuteBlock() ([]*types.TransactionResult, error)
Expand Down
27 changes: 27 additions & 0 deletions server/backend/mocks/emulator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.