From the course: Test-Driven Development in C++

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Example: TDD session, the FizzBuzz kata

Example: TDD session, the FizzBuzz kata - C++ Tutorial

From the course: Test-Driven Development in C++

Example: TDD session, the FizzBuzz kata

- [Instructor] In this lecture, we're going to walk through an actual test-driven development coding session. For the example, we'll be using the fizzBuzz code kata. The name kata comes from martial arts and means training exercises. So code kata are training exercises for programmers. The fizzBuzz Kata is pretty simple. We'll be implementing a function that is passed in an integer value as an input and the function will return the string fizz if the passed-in number is a multiple of three, Buzz if the passed-in number is a multiple of five, and fizzBuzz if the passed-in number is a multiple of three and five. If the value is not a multiple of three or five, then the value itself is returned as a string. I'll be using Eclipse as my IDE for this example, and all the example coding sessions for this course. But the TDD process should apply regardless of the IDE you're using. In some of the future lectures, I'll show you how to build and use Google tests and some of the other common IDEs…

Contents