C ++ and the correct TDD

Hello! I recently tried developing a small project in C#, and throughout the project, our team used the Test-Driven-Development ( TDD) ( xunit, moq) method .

I really think it was awesome, because (when pairing with C#) this approach allowed me to relax when coding, to relax when projecting and relaxing when refactoring. I suspect that all of these TDDfiles actually simplify the coding process and, well, this allowed (in the end, for me) to get the same result with fewer brain cells.

Immediately after that, I tried to use it TDDin tandem with C++(I used the Google Testand libraries Google Mock), and I don’t know why, but I really think that TDD here was a step backwards for the conditions of rapid application development.

I had some moments when I had to spend a huge amount of time thinking about my tests, build the correct layouts, rebuild them and swear on my monitor.

And, well, I obviously can't ask something like "what did I do wrong?" or β€œwhat was wrong with my approach?” because I don’t know what to describe. But if there are people who are used to TDDin C++(and possibly C#), could you advise me how to do it properly.

, , - TDD & C++, .

+5
4

, TDD ++, #. ( ) ( ) .

unit test ++, , , , .

TDD . Python. # ( , )

++ . , , , , . .

+3

TDD - , , , . , , , , , , , TDD . , , , , , TDD. , , , "" .

, , - . , ? , , , , ? , , TDD ?

, Sudoku Solver TDD, . , , , TDD , , - TDD.

+4
+2

I believe that test-based development is very complicated to do everything right; sometimes tests just flow, sometimes it takes a little jump. To speed things up, I often move away from the TDD approach. This is not a problem for me, since I support a complete set of unit tests for all the code that I "completed" (allowing relaxation when coding new bits and refactoring).

+1
source

All Articles