Add tests for checking data types

This commit is contained in:
2018-07-03 17:10:12 +02:00
parent 44e6ea18b3
commit 651895860d
2 changed files with 19 additions and 6 deletions
+17
View File
@@ -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);