Skip to content

Commit

Permalink
Improve docstring wordings for Test contract
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Aug 8, 2023
1 parent c5a7641 commit ff06b1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions runtime/stdlib/contracts/test.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub contract Test {
return self.backend.events(type)
}

/// Resets the state of the blockchain at the given height.
/// Resets the state of the blockchain to the given height.
///
pub fun reset(to height: UInt64) {
self.backend.reset(to: height)
Expand Down Expand Up @@ -168,11 +168,11 @@ pub contract Test {
/// operations, such as transactions and scripts.
///
pub struct interface Result {
/// The resulted status of an executed operation.
/// The result status of an executed operation.
///
pub let status: ResultStatus

/// The optionally resulted error of an executed operation.
/// The optional error of an executed operation.
///
pub let error: Error?
}
Expand Down Expand Up @@ -309,7 +309,7 @@ pub contract Test {
///
pub fun events(_ type: Type?): [AnyStruct]

/// Resets the state of the blockchain at the given height.
/// Resets the state of the blockchain to the given height.
///
pub fun reset(to height: UInt64)
}
Expand Down Expand Up @@ -350,9 +350,9 @@ pub contract Test {
})
}

/// Asserts that the result of an executed operation, such as
/// scripts & transactions, has errored and the error message
/// contains the given sub-string.
/// Asserts that the result status of an executed operation, such as
/// a script or transaction, has failed and contains the given error
/// message.
///
pub fun assertError(_ result: {Result}, errorMessage: String) {
pre {
Expand Down
2 changes: 1 addition & 1 deletion runtime/stdlib/test_emulatorbackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ func (t *testEmulatorBackendType) newEventsFunction(
const testEmulatorBackendTypeResetFunctionName = "reset"

const testEmulatorBackendTypeResetFunctionDocString = `
Resets the state of the blockchain at the given height.
Resets the state of the blockchain to the given height.
`

func (t *testEmulatorBackendType) newResetFunction(
Expand Down

0 comments on commit ff06b1d

Please sign in to comment.