@@ -348,7 +348,7 @@ class ModelElementFixture : public ElementUpdateFixture
348
348
// ///////////////////////////////////////////////
349
349
TEST_F (ModelElementFixture, ModelsInline)
350
350
{
351
- this ->LoadWorld (" test/ worlds/ shapes.sdf" );
351
+ this ->LoadWorld (common::joinPaths ( " test" , " worlds" , " shapes.sdf" ) );
352
352
this ->TestModel (" box" );
353
353
this ->TestModel (" capsule" );
354
354
this ->TestModel (" cylinder" );
@@ -359,15 +359,15 @@ TEST_F(ModelElementFixture, ModelsInline)
359
359
// ///////////////////////////////////////////////
360
360
TEST_F (ModelElementFixture, ModelIncluded)
361
361
{
362
- this ->LoadWorld (" test/ worlds/ save_world.sdf" );
362
+ this ->LoadWorld (common::joinPaths ( " test" , " worlds" , " save_world.sdf" ) );
363
363
this ->TestModel (" backpack1" );
364
364
this ->TestModel (" backpack2" );
365
365
}
366
366
367
367
// ///////////////////////////////////////////////
368
368
TEST_F (ModelElementFixture, ModelComponentUpdate)
369
369
{
370
- this ->LoadWorld (" test/ worlds/ shapes.sdf" );
370
+ this ->LoadWorld (common::joinPaths ( " test" , " worlds" , " shapes.sdf" ) );
371
371
std::string modelName = " box" ;
372
372
Entity modelEntity = this ->ecm .EntityByComponents (
373
373
components::Model (), components::Name (modelName));
@@ -461,8 +461,7 @@ TEST_F(ElementUpdateFixture, ConfigOverrideCopyOrMerge)
461
461
// ///////////////////////////////////////////////
462
462
TEST_F (ElementUpdateFixture, ConfigOverride)
463
463
{
464
- const std::string worldFile{" test/worlds/save_world.sdf" };
465
- this ->LoadWorld (worldFile);
464
+ this ->LoadWorld (common::joinPaths (" test" , " worlds" , " save_world.sdf" ));
466
465
Entity worldEntity = this ->ecm .EntityByComponents (components::World ());
467
466
{
468
467
this ->sdfGenConfig .mutable_global_entity_gen_config ()
@@ -522,8 +521,7 @@ TEST_F(ElementUpdateFixture, ConfigOverride)
522
521
// ///////////////////////////////////////////////
523
522
TEST_F (ElementUpdateFixture, WorldWithModelsInline)
524
523
{
525
- const std::string worldFile{" test/worlds/shapes.sdf" };
526
- this ->LoadWorld (worldFile);
524
+ this ->LoadWorld (common::joinPaths (" test" , " worlds" , " shapes.sdf" ));
527
525
Entity worldEntity = this ->ecm .EntityByComponents (components::World ());
528
526
auto elem = std::make_shared<sdf::Element>();
529
527
sdf::initFile (" world.sdf" , elem);
@@ -535,7 +533,7 @@ TEST_F(ElementUpdateFixture, WorldWithModelsInline)
535
533
// ///////////////////////////////////////////////
536
534
TEST_F (ElementUpdateFixture, WorldWithModelsIncludedExpanded)
537
535
{
538
- this ->LoadWorld (" test/ worlds/ save_world.sdf" );
536
+ this ->LoadWorld (common::joinPaths ( " test" , " worlds" , " save_world.sdf" ) );
539
537
Entity worldEntity = this ->ecm .EntityByComponents (components::World ());
540
538
auto elem = std::make_shared<sdf::Element>();
541
539
sdf::initFile (" world.sdf" , elem);
@@ -586,7 +584,7 @@ TEST_F(ElementUpdateFixture, WorldComponentUpdate)
586
584
// ///////////////////////////////////////////////
587
585
TEST_F (ElementUpdateFixture, WorldWithModelsIncludedNotExpanded)
588
586
{
589
- const std::string worldFile{ " test/ worlds/ save_world.sdf" } ;
587
+ const auto worldFile = common::joinPaths ( " test" , " worlds" , " save_world.sdf" ) ;
590
588
this ->LoadWorld (worldFile);
591
589
Entity worldEntity = this ->ecm .EntityByComponents (components::World ());
592
590
auto elem = std::make_shared<sdf::Element>();
@@ -644,17 +642,17 @@ TEST_F(ElementUpdateFixture, WorldWithModelsIncludedNotExpanded)
644
642
TEST_F (ElementUpdateFixture, WorldWithModelsIncludedWithInvalidUris)
645
643
{
646
644
const std::string goodUri =
647
- " https://fuel.ignitionrobotics .org/1.0/OpenRobotics /models/Backpack /2" ;
645
+ " https://fuel.gazebosim .org/1.0/openroboticstest /models/backpack /2" ;
648
646
649
647
// These are URIs that are potentially problematic.
650
648
const std::vector<std::string> fuelUris = {
651
649
// Thes following two URIs are valid, but have a trailing '/'
652
- " https://fuel.ignitionrobotics .org/1.0/OpenRobotics /models/Backpack /" ,
653
- " https://fuel.ignitionrobotics .org/1.0/OpenRobotics /models/Backpack /2/" ,
650
+ " https://fuel.gazebosim .org/1.0/openroboticstest /models/backpack /" ,
651
+ " https://fuel.gazebosim .org/1.0/openroboticstest /models/backpack /2/" ,
654
652
// Thes following two URIs are invalid, and will not be saved
655
- " https://fuel.ignitionrobotics .org/1.0/OpenRobotics /models/Backpack /"
653
+ " https://fuel.gazebosim .org/1.0/openroboticstest /models/backpack /"
656
654
" notInt" ,
657
- " https://fuel.ignitionrobotics .org/1.0/OpenRobotics /models/Backpack /"
655
+ " https://fuel.gazebosim .org/1.0/openroboticstest /models/backpack /"
658
656
" notInt/" ,
659
657
};
660
658
@@ -709,7 +707,7 @@ TEST_F(ElementUpdateFixture, WorldWithModelsIncludedWithInvalidUris)
709
707
TEST_F (ElementUpdateFixture, WorldWithModelsIncludedWithNonFuelUris)
710
708
{
711
709
const std::vector<std::string> includeUris = {
712
- " https://fuel.ignitionrobotics .org/1.0/OpenRobotics /models/Backpack " ,
710
+ " https://fuel.gazebosim .org/1.0/openroboticstest /models/backpack " ,
713
711
std::string (" file://" ) + PROJECT_SOURCE_PATH +
714
712
" /test/worlds/models/sphere" };
715
713
@@ -768,7 +766,7 @@ TEST_F(ElementUpdateFixture, WorldWithModelsIncludedWithNonFuelUris)
768
766
// ///////////////////////////////////////////////
769
767
TEST_F (ElementUpdateFixture, WorldWithModelsIncludedWithOneExpanded)
770
768
{
771
- const std::string worldFile{ " test/ worlds/ save_world.sdf" } ;
769
+ const auto worldFile = common::joinPaths ( " test" , " worlds" , " save_world.sdf" ) ;
772
770
this ->LoadWorld (worldFile);
773
771
Entity worldEntity = this ->ecm .EntityByComponents (components::World ());
774
772
auto elem = std::make_shared<sdf::Element>();
@@ -947,8 +945,7 @@ using GenerateWorldFixture = ElementUpdateFixture;
947
945
// ///////////////////////////////////////////////
948
946
TEST_F (GenerateWorldFixture, ModelsInline)
949
947
{
950
- const std::string worldFile{" test/worlds/save_world.sdf" };
951
- this ->LoadWorld (worldFile);
948
+ this ->LoadWorld (common::joinPaths (" test" , " worlds" , " save_world.sdf" ));
952
949
Entity worldEntity = this ->ecm .EntityByComponents (components::World ());
953
950
// Check with expandIncludeTags = true
954
951
{
0 commit comments