From d6c152ccfd5151e328dccfdcf6b026a54d0d2a7d Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Sun, 7 Oct 2018 08:11:19 -0700 Subject: [PATCH] added header compile tests --- example/print_file_ec.cpp | 9 +++++---- example/print_file_eh.cpp | 9 +++++---- example/transport_ec.cpp | 4 +--- example/transport_eh.cpp | 7 +++---- include/boost/leaf/all.hpp | 14 ++++++++++++++ include/boost/leaf/common.hpp | 2 +- include/boost/leaf/has_current_error.hpp | 1 + meson.build | 10 +++++++++- test/Jamfile.v2 | 9 +++++++++ test/hpp_capture_test.cpp | 9 +++++++++ test/hpp_common_test.cpp | 9 +++++++++ ...rrent_exception_diagnostic_information_test.cpp | 9 +++++++++ test/hpp_diagnostic_information_test.cpp | 9 +++++++++ test/hpp_expect_test.cpp | 9 +++++++++ test/hpp_has_current_error_test.cpp | 9 +++++++++ test/hpp_put_test.cpp | 9 +++++++++ test/hpp_transport_test.cpp | 9 +++++++++ 17 files changed, 120 insertions(+), 17 deletions(-) create mode 100644 include/boost/leaf/all.hpp create mode 100644 test/hpp_capture_test.cpp create mode 100644 test/hpp_common_test.cpp create mode 100644 test/hpp_current_exception_diagnostic_information_test.cpp create mode 100644 test/hpp_diagnostic_information_test.cpp create mode 100644 test/hpp_expect_test.cpp create mode 100644 test/hpp_has_current_error_test.cpp create mode 100644 test/hpp_put_test.cpp create mode 100644 test/hpp_transport_test.cpp diff --git a/example/print_file_ec.cpp b/example/print_file_ec.cpp index c3a1851..b5377c6 100644 --- a/example/print_file_ec.cpp +++ b/example/print_file_ec.cpp @@ -4,10 +4,11 @@ //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#include -#include -#include -#include +//This example demonstrates the basic use of LEAF to augment error conditions with +//additional information when using error codes to report failures. See print_file_eh.cpp +//for the variant that uses exception handling. + +#include #include #include diff --git a/example/print_file_eh.cpp b/example/print_file_eh.cpp index 35b7620..d380c80 100644 --- a/example/print_file_eh.cpp +++ b/example/print_file_eh.cpp @@ -4,10 +4,11 @@ //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#include -#include -#include -#include +//This example demonstrates the basic use of LEAF to augment error conditions with +//additional information when using exceptions to report failures. See print_file_ec.cpp +//for the variant that uses error codes. + +#include #include #include diff --git a/example/transport_ec.cpp b/example/transport_ec.cpp index 505f694..270f085 100644 --- a/example/transport_ec.cpp +++ b/example/transport_ec.cpp @@ -7,9 +7,7 @@ //This is a simple program that demonstrates the use of LEAF to transport error info between threads, //without using exception handling. See transport_eh.cpp for the (simpler) exception-handling variant. -#include -#include -#include +#include #include #include #include diff --git a/example/transport_eh.cpp b/example/transport_eh.cpp index 5d28053..947d763 100644 --- a/example/transport_eh.cpp +++ b/example/transport_eh.cpp @@ -5,11 +5,10 @@ //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //This is a simple program that demonstrates the use of LEAF to transport error info between threads, -//without using exception handling. See transport_eh.cpp for the (simpler) exception-handling variant. +//when using exception handling to report failures. See transport_ec.cpp for the variant that uses +//error codes. -#include -#include -#include +#include #include #include #include diff --git a/include/boost/leaf/all.hpp b/include/boost/leaf/all.hpp new file mode 100644 index 0000000..248b613 --- /dev/null +++ b/include/boost/leaf/all.hpp @@ -0,0 +1,14 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/include/boost/leaf/common.hpp b/include/boost/leaf/common.hpp index 1b34319..31322a1 100644 --- a/include/boost/leaf/common.hpp +++ b/include/boost/leaf/common.hpp @@ -7,8 +7,8 @@ #ifndef EBA7EF10B6F311E8AAD493990D39171A #define EBA7EF10B6F311E8AAD493990D39171A +#include #include -#include #include namespace diff --git a/include/boost/leaf/has_current_error.hpp b/include/boost/leaf/has_current_error.hpp index 516fac8..1a22c51 100644 --- a/include/boost/leaf/has_current_error.hpp +++ b/include/boost/leaf/has_current_error.hpp @@ -8,6 +8,7 @@ #define UUID_E20D9594B97411E89C6313280D39171A #include +#include namespace boost diff --git a/meson.build b/meson.build index 10bbfcc..c26a852 100644 --- a/meson.build +++ b/meson.build @@ -27,7 +27,15 @@ tests = [ 'diagnostic_print_test', 'diagnostic_information_test', 'expect_test', - 'transport_test' + 'transport_test', + 'hpp_capture_test', + 'hpp_common_test', + 'hpp_current_exception_diagnostic_information_test', + 'hpp_diagnostic_information_test', + 'hpp_expect_test', + 'hpp_has_current_error_test', + 'hpp_put_test', + 'hpp_transport_test' ] foreach t : tests test(t, executable(t, 'test/'+t+'.cpp', dependencies: [ leaf ] ) ) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index a091093..1537e5e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -20,6 +20,15 @@ run diagnostic_information_test.cpp ; run expect_test.cpp ; run transport_test.cpp : : : multi ; +compile hpp_capture_test.cpp ; +compile hpp_common_test.cpp ; +compile hpp_current_exception_diagnostic_information_test.cpp ; +compile hpp_diagnostic_information_test.cpp ; +compile hpp_expect_test.cpp ; +compile hpp_has_current_error_test.cpp ; +compile hpp_put_test.cpp ; +compile hpp_transport_test.cpp ; + compile ../example/print_file_ec.cpp ; compile ../example/print_file_eh.cpp ; compile ../example/transport_ec.cpp ; diff --git a/test/hpp_capture_test.cpp b/test/hpp_capture_test.cpp new file mode 100644 index 0000000..88bb74f --- /dev/null +++ b/test/hpp_capture_test.cpp @@ -0,0 +1,9 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +int main() { return 0; } diff --git a/test/hpp_common_test.cpp b/test/hpp_common_test.cpp new file mode 100644 index 0000000..62811a1 --- /dev/null +++ b/test/hpp_common_test.cpp @@ -0,0 +1,9 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +int main() { return 0; } diff --git a/test/hpp_current_exception_diagnostic_information_test.cpp b/test/hpp_current_exception_diagnostic_information_test.cpp new file mode 100644 index 0000000..d9dc19e --- /dev/null +++ b/test/hpp_current_exception_diagnostic_information_test.cpp @@ -0,0 +1,9 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +int main() { return 0; } diff --git a/test/hpp_diagnostic_information_test.cpp b/test/hpp_diagnostic_information_test.cpp new file mode 100644 index 0000000..0e56150 --- /dev/null +++ b/test/hpp_diagnostic_information_test.cpp @@ -0,0 +1,9 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +int main() { return 0; } diff --git a/test/hpp_expect_test.cpp b/test/hpp_expect_test.cpp new file mode 100644 index 0000000..230473a --- /dev/null +++ b/test/hpp_expect_test.cpp @@ -0,0 +1,9 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +int main() { return 0; } diff --git a/test/hpp_has_current_error_test.cpp b/test/hpp_has_current_error_test.cpp new file mode 100644 index 0000000..f1349ca --- /dev/null +++ b/test/hpp_has_current_error_test.cpp @@ -0,0 +1,9 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +int main() { return 0; } diff --git a/test/hpp_put_test.cpp b/test/hpp_put_test.cpp new file mode 100644 index 0000000..a51fa0d --- /dev/null +++ b/test/hpp_put_test.cpp @@ -0,0 +1,9 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +int main() { return 0; } diff --git a/test/hpp_transport_test.cpp b/test/hpp_transport_test.cpp new file mode 100644 index 0000000..2ded683 --- /dev/null +++ b/test/hpp_transport_test.cpp @@ -0,0 +1,9 @@ +//Copyright (c) 2018 Emil Dotchevski +//Copyright (c) 2018 Second Spectrum, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +int main() { return 0; }