From b1ddf1194589f4746dbc40dc332b1bf6d317dd0c Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Sat, 21 Jun 2025 06:11:07 -0400 Subject: [PATCH] fix(fourdst-namespace): moved into fourdst::constants namespace --- src/constants/private/const.cpp | 8 ++++---- src/constants/public/const.h | 8 ++++---- tests/constants/constTest.cpp | 18 +++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/constants/private/const.cpp b/src/constants/private/const.cpp index ce38681..d9986b9 100644 --- a/src/constants/private/const.cpp +++ b/src/constants/private/const.cpp @@ -4,11 +4,11 @@ // File Author: Emily Boudreaux // Last Modified: March 17, 2025 // -// 4DSSE is free software; you can use it and/or modify +// libconstants is free software; you can use it and/or modify // it under the terms and restrictions the GNU General Library Public // License version 3 (GPLv3) as published by the Free Software Foundation. // -// 4DSSE is distributed in the hope that it will be useful, +// libconstants is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU Library General Public License for more details. @@ -30,7 +30,7 @@ #include "const.h" #include "embedded_constants.h" // Generated at build time by meson -namespace serif::constant { +namespace fourdst::constant { Constants::Constants() { loaded_ = initialize(); } @@ -123,4 +123,4 @@ namespace serif::constant { loaded_ = true; return true; } -} \ No newline at end of file +} diff --git a/src/constants/public/const.h b/src/constants/public/const.h index 910e851..8843090 100644 --- a/src/constants/public/const.h +++ b/src/constants/public/const.h @@ -4,11 +4,11 @@ // File Author: Emily Boudreaux // Last Modified: March 17, 2025 // -// 4DSSE is free software; you can use it and/or modify +// libconstants is free software; you can use it and/or modify // it under the terms and restrictions the GNU General Library Public // License version 3 (GPLv3) as published by the Free Software Foundation. // -// 4DSSE is distributed in the hope that it will be useful, +// libconstants is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU Library General Public License for more details. @@ -24,7 +24,7 @@ #include #include -namespace serif::constant { +namespace fourdst::constant { /** * @brief Structure to hold a constant's details. */ @@ -137,5 +137,5 @@ public: }; -} // namespace serif::const +} // namespace fourdst::const diff --git a/tests/constants/constTest.cpp b/tests/constants/constTest.cpp index b458339..eae3798 100644 --- a/tests/constants/constTest.cpp +++ b/tests/constants/constTest.cpp @@ -17,7 +17,7 @@ class constTest : public ::testing::Test { protected: void SetUp() override { - serif::constant::Constants::getInstance(); + fourdst::constant::Constants::getInstance(); } }; @@ -25,7 +25,7 @@ protected: * @test Verify default constructor initializes correctly. */ TEST_F(constTest, DefaultConstructor) { - EXPECT_NO_THROW(serif::constant::Constants::getInstance()); + EXPECT_NO_THROW(fourdst::constant::Constants::getInstance()); } /** @@ -33,14 +33,14 @@ TEST_F(constTest, DefaultConstructor) { */ TEST_F(constTest, isLoaded) { - EXPECT_NO_THROW(serif::constant::Constants::getInstance().isLoaded()); + EXPECT_NO_THROW(fourdst::constant::Constants::getInstance().isLoaded()); } /** * @test Verify get method returns the correct constant. */ TEST_F(constTest, GetMethod) { - serif::constant::Constants& obj = serif::constant::Constants::getInstance(); + fourdst::constant::Constants& obj = fourdst::constant::Constants::getInstance(); EXPECT_DOUBLE_EQ(obj.get("c").value, 2.99792458e10); EXPECT_EQ(obj.get("c").unit, "cm / s"); EXPECT_DOUBLE_EQ(obj.get("c").uncertainty, 0.0); @@ -51,7 +51,7 @@ TEST_F(constTest, GetMethod) { * @test Verify [] opperators returns the correct constant. */ TEST_F(constTest, SubscriptOperator) { - serif::constant::Constants& obj = serif::constant::Constants::getInstance(); + fourdst::constant::Constants& obj = fourdst::constant::Constants::getInstance(); EXPECT_DOUBLE_EQ(obj["c"].value, 2.99792458e10); EXPECT_EQ(obj["c"].unit, "cm / s"); EXPECT_DOUBLE_EQ(obj["c"].uncertainty, 0.0); @@ -62,7 +62,7 @@ TEST_F(constTest, SubscriptOperator) { * @test Verify that the has method returns the correct values */ TEST_F(constTest, HasMethod) { - serif::constant::Constants& obj = serif::constant::Constants::getInstance(); + fourdst::constant::Constants& obj = fourdst::constant::Constants::getInstance(); EXPECT_TRUE(obj.has("c")); EXPECT_FALSE(obj.has("c4")); @@ -70,7 +70,7 @@ TEST_F(constTest, HasMethod) { } TEST_F(constTest, KeysMethod) { - serif::constant::Constants& obj = serif::constant::Constants::getInstance(); + fourdst::constant::Constants& obj = fourdst::constant::Constants::getInstance(); std::set checkKeys; checkKeys.insert("c"); checkKeys.insert("wienK"); @@ -99,11 +99,11 @@ TEST_F(constTest, KeysMethod) { } TEST_F(constTest, StreamOperator) { - serif::constant::Constants& obj = serif::constant::Constants::getInstance(); + fourdst::constant::Constants& obj = fourdst::constant::Constants::getInstance(); std::ostringstream os; os << obj.get("c"); std::string expected = "\n"; EXPECT_EQ(os.str(), expected); -} \ No newline at end of file +}