Skip to content

Commit

Permalink
Ignore codecov paths in tests (#1671)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
SteveMacenski authored May 2, 2020
1 parent c64ee48 commit e85802c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
fixes:
- "src/navigation2/::"

ignore:
- "*/**/test/*" # ignore package test directories, e.g. nav2_dwb_controller/costmap_queue/tests
- "*/test/**/*" # ignore package test directories, e.g. nav2_costmap_2d/tests
3 changes: 3 additions & 0 deletions nav2_util/test/test_string_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <string>

#include "nav2_util/string_utils.hpp"
#include "gtest/gtest.h"

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

0 comments on commit e85802c

Please sign in to comment.