2
0
mirror of https://github.com/boostorg/test.git synced 2026-02-11 12:12:11 +00:00
Commit Graph

557 Commits

Author SHA1 Message Date
Raffi Enficiaud
d477598759 Removing tabs 2018-06-27 12:30:10 +02:00
Raffi Enficiaud
b4e08ee4bf Merge branch 'topic/12953-access-master_test_suite-in-datatest-cases' into next-internal
* topic/12953-access-master_test_suite-in-datatest-cases:
  Change log
  Another example with different arity
  Datasets based on std::initializer_list fixes
  Delayed/lazy dataset construction
  Handling sequences of size 0

# Conflicts:
#	doc/closing_chapters/change_log.qbk
#	test/Jamfile.v2
2018-06-27 10:26:54 +02:00
Raffi Enficiaud
9df1f3c493 Another example with different arity 2018-06-27 10:22:46 +02:00
Raffi Enficiaud
b178b8d9a8 Datasets based on std::initializer_list fixes
Since the previous changes, the elements of the std::initializer_list
get destroyed before the test tree initializes properly. The changes
are

- not relying on a moved std::initializer_list for storing the values
of the dataset. Those are moved to a std::vector instead if the
move constructor is noexcept as expected by std::vector,
- providing a template parameter pack for the same type of constructs
in place of the std::initializer_list

Some of the changes are also related to the fact that VS2013 does not
handle properly the std::initializer_list vs template parameter pack.
2018-06-27 10:22:46 +02:00
Raffi Enficiaud
dea96e77bc Delayed/lazy dataset construction
The dataset generators need to access runtime variables, which is
possible only after the test framework enters its setup.

The purpose of those changes is to instanciate the dataset and populate
the test tree during the initialization phase and not during the static
instanciation of the different test case:

- new delayed dataset type that is used for holding the parameters of a dataset
  and its type. This dataset will be instanciated on demand (lazy construct)
- the test tree is now able to hold a generator until the init phase of the test
  module. Once the init reached, the lazy datasets are instanciated and the test
  tree populated with new tests.
- operations like zip do not require the size earlier than needed
2018-06-27 10:22:46 +02:00
Raffi Enficiaud
c694b7fce5 Unit tests for command line arguments 2018-06-27 10:11:52 +02:00
Raffi Enficiaud
6752427ecc Bugfix short form of runtime parameters
The fact that the separator is empty for most of the short version
of the runtime parameters make it such that the parameter is considered
as another/next token.
2018-06-27 10:11:46 +02:00
Raffi Enficiaud
0591dc21d3 Updating the documentation
- difference between skipped and disabled tests
- examples
- additional comments in the code
2018-06-25 20:12:37 +02:00
Raffi Enficiaud
9a9e1467fd Precondition failure is not an error and better handling of skipped tests
- Skipped tests is not an error
- Handling of skipped tests
  - Now printing when a test has been skipped because of the failed precondition
  - More demonstrative test
- Unit test reproducing the precondition error issue
2018-06-25 20:10:51 +02:00
Raffi Enficiaud
3f5d06cb22 Merge branch 'topic/13528-crashes-with-report_sink' into next-internal
* topic/13528-crashes-with-report_sink:
  Change log
  Execute the callback cleaner also for stdout/stderr
  Ensuring shutdown in all execution path

# Conflicts:
#	doc/closing_chapters/change_log.qbk
2018-06-21 22:12:35 +02:00
Raffi Enficiaud
b785e7b4ee Ensuring shutdown in all execution path
- added corresponding smoke test
2018-06-21 20:15:34 +02:00
Raffi Enficiaud
8f80e9de8c Preventing the copy of the master test suite 2018-06-20 22:38:07 +02:00
Raffi Enficiaud
40ee9bae08 Adding extensive tests
- modifying a bit the API of the unit_test_log to retrieve the stream
- defining a test that checks after the framework executed that the streams
  are correct
2018-02-19 23:30:05 +01:00
Raffi Enficiaud
2d614eac67 Merge branch 'topic/13435-report-generation-before-observer-shutdown' into develop
* topic/13435-report-generation-before-observer-shutdown:
  Explicit mention of the test file

# Conflicts:
#	test/Jamfile.v2
2018-02-13 09:04:27 +01:00
Raffi Enficiaud
2dfe7935a9 Explicit mention of the test file 2018-02-13 08:07:47 +01:00
Raffi Enficiaud
801754362e Merge branch 'topic/13435-report-generation-before-observer-shutdown' into next-internal
* topic/13435-report-generation-before-observer-shutdown:
  Change log
  Moving the report generation before the global configuration shutdown
