LogikSim / LogikSimPython

Python prototype of a digital logic simulator
http://www.logiksim.org/
GNU General Public License v3.0
2 stars 1 forks source link

Unittests for line drawing logic #19

Closed christianbrugger closed 9 years ago

christianbrugger commented 10 years ago

The code for inserting lines contains complex logic for drawing and merging. Testing the code by hand is getting harder and harder, since the code has many edge cases. This makes it very easy to break things accidentally.

To allow refactoring, we have to find a way to systematically test this part of the code.

hacst commented 10 years ago

Unfortunately there's a bit of coupling to the UI in there (e.g. for overlap checks). Shouldn't be impossible to work around though.

hacst commented 9 years ago

With #21 I guess we could not actually test some of it with integration tests using GUI. However I think being able to really unit test it would still be preferable. In any case. We should work getting rid of some of that red: https://coveralls.io/files/343750320 ;)

christianbrugger commented 9 years ago

Added visual regression tests covering critical parts of the line inserting logic.