Skip to content

Conversation

@jlaurens
Copy link
Collaborator

A QCOMPARE test is replaced by a more permissive TWX_COMPARE_DBL. This clever macro uses relative comparison instead of absolute comparison as usually found on the net.

As side effect we get two very cool technologies for free:

  • testing without building everything, to gain a huge amount of time.
mkdir build_ui && cd. buid_ui && cmake ../src/ui && cmake --build . && ctest .

The same holds for unit-tests instead of src/ui except that some tests are disabled. In forthcoming commits, all the test should run separately.

  • The summary of the configuration can be colorized, as demonstrated by the src/ui/CMakeList.txt. Not essential, but very handy.

  • Source documentation with doxydoc. Once configured, run make doxydoc and open <binary_dir>/doxydoc/html/index.html: Tadaaaaam!

Using docco is not really helpfull for day to day use and Doxygen really seems the way to go. Documenting .cmake files is rather tricky. Next step is the documentation of CMakeLists.txt.

A `QCOMPARE` test is replaced by a more permissive `TWX_COMPARE_DBL`.
This clever macro uses relative comparison instead of absolute comparison
as usually found on the net.

As side effect we get two very cool technologies for free:
* testing without building everything, to gain a huge amount of time.
```
mkdir build_ui && cd. buid_ui && cmake ../src/ui && cmake --build . && ctest .
```
The same holds for `unit-tests` instead of `src/ui` except that some tests
are disabled. In forthcoming commits, all the test should run separately.

* The summary of the configuration can be colorized, as demonstrated
by the `src/ui/CMakeList.txt`. Not essential, but very handy.

* Source documentation with `doxydoc`. Once configured, run
`make doxydoc` and open `<binary_dir>/doxydoc/html/index.html`:
Tadaaaaam!

Using `docco` is not really helpfull for day to day use and
Doxygen really seems the way to go. Documenting `.cmake` files is rather tricky.
Next step is the documentation of `CMakeLists.txt`.
@jlaurens jlaurens requested a review from stloeffler May 12, 2023 22:00
@jlaurens
Copy link
Collaborator Author

I forgot that it solves issue #1019

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Merging #1024 (402fdef) into main (8578674) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 402fdef differs from pull request most recent head 72dc929. Consider uploading reports for the commit 72dc929 to get more accurate results

@@           Coverage Diff           @@
##             main    #1024   +/-   ##
=======================================
  Coverage   34.73%   34.73%           
=======================================
  Files         148      148           
  Lines       17381    17381           
=======================================
  Hits         6038     6038           
  Misses      11343    11343           
Impacted Files Coverage Δ
src/ui/Test/byte_echo_test.cpp 73.68% <ø> (ø)
src/ui/Test/TwxUITest.cpp 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants