Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Edit</strong> I understand this is not what you need. I'm leaving it here as community wiki as the comments are useful.</p> <p>Haha, well, whenever I see job adverts with the words: "requires test driven development" or "agile development methodologies" and the like I run the other way. I am strictly of the opinion that examining the problem and understanding the best way to solve it (do I work in a pair, or liaise regularly with the customer, or just write something against the hardware spec) is part of the job and doesn't need a fancy name and forcing on projects that don't need them. Rant over.</p> <p>I would say you don't need to, at least, you don't need to test the Windows API - you're testing functions for an API you can't modify anyway.</p> <p>If you're building a function that does some process on the output of a Windows API call, you can test that. Let's just say for example you are pulling Window Titles given a hWnd and inverting them. You can't test GetWindowTitle and SetWindowTitle, but you can test InvertString, which you wrote, simply by calling your function with "Thisisastring" and testing if the result of the function is "gnirtsasisihT". If it is, great, update a test score in the matrix. If it isn't, oh dear, whatever modifications you made broke the program, not good, go back and fix.</p> <p>There is a question as to if that's actually necessary, for such a simple function. Does having a test prevent any bugs sneaking in? How often is the algorithm likely to be miscompiled/broken by changes etc?</p> <p>Such tests are more useful on a project on which I work called MPIR, which builds against many different platforms. We run a build on each of these platforms then test the resultant binary to make sure the compiler hasn't created an error via optimisation, or something we've done in writing the algorithm doesn't do unexpected things on that platform. It's a check, to make sure we don't miss things. If it passes, great, if it fails, somebody goes and looks into why.</p> <p>Personally, I'm not sure exactly how an entire development process can be driven purely by tests. They're checks, after all. They don't tell you when it is time to make a significant change in direction in your codebase, just what you've done works. So, I'm going to go so far as to say TDD is just a buzzword. Somebody feel free to disagree with me.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload