From: Denis Davydov Date: Thu, 12 Oct 2017 12:58:15 +0000 (+0200) Subject: doc: explain how to use SOURCE_DIR from user tests X-Git-Tag: v9.0.0-rc1~959^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae47d3e26ea4046d35d0d6a316d85051cb2aa494;p=dealii.git doc: explain how to use SOURCE_DIR from user tests --- diff --git a/doc/users/testsuite.html b/doc/users/testsuite.html index bf5af14057..667f3b4d3a 100644 --- a/doc/users/testsuite.html +++ b/doc/users/testsuite.html @@ -247,6 +247,16 @@ Test project .../examples/step 100% tests passed, 0 tests failed out of 2 Total Test time (real) = 0.43 sec + In some cases, additional input data has to be provided in users' tests. For + example, we may have an input file +
+tests/support/my_test_2.input
+ which shall be parsed within my_test_2.cc. To read this file, + one can use the SOURCE_DIR preprocessor variable which will be equal + to the parent folder of each .cc test. In other words, given the current + imaginary directory stucture, const std::string str = std::string(SOURCE_DIR) + "/my_test_2.input"; + used from my_test_2.cc will contain the path to the + auxiliary input file.