2018-02-12 00:48:21 +01:00
Raffi Enficiaud
b2b30fda1c Moving the report generation before the global configuration shutdown
- adding dedicated test
2018-02-12 00:46:03 +01:00
Raffi Enficiaud
6a3ef6d693 Closing some missing JUNIT tags
- Check the JUNIT build_info
2018-02-11 16:04:53 +01:00
Raffi Enficiaud
c4d0aa6587 Merge branch 'topic/13181-collection-compare-missing-typename' into next-internal
* topic/13181-collection-compare-missing-typename:
  Change log and documentation update
  Fixing VS compilation issues
  forward_iterable: const_iterator infered by the type returned by begin
2018-02-10 20:33:12 +01:00
Raffi Enficiaud
3fb63194cd Fixing VS compilation issues
- VS2012 does not work well with decltype
- VS2013 has a buggy initialization_list that is detected in later updates and lead to a compilation error
2018-02-10 20:31:08 +01:00
Raffi Enficiaud
bb95cdcc42 Merge branch 'topic/12596-sanitize-metacharacters-test-names' into next-internal
* topic/12596-sanitize-metacharacters-test-names:
  Change log
  Sanitizing chars in test case names that collide with runtime filters reserved chars
2018-02-10 20:28:35 +01:00
Raffi Enficiaud
dcfe8b2005 Increasing the arity of BOOST_DATA_TEST_CASE by switching to std::bind
std::bind compatible with boost::function allows for truly variadic.
2018-02-10 14:39:09 +01:00
Raffi Enficiaud
9f0291a6f1 forward_iterable: const_iterator infered by the type returned by begin
- fixing computation of size for types that have only begin/end
- adding test on the new type requirements
2018-02-04 20:42:53 +01:00
Raffi Enficiaud
e3e2a191cf Sanitizing chars in test case names that collide with runtime filters reserved chars
- Additional sanitizing logic for chars that appears on runtime filters
- Not sanitizing spaces anymore
- Remove leading and trailing spaces on test names
2018-02-04 19:53:31 +01:00
Raffi Enficiaud
06d43a2177 Adding the possibility to instanciate a template test case with tuples
Addresses 12092
2018-01-18 14:33:39 +01:00
Raffi Enficiaud
77bda1ffd2 Avoiding duplicate test cases in template and param test cases
- fixing logging on non-existant stream
- fixing doc test cases with duplicate test cases
- updating log and report tests
2018-01-02 20:41:32 +01:00
Raffi Enficiaud
306b55259d Check for clashing names in adding test units
- clashing on name only
- adding tests
2018-01-02 20:41:04 +01:00
Raffi Enficiaud
0c36fae06f Fix patch and regression tests 2017-12-29 21:07:34 +01:00
Raffi Enficiaud
52a09ddc7c Contribution instructions, better README.md 2017-12-28 19:22:56 +01:00
Raffi Enficiaud
42a59be6e6 Merge branch 'topic/11471-array-sequence' into next-internal
* topic/11471-array-sequence:
  Change log
  Documentation update
  Fixing array comparison semantics
  C-arrays are now considered as sequences
2017-07-14 12:46:55 +02:00
Raffi Enficiaud
3fb84ca894 Fixing array comparison semantics 2017-07-09 10:32:50 +02:00
Raffi Enficiaud
aece067770 C-arrays are now considered as sequences
Most of the difficulty came from the fact that c-strings are also c-arrays, but comparisons are made in a different way (eg. not considering the last \0 element in the computation of the size, etc)

