Commit Graph

16 Commits (a0197dba49bbe785c539b3840e57743303b6b8ee)

Author SHA1 Message Date
Antti Kauppila d6706d1a5f Unittest configuration mechanism improved
Earlier all unittests ended up having all flags in common from all unittest targets.
This is now improved by using googletest provided mechanism to set build time compile options
All cmake files have been modified to reflect changes (when needed)

Could not figure out a syntax for {0x00, 0x00, ..., 0x00} intitializer list yet,
so those needs to be setup by updating C/CXX flags.
2019-12-09 13:11:56 +02:00
Seppo Takalo c54d76eddf Allow MBED_ASSERT to throw errors in unittests, so we can verify it.
GoogleTest allows you to check whether certain function throws errors.
For example:
ASSERT_ANY_THROW(mbed::HeapBlockDevice one(3050, 100));
or
ASSERT_NO_THROW(bd.init());

As MBED_ERROR is now only function that can throw errors, there is
no need to check the type of thrown object.
2019-11-22 13:10:46 +02:00
Hugues Kamba b8bcc7face PwmOut: Add unit test 2019-11-01 09:35:41 +00:00
George Psimenos 3b23edb78c Fix CI for branch feature-public-headers (#11093)
* Fix rtos include path in NRFCordioHCIDriver
* Flatten USB driver directory structure
* Add missing include for us_ticker
* Add more missing includes for us_ticker
* Fix mbed_hal_fpga_ci_test_shield/uart test
* Fix bare-metal build
* Fix Watchdog UNITTEST
* Fix Mbed OS 2 build for Public/Internal headers relocating
2019-08-02 12:32:40 +01:00
Martin Kojtal 25fbd3956b Watchdog: remove VirtualWatchdog
We will provide documentation how to create your own VirtualWatchdog. It's simple,
create timeout and watchdog objects.

This class brought lot of discussion and questions. After our refactor we made this class
just a linked list of objects - something tickers can do as well (they already have linked list) and handling hw should be
done via Watchdog due to the limitations (timeout can be set only once per app!).
2019-07-02 12:46:23 +01:00
Filip Jagodzinski 968e270b0b Watchdog: Fix unittests
Compare get_timeout against the last timeout successfully set.
Merge most of the test cases into one. Do not rely on the tests
execution order.
Fix the watchdog_api_stub to keep timeout value set by init function.
2019-07-02 12:46:23 +01:00
Martin Kojtal fd445a57cb Watchdog: remove config value for timeout, set it dynamically
Use start method to set timeout
2019-07-02 12:46:23 +01:00
Martin Kojtal 89c0ab793e VirtualWatchdog: process fail test expects 0 as reset - no ticker running 2019-07-02 12:46:23 +01:00
Filip Jagodzinski cc7a3dd677 Fix more unittest errors 2019-07-02 12:46:23 +01:00
Filip Jagodzinski 1c12f9b2b0 Fix unittest errors 2019-07-02 12:46:23 +01:00
Martin Kojtal 529f4a2a7e unittest: add virtualwatchdog stub 2019-07-02 12:46:23 +01:00
Martin Kojtal 33f8b35917 watchdog unittest: fix naming after refactor 2019-07-02 12:46:23 +01:00
Martin Kojtal 4549a22566 unittest: move watchdog files to drivers
Test VirtualWatchdog and Watchdog
2019-07-02 12:46:23 +01:00
Martin Kojtal 2d77fccb09 Watchdog: update unittests 2019-07-02 12:46:23 +01:00
Rajkumar Kanagaraj f672974c25 Incorporated the Reivew Comments 2019-06-03 15:24:04 +02:00
Rajkumar Kanagaraj 47030cd23f SW watchdog unittest cases
-Added the mock class function to mock mbed_assert_internal
  -Added the unit test case to test start,kick,stop
  -Modified the interface api name from is_alive to process
  -added the unit test cases for process
2019-06-03 15:23:59 +02:00