summaryrefslogtreecommitdiffstats
path: root/Tests/Tutorial/Step6/tutorial.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Tests/Tutorial: Fix when USE_MYMATH is OFFDaniele E. Domenichelli2014-10-311-2/+6
| | | | | | | | | | | | | | | Unit tests for the square root of "-25" currently fail when USE_MYMATH is disabled. The "mysqrt" method in the tutorials, returns "0" for a negative value, while "sqrt" returns "NaN", and therefore the output is not accepted by the test. This patch checks if the number is negative and eventually returns "0" before calling "sqrt" or "mysqrt" to fix this issue. Printing a NaN might cause issues with the string catched by the tests on some platform. Therefore assume that "0" is correct and "fix" the USE_MYMATH=OFF version by checking if the number is negative and eventually returning "0" before calling "sqrt" or "mysqrt".
* ENH: Add new Tutorial steps. Diff between Step5 and Step6 shows how to add a ↵David Cole2007-11-081-0/+34
cpack driven installer to your project. Diff between Step6 and Step7 shows how to add ctest dashboard scripting capability.