Begin work on setidle unit tests

This commit is contained in:
Ciaran Woodward
2021-12-14 14:15:48 +00:00
parent 8799f5f36e
commit 5be97ac227
3 changed files with 97 additions and 32 deletions

View File

@@ -573,3 +573,16 @@ void test_modification_with_subsequent_preparation( void )
reportDescPtr = hidGetReportDescriptor();
TEST_ASSERT_NOT_NULL( reportDescPtr );
}
//setIdle functionality tests
void test_set_idle( void )
{
unsigned reportId = 0;
unsigned setIdle = hidIsIdleActive( reportId );
TEST_ASSERT_EQUAL_UINT( 0, setIdle );
hidSetIdle( reportId, 1 );
setIdle = hidIsIdleActive( reportId );
TEST_ASSERT_EQUAL_UINT( 1, setIdle );
}