eclipse-archived / ceylon.formatter

A formatter for the Ceylon programming language, written in Ceylon.
Apache License 2.0
14 stars 11 forks source link

Improve tests, use original file if .formatted absent #101

Closed lucaswerkmeister closed 9 years ago

lucaswerkmeister commented 9 years ago

Currently, each test sample has two files: We format x.ceylon and check if the result matches x.ceylon.formatted.

For almost all the tests I’ve recently written (where “recently” actually starts quite a while back – probably around 90%), those two files are identical, because if it takes several iterations until the test case is perfect, it’s easier to just keep the original formatted and copy it over instead of maintaining both an “ugly” and a “pretty” version separately.

This is of course a waste of effort – the test system should recognize when the x.ceylon.formatted file is missing, and then just use x.ceylon instead.