Skip to content

Commit

Permalink
Let's always have unit test being built as the default
Browse files Browse the repository at this point in the history
  • Loading branch information
KjellKod committed Nov 30, 2023
1 parent 80d0e9a commit 959938d
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 125 deletions.
2 changes: 1 addition & 1 deletion docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ will install the g3log library to `CPACK_PACKAGING_INSTALL_PREFIX`.

## <a name="testing">Testing</a>

By default, tests will not be built. To enable unit testing, you should turn on `ADD_G3LOG_UNIT_TEST`.
By default, tests will be built. To disable unit testing, you should turn off `ADD_G3LOG_UNIT_TEST`.

Suppose the build process has completed, then you can run the tests with:
```
Expand Down
10 changes: 3 additions & 7 deletions test_unit/Test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@

# ============================================================================
# TEST OPTIONS: Turn OFF the ones that is of no interest to you
# ---- by default all is OFF: except 'g3log-FATAL-example -----
# ---- the reason for this is that
# ----- 1) the performance tests were only thoroughly tested on Ubuntu, not windows-
# (g3log windows/linux, but Google's glog only on linux)
#
# 2) The unit test were tested windows/linux
# ---- by default unit tests and g3log-FATAL-example are enabled.
# Performance tests are turned off by default since they were not tested on Windows.
# ============================================================================


# Unit test for g3log (cmake -DUSE_G3LOG_UNIT_TEST=ON ..)
option (ADD_G3LOG_UNIT_TEST "g3log unit tests" OFF)
option (ADD_G3LOG_UNIT_TEST "g3log unit tests" ON)


# 4. create the unit tests for g3log --- ONLY TESTED THE UNIT TEST ON LINUX
Expand Down
Loading

0 comments on commit 959938d

Please sign in to comment.