Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I basically want to test a particular method multiple times with different data (>50 different datasets).
Is there any way to easily execute a test and pass it some custom data? The pseudocode below should demonstrate what I mean:
for (int i = 0; i < 50; i++)
You can't pass data directly to unit tests, but you could have multiple unit tests call a function that takes as a parameter this test data.
u can do this with a CppUnit::TestCase.
-u can create for example a costum Class , MyClass: public TestCase
-pass the data in the class constructor
-implement the virtual void runTest() function of TestCase Class
After that u create a CppUnit::TestSuite that contain all your Tests with the right parameters.
-u add the suite to your TestRunner
-and run them
Sorry for my bad english ;)