adam-mcdaniel / oakc

A portable programming language with a compact intermediate representation
Apache License 2.0
725 stars 21 forks source link

better implementation of machine_dump for TypeScript backend and a testing script #70

Closed dospunk closed 4 years ago

dospunk commented 4 years ago

The testing script is the big addition here. It allows you to test the output of an Oak program compiled with the C backend against the output of the same program compiled with any other backend.

Flags:
     -b: the backend to be tested (ex. "--cc", "--go")
         best to use the "--" version of the flag to avoid clashing with 
         this program's flags
     -r: the command to run the output of the test backend (ex. "./main")
     -f: the file to be tested (ex. "./examples/num.ok")
     -v: verbose output, optional
adam-mcdaniel commented 4 years ago

Yay!!!! This will be incredibly handy when writing new backend implementations. I'm very excited.

dospunk commented 4 years ago

It's been very helpful for me already!