2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-24 18:32:30 +00:00
Commit Graph

1210 Commits

Author SHA1 Message Date
Raffi Enficiaud
04006ad5bd Fix visibility warnings
Forward declarations for templates should also have the visibility right
Local static variables cannot have their visibility set and need to get out of the function scope.
2019-03-28 08:52:16 +01:00
Juan Alday
377695da54 Fixes issue with sun_cc lacking the __global attribute for enums
Fixes https://github.com/boostorg/test/issues/213
https://docs.oracle.com/cd/E19205-01/819-5267/bkaed/index.html
2019-03-28 07:26:44 +01:00
Raffi Enficiaud
6a8773f626 Merge branch 'doc/small-additions' into next-internal
* doc/small-additions:
  More about datasets and delayed ones
  Updates on what is a sequence.
  Test tree constrains and doc refactoring
2019-03-24 17:43:25 +01:00
Raffi Enficiaud
4f3806d802 Win32 waitable timer: better casting 2019-03-24 17:42:31 +01:00
Raffi Enficiaud
17ce78b0fe More about datasets and delayed ones 2019-03-24 17:41:37 +01:00
Raffi Enficiaud
b9d74d1f55 Merge branch 'topic/PR-212-ar-parameter-assertion_result-warning' into next-internal
* topic/PR-212-ar-parameter-assertion_result-warning:
  Change log
  Comment 'ar' parameter of assertion_result to avoid warning

# Conflicts:
#	doc/closing_chapters/change_log.qbk
2019-03-20 20:29:39 +01:00
Mateusz Łoskot
fa037a059e Comment 'ar' parameter of assertion_result to avoid warning 2019-03-20 20:28:34 +01:00
Rainer Deyke
5feed945fc Change Windows.h to lower case. 2019-03-20 08:25:52 +01:00
Raffi Enficiaud
fcd24729df New documentation section about runtime configuration
- adding tests for custom command line argument passing
- using command line argument in global fixtures and raising strong errors
- using command line argument in init function and describing the errors
- using command line argument dataset test cases and describing the errors
- removing sample totally from all the examples
2019-03-19 01:43:29 +01:00
Raffi Enficiaud
37dfcf2117 Merge branch 'topic/fix-win32-timed-test' into next-internal
* topic/fix-win32-timed-test:
  Change log
  Fixup _WIN32_WINNT definition
2019-03-05 21:56:34 +01:00
Raffi Enficiaud
0ed5a9a71f Merge branch 'topic/GH-198-support-boost-cmake-in-b2' into next-internal
* topic/GH-198-support-boost-cmake-in-b2:
  Change log
  Making the dynamic link aware of the b2/cmake defines
2019-03-05 21:54:25 +01:00
Raffi Enficiaud
7d71da7a7f Template test cases: handling the references and volatile in the test-case names 2019-03-04 21:02:13 +01:00
Raffi Enficiaud
9b3be27a9f Template test cases with arbitrary parameter pack
Using arbitrary parameter pack of a template
class/struct to infer the list of types, instead
of restricting to `std::tuples`.

Filtering the mpl::sequences from this logic because
the parameter pack is filled with `mpl::na` on non-entries.
2019-03-04 15:23:08 +01:00
Raffi Enficiaud
625bafd2cd Making the dynamic link aware of the b2/cmake defines 2019-03-03 20:42:28 +01:00
Raffi Enficiaud
504723babe Fixup _WIN32_WINNT definition 2019-03-03 16:15:56 +01:00
Raffi Enficiaud
7e20f966dc Junit counting fixups: failed and errored differences
Failed and errored are exclusive in the JUnit sense.
Counting the number of total tests slightly differently.

Changing slightly the signature of unit_test_log_formatter::log_build_info to avoid a sticky
state when the function was called only once (happens for instance in JUNIT).
2019-03-01 08:47:50 +01:00
Raffi Enficiaud
76d1bdfef8 Merge branch 'topic/GH-202-boost-timer-deprecation' into next-internal
* topic/GH-202-boost-timer-deprecation:
  Change log
  Documentation updates
  Adding the support for skipped test units/suites in the reporter and formatters
  <boost/timer.hpp> removal and time-out for suites and major refactoring
2019-02-27 21:11:12 +01:00
Raffi Enficiaud
83d505a61d Adding the support for skipped test units/suites in the reporter and formatters 2019-02-27 14:58:57 +01:00
Raffi Enficiaud
42e9a15317 <boost/timer.hpp> removal and time-out for suites and major refactoring
As boost/timer.hpp is being deprecated, and the needed functionality
is very little, reimplemeted naively a timing class for the purpose
of measuring the test-unit time.

