200sc / bebop

bebop wire format in Go
Apache License 2.0
69 stars 5 forks source link

Write stress tests #20

Open 200sc opened 2 years ago

200sc commented 2 years ago

Write a test harness which will repeatedly:

  1. Generate a random, arbitrarily large bebop.File structure
  2. Write this structure out to a bop file (with formatting tooling) 2a. Randomly adjust this file in ways that maintain it as a valid bebop file (newlines and other whitespace, comments, etc)
  3. Read this structure back in
  4. Confirm that read structure matches the original structure
  5. Generate a go file from this new structure
  6. Confirm this go file compiles
  7. Confirm this go file contains a type definition for every type in the bebop definition

A harness like this would have detected #18 sooner.