From 01d7af5db577fe893006d398f6eb8f85c34faa1e Mon Sep 17 00:00:00 2001 From: Ardit Marku Date: Mon, 7 Aug 2023 19:33:15 +0300 Subject: [PATCH] Improve docstring wordings for Test contract --- runtime/stdlib/contracts/test.cdc | 14 +++++++------- runtime/stdlib/test_emulatorbackend.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/runtime/stdlib/contracts/test.cdc b/runtime/stdlib/contracts/test.cdc index 6888f740c2..cbfc3ed774 100644 --- a/runtime/stdlib/contracts/test.cdc +++ b/runtime/stdlib/contracts/test.cdc @@ -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) @@ -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? } @@ -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) } @@ -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 { diff --git a/runtime/stdlib/test_emulatorbackend.go b/runtime/stdlib/test_emulatorbackend.go index ecf2ef3cbb..cde1d1456c 100644 --- a/runtime/stdlib/test_emulatorbackend.go +++ b/runtime/stdlib/test_emulatorbackend.go @@ -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(