Friday, August 13, 2010

Automatic Face Construction Logic Fixed

Most unit tests were fixed and a new unit test was fixed. This unit test did try to show a bug that the automatic face detection was not working right. Most of other unit tests were fixed if were figured out the side effects. This change the pattern of executing unit test and previously the code was like: InitialSetup, Test1, ResetConfiguration, Test2, ResetConfiguration, Test3, etc. and the code right now is: InitialSetup, Test1, InitialSetup, Test2. This makes possible that the bugs of ResetConfiguraion to not happen. In this way also excluding two tests that try to extract invalid coordinates as those unit tests get no valid coordinates in the unit tests way, will give an exception on extracting plane under mouse (as the coordinate are invalid, the selection code is also invalid). There is a fake FacePicker code just for tests. So tests are mostly in place and working and they will also guarantee that as much as the battery of tests will grow that most of common failures that NaroCAD sometimes encounter because of a refactor or a new feature is in place, it will not affect basic functionality that is covered by all those unit tests.

No comments: