Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/misc/testing/TestConverter.cpp @ 727

Last change on this file since 727 was 727, checked in by bensch, 16 years ago

FICN: Added simple testing facilities to CMake.this is an example of how to implement Testing using CMake.

The Boolean cache-option TESTING_ENABLED can be triggered to enable all tests. Be aware to add all testing subdirectory includes into a IF(TESTING_ENABLED) clause.

File size: 252 bytes
Line 
1#include "Convert.h"
2#include <iostream>
3
4int main(int argc, char** argv)
5{
6  int input = 5;
7  std::string sub;
8  int output = 0;
9
10  ConvertValue(&sub, input);
11  ConvertValue(&output, sub);
12
13  if (input == output)
14    return 0;
15  else
16    return -1;
17}
Note: See TracBrowser for help on using the repository browser.