Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test file location wasn't clear, added example file tree #4179

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

Jakeisthesnake
Copy link

[I am a beginner with ROS, but from what I could gather by looking at other repositories, the test files go in the root of the package directory. Please reject this pull request if that isn't accurate. Or leave feedback and I can correct it.]

I also changed the names to match the example file tree.

One example of where test files are stored in another repository.
https://github.com/ros2/geometry2/tree/rolling/tf2

I also changed the names to match the example file tree

Signed-off-by: Jakeisthesnake <[email protected]>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with a few minor nits. thanks for creating PR.

@@ -12,13 +12,13 @@ Package Setup

Source Code
^^^^^^^^^^^
We'll start off with our code in a file called ``test/tutorial_test.cpp``
We'll start off with our code in a file called ``<your_package>/test/tutorial_test.cpp``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.ros.org/en/rolling/Tutorials/Beginner-Client-Libraries/Creating-Your-First-ROS2-Package.html#createpkg uses my_package, would be nice if we use that here as well.

Suggested change
We'll start off with our code in a file called ``<your_package>/test/tutorial_test.cpp``
We'll start off with our code in a file called ``my_package/test/tutorial_test.cpp``


.. code-block:: c++

#include <gtest/gtest.h>

TEST(package_name, a_first_test)
TEST(<your_package>, a_first_test)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST(<your_package>, a_first_test)
TEST(my_package, a_first_test)


.. code-block::

<your_workspace>/src/<your_package>/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<your_workspace>/src/<your_package>/
workspace_folder/src/my_package/

@clalancette clalancette added the more-information-needed Further information is required label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants