8#include <framework/gearbox/Unit.h>
10#include <framework/utilities/TestHelpers.h>
12#include <gtest/gtest.h>
20 TEST(UnitTest, MultiplyDivide)
25 EXPECT_DOUBLE_EQ(1.0, length);
27 EXPECT_DOUBLE_EQ(10.0, length /
Unit::mm);
28 EXPECT_DOUBLE_EQ(10000.0, length /
Unit::um);
30 EXPECT_DOUBLE_EQ(1e9, 1 *
Unit::s);
34 TEST(UnitTest, ConvertValue)
63 TEST(UnitTest, ConvertValueToUnit)
static const double mm
[millimeters]
static const double um
[micrometers]
static const double s
[second]
static double convertValueToUnit(double value, const std::string &unitString)
Converts a floating point value from the standard framework unit to the given unit.
static double convertValue(double value, const std::string &unitString)
Converts a floating point value to the standard framework unit.
Abstract base class for different kinds of events.