Loading ...
Sorry, an error occurred while loading the content.

120198Re: [XP] Is there anyone who uses xp methods in embedded applications?

Expand Messages
  • Ian Collins
    Jun 1, 2006
    • 0 Attachment
      Micron Engineering wrote:

      >Ian Collins ha scritto:
      >
      >
      >>Micron Engineering wrote:
      >>
      >>
      >>
      >>
      >>>I would like to know some opinions about unit test implementations in
      >>>embedded applications (mainly in C and C++).
      >>>
      >>>
      >>>
      >>>
      >>>
      >>Yes, lots.
      >>
      >>All the recent embedded products at my last company where developed
      >>using XP. My preferred unit test framework is one of the CppUnit variants.
      >>
      >>All of the products were developed using TDD in a host environment, with
      >>acceptance tests that cold be run against a simulation on the host, or a
      >>real target. We tried various levels of hardware simulations, including
      >>a very detailed model of the embedded microcontroller which enabled us
      >>to TDD device drivers.
      >>
      >>We used the same tools for both C and C++ targets, the detailed
      >>simulations required the C code to be built as C++ which has its pros
      >>and cons.
      >>
      >>If you want any specific detail, please ask.
      >>
      >>
      >>
      >
      >I read some papers about unit tests and would like to compare my actual
      >approach with the list to see if my be improved or if it has a bad
      >implementation.
      >
      >

      I get the impression you are adding unit tests rather than doing TDD?

      Have a look at CppUnit or CppUnitLight. I haven't used the latter, but
      it appears to be popular.

      Look how these frameworks build their test cases and suites, notice that
      you do not have to pollute your target code with test code.

      I use CppUnit to test all of my C code, it works well with a couple of
      fiddles, mainly a macro for 'static' to make static data and function
      visible to the test harness.

      Have a good look and come back with some specific questions, I can give
      you some examples.

      Cheers,

      Ian.
    • Show all 14 messages in this topic