File tree Expand file tree Collapse file tree
test/cmocka/src/audio/kpb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,17 +228,30 @@ static void kpb_test_buffer_real_time_stream(void **state)
228228{
229229 struct comp_buffer * source_test ;
230230 struct comp_buffer * sink_test ;
231+ int ret ;
232+ struct test_case * test_case_data = (struct test_case * )* state ;
231233
232234 source_test = list_first_item (& kpb_dev_mock -> bsource_list ,
233235 struct comp_buffer ,
234236 sink_list );
235237 sink_test = list_first_item (& kpb_dev_mock -> bsink_list ,
236238 struct comp_buffer ,
237239 source_list );
238- /*Verify if we fetched proper sink and source */
240+
241+ /* Verify if we fetched proper sink and source */
239242 assert_ptr_equal (source , source_test );
240243 assert_ptr_equal (sink , sink_test );
241244
245+ /* Perform kpb_copy test */
246+ ret = kpb_drv_mock .ops .copy (kpb_dev_mock );
247+
248+ assert_int_equal (ret , 0 );
249+
250+ /* Verify if source was copied to sink */
251+ assert_memory_equal (source_data ,
252+ sink_data ,
253+ test_case_data -> period_bytes );
254+
242255}
243256
244257/* Always successful test */
You can’t perform that action at this time.
0 commit comments