Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LedController mbed-rtos mbed NerfUSXbee Servomotor TargetManager
Fork of NerfUS by
Diff: TESTS/HardwareInterfaceImportTest.cpp
- Revision:
- 13:850be84c78dd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TESTS/HardwareInterfaceImportTest.cpp Thu Feb 16 12:34:00 2017 -0500 @@ -0,0 +1,19 @@ +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "HardwareInterface.hpp" + +class MockHardwareLPC1768 : public HardwareInterface +{ + public: + MOCK_METHOD0(blink, void()); +}; + +TEST(ImportingLibraryFromMbedOrg, IsPossibleToMockInterface) +{ + MockHardwareLPC1768 hardwareLPC1768; + + EXPECT_CALL(hardwareLPC1768, blink()); + + hardwareLPC1768.blink(); +} +