Skip to content

Commit e85802c

Browse files
Ignore codecov paths in tests (#1671)
* Ignore codecov paths in tests * adding missing string test case for stripping leading slash * Update test_string_utils.cpp * Update test_string_utils.cpp * Update codecov.yml * Update codecov.yml * Update codecov.yml * Update codecov.yml
1 parent c64ee48 commit e85802c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
fixes:
22
- "src/navigation2/::"
3+
4+
ignore:
5+
- "*/**/test/*" # ignore package test directories, e.g. nav2_dwb_controller/costmap_queue/tests
6+
- "*/test/**/*" # ignore package test directories, e.g. nav2_costmap_2d/tests

nav2_util/test/test_string_utils.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#include <string>
16+
1517
#include "nav2_util/string_utils.hpp"
1618
#include "gtest/gtest.h"
1719

@@ -26,4 +28,5 @@ TEST(Split, SplitFunction)
2628
ASSERT_EQ(split("foo:bar:", ':'), Tokens({"foo", "bar", ""}));
2729
ASSERT_EQ(split(":", ':'), Tokens({"", ""}));
2830
ASSERT_EQ(split("foo::bar", ':'), Tokens({"foo", "", "bar"}));
31+
ASSERT_TRUE(nav2_util::strip_leading_slash(std::string("/hi")) == std::string("hi"));
2932
}

0 commit comments

Comments
 (0)