mirror of
https://github.com/polybar/polybar.git
synced 2024-11-25 13:55:47 -05:00
Move testing page to repo
This commit is contained in:
parent
f6651d58d0
commit
e1856cf8ec
4 changed files with 33 additions and 4 deletions
|
@ -99,8 +99,9 @@ If possible, you should also add tests for the things you write.
|
|||
However, this is not always possible, for example when working on modules.
|
||||
But at least isolated components should be tested.
|
||||
|
||||
See the [testing page](https://github.com/polybar/polybar/wiki/Testing) on the
|
||||
wiki for more information.
|
||||
See the [testing
|
||||
page](https://polybar.readthedocs.io/en/latest/dev/testing.html) in the
|
||||
documentation.
|
||||
Also don't hesitate to ask for help, testing isn't that mature in polybar yet
|
||||
and some things may be harder/impossible to test right now.
|
||||
|
||||
|
@ -154,7 +155,8 @@ repo.
|
|||
|
||||
### Style
|
||||
|
||||
Please read our [style guide](https://github.com/polybar/polybar/wiki/Style-Guide).
|
||||
Please read our [style
|
||||
guide](https://polybar.readthedocs.io/en/latest/dev/style-guide.html).
|
||||
|
||||
## Donations
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ We use ``clang-format`` for code formatting, the style rules are defined in
|
|||
``.clang-format``, before submitting a PR, make sure to run the following command
|
||||
on all the C++ files you changed:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: shell
|
||||
|
||||
clang-format -style=file -i <FILES>
|
||||
|
||||
|
|
26
doc/dev/testing.rst
Normal file
26
doc/dev/testing.rst
Normal file
|
@ -0,0 +1,26 @@
|
|||
Testing
|
||||
=======
|
||||
|
||||
Polybar uses `googletest <https://google.github.io/googletest/>`_ as its
|
||||
testing and mocking framework.
|
||||
Tests live in the ``tests/`` directory; they can be enabled during cmake with
|
||||
``-DBUILD_TESTS=ON`` and compiled with ``make all_unit_tests``.
|
||||
|
||||
Each test gets its own executable in ``build/tests``, which can be executed to run
|
||||
a specific test.
|
||||
|
||||
Running all tests is preferably done with the following command:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
make check
|
||||
|
||||
This runs all available tests and prints the output in color for failed tests
|
||||
only.
|
||||
|
||||
Adding New Tests
|
||||
----------------
|
||||
|
||||
All new tests need to be added to the ``tests/CMakeLists.txt`` file. Have a look
|
||||
at the other unit tests in ``tests/unit_tests`` to see how to write tests for your
|
||||
code.
|
|
@ -34,6 +34,7 @@ Welcome to the official polybar documentation.
|
|||
:caption: Developer Documentation:
|
||||
|
||||
dev/style-guide
|
||||
dev/testing
|
||||
dev/release-workflow
|
||||
|
||||
Getting Help
|
||||
|
|
Loading…
Reference in a new issue