mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 12:24:07 +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:
parent
d1d35760d4
commit
07bad40387
20
libuavcan/test/dsdl_test/dsdl_const_1.cpp
Normal file
20
libuavcan/test/dsdl_test/dsdl_const_1.cpp
Normal 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;
|
||||
}
|
||||
16
libuavcan/test/dsdl_test/dsdl_const_2.cpp
Normal file
16
libuavcan/test/dsdl_test/dsdl_const_2.cpp
Normal 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;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user