Stand by...

Archive for the ‘C++’ Category

New training: Google Test – Introduction to asserts and expects

Today I have published first training from Agile C++ Developer series: Google Test – Introduction to asserts and expects. This is my first approach to this kind of training so every comments will be valuable. This training is for Google Test beginners. Have a nice read.

How to open file in testable way?

One of the most common problems in Test-Driven Development are parts of code which need to make some calls to your system environment. In general you is such situation you are forced to use some global functions which are really hard to test or mock. So lets look on some code and lets try to make it more testable.

How to test main()?

When you are doing Test-Driven Development you try to test what ever you wrote. Better you write tests before you write any line of code. But finally when you have your brand new functions and classes (all 100% covered by tests) you have to integrate it in some working software. In the very end (or begining) you have to write main(int, char**) function. How do you test it using Unit Tests?

Funny little nasty bug

Some time ago I was writing some piece of code in which there was a part where I have to concatenate strings differently depending on some flag. Easy thing. So I wrote some few lines of code and to my great surprise it does not work.

CMake/CPack/CTest/CDash Open Source Tools to Build Test and Deploy C++ Software

Bill Hoffman gave a Google Tech Talk on 7 December 2009 at Google’s New York city office on CMake, CTest, CDash and CPack.