Document API IEC60730 Library
Functions

Header file list of test cases for the verification operate functions in irq module. More...

Functions

void test_sl_iec60730_irq_init_param_null (void)
 
void test_sl_iec60730_irq_init_param_size_greater_than_max_irq (void)
 
void test_sl_iec60730_irq_check_count_in_bound (void)
 
void test_sl_iec60730_irq_check_count_out_bound (void)
 
void test_sl_iec60730_irq_reset_counter (void)
 
void test_sl_iec60730_irq_fail_occur (void)
 
void test_sl_iec60730_irq_reset_fail_result (void)
 

Detailed Description

Header file list of test cases for the verification operate functions in irq module.

IEC60730 IRQ Unit Tests

These test cases run unit tests to check the operation of the functions in irq module.

Hardware setup:

Function Documentation

◆ test_sl_iec60730_irq_check_count_in_bound()

void test_sl_iec60730_irq_check_count_in_bound ( void  )

Public Check sl_iec60730_irq_check() operate

Returns
None.

After successful initialization, after calling function. If the test element has an irq_count between the irq_bounds max and min values, function sl_iec60730_safe_state() is not called.

◆ test_sl_iec60730_irq_check_count_out_bound()

void test_sl_iec60730_irq_check_count_out_bound ( void  )

Public Check sl_iec60730_irq_check() operate

Returns
None.

After successful initialization, after calling function. If the test element has an irq_count out of range the irq_bounds max and min values, function sl_iec60730_safe_state() is called.

◆ test_sl_iec60730_irq_fail_occur()

void test_sl_iec60730_irq_fail_occur ( void  )

Public Check sl_iec60730_irq_fail_occur() operate

Returns
None.

Check if the value of wrong interrupt count and wrong interrupt index passed into the function is equal to the value received from function sl_iec60730_get_irq_index_failed(), then test passes.

◆ test_sl_iec60730_irq_init_param_null()

void test_sl_iec60730_irq_init_param_null ( void  )

Public Check sl_iec60730_irq_init() operate

Returns
None.

If the passed param is NULL after call sl_iec60730_irq_check(), function sl_iec60730_safe_state() will be called (variable local is_function_called set true).

◆ test_sl_iec60730_irq_init_param_size_greater_than_max_irq()

void test_sl_iec60730_irq_init_param_size_greater_than_max_irq ( void  )

Public Check sl_iec60730_irq_init() operate

Returns
None.

If the param greater than IEC60730_MAX_IRQ_CHECK, function sl_iec60730_safe_state() will be called (variable local is_function_called set true).

◆ test_sl_iec60730_irq_reset_counter()

void test_sl_iec60730_irq_reset_counter ( void  )

Public Check sl_iec60730_irq_reset_counter() operate

Returns
None.

After calling this function, check the value of the irq_count element of the config variable passed to function sl_iec60730_irq_init(). If the value is 0, the test case passes.

◆ test_sl_iec60730_irq_reset_fail_result()

void test_sl_iec60730_irq_reset_fail_result ( void  )

Public Check sl_iec60730_irq_reset_fail_result() operate

Returns
None.

Check if the value of wrong interrupt count and wrong interrupt position received from function sl_iec60730_get_irq_index_failed() is 0 after calling sl_iec60730_irq_reset_fail_result() then test passes.