mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 18:10:47 +02:00
formatting
This commit is contained in:
@@ -136,7 +136,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, size_t N>
|
template <typename T, size_t N>
|
||||||
void parse(std::array<T, N> &array)
|
void parse(std::array<T, N>& array)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < N; i++)
|
for (size_t i = 0; i < N; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define ASSERT_DOUBLE_ARRAY_EQ(fn, name) \
|
#define ASSERT_DOUBLE_ARRAY_EQ(fn, name) \
|
||||||
for (auto const& v : name) \
|
for (auto const& v : name) \
|
||||||
{ \
|
{ \
|
||||||
ASSERT_EQ(fn, v) << #name " failed parsing"; \
|
ASSERT_EQ(fn, v) << #name " failed parsing"; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include <gtest/gtest.h>
|
|
||||||
#include "ur_modern_driver/ur/robot_mode.h"
|
#include "ur_modern_driver/ur/robot_mode.h"
|
||||||
|
#include <gtest/gtest.h>
|
||||||
#include "ur_modern_driver/bin_parser.h"
|
#include "ur_modern_driver/bin_parser.h"
|
||||||
#include "ur_modern_driver/log.h"
|
#include "ur_modern_driver/log.h"
|
||||||
#include "ur_modern_driver/types.h"
|
|
||||||
#include "ur_modern_driver/test/utils.h"
|
|
||||||
#include "ur_modern_driver/test/random_data.h"
|
#include "ur_modern_driver/test/random_data.h"
|
||||||
|
#include "ur_modern_driver/test/utils.h"
|
||||||
|
#include "ur_modern_driver/types.h"
|
||||||
|
|
||||||
TEST(RobotModeData_V1_X, testRandomDataParsing)
|
TEST(RobotModeData_V1_X, testRandomDataParsing)
|
||||||
{
|
{
|
||||||
@@ -27,7 +27,6 @@ TEST(RobotModeData_V1_X, testRandomDataParsing)
|
|||||||
ASSERT_TRUE(bp.empty()) << "Did not consume all data";
|
ASSERT_TRUE(bp.empty()) << "Did not consume all data";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(RobotModeData_V3_0__1, testRandomDataParsing)
|
TEST(RobotModeData_V3_0__1, testRandomDataParsing)
|
||||||
{
|
{
|
||||||
RandomDataTest rdt(33);
|
RandomDataTest rdt(33);
|
||||||
@@ -51,7 +50,6 @@ TEST(RobotModeData_V3_0__1, testRandomDataParsing)
|
|||||||
ASSERT_TRUE(bp.empty()) << "Did not consume all data";
|
ASSERT_TRUE(bp.empty()) << "Did not consume all data";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(RobotModeData_V3_2, testRandomDataParsing)
|
TEST(RobotModeData_V3_2, testRandomDataParsing)
|
||||||
{
|
{
|
||||||
RandomDataTest rdt(41);
|
RandomDataTest rdt(41);
|
||||||
@@ -76,8 +74,6 @@ TEST(RobotModeData_V3_2, testRandomDataParsing)
|
|||||||
ASSERT_TRUE(bp.empty()) << "Did not consume all data";
|
ASSERT_TRUE(bp.empty()) << "Did not consume all data";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TEST(RobotModeData_V1_X, testTooSmallBuffer)
|
TEST(RobotModeData_V1_X, testTooSmallBuffer)
|
||||||
{
|
{
|
||||||
RandomDataTest rdt(10);
|
RandomDataTest rdt(10);
|
||||||
@@ -86,7 +82,6 @@ TEST(RobotModeData_V1_X, testTooSmallBuffer)
|
|||||||
EXPECT_FALSE(state.parseWith(bp)) << "parse() should fail when buffer not big enough";
|
EXPECT_FALSE(state.parseWith(bp)) << "parse() should fail when buffer not big enough";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(RobotModeData_V3_0__1, testTooSmallBuffer)
|
TEST(RobotModeData_V3_0__1, testTooSmallBuffer)
|
||||||
{
|
{
|
||||||
RandomDataTest rdt(10);
|
RandomDataTest rdt(10);
|
||||||
@@ -95,7 +90,6 @@ TEST(RobotModeData_V3_0__1, testTooSmallBuffer)
|
|||||||
EXPECT_FALSE(state.parseWith(bp)) << "parse() should fail when buffer not big enough";
|
EXPECT_FALSE(state.parseWith(bp)) << "parse() should fail when buffer not big enough";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(RobotModeData_V3_2, testTooSmallBuffer)
|
TEST(RobotModeData_V3_2, testTooSmallBuffer)
|
||||||
{
|
{
|
||||||
RandomDataTest rdt(10);
|
RandomDataTest rdt(10);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include <gtest/gtest.h>
|
|
||||||
#include "ur_modern_driver/ur/rt_state.h"
|
#include "ur_modern_driver/ur/rt_state.h"
|
||||||
|
#include <gtest/gtest.h>
|
||||||
#include "ur_modern_driver/bin_parser.h"
|
#include "ur_modern_driver/bin_parser.h"
|
||||||
#include "ur_modern_driver/log.h"
|
#include "ur_modern_driver/log.h"
|
||||||
#include "ur_modern_driver/types.h"
|
|
||||||
#include "ur_modern_driver/test/utils.h"
|
|
||||||
#include "ur_modern_driver/test/random_data.h"
|
#include "ur_modern_driver/test/random_data.h"
|
||||||
|
#include "ur_modern_driver/test/utils.h"
|
||||||
|
#include "ur_modern_driver/types.h"
|
||||||
|
|
||||||
TEST(RTState_V1_6__7, testRandomDataParsing)
|
TEST(RTState_V1_6__7, testRandomDataParsing)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user