From 28b2ee6920091f4861108194e516f836efd8df9e Mon Sep 17 00:00:00 2001 From: Kaj Williams <kewilliams@usgs.gov> Date: Wed, 22 Aug 2018 13:17:22 -0700 Subject: [PATCH] cleaned up key/newValue and comments --- tests/FrameCameraTests.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/FrameCameraTests.cpp b/tests/FrameCameraTests.cpp index 794be97..9fa055f 100644 --- a/tests/FrameCameraTests.cpp +++ b/tests/FrameCameraTests.cpp @@ -75,8 +75,7 @@ class FrameSensorModel : public ::testing::Test { } }; -//NOTE: The imagePt layour is (Lines,Samples) -// Also subtract 0.5 from the lines/samples. Hence Samples=0 and Lines=15 -> 14.5,-0.5 +//NOTE: The imagePt format is (Lines,Samples) //centered and slightly off-center: TEST_F(FrameSensorModel, Center) { @@ -127,8 +126,10 @@ TEST_F(FrameSensorModel, OffBody4) { // Focal Length Tests: TEST_F(FrameIsdTest, FL500_OffBody4) { - isd.clearParams("focal_length"); - isd.addParam("focal_length","500.0"); + std::string key = "focal_length"; + std::string newValue = "500.0"; + isd.clearParams(key); + isd.addParam(key,newValue); UsgsAstroFramePlugin frameCameraPlugin; csm::Model *model = frameCameraPlugin.constructModelFromISD( @@ -145,8 +146,10 @@ TEST_F(FrameIsdTest, FL500_OffBody4) { EXPECT_NEAR(groundPt.z, -1.48533467, 1e-8); } TEST_F(FrameIsdTest, FL500_OffBody3) { - isd.clearParams("focal_length"); - isd.addParam("focal_length","500.0"); + std::string key = "focal_length"; + std::string newValue = "500.0"; + isd.clearParams(key); + isd.addParam(key,newValue); UsgsAstroFramePlugin frameCameraPlugin; csm::Model *model = frameCameraPlugin.constructModelFromISD( @@ -163,8 +166,10 @@ TEST_F(FrameIsdTest, FL500_OffBody3) { EXPECT_NEAR(groundPt.z, 1.48533467, 1e-8); } TEST_F(FrameIsdTest, FL500_Center) { - isd.clearParams("focal_length"); - isd.addParam("focal_length","500.0"); + std::string key = "focal_length"; + std::string newValue = "500.0"; + isd.clearParams(key); + isd.addParam(key,newValue); UsgsAstroFramePlugin frameCameraPlugin; csm::Model *model = frameCameraPlugin.constructModelFromISD( @@ -181,8 +186,10 @@ TEST_F(FrameIsdTest, FL500_Center) { EXPECT_NEAR(groundPt.z, 0.0, 1e-8); } TEST_F(FrameIsdTest, FL500_SlightlyOffCenter) { - isd.clearParams("focal_length"); - isd.addParam("focal_length","500.0"); + std::string key = "focal_length"; + std::string newValue = "500.0"; + isd.clearParams(key); + isd.addParam(key,newValue); UsgsAstroFramePlugin frameCameraPlugin; csm::Model *model = frameCameraPlugin.constructModelFromISD( -- GitLab