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
LedControllerTest.cpp
00001 #include "gmock/gmock.h" 00002 #include "gtest/gtest.h" 00003 00004 #include "LedController.hpp" 00005 #include "mocks/MockDigitalOut.hpp" 00006 00007 TEST(LedController, TurnOn) 00008 { 00009 MockDigitalOut mock_digital_out; 00010 LedController led_controller(mock_digital_out); 00011 00012 EXPECT_CALL(mock_digital_out, write(1)) 00013 .Times(1); 00014 00015 led_controller.turn_on(); 00016 } 00017 00018 TEST(LedController, TurnOff) 00019 { 00020 MockDigitalOut mock_digital_out; 00021 LedController led_controller(mock_digital_out); 00022 00023 EXPECT_CALL(mock_digital_out, write(0)) 00024 .Times(1); 00025 00026 led_controller.turn_off(); 00027 }
Generated on Thu Jul 14 2022 01:50:38 by
1.7.2
