From e7278c5fb30cd3208e2df9767e9ccc333be575f7 Mon Sep 17 00:00:00 2001 From: Simon Vidanovic Date: Fri, 18 Aug 2023 10:47:50 -0700 Subject: [PATCH] Update to deflection tests. --- .../DoubleClearDeflectionTPTest1.unit.cpp | 71 ++++++---------- .../DoubleClear_DeflectionWithLoad.unit.cpp | 26 ++---- .../units/DoubleLoweWithDeflection.unit.cpp | 40 ++++----- .../tst/units/TripleClear_Deflection.unit.cpp | 82 +++++++------------ .../TripleClear_DeflectionWithLoad.unit.cpp | 50 ++++------- 5 files changed, 99 insertions(+), 170 deletions(-) diff --git a/src/Tarcog/tst/units/DoubleClearDeflectionTPTest1.unit.cpp b/src/Tarcog/tst/units/DoubleClearDeflectionTPTest1.unit.cpp index ef071226..082ef423 100644 --- a/src/Tarcog/tst/units/DoubleClearDeflectionTPTest1.unit.cpp +++ b/src/Tarcog/tst/units/DoubleClearDeflectionTPTest1.unit.cpp @@ -3,7 +3,8 @@ #include #include "WCETarcog.hpp" -#include "WCECommon.hpp" + +#include "vectorTesting.hpp" class DoubleClearDeflectionTPTest1 : public testing::Test { @@ -16,10 +17,10 @@ class DoubleClearDeflectionTPTest1 : public testing::Test ///////////////////////////////////////////////////////// /// Outdoor ///////////////////////////////////////////////////////// - auto airTemperature = 255.15; // Kelvins - auto airSpeed = 5.5; // meters per second - auto tSky = 255.15; // Kelvins - auto solarRadiation = 0.0; + constexpr auto airTemperature = 255.15; // Kelvins + constexpr auto airSpeed = 5.5; // meters per second + constexpr auto tSky = 255.15; // Kelvins + constexpr auto solarRadiation = 0.0; auto Outdoor = Tarcog::ISO15099::Environments::outdoor( airTemperature, airSpeed, solarRadiation, tSky, Tarcog::ISO15099::SkyModel::AllSpecified); @@ -30,7 +31,7 @@ class DoubleClearDeflectionTPTest1 : public testing::Test // Indoor ///////////////////////////////////////////////////////// - auto roomTemperature = 294.15; + constexpr auto roomTemperature = 294.15; auto Indoor = Tarcog::ISO15099::Environments::indoor(roomTemperature); ASSERT_TRUE(Indoor != nullptr); @@ -38,33 +39,33 @@ class DoubleClearDeflectionTPTest1 : public testing::Test ///////////////////////////////////////////////////////// // IGU ///////////////////////////////////////////////////////// - auto solidLayerThickness1 = 0.003048; // [m] - auto solidLayerThickness2 = 0.005715; - auto solidLayerConductance = 1.0; + constexpr auto solidLayerThickness1 = 0.003048; // [m] + constexpr auto solidLayerThickness2 = 0.005715; + constexpr auto solidLayerConductance = 1.0; auto aSolidLayer1 = Tarcog::ISO15099::Layers::solid(solidLayerThickness1, solidLayerConductance); // Introducing non default deflection properties - auto youngsModulus = 8.1e10; + constexpr auto youngsModulus = 8.1e10; aSolidLayer1 = Tarcog::ISO15099::Layers::updateMaterialData(aSolidLayer1, youngsModulus); // Layer will be using default deflection values auto aSolidLayer2 = Tarcog::ISO15099::Layers::solid(solidLayerThickness2, solidLayerConductance); - auto gapThickness = 0.0127; + constexpr auto gapThickness = 0.0127; auto m_GapLayer = Tarcog::ISO15099::Layers::gap(gapThickness); ASSERT_TRUE(m_GapLayer != nullptr); - double windowWidth = 1; - double windowHeight = 1; + constexpr double windowWidth = 1; + constexpr double windowHeight = 1; Tarcog::ISO15099::CIGU aIGU(windowWidth, windowHeight); aIGU.addLayers({aSolidLayer1, m_GapLayer, aSolidLayer2}); // Deflection properties - auto Tini = 303.15; - auto Pini = 101325.0; + constexpr auto Tini = 303.15; + constexpr auto Pini = 101325.0; aIGU.setDeflectionProperties(Tini, Pini); ///////////////////////////////////////////////////////// @@ -95,50 +96,26 @@ TEST_F(DoubleClearDeflectionTPTest1, Test1) /////////////////////////////////////////////////////////////////////////////// /// Temperatures test /////////////////////////////////////////////////////////////////////////////// - auto Temperature = aSystem->getTemperatures(); - std::vector correctTemperature = {258.799454, 259.124627, 279.009121, 279.618821}; - ASSERT_EQ(correctTemperature.size(), Temperature.size()); - - for(auto i = 0u; i < correctTemperature.size(); ++i) - { - EXPECT_NEAR(correctTemperature[i], Temperature[i], Tolerance); - } + std::vector correctTemperature = {258.795861, 259.120713, 279.023351, 279.632449}; + testVectors("Temperature", correctTemperature, aSystem->getTemperatures(), Tolerance); /////////////////////////////////////////////////////////////////////////////// /// Radiosity test /////////////////////////////////////////////////////////////////////////////// - auto Radiosity = aSystem->getRadiosities(); - std::vector correctRadiosity = {252.092017, 267.753052, 331.451548, 359.055470}; - ASSERT_EQ(correctRadiosity.size(), Radiosity.size()); - - for(auto i = 0u; i < correctRadiosity.size(); ++i) - { - EXPECT_NEAR(correctRadiosity[i], Radiosity[i], Tolerance); - } + std::vector correctRadiosity = {252.080153, 267.749407, 331.509846, 359.112232}; + testVectors("Radiosity", correctRadiosity, aSystem->getRadiosities(), Tolerance); /////////////////////////////////////////////////////////////////////////////// /// Max deflection test /////////////////////////////////////////////////////////////////////////////// - const auto MaxDeflection = aSystem->getMaxLayerDeflections(); - std::vector correctMaxDeflection = {-2.285903e-3, 0.483756e-3}; - ASSERT_EQ(correctMaxDeflection.size(), MaxDeflection.size()); - - for(auto i = 0u; i < correctMaxDeflection.size(); ++i) - { - EXPECT_NEAR(correctMaxDeflection[i], MaxDeflection[i], 1e-8); - } + std::vector correctMaxDeflection = {-2.28568e-3, 0.483674e-3}; + testVectors("Max deflection", correctMaxDeflection, aSystem->getMaxLayerDeflections(), 1e-8); /////////////////////////////////////////////////////////////////////////////// /// Mean deflection test /////////////////////////////////////////////////////////////////////////////// - const auto MeanDeflection = aSystem->getMeanLayerDeflections(); - std::vector correctMeanDeflection = {-0.957624e-3, 0.202658e-3}; - ASSERT_EQ(correctMeanDeflection.size(), MeanDeflection.size()); - - for(auto i = 0u; i < correctMaxDeflection.size(); ++i) - { - EXPECT_NEAR(correctMeanDeflection[i], MeanDeflection[i], 1e-8); - } + std::vector correctMeanDeflection = {-0.957531e-3, 0.202624e-3}; + testVectors("Mean deflection", correctMeanDeflection, aSystem->getMeanLayerDeflections(), 1e-8); const auto numOfIter = aSystem->getNumberOfIterations(); EXPECT_EQ(25u, numOfIter); diff --git a/src/Tarcog/tst/units/DoubleClear_DeflectionWithLoad.unit.cpp b/src/Tarcog/tst/units/DoubleClear_DeflectionWithLoad.unit.cpp index c65e74cf..359af18f 100644 --- a/src/Tarcog/tst/units/DoubleClear_DeflectionWithLoad.unit.cpp +++ b/src/Tarcog/tst/units/DoubleClear_DeflectionWithLoad.unit.cpp @@ -3,7 +3,8 @@ #include #include "WCETarcog.hpp" -#include "WCECommon.hpp" + +#include "vectorTesting.hpp" class TestDoubleClearDeflectionWithLoad : public testing::Test {}; @@ -68,7 +69,6 @@ TEST_F(TestDoubleClearDeflectionWithLoad, U_ValueRun) tarcogSystem.setAppliedLoad({2000, 1000}); tarcogSystem.setDeflectionProperties(320, 102000); - constexpr auto Tolerance{1e-6}; ////////////////////////////////////////////////////////////////////// @@ -77,21 +77,13 @@ TEST_F(TestDoubleClearDeflectionWithLoad, U_ValueRun) constexpr auto aRun = Tarcog::ISO15099::System::Uvalue; - const auto Temperature = tarcogSystem.getTemperatures(aRun); - const std::vector correctTemperature{292.076937, 291.609964, 272.797101, 272.330129}; - ASSERT_EQ(correctTemperature.size(), Temperature.size()); - - for(auto i = 0u; i < correctTemperature.size(); ++i) - { - EXPECT_NEAR(correctTemperature[i], Temperature[i], Tolerance); - } + const std::vector correctTemperature{292.076977, 291.610008, 272.796958, 272.329989}; + testVectors( + "U-value temperatures", correctTemperature, tarcogSystem.getTemperatures(aRun), Tolerance); const std::vector correctDeflection{-55.488195e-3, -54.644421e-3}; - - const auto deflection{tarcogSystem.getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue)}; - - for(auto i = 0u; i < correctDeflection.size(); ++i) - { - EXPECT_NEAR(correctDeflection[i], deflection[i], 1e-8); - } + testVectors("U-value deflection", + correctDeflection, + tarcogSystem.getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue), + Tolerance); } diff --git a/src/Tarcog/tst/units/DoubleLoweWithDeflection.unit.cpp b/src/Tarcog/tst/units/DoubleLoweWithDeflection.unit.cpp index dce90423..903d5a43 100644 --- a/src/Tarcog/tst/units/DoubleLoweWithDeflection.unit.cpp +++ b/src/Tarcog/tst/units/DoubleLoweWithDeflection.unit.cpp @@ -3,7 +3,8 @@ #include #include "WCETarcog.hpp" -#include "WCECommon.hpp" + +#include "vectorTesting.hpp" // Example of double clear window with inital guess for solution class TestDoubleLoweEnvironmentWithDeflection : public testing::Test @@ -82,7 +83,8 @@ class TestDoubleLoweEnvironmentWithDeflection : public testing::Test } public: - [[nodiscard]] std::shared_ptr GetSystem() const { + [[nodiscard]] std::shared_ptr GetSystem() const + { return m_TarcogSystem; } }; @@ -95,28 +97,22 @@ TEST_F(TestDoubleLoweEnvironmentWithDeflection, Test1) constexpr auto DeflectionTolerance = 1e-8; const auto aSystem = GetSystem(); - ASSERT_TRUE(aSystem != nullptr); + ASSERT_TRUE(aSystem != nullptr); /////////////////////////////////////////////////////////////////////////////// /// Deflection results /////////////////////////////////////////////////////////////////////////////// - const auto MaxDeflectionU = aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue); - const std::vector correctMaxDeflectionU{-1.849981e-3, 0.344021e-3}; - ASSERT_EQ(correctMaxDeflectionU.size(), MaxDeflectionU.size()); - - for(auto i = 0u; i < correctMaxDeflectionU.size(); ++i) - { - EXPECT_NEAR(correctMaxDeflectionU[i], MaxDeflectionU[i], DeflectionTolerance); - } - - const auto MaxDeflectionS = aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::SHGC); - const std::vector correctMaxDeflectionSHGC{-1.385369e-3, 0.253010e-3}; - ASSERT_EQ(correctMaxDeflectionSHGC.size(), MaxDeflectionU.size()); - - for(auto i = 0u; i < correctMaxDeflectionSHGC.size(); ++i) - { - EXPECT_NEAR(correctMaxDeflectionSHGC[i], MaxDeflectionS[i], DeflectionTolerance); - } + const std::vector correctMaxDeflectionU{-1.849876e-3, 0.343977e-3}; + testVectors("Max deflection U-value run", + correctMaxDeflectionU, + aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue), + DeflectionTolerance); + + const std::vector correctMaxDeflectionSHGC{-1.385198e-3, 0.252978e-3}; + testVectors("Max deflection SHGC run", + correctMaxDeflectionSHGC, + aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::SHGC), + DeflectionTolerance); ////////////////////////////////////////////////////////////////////// /// General results @@ -129,8 +125,8 @@ TEST_F(TestDoubleLoweEnvironmentWithDeflection, Test1) EXPECT_EQ(26u, numOfIterS); const auto Uvalue = aSystem->getUValue(); - EXPECT_NEAR(Uvalue, 1.695037, Tolerance); + EXPECT_NEAR(Uvalue, 1.693616, Tolerance); const auto SHGC = aSystem->getSHGC(0.3716); - EXPECT_NEAR(SHGC, 0.425361, Tolerance); + EXPECT_NEAR(SHGC, 0.425337, Tolerance); } diff --git a/src/Tarcog/tst/units/TripleClear_Deflection.unit.cpp b/src/Tarcog/tst/units/TripleClear_Deflection.unit.cpp index 643be617..5537f14f 100644 --- a/src/Tarcog/tst/units/TripleClear_Deflection.unit.cpp +++ b/src/Tarcog/tst/units/TripleClear_Deflection.unit.cpp @@ -3,7 +3,8 @@ #include #include "WCETarcog.hpp" -#include "WCECommon.hpp" + +#include "vectorTesting.hpp" // Example of double clear window with inital guess for solution class TestTripleClearDeflection : public testing::Test @@ -17,10 +18,10 @@ class TestTripleClearDeflection : public testing::Test ///////////////////////////////////////////////////////// /// Outdoor ///////////////////////////////////////////////////////// - const auto airTemperature{250}; // Kelvins - const auto airSpeed{5.5}; // meters per second - const auto tSky{255.15}; // Kelvins - const auto solarRadiation{783.0}; + constexpr auto airTemperature{250}; // Kelvins + constexpr auto airSpeed{5.5}; // meters per second + constexpr auto tSky{255.15}; // Kelvins + constexpr auto solarRadiation{783.0}; auto Outdoor = Tarcog::ISO15099::Environments::outdoor( airTemperature, airSpeed, solarRadiation, tSky, Tarcog::ISO15099::SkyModel::AllSpecified); @@ -31,7 +32,7 @@ class TestTripleClearDeflection : public testing::Test /// Indoor ///////////////////////////////////////////////////////// - const auto roomTemperature{293.0}; + constexpr auto roomTemperature{293.0}; auto Indoor = Tarcog::ISO15099::Environments::indoor(roomTemperature); ASSERT_TRUE(Indoor != nullptr); @@ -39,8 +40,8 @@ class TestTripleClearDeflection : public testing::Test ///////////////////////////////////////////////////////// /// IGU ///////////////////////////////////////////////////////// - const auto solidLayerThickness{0.003048}; // [m] - const auto solidLayerConductance{1.0}; // [W/m2K] + constexpr auto solidLayerThickness{0.003048}; // [m] + constexpr auto solidLayerConductance{1.0}; // [W/m2K] auto aSolidLayer1 = Tarcog::ISO15099::Layers::solid(solidLayerThickness, solidLayerConductance); @@ -54,32 +55,25 @@ class TestTripleClearDeflection : public testing::Test Tarcog::ISO15099::Layers::solid(solidLayerThickness, solidLayerConductance); aSolidLayer3->setSolarAbsorptance(0.058234799653, solarRadiation); - const auto gapThickness1{0.006}; + constexpr auto gapThickness1{0.006}; const auto gapLayer1 = Tarcog::ISO15099::Layers::gap(gapThickness1); ASSERT_TRUE(gapLayer1 != nullptr); - const auto gapThickness2{0.025}; + constexpr auto gapThickness2{0.025}; const auto gapLayer2 = Tarcog::ISO15099::Layers::gap(gapThickness2); ASSERT_TRUE(gapLayer2 != nullptr); - const auto windowWidth{1.0}; - const auto windowHeight{1.0}; + constexpr auto windowWidth{1.0}; + constexpr auto windowHeight{1.0}; Tarcog::ISO15099::CIGU aIGU(windowWidth, windowHeight); aIGU.addLayers({aSolidLayer1, gapLayer1, aSolidLayer2, gapLayer2, aSolidLayer3}); - //aIGU.setDeflectionProperties(273, 101325); - - // Alternative way of adding layers. - // aIGU.addLayer(aSolidLayer1); - // aIGU.addLayer(gapLayer); - // aIGU.addLayer(aSolidLayer2); - ///////////////////////////////////////////////////////// /// System ///////////////////////////////////////////////////////// m_TarcogSystem = std::make_shared(aIGU, Indoor, Outdoor); - m_TarcogSystem->setDeflectionProperties(273, 101325); + m_TarcogSystem->setDeflectionProperties(273, 101325); ASSERT_TRUE(m_TarcogSystem != nullptr); } @@ -107,22 +101,15 @@ TEST_F(TestTripleClearDeflection, Test1) auto aRun = Tarcog::ISO15099::System::Uvalue; auto Temperature = aSystem->getTemperatures(aRun); - std::vector correctTemperature = {253.145118, 253.399346, 265.491216, 265.745444, 281.162092, 281.416320}; - ASSERT_EQ(correctTemperature.size(), Temperature.size()); - - for(auto i = 0u; i < correctTemperature.size(); ++i) - { - EXPECT_NEAR(correctTemperature[i], Temperature[i], Tolerance); - } + std::vector correctTemperature{ + 253.145128, 253.399356, 265.491273, 265.745502, 281.162057, 281.416285}; + testVectors("U-value run temperatures", Temperature, correctTemperature, Tolerance); std::vector correctDeflection{-0.421986e-3, 0.265021e-3, 0.167762e-3}; - - auto deflection = aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue); - - for(auto i = 0u; i < correctDeflection.size(); ++i) - { - EXPECT_NEAR(correctDeflection[i], deflection[i], DeflectionTolerance); - } + testVectors("U-value run maximum deflection", + aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue), + correctDeflection, + DeflectionTolerance); auto numOfIter = aSystem->getNumberOfIterations(aRun); EXPECT_EQ(24u, numOfIter); @@ -134,22 +121,15 @@ TEST_F(TestTripleClearDeflection, Test1) aRun = Tarcog::ISO15099::System::SHGC; Temperature = aSystem->getTemperatures(aRun); - correctTemperature = {257.435790, 257.952362, 276.186799, 276.492794, 289.163055, 289.308119}; - ASSERT_EQ(correctTemperature.size(), Temperature.size()); - - for(auto i = 0u; i < correctTemperature.size(); ++i) - { - EXPECT_NEAR(correctTemperature[i], Temperature[i], Tolerance); - } + correctTemperature = {257.436181, 257.952788, 276.188735, 276.494764, 289.161417, 289.306516}; + testVectors( + "SHGC run temperatures", aSystem->getTemperatures(aRun), correctTemperature, Tolerance); correctDeflection = {-0.421986e-3, 0.265021e-3, 0.167762e-3}; - - deflection = aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue); - - for(auto i = 0u; i < correctDeflection.size(); ++i) - { - EXPECT_NEAR(correctDeflection[i], deflection[i], DeflectionTolerance); - } + testVectors("SHGC run maximum deflection", + aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue), + correctDeflection, + DeflectionTolerance); numOfIter = aSystem->getNumberOfIterations(aRun); EXPECT_EQ(27u, numOfIter); @@ -158,11 +138,11 @@ TEST_F(TestTripleClearDeflection, Test1) /// General results ////////////////////////////////////////////////////////////////////// const auto Uvalue = aSystem->getUValue(); - EXPECT_NEAR(Uvalue, 1.9522982371191091, Tolerance); + EXPECT_NEAR(Uvalue, 1.952304, Tolerance); const auto SHGC = aSystem->getSHGC(0.598424255848); - EXPECT_NEAR(SHGC, 0.673282, Tolerance); + EXPECT_NEAR(SHGC, 0.673268, Tolerance); const auto relativeHeatGain = aSystem->relativeHeatGain(0.703296); - EXPECT_NEAR(relativeHeatGain, 579.484762, Tolerance); + EXPECT_NEAR(relativeHeatGain, 579.474468, Tolerance); } diff --git a/src/Tarcog/tst/units/TripleClear_DeflectionWithLoad.unit.cpp b/src/Tarcog/tst/units/TripleClear_DeflectionWithLoad.unit.cpp index f8cb0909..c23f562b 100644 --- a/src/Tarcog/tst/units/TripleClear_DeflectionWithLoad.unit.cpp +++ b/src/Tarcog/tst/units/TripleClear_DeflectionWithLoad.unit.cpp @@ -3,7 +3,8 @@ #include #include "WCETarcog.hpp" -#include "WCECommon.hpp" + +#include "vectorTesting.hpp" // Example of double clear window with inital guess for solution class TestTripleClearDeflectionWithLoad : public testing::Test @@ -17,10 +18,10 @@ class TestTripleClearDeflectionWithLoad : public testing::Test ///////////////////////////////////////////////////////// /// Outdoor ///////////////////////////////////////////////////////// - const auto airTemperature{250}; // Kelvins - const auto airSpeed{5.5}; // meters per second - const auto tSky{255.15}; // Kelvins - const auto solarRadiation{0.0}; + constexpr auto airTemperature{250}; // Kelvins + constexpr auto airSpeed{5.5}; // meters per second + constexpr auto tSky{255.15}; // Kelvins + constexpr auto solarRadiation{0.0}; auto Outdoor = Tarcog::ISO15099::Environments::outdoor( airTemperature, airSpeed, solarRadiation, tSky, Tarcog::ISO15099::SkyModel::AllSpecified); @@ -31,7 +32,7 @@ class TestTripleClearDeflectionWithLoad : public testing::Test /// Indoor ///////////////////////////////////////////////////////// - const auto roomTemperature{293.0}; + constexpr auto roomTemperature{293.0}; auto Indoor = Tarcog::ISO15099::Environments::indoor(roomTemperature); ASSERT_TRUE(Indoor != nullptr); @@ -39,8 +40,8 @@ class TestTripleClearDeflectionWithLoad : public testing::Test ///////////////////////////////////////////////////////// /// IGU ///////////////////////////////////////////////////////// - const auto solidLayerThickness{0.003048}; // [m] - const auto solidLayerConductance{1.0}; // [W/m2K] + constexpr auto solidLayerThickness{0.003048}; // [m] + constexpr auto solidLayerConductance{1.0}; // [W/m2K] auto aSolidLayer1 = Tarcog::ISO15099::Layers::solid(solidLayerThickness, solidLayerConductance); @@ -54,26 +55,19 @@ class TestTripleClearDeflectionWithLoad : public testing::Test Tarcog::ISO15099::Layers::solid(solidLayerThickness, solidLayerConductance); aSolidLayer3->setSolarAbsorptance(0.058234799653, solarRadiation); - const auto gapThickness1{0.006}; + constexpr auto gapThickness1{0.006}; const auto gapLayer1 = Tarcog::ISO15099::Layers::gap(gapThickness1); ASSERT_TRUE(gapLayer1 != nullptr); - const auto gapThickness2{0.025}; + constexpr auto gapThickness2{0.025}; const auto gapLayer2 = Tarcog::ISO15099::Layers::gap(gapThickness2); ASSERT_TRUE(gapLayer2 != nullptr); - const auto windowWidth{1.0}; - const auto windowHeight{1.0}; + constexpr auto windowWidth{1.0}; + constexpr auto windowHeight{1.0}; Tarcog::ISO15099::CIGU aIGU(windowWidth, windowHeight); aIGU.addLayers({aSolidLayer1, gapLayer1, aSolidLayer2, gapLayer2, aSolidLayer3}); - //aIGU.setDeflectionProperties(273, 101325); - - // Alternative way of adding layers. - // aIGU.addLayer(aSolidLayer1); - // aIGU.addLayer(gapLayer); - // aIGU.addLayer(aSolidLayer2); - ///////////////////////////////////////////////////////// /// System ///////////////////////////////////////////////////////// @@ -107,20 +101,10 @@ TEST_F(TestTripleClearDeflectionWithLoad, Test1) auto aRun = Tarcog::ISO15099::System::Uvalue; const auto Temperature = aSystem->getTemperatures(aRun); - const std::vector correctTemperature{253.314583, 253.583839, 265.810776, 266.080031, 280.499960, 280.769216}; - ASSERT_EQ(correctTemperature.size(), Temperature.size()); - - for(auto i = 0u; i < correctTemperature.size(); ++i) - { - EXPECT_NEAR(correctTemperature[i], Temperature[i], Tolerance); - } - - const std::vector correctDeflection{22.784211e-3, 24.460877e-3, 63.338034e-3}; + const std::vector correctTemperature{253.442695, 253.723313, 266.443064, 266.723682, 280.000269, 280.280887}; + testVectors("Surface temperatures", Temperature, correctTemperature, Tolerance); + const std::vector correctDeflection{22.808033e-3, 24.468037e-3, 63.330606e-3}; const auto deflection = aSystem->getMaxLayerDeflections(Tarcog::ISO15099::System::Uvalue); - - for(auto i = 0u; i < correctDeflection.size(); ++i) - { - EXPECT_NEAR(correctDeflection[i], deflection[i], DeflectionTolerance); - } + testVectors("Maximum deflection", deflection, correctDeflection, DeflectionTolerance); }