- specific timer class that is cross-platform and agnostic to changes made
  to the OS while measuring time (mac, posix and windows). Wall-clock and system/user
  time available
- changed framework to work fully with microseconds. Only ::alarm needs seconds
  and ceiling is used for signaling time-out
- Windows now signals also time-outs the same way as for other platforms (exception
  raised in the test and reported). However, Windows platform do not raise a signal
  that terminates the current test
- timeout is not used for failing a test-suite as well. Remaining time calculation is
  now made in microseconds. Adding an observer interface for signaling time out and
  adding the time outs in the test results
- cleaned up interfaces, clarify the code about the dimension of the different scalar values.
2019-02-27 14:55:00 +01:00
Tien Do
9103a0e027 Correct library name in test runner help screen 2019-02-15 13:40:49 +01:00
Raffi Enficiaud
5771ddb4f8 Merge branch 'topic/GH-138-decorator-dataset-testcase' into next-internal
* topic/GH-138-decorator-dataset-testcase:
  Change log
  Fixing propagation of decorators to underlying test-case generator

# Conflicts:
#	doc/closing_chapters/change_log.qbk
2019-02-14 08:33:24 +01:00
Raffi Enficiaud
475a399d97 Merge branch 'topic/PR-205-Fix-MinGW-vsnprintf-compile-errors-warnings' into next-internal
* topic/PR-205-Fix-MinGW-vsnprintf-compile-errors-warnings:
  Change log
  Added unused variable markup to silence gcc warnings.
  Use legacy _vsnprintf on MinGW.

# Conflicts:
#	doc/closing_chapters/change_log.qbk
2019-02-14 08:27:44 +01:00
Raffi Enficiaud
52c7da62d8 Fixing propagation of decorators to underlying test-case generator
The BOOST_DATA_TEST_CASE creates an implicit test suite. that consumes
all the decorators that have been declared prior to the BOOST_DATA_TEST_CASE
macro. In order to properly propagate the decorators to the underlying
test-case generator (the data test case), a new "stacked" decorator collector
has been implemented. The new decorator decorator::stack_decorator
allows the user to push the currently stacked decorator to a higher level of the
hierarchy.
2019-02-14 08:25:32 +01:00
Raffi Enficiaud
a2816aeb75 Merge branch 'topic/GH-197-plural-context-in-single-scope' into next-internal
* topic/GH-197-plural-context-in-single-scope:
  Change log
  Making BOOST_TEST_CONTEXT variadic and adding sticky context

# Conflicts:
#	doc/closing_chapters/change_log.qbk
2019-02-13 07:15:12 +01:00
Andrey Semashev
40ddfdd0b1 Added unused variable markup to silence gcc warnings.
The singleton reference variables and a few other globals may not be actually
used in the user's code, which makes gcc emit warnings. This commit marks these
variables as potentially unused, which silences the warnings.
2019-02-13 07:11:59 +01:00
Andrey Semashev
c5ef935641 Use legacy _vsnprintf on MinGW.
Apparently, some versions of legacy MinGW headers don't provide
the standard vsnprintf function, as Appveyor CI fails for this target.
Thus we use the non-standard MSVC-specific _vsnprintf instead.
2019-02-12 01:12:04 +01:00
Raffi Enficiaud
1cf1503b23 Making BOOST_TEST_CONTEXT variadic and adding sticky context
To ease the creation of contexts, variadic let us declare several
values in one call (no extra brace) while ticky context let us
add new information while they arrive.

The example shows a random trial making a test fail. We force the failure
for the unit tests, which does not remove the documentation value of the
example.
2019-02-12 01:04:00 +01:00
Raffi Enficiaud
60eec92e0e Merge branch 'topic/GH-203-dataset-new-fixtures' into next-internal
* topic/GH-203-dataset-new-fixtures:
  Change log
  Extended fixture messages for template test cases
  Dataset test case: allowing fixtures w. setup/teardown

