55#include < lsl_cpp.h>
66#include < thread>
77
8+ // clazy:excludeall=non-pod-global-static
9+
810TEMPLATE_TEST_CASE (
911 " datatransfer" , " [datatransfer][basic]" , char , int16_t , int32_t , int64_t , float , double ) {
1012 const int numBounces = sizeof (TestType) * 8 ;
1113 double timestamps[numBounces][2 ];
1214 const char *name = SampleType<TestType>::fmt_string ();
13- lsl:: channel_format_t cf = ( lsl::channel_format_t ) SampleType<TestType>::chan_fmt;
15+ auto cf = static_cast < lsl::channel_format_t >( SampleType<TestType>::chan_fmt) ;
1416
1517 Streampair sp (create_streampair (
1618 lsl::stream_info (name, " Bounce" , 2 , lsl::IRREGULAR_RATE, cf, " streamid" )));
@@ -60,8 +62,8 @@ TEST_CASE("TypeConversion", "[datatransfer][types][basic]") {
6062 Streampair sp{create_streampair (
6163 lsl::stream_info (" TypeConversion" , " int2str2int" , 1 , 1 , lsl::cf_string, " TypeConversion" ))};
6264 const int num_bounces = 31 ;
63- std::vector<int32_t > data;
64- for (int i = 0 ; i < num_bounces; ++i) data. push_back ( 1 << i) ;
65+ std::vector<int32_t > data (num_bounces) ;
66+ for (int i = 0 ; i < num_bounces; ++i) data[i] = 1 << i;
6567
6668 sp.out_ .push_chunk_multiplexed (data);
6769
@@ -88,11 +90,11 @@ TEST_CASE("Flush", "[datatransfer][basic]") {
8890 }
8991 });
9092
91- double data_in, ts_in ;
92- ts_in = sp.in_ .pull_sample (&data_in, 1 .);
93+ double data_in;
94+ double ts_in = sp.in_ .pull_sample (&data_in, 1 .);
9395 REQUIRE (ts_in == Approx (data_in));
9496 std::this_thread::sleep_for (std::chrono::milliseconds (700 ));
95- int pulled = sp.in_ .flush () + 1 ;
97+ auto pulled = sp.in_ .flush () + 1 ;
9698
9799 for (; pulled < n; ++pulled) {
98100 INFO (pulled);
0 commit comments