From: Wolfgang Bangerth Date: Tue, 11 Apr 2017 21:52:10 +0000 (-0600) Subject: Add test. X-Git-Tag: v9.0.0-rc1~1695^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6473dc0c72f759aa6c7dacb9609c0b284a405709;p=dealii.git Add test. --- diff --git a/tests/base/table_handler_15.cc b/tests/base/table_handler_15.cc new file mode 100644 index 0000000000..c6ffaeb972 --- /dev/null +++ b/tests/base/table_handler_15.cc @@ -0,0 +1,48 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2017 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +// test TableHandler::declare_column() + + +#include "../tests.h" +#include +#include +#include + +#include +#include +#include +#include + + +int main () +{ + initlog (); + + TableHandler table; + + // declare columns either directly, or by adding a value + table.declare_column ("key1"); + table.add_value("key2", 0); + table.declare_column ("key3"); + + // finish that row (even though there is something only in column 2) + // and output the whole shebang + table.start_new_row (); + + table.write_text(deallog.get_file_stream(), + TableHandler::org_mode_table); +} diff --git a/tests/base/table_handler_15.output b/tests/base/table_handler_15.output new file mode 100644 index 0000000000..746ed264d0 --- /dev/null +++ b/tests/base/table_handler_15.output @@ -0,0 +1,3 @@ + +| key1 | key2 | key3 | +| "" | 0 | "" |