Jump to content
Sign in to follow this  
RobG

Unit tests in CCS project

Recommended Posts

Yes, that's pretty much it. Has anyone installed and used it in CCS environment?

I use JUnit on a daily basis (not for msp430 of course) and it's the one thing that I miss in CCS. It doesn't have to be as complex, could be just a simple launcher, something that will let me test functions without the need to use emulator.

Share this post


Link to post
Share on other sites

I just put a main() at the bottom of a .c file with a bunch of tests and surround it with #ifdefs. I then compile that file separately and load it onto the MSP430. Since I am using #ifdefs, the test code won't get compiled when I put it back into my project.

 

That is a manual "unit test" -- not sure if it is what you had in mind.

Share this post


Link to post
Share on other sites

Not really, this is pretty much what I do now. I don't want my tests to rely on msp430.

It would be nice to be able to select source file and launch Test session. Source would have testMain() surrounded in #ifdef (thanks for that suggestion.) I wonder if that can be achieved by adding new Configuration, which is based on Debug, but without msp430 stuff.

Another possibility, create C project with tests and include files from other, CCS projects.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...