- is_forward_iterable now just checks if the type has accessors that makes it forward iterable (no size member function for instance)
- new concept: is_forward_container_iterable that looks for forward_iterable access + size and specific types. This is needed in order to disambiguate the dataset creation for arrays from the ones for collections
- is_cstring is now only for the C-string type of arrays. std::string and basic_cstring are not a C-strings anymore
- new concept is_cstring_comparable: indicates that types can be compared as if they were strings
- new concept for converting types to a basic_cstring, used for comparisons
- wrapper for accessing the begin/end/size (works for containers and C-arrays
- copy ctor for basic_cstring
- boost.range(begin/end) does not work well for array types
2017-07-06 11:47:03 +02:00
Raffi Enficiaud
fcb302b66e Indicating the log level to the formatters for the contexts
- unit tests for the message part: for checking the dataset, we need to register it and then to re-run it under our own environment (so technically it runs twice in the test module)
- refactoring of tests for reusing the stream checker that is agnostic to filenames location, testing time, etc. Modifying the baseline outputs accordingly
2017-07-06 11:45:33 +02:00
Raffi Enficiaud
bf703c2628 Fixing the relational/comparison operators for floating points
- simplifying the logic behind the operations
- minor doc fixes
- tests output change slightly due to the fact that <= and >= are now going through the
  floating point comparison
2017-06-27 20:54:55 +02:00
Raffi Enficiaud
680f24e953 Passing the pattern file as argument 2017-06-25 11:53:37 +02:00
Raffi Enficiaud
5757d9cd16 Fixing logging issues for JUnit with global fixtures
- considering skipped tests: a skipped test is not considered as an error, especially when there was no logged information
- removing CR/LF from TU names
- updating the JUnit output
- additional refactoring of junit
2017-06-22 09:22:57 +02:00
Raffi Enficiaud
1ba4e0a9b8 Fixture setup/teardown detection for C++11 capable compilers 2017-06-22 09:22:56 +02:00
Raffi Enficiaud
847212ae0c Improving global initialization and fixtures
- new macros:
  BOOST_TEST_GLOBAL_FIXTURE: for global "real" fixtures
  BOOST_TEST_GLOBAL_CONFIGURATION: for global configuration of observers.
- deprecating BOOST_GLOBAL_FIXTURE. BOOST_GLOBAL_FIXTURE and BOOST_TEST_GLOBAL_CONFIGURATION are currently
  fully equivalent, the former being confusing in term of scope/role is deprecated
- SFINAE detection for a setup/teardown function within the fixture class
- Attaching global fixture to the main or master test unit being executed, exactly as other fixtures. Global fixtures
  via BOOST_TEST_GLOBAL_FIXTURE registers themselves in a particular field of the framework and are attached each time
  the framework executes the tests, such that we can run the framework on another test root and still benefit from the
  global fixtures. The global fixtures are appended to already existing fixtures (in case the master test suite is not
  the root of the current execution tree).
- Checking that the framework setup is not failing for running the test
- RAII class for restoring the global fixtures
- Tests on the setup/teardown detection
- Tests on global fixtures and baseline
- Fixing several logging issues

Some additional refactoring
- renaming m_curr_test_case to m_curr_test_unit
- function for providing the current test unit (and not only the current test case)
- for output_stream comparison: stops properly if the reference stream is shorter than the current one,
  initialises the read char correctly to 0 and prints a proper ~ at the mismatch location
2017-06-22 09:20:58 +02:00
Daniela Engert
f3a26e0cf9 Conditionally replace deprecated/removed C++98 binders, adapters, and random_shuffle by emulations using more modern equivalents.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-05-01 10:11:47 +02:00
Raffi Enficiaud
7051d361f8 Merge branch 'topic/12540-printing-types-customisation-point' into next-internal
* topic/12540-printing-types-customisation-point:
  Change log update
  Documenting the customization point
  Fixing the tests and checking everything works ok
  Test for customization points
  Customization points for printing user defined types through `boost_test_print_type`
2017-03-09 15:52:41 +01:00
Raffi Enficiaud
f886e36ea9 Fixing the tests and checking everything works ok 2017-03-09 15:47:05 +01:00
Raffi Enficiaud
3f1da25d93 JUnit: changing the default to log-messages 2017-03-05 20:40:59 +01:00
Raffi Enficiaud
88b3854513 JUnit: refactoring for handling the different phases in an easier way
- adding the global messages as a global sysout/syserr
- detecting/parsing better the skipped tests
2017-03-05 20:13:40 +01:00
Raffi Enficiaud
e02d6b6758 JUnit: being able to indicate the log level for speeding up
- junit internal log level to be able to intercept all the intermediate messages (tu enter/exit)
- skipping events that do not match the desired log level
- some refactoring (root of the subtree, getter of the current log)
- logs that do not belong to any TU go to a global log

TODO: global log should be outputted to the stream as well
2017-03-01 23:51:20 +01:00
Raffi Enficiaud
08480e4345 Test for customization points 2017-02-16 08:38:33 +01:00
Raffi Enficiaud
065e85ff08 Customization points for printing user defined types through boost_test_print_type
- some cleanups
2017-02-16 08:38:33 +01:00
Raffi Enficiaud
1bb72301c2 Merge branch 'topic/12748-VERSION-macro-clashes' into next-internal
* topic/12748-VERSION-macro-clashes:
  Fix tests issues
  Change log update
  Change some capital variable names to lowercase

# Conflicts:
#	doc/closing_chapters/change_log.qbk
2017-02-15 09:56:55 +01:00
Raffi Enficiaud
243542f9e2 Merge branch 'topic/12778-nullptr' into next-internal
* topic/12778-nullptr:
  Change log update
  nullptr support in the test tools + test

# Conflicts:
#	doc/closing_chapters/change_log.qbk
2017-02-15 09:54:49 +01:00
Raffi Enficiaud
229e71199c nullptr support in the test tools + test 2017-02-15 09:21:42 +01:00
Adam Majer
20bcf731e2 Change some capital variable names to lowercase
Addresses issue 12748.
Now potential clashing variable name used in runtime parameters are lowercase and prepended with "btrt_".
2017-02-15 09:21:29 +01:00