]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Document the line continuation tests.
authorDavid Wells <wellsd2@rpi.edu>
Mon, 25 Jan 2016 02:44:30 +0000 (21:44 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Mon, 25 Jan 2016 03:44:53 +0000 (22:44 -0500)
tests/bits/parameter_handler_backslash_01.cc
tests/bits/parameter_handler_backslash_02.cc
tests/bits/parameter_handler_backslash_03.cc
tests/bits/parameter_handler_backslash_04.cc
tests/bits/parameter_handler_backslash_05.cc
tests/bits/parameter_handler_backslash_06.cc
tests/bits/parameter_handler_backslash_07.cc

index 88f65430a44b160ce1692b6d65f5291f0cc133cd..d0496c713e5eea054e2592a024066a50734dc86e 100644 (file)
 #include <deal.II/base/parameter_handler.h>
 #include <fstream>
 
+/*
+ * Test that ParameterHandler can read parameters of the form
+ *
+ *     set Function = a, \
+ *                    b, \
+ *                    c
+ *
+ * correctly. The main point of this test is to exercise the
+ * backslash-handling part of ParameterHandler.
+ */
 
 int main ()
 {
index f5e8b216e733f13af736033b2fb45780b32f2116..ffc273a636f01ada6c75e3fc7dde13c3b9fd8ab5 100644 (file)
 #include <deal.II/base/parameter_handler.h>
 #include <fstream>
 
+/*
+ * Test that ParameterHandler can read parameters of the form
+ *
+ *     set Function = a,\
+ *                    \
+ *                    b,\
+ *     \
+ *                    c
+ *
+ * correctly. This tests how ParameterHandler handles lines that are blank
+ * aside from whitespace and a continuation ('\') character.
+ */
 
 int main ()
 {
index 3b205e7be0bce9bf833a71ae91ef5c0a2d76bb0a..11ff875cf7ec747b05d35bd4146d0faebe1199d1 100644 (file)
 #include <deal.II/base/parameter_handler.h>
 #include <fstream>
 
+/*
+ * Test that ParameterHandler does not join lines for things like
+ *
+ *     set Function = a,\ # first term
+ *                    b
+ *
+ * since there are non-whitespace characters after the '\'.
+ */
 
 int main ()
 {
index 92fe3fe89ac24786c8d967deeca531aee6e206a4..376f8c40b2d660496bf68e2a8e441c8caa253ec2 100644 (file)
 #include <deal.II/base/parameter_handler.h>
 #include <fstream>
 
+/*
+ * Test that ParameterHandler does *not* join lines for things like
+ *
+ *      set Function = a,\ b,
+ *                     c
+ */
 
 int main ()
 {
index cd0b010ff7a1d87b03c01f0e8058956e17e60451..0500ba9a077028ea56e82298a441743a45186cea 100644 (file)
 #include <deal.II/base/parameter_handler.h>
 #include <fstream>
 
+/*
+ * Test that ParameterHandler will stop a line continuation if a completely
+ * blank line follows one with a '\', such as
+ *
+ *     set Function_1 = a, \
+ *
+ *                      b, \
+ *                      c
+ *
+ * This should *not* be parsed as 'Function_1 = a, b, c'.
+ */
 
 int main ()
 {
index 867870464eaed197df0f6a0daa9e909977c3990c..a584306cf66671a20758c9f581475d58fe9b2b18 100644 (file)
 // ---------------------------------------------------------------------
 
 
+/*
+ * Test that ParameterHandler will ignore whitespace characters following a
+ * '\' character when joining lines.
+ */
+
 #include "../tests.h"
 #include <deal.II/base/logstream.h>
 #include <deal.II/base/parameter_handler.h>
index 765352f5873b38e74424fb0657560f7b38dc39d9..d9f16c6f2d307b01d5b9948afffd50663efdbf59 100644 (file)
 #include <deal.II/base/parameter_handler.h>
 #include <fstream>
 
+/*
+ * If a parameter file line ends in a '\', then the whitespace at at the
+ * beginning of the next line is ignored when joining the lines. For example,
+ * the input
+ *
+ *      set value = val\
+ *                  u\
+ *                  e
+ *
+ * is parsed as 'set value = value'.
+ */
+
 
 int main ()
 {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.