unit tests

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Yogibear
Retired Developer
Posts: 1086
Joined: September 16th, 2005, 5:44 am
Location: Hamburg, Germany

unit tests

Post by Yogibear »

Is it common practice to provide unit tests for your code? I haven't seen any yet.
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!
Niels
Posts: 12
Joined: August 11th, 2005, 9:40 am

Post by Niels »

"test driven development" is not common practice!!!
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

I think unit testing can work well, if it's done right. However, we don't use unit tests in Wesnoth development.

One of the big dangers of unit testing is for it to add a heap of bueracracy and overhead to all changes you make, with little tangible benefit in many cases. If you want to do unit tests, you have to make really really sure you do them in the right way and for the right reasons otherwise they can be far more trouble than they're worth.

Alot of basic unit testing for a language like Python is taken care of by the checks the C++ compiler does, which is a very nice bonus for developing in C++.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
melune
Posts: 4
Joined: December 3rd, 2005, 4:44 pm
Location: Wesnoth

I do.

Post by melune »

I don't know about you, but I test mine on my backed-up Wesnoth2, 3, and UNITTESTER files and test with multiplayer against the AI, or with Local so I am controlling all sides. I create tons of units on my back-up Wesnoths, but I am no good at making images or coding anything but new advancements, because I use debug then create, Wow, I am saying this long.
Proud to have been playing Wesnoth since Version 7.9
(well with like 4 year breaks
True-Akira
Posts: 5
Joined: December 17th, 2005, 10:18 pm
Contact:

Post by True-Akira »

THe Topic is "Units" so i hope its correct i ask in this topic...
Can someone tell me, what i do wrong, if i want to open the unitdescription of my own creature and a error reveal... The result is, that i can't read my description and the game hung up...

Add: I can play the Character in the game without an error.

I hope there is sombody who know my prob and can help me out....
Yogibear
Retired Developer
Posts: 1086
Joined: September 16th, 2005, 5:44 am
Location: Hamburg, Germany

Post by Yogibear »

Hmm, this has nothing to do with unit tests, which are a means of software development. But since that issue is clarified anyway i don't mind using my thread for it.

But for making the right persons read this, i suggest to split the thread and move your question to "Technical Support". Maybe you can give some more information:
- Which unit description caused this?
- Are you referring to the help system or the status bar information?
- Which version of wesnoth are you using?
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!
Post Reply