Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Unit Testing (Read 10885 times)
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Unit Testing
Apr 17th, 2012 at 7:50pm
Print Post  
Is there a way to perform unit testing?

I think this is a great way to produce stable code especially when debugging (stepping through code) is so hard to make.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unit Testing
Reply #1 - May 4th, 2012 at 7:17am
Print Post  
sorry i missed this message. how would you expect unit tests to work? it sounds like a good idea
  
Back to top
WWW  
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Unit Testing
Reply #2 - May 6th, 2012 at 10:45am
Print Post  
I sort of got it working with the normal managed VS unit test prject (for C++). You have to switch from safe CLR to just CLR in the project settings. I simply include the source files from the main project in the unit test (class) I'm working on. External reference to Arduino specific header files are stubbed.

For now this allows me to test my new library I'm working on although I'm still interested in experiences from other users...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unit Testing
Reply #3 - May 6th, 2012 at 8:28pm
Print Post  
Interesting if you get time please email your solution and sources to info at visualmicro .com

+ I wonder if vm should always set CLR. 

+ I would like to improve the intellisense for some of the deeper avr functions, seems to work better when using Project>Show All Arduino files. 

Interested to hear any thoughts now or in the fture
  
Back to top
WWW  
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Unit Testing
Reply #4 - May 9th, 2012 at 7:12pm
Print Post  
Here is the start of a lib I'm working on, the Arduino Template Library (ATL).

http://atl.codeplex.com

It uses a normal VS C++ Test project with the clr setting tweaked. Just started the project so I have not encountered all the issues to be solved, I'm sure.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unit Testing
Reply #5 - May 14th, 2012 at 12:26pm
Print Post  
Yes I have been watching your atl project. It's a really good idea!

I am going to put a link on the main site to your codeplex project.

It would be great to see a number of different templates. Also very useful for new users.
« Last Edit: May 14th, 2012 at 12:28pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Unit Testing
Reply #6 - May 15th, 2012 at 12:14pm
Print Post  
Cool! Thanx!  Cool
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unit Testing
Reply #7 - Jun 5th, 2012 at 10:59pm
Print Post  
I forgot to put a link to your project in the members email that I sent today. I also screwed up the formatting of the email Smiley When the debug tools are released I will add a link and a message about your site. Sorry
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint