Skip to content

Commit

Permalink
chore: implement nit MR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pau Hebrero committed Oct 11, 2023
1 parent b54f953 commit 68e6de1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class StateBuilder
/// @param [in] aCoordinatesSubsetSPtr The CoordinatesSubset to remove
///
/// @return A new StateBuilder

const StateBuilder contract(const Shared<const CoordinatesSubset>& aCoordinatesSubsetSPtr) const;

/// @brief Get an undefined StateBuilder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const StateBuilder StateBuilder::expand(const Shared<const CoordinatesSubset>& a

if (this->coordinatesBrokerSPtr_->hasSubset(aCoordinatesSubsetSPtr))
{
throw ostk::core::error::runtime::Wrong("CoordinatesSubset");
throw ostk::core::error::RuntimeError("Duplicate CoordinatesSubset");
}

Array<Shared<const CoordinatesSubset>> expandedSubsets = Array<Shared<const CoordinatesSubset>>::Empty();
Expand All @@ -176,7 +176,7 @@ const StateBuilder StateBuilder::contract(const Shared<const CoordinatesSubset>&

if (!this->coordinatesBrokerSPtr_->hasSubset(aCoordinatesSubsetSPtr))
{
throw ostk::core::error::runtime::Wrong("CoordinatesSubset");
throw ostk::core::error::RuntimeError("Missing CoordinatesSubset");
}

Array<Shared<const CoordinatesSubset>> contractedSubsets = Array<Shared<const CoordinatesSubset>>::Empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Trajectory_StateBuilder, contract)
{
const StateBuilder stateBuilder = StateBuilder::Undefined();

EXPECT_ANY_THROW(stateBuilder.expand(CartesianPosition::Default()));
EXPECT_ANY_THROW(stateBuilder.contract(CartesianPosition::Default()));
}

{
Expand Down

0 comments on commit 68e6de1

Please sign in to comment.