Loading…
C++Now 2014 has ended
Please visit the C++Now website.

Log in to bookmark your favorites and sync them to your phone or calendar.

users [clear filter]
Tuesday, May 13
 

2:30pm MDT

Test-Driven Development With Boost.Test and Turtle Mock, Part I
Test-driven development embraces three simple rules:

  1. You are not allowed to write any production code unless it is to make a failing unit test pass.

  2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.

  3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test. In short, with Test-Driven Development, you always write production code in response to a failing unit test.


In this tutorial, you will see how to apply the ideas of test-driven development in C++ using the Boost.Test unit testing framework. All the major areas of Boost.Test will be covered from assertions through test case design and organization. We will cover the difference between state-based testing and behavior based testing using mock objects provided through turtle mock, a mock object framework for Boost.Test.

First, you will walk through some exercises designed to show you the mechanics of test-driven development. Next, you will apply the concepts you have learned about test-driven development as a design activity to implement a feature. Once this tutorial is over, you will see how test-driven development is a powerful design activity that will naturally lead you to creating small, cohesive and decoupled classes.

Speakers
avatar for Richard Thomson

Richard Thomson

Senior Software Engineer, Fusion-io
Richard Thomson is a passionate software craftsman.  He has been writing C programs since 1980, C++ programs since 1993 and practicing test-driven development since 2006.  For 10 years, Richard was a Microsoft MVP for Direct3D, Microsoft's native C++ API for 3D graphics. His book... Read More →


Tuesday May 13, 2014 2:30pm - 4:00pm MDT
Bethe

4:30pm MDT

Test-Driven Development With Boost.Test and Turtle Mock, Part II
Test-driven development embraces 3 simple rules: 1. You are not allowed to write any production code unless it is to make a failing unit test pass. 2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures. 3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test. In short, with Test-Driven Development, you always write production code in response to a failing unit test.

In this tutorial, you will see how to apply the ideas of test-driven development in C++ using the Boost.Test unit testing framework. All the major areas of Boost.Test will be covered from assertions through test case design and organization. We will cover the difference between state-based testing and behavior based testing using mock objects provided through turtle mock, a mock object framework for Boost.Test.

First, you will walk through some exercises designed to show you the mechanics of test-driven development. Next, you will apply the concepts you have learned about test-driven development as a design activity to implement a feature. Once this tutorial is over, you will see how test-driven development is a powerful design activity that will naturally lead you to creating small, cohesive and decoupled classes.

Speakers
avatar for Richard Thomson

Richard Thomson

Senior Software Engineer, Fusion-io
Richard Thomson is a passionate software craftsman.  He has been writing C programs since 1980, C++ programs since 1993 and practicing test-driven development since 2006.  For 10 years, Richard was a Microsoft MVP for Direct3D, Microsoft's native C++ API for 3D graphics. His book... Read More →


Tuesday May 13, 2014 4:30pm - 6:00pm MDT
Bethe
 
Friday, May 16
 

9:00am MDT

Create Your Own Refactoring Tool with Clang
Refactoring tools for C++ have lagged behind those available in other languages. We've all heard the excuses about how C++ is too hard to parse and too hard to reason about. Well, get ready to have your socks blown off by the tooling infrastructure provided with clang. It makes writing refactoring tools simple and easy.

In this talk, I will incrementally develop a refactoring tool with clang that transforms a "(void)" function argument list to an empty argument list: "()".  This will give you a concrete example of how to apply the tooling library from clang: exploring the parsed abstract syntax tree (AST), writing code that matches elements of the AST, and operating on the matched nodes to create source code transformations that are applied by the tooling library.

If time is available, we'll look at some other examples of refactoring tools and discuss how they operate.

Speakers
avatar for Richard Thomson

Richard Thomson

Senior Software Engineer, Fusion-io
Richard Thomson is a passionate software craftsman.  He has been writing C programs since 1980, C++ programs since 1993 and practicing test-driven development since 2006.  For 10 years, Richard was a Microsoft MVP for Direct3D, Microsoft's native C++ API for 3D graphics. His book... Read More →


Friday May 16, 2014 9:00am - 10:30am MDT
Hudson