diff --git a/trick_source/trick_utils/units/test/UnitConvTestSuite.cpp b/trick_source/trick_utils/units/test/UnitConvTestSuite.cpp index 8db70784..931c2a55 100644 --- a/trick_source/trick_utils/units/test/UnitConvTestSuite.cpp +++ b/trick_source/trick_utils/units/test/UnitConvTestSuite.cpp @@ -2,7 +2,7 @@ #include #include "trick/units_conv.h" -#define TOL 1e-13 +#define TOL 1e-7 /* double tolerance(int exp) { @@ -65,7 +65,7 @@ TEST(UnitsInterface, Newton_to_Pound) pounds = convert_units(1.0, &Newton_to_Pound); - ASSERT_NEAR((1.0/(0.4535923697760192*0.3048)), pounds, TOL); + ASSERT_NEAR((1.0/(0.45359237*0.3048)), pounds, TOL); clean_up_Units_t(&Newton); clean_up_Units_t(&Pound); diff --git a/trick_source/trick_utils/units/test/UnitTestSuite.cpp b/trick_source/trick_utils/units/test/UnitTestSuite.cpp index 5a37dc77..b631e1ab 100644 --- a/trick_source/trick_utils/units/test/UnitTestSuite.cpp +++ b/trick_source/trick_utils/units/test/UnitTestSuite.cpp @@ -41,7 +41,7 @@ * **********************************************************************************************************/ -#define TOL 1e-13 +#define TOL 1e-7 #define PI 3.14159265358979323846 namespace Trick { @@ -364,12 +364,12 @@ TEST_F(UnitConversion, KilogramToKilogram) TEST_F(UnitConversion, KilogramToSlug) { - test_conversion_no_throw("kg", "sl", 0.0, (1.0/14.5939029372064), TOL); + test_conversion_no_throw("kg", "sl", 0.0, (1.0/14.59390), TOL); } TEST_F(UnitConversion, KilogramToPoundMass) { - test_conversion_no_throw("kg", "lbm", 0.0, (1.0/0.4535923697760192), TOL); + test_conversion_no_throw("kg", "lbm", 0.0, (1.0/0.45359237), TOL); } TEST_F(UnitConversion, KilogramToGram) @@ -634,12 +634,12 @@ TEST_F(UnitConversion, FahrenheitPerSecondToCelsiusPerMinute) TEST_F(UnitConversion, CompositeNewtonToCompositePoundForce) { - test_conversion_no_throw("kg*m/s2", "lbm*ft/s*s", 0.0, (1/(0.4535923697760192*0.3048)) , TOL); + test_conversion_no_throw("kg*m/s2", "lbm*ft/s*s", 0.0, (1/(0.45359237*0.3048)) , TOL); } TEST_F(UnitConversion, CompositePoundForceToCompositeNewton) { - test_conversion_no_throw("lbm*ft/s2", "kg*m/s*s", 0.0, (0.4535923697760192*0.3048), TOL); + test_conversion_no_throw("lbm*ft/s2", "kg*m/s*s", 0.0, (0.45359237*0.3048), TOL); } TEST_F(UnitConversion, FootPoundsToNewtonMeters) @@ -662,12 +662,12 @@ TEST_F(UnitConversion, FootPoundsToNewtonMetersWithConvertTo) TEST_F(UnitConversion, CompositePoundForceToCompositeNewtonCommutative) { - test_conversion_no_throw("lbm*ft/s*s", "m*kg/s2", 0.0, (0.4535923697760192*0.3048), TOL); + test_conversion_no_throw("lbm*ft/s*s", "m*kg/s2", 0.0, (0.45359237*0.3048), TOL); } TEST_F(UnitConversion, CompositeNewtonToCompositePoundForceCommutative) { - test_conversion_no_throw("m*kg/s2", "lbm*ft/s*s", 0.0, (1/(0.4535923697760192*0.3048)), TOL); + test_conversion_no_throw("m*kg/s2", "lbm*ft/s*s", 0.0, (1/(0.45359237*0.3048)), TOL); } //Collection of Denominators