Page 1 of 1

Make PureUnit more "prominent"

Posted: Sun May 18, 2014 8:29 pm
by c4s
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?!

Re: Make PureUnit more "prominent"

Posted: Sun May 18, 2014 8:39 pm
by freak
UnitDebug() only displays in verbose mode (-v) iirc.

Re: Make PureUnit more "prominent"

Posted: Sun May 18, 2014 9:23 pm
by c4s
Thanks freak, you're right. It's not mentioned in the readme file though.

Re: Make PureUnit more "prominent"

Posted: Tue Jan 06, 2015 10:22 pm
by rvrom
Hello,

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.

Re: Make PureUnit more "prominent"

Posted: Thu Jan 08, 2015 7:19 pm
by Mistrel
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.

Toolbar icon:
Image

Tool Arguments:

Code: Select all

/GUI %FILE
Example:
Image

Re: Make PureUnit more "prominent"

Posted: Thu Jan 08, 2015 8:05 pm
by freak
rvrom wrote:Hello,

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.

Re: Make PureUnit more "prominent"

Posted: Thu Jan 08, 2015 8:31 pm
by Bananenfreak
Heyho, this sounds a bit offtopic, but
What´s PureUnit?

Re: Make PureUnit more "prominent"

Posted: Fri Jan 09, 2015 2:14 am
by Shield
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. :)

Read Here: http://en.wikipedia.org/wiki/Unit_testing

Re: Make PureUnit more "prominent"

Posted: Fri Feb 27, 2015 8:27 am
by langinagel
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...

Greetings
LN

Re: Make PureUnit more "prominent"

Posted: Fri Feb 27, 2015 9:11 am
by Little John
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.