As long as the changes are improvements, sure we'll accept them. I suggest to work with them one at the time via pull requests on github. Have you used github before?
Heath, do you mind if I put your report on the cpputest webpages?
Impressive documentation... You will find my take at AllTests.cpp, which I called AllTestsForTarget.cpp, at [ \project\CCStudio\tests ]
I do think that they are a bit hard to find there, and since they would basically work the same for all embedded targets, maybe we can find a better place to keep them, so they can serve IAR, CCStudio or what have you.
Error[Pe276]: name followed by "::" must be a class or namespace name
C:\COM\SRC\cpputest35\include\CppUTest\SimpleString.h 143 I tried the following line in order to silence the error, it seems to work because it reduce the errors to 11.#define std // Nothing hereAnyway, I don't think I'm on the right path because then I get errors relating to Try catch blocks. If this is not supported then I guess most of other structures are not supported either.
The caveat is that memory leakage checks may not work any more, and static objects might not be destroyed. Still if this modification enables any unit testing, I'd say it's worth the price.
I still didn't manage to get CppUTest runner to work in Eclipse. If I have the spare time some day, maybe I'll try again. Problem seems to be in how Eclipse runs the simulator; CSspyBat yields different output when run from command line and from Eclipse.
Juho
--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "cpputest" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cpputest/WxCfnVZYGHw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cpputest+u...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<IAR Build errors.txt>
- Project -> Options -> General Options -> Library Configuration -> Library low-level interface implementation = Semihosted
int main(int ac, char** av)
{const char * av_override[] = {"exe", "-v"};return CommandLineTestRunner::RunAllTests(2, av_override);}
int main(int ac, char** av){
On 3 Aug 2017, at 12:49 am, Cameron Fedde <crf...@gmail.com> wrote:Hey Heath, thanks so much for the fast response! You're right, I changed line 258 of CppUTestConfig.h to define _override to nothing:>258 #define _overrideand I'm no longer getting the number of errors as I was getting before. However, now I'm running into another error:
Error[Pe167]: argument of type "void *" is incompatible with parameter of type "unsigned char const *" C:\Users\...\cpputest-3.8\tests\CppUTestExt\MockSupport_cTestCFile.c 61Error[Pe167]: argument of type "void *" is incompatible with parameter of type "unsigned char const *" C:\Users\...\cpputest-3.8\tests\CppUTestExt\MockSupport_cTestCFile.c 74with lines 61 and 74 being:>61 withMemoryBufferParameter("name", (void*) 1, 0UL)->>74 withMemoryBufferParameter("name", (void*) 1, 0UL)->so I will try to debug it, but if you know of this issue as well, I appreciate any input! Thanks!
--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/b5b7e0e1-535f-4381-aa5c-6a927fb1c9a2%40googlegroups.com.
Hello Akshata
I might be able to help you find a solution. CppUTest relies on file scope initialization to install test cases into the test runner.
Sparing some of the details, the TEST macro causes a static instance of a TestInstaller to be defined for each TEST. The C++ compiler is responsible for initializing file-scope static data and objects before main starts. This means that file-scope constructors must be called before main for C++ file-scope static objects. Running the TestInstaller constructor adds a TestShell to the list of all tests. RUN_ALL_TESTS uses that list.
I suspect that there is a function that you need to call that runs all the constructors your pre-main initialization. I've seen this function before another compiler with has ctor in its name. Hopefully with these clues you can find the function that your per-main need to call to do its job. If you have production code C++ file-scope objects they probably are not being constructed either.
Here's the TEST macro if you really want to look under the hood.
#define TEST(testGroup, testName) \
/* External declarations for strict compilers */ \
class TEST_##testGroup##_##testName##_TestShell; \
extern TEST_##testGroup##_##testName##_TestShell TEST_##testGroup##_##testName##_TestShell_instance; \
\
class TEST_##testGroup##_##testName##_Test : public TEST_GROUP_##CppUTestGroup##testGroup \
{ public: TEST_##testGroup##_##testName##_Test () : TEST_GROUP_##CppUTestGroup##testGroup () {} \
void testBody(); }; \
class TEST_##testGroup##_##testName##_TestShell : public UtestShell { \
virtual Utest* createTest() _override { return new TEST_##testGroup##_##testName##_Test; } \
} TEST_##testGroup##_##testName##_TestShell_instance; \
static TestInstaller TEST_##testGroup##_##testName##_Installer(TEST_##testGroup##_##testName##_TestShell_instance, #testGroup, #testName, __FILE__,__LINE__); \
void TEST_##testGroup##_##testName##_Test::testBody()
I hope that helps, James
James Grenning - Author of TDD for Embedded C - wingman-sw.com/tddec
Ask me about my web delivered TDD training.
wingman-sw.com
wingman-sw.com/blog
twitter.com/jwgrenning
facebook.com/wingman.sw

To unsubscribe from this group and stop receiving emails from it, send an email to cppu...@googlegroups.com.
Great! Glad you fixed it.
Cheers, James
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/42a6a96b-5c55-4aed-b683-4805b7ea6fbb%40googlegroups.com.