MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / TEST

Function TEST

libraries/AP_JSButton/tests/test_jsbutton.cpp:6–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4const AP_HAL::HAL& hal = AP_HAL::get_HAL();
5
6TEST(JSButtonTest, Test)
7{
8 JSButton jsbutton;
9 EXPECT_EQ(jsbutton.function(), JSButton::k_none);
10 EXPECT_EQ(jsbutton.function(true), JSButton::k_none);
11 jsbutton.set_default(JSButton::k_shift, JSButton::k_arm_toggle);
12 EXPECT_EQ(jsbutton.function(), JSButton::k_shift);
13 EXPECT_EQ(jsbutton.function(true), JSButton::k_arm_toggle);
14}
15
16AP_GTEST_MAIN()

Callers

nothing calls this directly

Calls 2

functionMethod · 0.80
set_defaultMethod · 0.45

Tested by

no test coverage detected