Make PureUnit more "prominent"

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Make PureUnit more "prominent"

Post 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?!
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Make PureUnit more "prominent"

Post by freak »

UnitDebug() only displays in verbose mode (-v) iirc.
quidquid Latine dictum sit altum videtur
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Make PureUnit more "prominent"

Post by c4s »

Thanks freak, you're right. It's not mentioned in the readme file though.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
rvrom
New User
New User
Posts: 5
Joined: Sun Jul 27, 2014 6:25 pm

Re: Make PureUnit more "prominent"

Post 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.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Make PureUnit more "prominent"

Post 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
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Make PureUnit more "prominent"

Post 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.
quidquid Latine dictum sit altum videtur
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: Make PureUnit more "prominent"

Post by Bananenfreak »

Heyho, this sounds a bit offtopic, but
What´s PureUnit?
Image
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Make PureUnit more "prominent"

Post 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
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
langinagel
Enthusiast
Enthusiast
Posts: 131
Joined: Fri Jan 28, 2005 11:53 pm
Location: Germany
Contact:

Re: Make PureUnit more "prominent"

Post 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
https://www.doerpsoft.org

Boost. Work. Efficiency.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Make PureUnit more "prominent"

Post 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.
Post Reply