mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpimath] Add remaining struct and protobuf implementations (#5953)
This commit is contained in:
23
wpimath/src/test/native/cpp/struct/MatrixStructTest.cpp
Normal file
23
wpimath/src/test/native/cpp/struct/MatrixStructTest.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../StructTestBase.h"
|
||||
#include "frc/EigenCore.h"
|
||||
#include "frc/struct/MatrixStruct.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
struct MatrixStructTestData {
|
||||
using Type = Matrixd<2, 3>;
|
||||
|
||||
inline static const Type kTestData{{1.1, 1.2, 1.3}, {1.4, 1.5, 1.6}};
|
||||
|
||||
static void CheckEq(const Type& testData, const Type& data) {
|
||||
EXPECT_EQ(testData, data);
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Matrix, StructTest, MatrixStructTestData);
|
||||
Reference in New Issue
Block a user