Skip to content
Simon Gene Gottlieb edited this page Dec 7, 2020 · 7 revisions

Test infrastructure

Building the tests

Check seqan3 documentation: http://docs.seqan.de/seqan/3.0.1/setup_tests.html

TODO cmake call

TODO how GoogleTest it is automatically checked

adding a test

TODO create file, add to cmake lists et cetera

Writing a test case

Basic rules

  • test the publicly specified interfaces
  • remember to test const/non-const versions
  • remember to test rvalue/lvalue versions
  • try to use generalized typed test whenever possible
  • write typed tests for your concepts and include all types that fulfill the concept

Test dependencies

  • prefer many small tests to one big test
  • try to make tests atomic, i.e. make them independent of functionality tested in other tests
  • if you need to use functionality from other tests, re-order your tests so that they only depend on previously tested functionality, not on things tested "later on"
  • never introduce circular dependencies between tests!

Example

TODO

Clone this wiki locally