-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
base: rolling
Are you sure you want to change the base?
Conversation
I also changed the names to match the example file tree Signed-off-by: Jakeisthesnake <[email protected]>
There was a problem hiding this 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`` |
There was a problem hiding this comment.
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.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST(<your_package>, a_first_test) | |
TEST(my_package, a_first_test) |
|
||
.. code-block:: | ||
|
||
<your_workspace>/src/<your_package>/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<your_workspace>/src/<your_package>/ | |
workspace_folder/src/my_package/ |
[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