# Conflicts:
#	doc/closing_chapters/change_log.qbk
2019-02-10 23:25:10 +01:00
Raffi Enficiaud
638f7c1e0a Extended fixture messages for template test cases
Unifying the messages as for the other test-cases
2019-02-10 20:24:01 +01:00
Raffi Enficiaud
0b4eeb22c6 Dataset test case: allowing fixtures w. setup/teardown
Also the context is now spread to the fixture as well.
2019-02-10 20:23:52 +01:00
Raffi Enficiaud
ae1a6c608b Merge branch 'topic/floating-point-comparison-issues' into next-internal
* topic/floating-point-comparison-issues:
  Change log
  Relaxed tolerance based comparisons
2019-02-08 03:26:52 +01:00
Raffi Enficiaud
80d342a806 Relaxed tolerance based comparisons
It is now possible to compare a type that is tolerance based together
with a type that is not necessarily tolerance based but still
arithmetic.

Doc update and tests.
2019-02-08 01:32:54 +01:00
Raffi Enficiaud
a84a5564f5 Default visibility for enums and rtti objects facility
Making the RTTI objects globally visible.
Some old versions of clang are apparently not honoring
the enum visibility.
2019-02-08 00:00:01 +01:00
Raffi Enficiaud
f8fc344a73 Merge branch 'topic/deprecating-minimal' into next-internal
* topic/deprecating-minimal:
  Change log
  Deprecating boost.test minimal.hpp header
2019-02-04 07:58:20 +01:00
Raffi Enficiaud
09c0f0ae53 Deprecating boost.test minimal.hpp header 2019-02-03 21:09:11 +01:00
Raffi Enficiaud
f9c674b54f Merge branch 'topic/PR-172-unused-variable-warning' into next-internal
* topic/PR-172-unused-variable-warning:
  Change log
  Using boost/core facility to silence unused variables
  Check for non-used variables when NDEBUG is defined
2019-02-03 20:06:54 +01:00
Raffi Enficiaud
5a2ee25b54 Using boost/core facility to silence unused variables
- removing boost.test workaround for unused variables
- deleting a file that apparently is not needed anymore
2019-02-03 20:05:23 +01:00
Peter Jansson
92ec933350 Check for non-used variables when NDEBUG is defined
When NDEBUG is defined, the compiler may warn about variables not used. They are only used in assert's.
2019-02-03 12:30:07 +01:00
Raffi Enficiaud
07009990a5 Merge branch 'topic/GH-194-master-test-suite-declared-twice' into next-internal
* topic/GH-194-master-test-suite-declared-twice:
  Change log
  Removed second declaration
2019-02-03 11:48:10 +01:00
Raffi Enficiaud
c1780fc38b Merge branch 'topic/PR-195-Fix-MinGW-compilation-problems' into next-internal
* topic/PR-195-Fix-MinGW-compilation-problems:
  Change log
  Fix missing vsnprintf errors on MinGW.
2019-02-03 11:46:47 +01:00
Raffi Enficiaud
845f96aa31 Removed second declaration 2019-02-02 20:22:54 +01:00
Andrey Semashev
592fcd53e7 Fix missing vsnprintf errors on MinGW.
vsnprintf should be declared in stdio.h, not cstdio. This commit adds the
missing include and reorganises the workarounds for different platforms that
previously included the header.
2019-02-02 13:49:31 +01:00
Raffi Enficiaud
6199c60ddb Suppress color setup warnings 2019-02-02 13:28:43 +01:00
Raffi Enficiaud
1f88919c6b Deregistration of global objects at framework shutdown time
The change ensures that the framework unregisters all the global fixtures and
configuration when it is shut down. This prevents the global fixtures/configuration
to deregister themselves at destruction time, which requires the framework to be
still existing, and for which the order of destruction cannot be ensured during
the unwinding of static/global objects.
2019-02-02 11:22:07 +01:00
Raffi Enficiaud
acbcd74993 Visibility fixes
+ Warning fixup
2019-02-02 00:38:49 +01:00
Raffi Enficiaud
aec7ebe78e GH-180: warning for unreachable return statement 2019-02-02 00:38:00 +01:00
Raffi Enficiaud
b45052bba9 Check warning removal 2019-02-02 00:38:00 +01:00
Raffi Enficiaud
f6e76d728c Suppressing the missing-declaration warning 2018-10-30 23:54:09 +01:00
Raffi Enficiaud
78e3d165d2 Fix MSVC 2012 2018-10-29 10:46:14 +01:00
Raffi Enficiaud
f3e4174572 Addressing #13380: join returning reference to temporary
Raising an error in case of reference to temporary by changing the compiler options.
Seems to work better than any other programmatic check.

Removing the need for the sample type definition from datasets.
2018-10-29 10:45:59 +01:00