Skip to content

Commit

Permalink
make USDMaterial.hh a private header, remove RUN_ALL_TESTS call from …
Browse files Browse the repository at this point in the history
…unit tests

Signed-off-by: Ashton Larkin <[email protected]>
  • Loading branch information
adlarkin committed Mar 8, 2022
1 parent 654ae66 commit 3ae7fd9
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 24 deletions.
2 changes: 1 addition & 1 deletion usd/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ set(sources
sdf_parser/Sensor.cc
sdf_parser/Visual.cc
sdf_parser/World.cc
usd_parser/USDMaterial.cc
usd_parser/USDData.cc
usd_parser/USDStage.cc
usd_parser/USDMaterial.cc
)

ign_add_component(usd SOURCES ${sources} GET_TARGET_NAME usd_target)
Expand Down
2 changes: 1 addition & 1 deletion usd/src/usd_parser/USDData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <ignition/common/Util.hh>

#include "sdf/Material.hh"
#include "sdf/usd/usd_parser/USDMaterial.hh"
#include "USDMaterial.hh"

namespace sdf {
// Inline bracke to help doxygen filtering.
Expand Down
8 changes: 0 additions & 8 deletions usd/src/usd_parser/USDData_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,3 @@ TEST(USDData, Constructor)
ignition::common::joinPaths(ignition::common::cwd(), "materials"));
}
}

/////////////////////////////////////////////////
/// Main
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion usd/src/usd_parser/USDMaterial.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include "sdf/usd/usd_parser/USDMaterial.hh"
#include "USDMaterial.hh"

#include <ignition/common/Filesystem.hh>
#include <ignition/common/Util.hh>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include "sdf/Material.hh"
#include "sdf/config.hh"
#include "sdf/usd/Export.hh"
#include "sdf/usd/UsdError.hh"

namespace sdf
Expand All @@ -47,8 +46,8 @@ namespace sdf
/// material
/// \return UsdErrors, which is a vector of UsdError objects. Each UsdError
/// includes an error code and message. An empty vector indicates no error.
UsdErrors IGNITION_SDFORMAT_USD_VISIBLE ParseMaterial(
const pxr::UsdPrim &_prim, sdf::Material &_material);
UsdErrors ParseMaterial(const pxr::UsdPrim &_prim,
sdf::Material &_material);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion usd/src/usd_parser/USDStage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#pragma pop_macro ("__DEPRECATED")

#include "sdf/usd/usd_parser/USDStage.hh"
#include "sdf/usd/usd_parser/USDMaterial.hh"

namespace sdf {
// Inline bracke to help doxygen filtering.
Expand Down
10 changes: 1 addition & 9 deletions usd/src/usd_parser/USDStage_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,8 @@ TEST(USDStage, Constructor)

// Invalid file
{
sdf::usd::USDStage stage(sdf::testing::TestFile("usd", "/invalid_name"));
sdf::usd::USDStage stage(sdf::testing::TestFile("usd", "invalid_name"));
sdf::usd::UsdErrors errors = stage.Init();
EXPECT_EQ(1u, errors.size());
}
}

/////////////////////////////////////////////////
/// Main
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

0 comments on commit 3ae7fd9

Please sign in to comment.