3 // Copyright (C) 2005-2018 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the terms
7 // of the GNU General Public License as published by the Free Software
8 // Foundation; either version 3, or (at your option) any later
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this library; see the file COPYING3. If not see
18 // <http://www.gnu.org/licenses/>.
21 // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
23 // Permission to use, copy, modify, sell, and distribute this software
24 // is hereby granted without fee, provided that the above copyright
25 // notice appears in all copies, and that both that copyright notice
26 // and this permission notice appear in supporting documentation. None
27 // of the above authors, nor IBM Haifa Research Laboratories, make any
28 // representation about the suitability of this software for any
29 // purpose. It is provided "as is" without express or implied
33 * @file xml_formatter.hpp
34 * Contains an XML formatter for regression tests.
37 #ifndef PB_DS_COMMON_XML_TEST_REGRESSION_FORMATTER_HPP
38 #define PB_DS_COMMON_XML_TEST_REGRESSION_FORMATTER_HPP
42 #include <io/xml_test_formatter.hpp>
49 struct xml_test_rand_regression_formatter : public xml_test_formatter
52 xml_test_rand_regression_formatter(size_t sd, size_t n, size_t m,
53 double tp, double ip, double ep,
56 std::cout << make_xml_tag("sd", "value", sd);
57 std::cout << make_xml_tag("n", "value", n);
58 std::cout << make_xml_tag("m", "value", m);
59 std::cout << make_xml_tag("tp", "value", tp);
60 std::cout << make_xml_tag("ip", "value", ip);
61 std::cout << make_xml_tag("ep", "value", ep);
62 std::cout << make_xml_tag("cp", "value", cp);
63 std::cout << make_xml_tag("mp", "value", mp);
67 xml_test_rand_regression_formatter(size_t sd, size_t n, size_t m,
68 double tp, double ip, double dp,
69 double ep, double cp, double mp)
71 std::cout << make_xml_tag("sd", "value", sd);
72 std::cout << make_xml_tag("n", "value", n);
73 std::cout << make_xml_tag("m", "value", m);
74 std::cout << make_xml_tag("tp", "value", tp);
75 std::cout << make_xml_tag("ip", "value", ip);
76 std::cout << make_xml_tag("dp", "value", dp);
77 std::cout << make_xml_tag("ep", "value", ep);
78 std::cout << make_xml_tag("cp", "value", cp);
79 std::cout << make_xml_tag("mp", "value", mp);
84 struct xml_result_set_regression_formatter : public xml_result_set_formatter
86 xml_result_set_regression_formatter(const std::string& r_container_name,
87 const std::string& r_container_desc)
88 : xml_result_set_formatter(r_container_name, r_container_desc)
90 std::cout << detail::make_xml_name_start_tag("progress");
91 std::cout << detail::make_xml_name_start_tag_end_delimiter();
94 ~xml_result_set_regression_formatter()
95 { std::cout << detail::make_xml_name_end_tag("progress"); }
98 } // namespace __gnu_pbds
100 #endif // #ifndef PB_DS_COMMON_XML_TEST_REGRESSION_FORMATTER_HPP