mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 10:00:35 +08:00
Added tests for proper linking of generated types. Now these tests are failing to pass - will be fixed soon.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user