Add print-cfg tests

This commit is contained in:
Morgan Phillips
2016-07-14 13:43:11 -07:00
parent 4e74d85056
commit 41d4cdba46
6 changed files with 118 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
CFG tests
============
This directory contains test cases for the Cretonne cfg printer.
Each test case consists of a `foo.cton` input file annotated with its expected connections.
Annotations are comments of the form: `ebbx:insty -> ebbz` where ebbx is connected to ebbz via
a branch or jump instruction at line y. Instructions are labeled by line number starting from zero: `inst0` .. `instn`.
Each input file is run through the `cton-util print-cfg` command and the
output is compared against the specially formatted comments to ensure that
expected connections exist. This scheme allows for changes to graph style
without the need to update tests.