Skip to content

Commit

Permalink
Add docstrings to action_rapid test and state_rapid_test to better ex…
Browse files Browse the repository at this point in the history
…plain what the files are doing
  • Loading branch information
p-offtermatt committed Sep 20, 2023
1 parent 2f961cf commit 760c67a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/e2e/action_rapid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ import (
"pgregory.net/rapid"
)

// This file contains tests for serialization/deserialization of actions.
// The tests are written using the rapid testing library, which allows us to
// generate arbitrary actions and test that they can be serialized and
// deserialized without error.
// The generators for the various actions are defined in this file, and
// essentially tell rapid how to build these actions.

func TestActionMarshalling(t *testing.T) {
rapid.Check(t, func(t *rapid.T) {
action := GetActionGen().Draw(t, "Action")
Expand Down
7 changes: 7 additions & 0 deletions tests/e2e/state_rapid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import (
"pgregory.net/rapid"
)

// This file contains tests for serialization/deserialization of state.
// The tests are written using the rapid testing library, which allows us to
// generate arbitrary state structs and test that they can be serialized and
// deserialized without error.
// The generators for the various parts of the state are defined in this file, and
// essentially tell rapid how to build the state.

func TestChainStateMarshalling(t *testing.T) {
rapid.Check(t, func(t *rapid.T) {
chainState := GetChainStateGen().Draw(t, "ChainState")
Expand Down

0 comments on commit 760c67a

Please sign in to comment.