MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / TEST

Function TEST

src/tests/utils/data_buffer_unittest.cpp:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13TEST (DataBufferTest, AddData_AddLessDataThanBufferCapacity_StoreAllData)
14{
15 DataBuffer buffer (4, 2);
16 double values[4] = {1.0, 2.0, 3.0, 4.0};
17 double retrieved[4];
18
19 buffer.add_data (values);
20 buffer.get_current_data (1, retrieved);
21
22 EXPECT_EQ (buffer.get_data_count (), 1);
23 for (int i = 0; i < 4; i++)
24 {
25 EXPECT_EQ (retrieved[i], values[i]);
26 }
27}
28
29TEST (DataBufferTest, AddData_AddEqualDataToBufferCapacity_StoreAllData)
30{

Callers

nothing calls this directly

Calls 5

get_current_dataMethod · 0.80
get_data_countMethod · 0.80
get_dataMethod · 0.80
is_readyMethod · 0.80
add_dataMethod · 0.45

Tested by

no test coverage detected