add {.raises.} annotations to test_fixture_operations (#5984)

Some more progress in making exception flow explicit.
This commit is contained in:
Etan Kissling 2024-02-28 12:54:29 +01:00 committed by GitHub
parent ac11f50b77
commit 4a74ef9cba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
{.push raises: [].}
{.used.}
import

View File

@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
{.push raises: [].}
{.used.}
import
@ -129,7 +130,7 @@ suite baseDescription & "Execution Payload " & preset():
proc makeApplyExecutionPayloadCb(path: string): auto =
return proc(
preState: var bellatrix.BeaconState, body: bellatrix.BeaconBlockBody):
Result[void, cstring] =
Result[void, cstring] {.raises: [IOError].} =
let payloadValid = os_ops.readFile(
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
).contains("execution_valid: true")

View File

@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
{.push raises: [].}
{.used.}
import
@ -146,7 +147,7 @@ suite baseDescription & "Execution Payload " & preset():
proc makeApplyExecutionPayloadCb(path: string): auto =
return proc(
preState: var capella.BeaconState, body: capella.BeaconBlockBody):
Result[void, cstring] =
Result[void, cstring] {.raises: [IOError].} =
let payloadValid = os_ops.readFile(
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
).contains("execution_valid: true")

View File

@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
{.push raises: [].}
{.used.}
import
@ -149,7 +150,7 @@ suite baseDescription & "Execution Payload " & preset():
proc makeApplyExecutionPayloadCb(path: string): auto =
return proc(
preState: var deneb.BeaconState, body: deneb.BeaconBlockBody):
Result[void, cstring] =
Result[void, cstring] {.raises: [IOError].} =
let payloadValid = os_ops.readFile(
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
).contains("execution_valid: true")

View File

@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
{.push raises: [].}
{.used.}
import