03 Jan 2013, 13:50
Generic-user-small

sungsu yi (1 post)

Hi everyone,

I’d like to apply TDD to my project that using Atmel studio. But I don’t know how to setup CppTest to atmel studio project.

Would you let me know some suggestion? Thank you.

18 Sep 2013, 16:18
Generic-user-small

Daniel Alves Grillo (2 posts)

Me too. I’m looking for a way to use TDD with Atmel Studio.

10 Dec 2013, 03:51
James2009_pragsmall

James Grenning (137 posts)

Hi

Sorry about the late reply.

Assuming Amtel has a Visual Studio like IDE, you could look at the setup for VS.

It is hard to anticipate where you could run into problems, but here is what I would do:

  • Create a static library project using amtel’s IDE.
  • Build all the c/cpp files in src/CppUTest. If some do not compile and you don’t see an easy fix, remove them from the build.
  • If that went well add src/CppUTestExt to the library too.

One of the areas that makes portability difficult is memory leak detection. You can turn leak detection off by defining the preprocessor symbolCPPUTEST_USE_MEM_LEAK_DETECTION=N

Once you have a lib, you will want to create its test runner. That means building everything in the tests directory (and tests/CppUTestExt if applicable) and linking it with the cpputest library. Now you will probably get unresolved externals due to not having a UTestPlatform.cpp file or because you excluded some problem files from the lib build.

The people at https://groups.google.com/forum/#!forum/cpputest can probably make some suggestions too.

Hope this helps. Send me an email if you get stuck.

James

  You must be logged in to comment