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

Document unit testing in the engine and modules #4017

Merged
merged 1 commit into from
Sep 27, 2020
Merged

Document unit testing in the engine and modules #4017

merged 1 commit into from
Sep 27, 2020

Conversation

Xrayez
Copy link
Contributor

@Xrayez Xrayez commented Sep 15, 2020

See godotengine/godot#40659.

Adds a new page for C++ unit testing in Godot Engine.

Adds a section to "Custom modules in C++" to document the process of writing module tests as well, reusing the same mechanism.

There are naming conventions which are worth to be considered: godotengine/godot-proposals#1388, but at its current state, this should be enough.


Update: available at https://docs.godotengine.org/en/latest/development/cpp/unit_testing.html.

development/cpp/unit_testing.rst Outdated Show resolved Hide resolved
development/cpp/unit_testing.rst Outdated Show resolved Hide resolved
development/cpp/unit_testing.rst Outdated Show resolved Hide resolved
Adds a new page for C++ unit testing in Godot Engine.

Adds a section to "Custom modules in C++" to document the
process of writing module tests as well, reusing the same mechanism.
@Xrayez
Copy link
Contributor Author

Xrayez commented Sep 15, 2020

Applied suggested changes.

I was thinking about adding a section on generating test coverage and running tests with sanitizers, but this could be done in a separate PR, and perhaps by someone more knowledgeable in this area or someone who has already done this (@qarmin, @Calinou). 🙂

In fact, if there are some memory leaks in tests, CI won't let you pass those, but this is more or less advanced topic for testing, and sanitizers are not supported on all platforms out of the box.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Thanks!

@Calinou Calinou changed the title Document unit testing Document unit testing in the engine and modules Sep 27, 2020
@Calinou Calinou merged commit 8c5a168 into godotengine:master Sep 27, 2020
@Xrayez Xrayez deleted the unit-testing branch September 27, 2020 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants