Report
8 months, 1 week ago.

Step by step how write and execute unit test

Hi all, I tried make unit test function in my code but it don't work :(

for example I have simple function a+b = c:

include the mbed library with this snippet

int add(int value1, int value2) {
return value1 + value2;
}

I use Clion to write code, and have mbec-cli, mbedgt.

I read doc about test but there was not details how write unit test (expectedly for GreenTea an Icetea) . Someone can write how step by step write unit test to test this function in IDE and test it in target for example nucleo?

which framework for test is best: gtest, unity, catch.

Comment on this question

1 Answer

7 months, 2 weeks ago.

Hi, please read https://github.com/ARMmbed/mbed-os/tree/master/UNITTESTS that should explain all needed


You need to log in to post a question