chore: add legacy_names to gtest (#5335)
This commit is contained in:
@@ -191,4 +191,28 @@ TEST(Lua, Switches)
|
||||
luaExecStr("if MIXSRC_SB == nil then error('failed') end");
|
||||
}
|
||||
|
||||
TEST(Lua, testLegacyNames)
|
||||
{
|
||||
MODEL_RESET();
|
||||
#if defined(SURFACE_RADIO)
|
||||
for (uint8_t i = 0; i < 2; i ++)
|
||||
anaSetFiltered(i, -1024);
|
||||
luaExecStr("value = getValue('thr')");
|
||||
luaExecStr("if value ~= -1024 then error('th not defined in Legacy') end");
|
||||
luaExecStr("value = getValue('ste')");
|
||||
luaExecStr("if value ~= -1024 then error('st not defined in Legacy') end");
|
||||
#else
|
||||
for (uint8_t i = 0; i < 4; i ++)
|
||||
anaSetFiltered(i, -1024);
|
||||
luaExecStr("value = getValue('thr')");
|
||||
luaExecStr("if value ~= -1024 then error('thr not defined in Legacy') end");
|
||||
luaExecStr("value = getValue('ail')");
|
||||
luaExecStr("if value ~= -1024 then error('ail not defined in Legacy') end");
|
||||
luaExecStr("value = getValue('rud')");
|
||||
luaExecStr("if value ~= -1024 then error('rud not defined in Legacy') end");
|
||||
luaExecStr("value = getValue('ele')");
|
||||
luaExecStr("if value ~= -1024 then error('ele not defined in Legacy') end");
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // #if defined(LUA)
|
||||
|
||||
Reference in New Issue
Block a user