diff --git a/rapidproto/rapidproto_test.go b/rapidproto/rapidproto_test.go deleted file mode 100644 index 132876e..0000000 --- a/rapidproto/rapidproto_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package rapidproto_test - -import ( - "fmt" - "testing" - - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - "gotest.tools/v3/assert" - "gotest.tools/v3/golden" - "pgregory.net/rapid" - - "github.com/cosmos/cosmos-proto/rapidproto" - "github.com/cosmos/cosmos-proto/testpb" -) - -// TestRegression checks that the generator still produces the same output -// for the same random seeds, assuming that this data has been hand expected -// to generally look good. -func TestRegression(t *testing.T) { - gen := rapidproto.MessageGenerator(&testpb.A{}, rapidproto.GeneratorOptions{}) - for i := 1000; i < 1005; i++ { - testRegressionSeed(t, i, gen) - } -} - -func testRegressionSeed[X proto.Message](t *testing.T, seed int, generator *rapid.Generator[X]) { - x := generator.Example(seed) - bz, err := protojson.Marshal(x) - assert.NilError(t, err) - golden.Assert(t, string(bz), fmt.Sprintf("seed%d.json", seed)) -} diff --git a/rapidproto/testdata/seed1000.json b/rapidproto/testdata/seed1000.json deleted file mode 100644 index 4294f9d..0000000 --- a/rapidproto/testdata/seed1000.json +++ /dev/null @@ -1 +0,0 @@ -{"someBoolean":true, "INT32":112, "SINT32":20861, "UINT32":39, "INT64":"1916", "SING64":"-208", "UINT64":"95", "SFIXED32":-4267293, "FIXED32":56, "FLOAT":-0.061933517, "SFIXED64":"-128961679122", "FIXED64":"56609281", "DOUBLE":-4.2137932902833315e+218, "STRING":"a", "BYTES":"EQzPLBA1mwUBCQ==", "MAP":{"ž󠀶×a)?c":{"x":"Ʉ⃞➋-"}}, "ONEOFSTRING":"Aা𑅅҉^*[ॎ{؂Ⱥ\n@^