I just started writing tests for my include files using PureUnit. So far it's working pretty well! I wish I would have seen it way earlier because over the years automated tests could have saved me a lot of trouble... I think this important tool deserves much more love.
Some things I'm missing right now:
AssertEquals(ExpectedValue, ActualValue, Message$) - With something like that it would be possible to display the expected and actual result value if a test failed.
"official" IDE integration - Currently this rather important tool is very hidden and to make it work at all some things have to be configured, such as folding keywords, colors etc.
UnitDebug() doesn't seem to work?!
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
I've just now started using PureUnit as well and would also like to see it become a first-class citizen. I've created a new icon and added it to my toolbar to give this illusion but it would be great if it were implemented officially.
I use PureUnit GUI and have noticed that GUI tool has more features than console app.
For example, GUI supports "sources pattern", "process the whole directory" and "include subdirectories" features.
Does the console app support these features? Unfortunately, I've not found this information in PureUnitKeywords.txt file.
The intended use of the console program is to call it from a script or makefile. In such a case, tasks like processing a directory or applying a pattern can be performed by the script. This is why the console program does not have these features.
It allows you to write tests for your own procedures that allows the code to basically
check itself for correctness. Every time you change your code you can / should run
PureUnit and verify that your changes didn't break anything.
The question from Bananenfreak makes the point to this thread.
PureUnit is too much buried in the folder structure to get prominent of this fine tool.
I add to the list of feature requests:
-integration into IDE (Mistrels approach, see above)
!!! -Full feature description in the help files !!!
Please remember:
unit tests are a huge method for improving software quality.
Purebasic supports this method!!! Other program languages don't.
Why not brag around with real advantages?
...be prepared for the next request: PB static code checker...
c4s wrote:I just started writing tests for my include files using PureUnit. So far it's working pretty well! I wish I would have seen it way earlier because over the years automated tests could have saved me a lot of trouble... I think this important tool deserves much more love.
Absolutely!
Besides other points (which have already been mentioned), the file "PureUnit.res" should by default be located in the "Residents" subdirectory, so that it actually can be used by PB.