Files
lab-rv32i-freertos-c-delay-…/tests/delay_state_model_host.c
T

18 lines
475 B
C

#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include "task01_delay_state_model.h"
int main( void )
{
const uint32_t exact[] = { 0U, 2U, 4U, 6U };
const uint32_t drift[] = { 0U, 2U, 5U, 7U };
assert( fc04_periods_are_exact( exact, 4U, 2U ) == 1 );
assert( fc04_periods_are_exact( drift, 4U, 2U ) == 0 );
assert( fc04_periods_are_exact( exact, 1U, 2U ) == 0 );
puts( "PASS FC04 model: exact periodic release deltas" );
return 0;
}