Friday, February 17, 2012

Unit Test Side-Track

My casual attempt to code up some "quick" unit tests.
Has resulted in using the whole day to make up a unit-test framework.
Hopefully it will pay off with faster productivity...

Originally I had decided that from now on all my classes would have
their own static method called "UNIT_TEST" from which my master unit test
module would call.

Problems with this model:
[1]: Bloating of compiled .swf.
Flash Develop has optional compiler directives you can use.
But I want my code to be pure AS3.
More about that here: CONFIG::debug
http://divillysausages.com/blog/as3_conditional_compilation
[2]: Navigating through class to edit is harder because now
there is more text to dig through. Find and Replace method
will often put you into the unit-test code when you are trying
to correct errors in your class. This is especially true when
your unit test is very thorough.

New Model:
Since all my classes are in a folder with the SAME name,
there will be an accompanying file called "UNIT_TEST.as"
in that folder.

No comments:

Post a Comment