plow-technologies / inferno

A statically-typed functional scripting language
MIT License
4 stars 1 forks source link

Define an Arbitrary instance for VCObject for golden tests #31

Closed siddharth-krishna closed 1 year ago

siddharth-krishna commented 1 year ago

The inferno-vc-server executable serializes VCObjects into files, and we don't have golden tests for these. This PR adds the appropriate Arbitrary type class instances needed to generate golden files.

I've moved the Arbitrary Expr instance from test/Parse/Spec.hs into a new module Inferno.Utils.Arbitrary. This is because it needs to be used both by the tests in inferno-core as well as the Arbitrary VCObject instance in inferno-vc. Unfortunately, this is for some reason a dependency conflict... not sure why yet.

To do: