Added tests for proper linking of generated types. Now these tests are failing to pass - will be fixed soon.

This commit is contained in:
Pavel Kirienko 2014-03-11 22:23:15 +04:00
parent d1d35760d4
commit 07bad40387
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,20 @@
/*
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#include <gtest/gtest.h>
#include <uavcan/FigureOfMerit.hpp>
/*
* Objective of this test is to make sure that the generated types are being linked correcly.
* This test requests the address of some static const member variables to make sure that there
* will be no duplicated symbol linking errors.
*/
TEST(DsdlConst1, FigureOfMerit)
{
using uavcan::FigureOfMerit;
std::cout << &FigureOfMerit::MAX << std::endl;
std::cout << &FigureOfMerit::MIN << std::endl;
std::cout << &FigureOfMerit::UNKNOWN << std::endl;
}

View File

@ -0,0 +1,16 @@
/*
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#include <gtest/gtest.h>
#include <uavcan/FigureOfMerit.hpp>
TEST(DsdlConst2, FigureOfMerit)
{
using uavcan::FigureOfMerit;
std::cout << &FigureOfMerit::MAX << std::endl;
std::cout << &FigureOfMerit::MIN << std::endl;
std::cout << &FigureOfMerit::UNKNOWN << std::endl;
}