mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-02 01:22:23 +02:00
Add tests for checking data types
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include "../src/ZmqReceiver.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
TEST(ZmqReceiver, get_type_byte_size)
|
||||
{
|
||||
EXPECT_TRUE(get_type_byte_size("uint8") == 1);
|
||||
EXPECT_TRUE(get_type_byte_size("int8") == 1);
|
||||
EXPECT_TRUE(get_type_byte_size("uint16") == 2);
|
||||
EXPECT_TRUE(get_type_byte_size("int16") == 2);
|
||||
EXPECT_TRUE(get_type_byte_size("uint32") == 4);
|
||||
EXPECT_TRUE(get_type_byte_size("int32") == 4);
|
||||
EXPECT_TRUE(get_type_byte_size("float32") == 4);
|
||||
EXPECT_TRUE(get_type_byte_size("uint64") == 8);
|
||||
EXPECT_TRUE(get_type_byte_size("int64") == 8);
|
||||
EXPECT_TRUE(get_type_byte_size("float64") == 8);
|
||||
}
|
||||
@@ -1,11 +1,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "RingBuffer.hpp"
|
||||
#include "test_ZmqReceiver.cpp"
|
||||
|
||||
TEST(RingBufferTest, simple_operation)
|
||||
{
|
||||
|
||||
EXPECT_EQ(1000, 1000);
|
||||
}
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
Reference in New Issue
Block a user