From 35626619a427b9db47179b77f0a96fa4648bfe04 Mon Sep 17 00:00:00 2001 From: Neil Henderson Date: Tue, 30 Jul 2024 11:45:15 +1000 Subject: [PATCH] Update regression tests after recent changes --- .../pure2-function-typeids.cpp.execution | 17 ++++++++++++++++ .../pure2-function-typeids.cpp.execution | 17 ++++++++++++++++ .../mixed-bounds-check.cpp.execution | 2 +- ...ed-bounds-safety-with-assert.cpp.execution | 2 +- ...-safety-3-contract-violation.cpp.execution | 2 +- ...me-safety-and-null-contracts.cpp.execution | 2 +- ...re2-assert-optional-not-null.cpp.execution | 2 +- ...2-assert-shared-ptr-not-null.cpp.execution | 2 +- ...2-assert-unique-ptr-not-null.cpp.execution | 2 +- .../pure2-function-typeids.cpp.execution | 17 ++++++++++++++++ .../pure2-function-typeids.cpp.execution | 17 ++++++++++++++++ ...ed-bounds-safety-with-assert.cpp.execution | 2 +- ...mixed-bugfix-for-ufcs-non-local.cpp.output | 20 +++++++++---------- .../pure2-function-typeids.cpp.execution | 17 ++++++++++++++++ .../pure2-assert-expected-not-null.cpp.output | 4 ++-- .../pure2-function-typeids.cpp.execution | 17 ++++++++++++++++ .../pure2-function-typeids.cpp.output | 1 + 17 files changed, 123 insertions(+), 20 deletions(-) create mode 100644 regression-tests/test-results/apple-clang-14-c++2b/pure2-function-typeids.cpp.execution create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-typeids.cpp.execution create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-function-typeids.cpp.execution create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-function-typeids.cpp.execution create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-function-typeids.cpp.execution create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-function-typeids.cpp.execution create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-function-typeids.cpp.output diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-function-typeids.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-function-typeids.cpp.execution new file mode 100644 index 000000000..08f16f663 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-function-typeids.cpp.execution @@ -0,0 +1,17 @@ +hello world! +hello world! +Come in, Frodo +Come in, Sam +Come in awhile, but take some biscuits on your way out, Frodo! +Come in awhile, but take some biscuits on your way out, Sam! +fg_out initialized gandalf to: A Powerful Mage +pg_out initialized galadriel to: A Powerful Mage +I hear you've moving, Frodo? +I hear you've moving, Sam? +Inout Gandalf ... fh_forward returned: Gandalf +Inout Galadriel ... ph_forward returned: Galadriel +Inout Galadriel ... ph_forward2 returned: Galadriel +In Gandalf ... fh_out returned: yohoho +In Galadriel ... ph_out returned: yohoho +43 +44 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-typeids.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-typeids.cpp.execution new file mode 100644 index 000000000..08f16f663 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-typeids.cpp.execution @@ -0,0 +1,17 @@ +hello world! +hello world! +Come in, Frodo +Come in, Sam +Come in awhile, but take some biscuits on your way out, Frodo! +Come in awhile, but take some biscuits on your way out, Sam! +fg_out initialized gandalf to: A Powerful Mage +pg_out initialized galadriel to: A Powerful Mage +I hear you've moving, Frodo? +I hear you've moving, Sam? +Inout Gandalf ... fh_forward returned: Gandalf +Inout Galadriel ... ph_forward returned: Galadriel +Inout Galadriel ... ph_forward2 returned: Galadriel +In Gandalf ... fh_out returned: yohoho +In Galadriel ... ph_out returned: yohoho +43 +44 diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution index fa8252b3c..48b014ff8 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(883) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] +../../../include/cpp2util.h(937) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution index 312fa7694..e4b3e0b61 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(744) : Bounds safety violation +../../../include/cpp2util.h(749) : Bounds safety violation diff --git a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution index e58245c78..9c4799bce 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(744) : Contract violation: fill: value must contain at least count elements +../../../include/cpp2util.h(749) : Contract violation: fill: value must contain at least count elements diff --git a/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution index fb8eb511b..b5f3ff105 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution @@ -1,2 +1,2 @@ sending error to my framework... [dynamic null dereference attempt detected] -from source location: ../../../include/cpp2util.h(823) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&] +from source location: ../../../include/cpp2util.h(828) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&] diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution index bb106dd63..dedfd5463 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(823) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value +../../../include/cpp2util.h(828) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution index 375d8a3bf..beacf8d96 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(823) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty +../../../include/cpp2util.h(828) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution index 21996fccd..e24a6337a 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(823) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty +../../../include/cpp2util.h(828) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty diff --git a/regression-tests/test-results/clang-15-c++20/pure2-function-typeids.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-function-typeids.cpp.execution new file mode 100644 index 000000000..08f16f663 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-function-typeids.cpp.execution @@ -0,0 +1,17 @@ +hello world! +hello world! +Come in, Frodo +Come in, Sam +Come in awhile, but take some biscuits on your way out, Frodo! +Come in awhile, but take some biscuits on your way out, Sam! +fg_out initialized gandalf to: A Powerful Mage +pg_out initialized galadriel to: A Powerful Mage +I hear you've moving, Frodo? +I hear you've moving, Sam? +Inout Gandalf ... fh_forward returned: Gandalf +Inout Galadriel ... ph_forward returned: Galadriel +Inout Galadriel ... ph_forward2 returned: Galadriel +In Gandalf ... fh_out returned: yohoho +In Galadriel ... ph_out returned: yohoho +43 +44 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-function-typeids.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-function-typeids.cpp.execution new file mode 100644 index 000000000..08f16f663 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-function-typeids.cpp.execution @@ -0,0 +1,17 @@ +hello world! +hello world! +Come in, Frodo +Come in, Sam +Come in awhile, but take some biscuits on your way out, Frodo! +Come in awhile, but take some biscuits on your way out, Sam! +fg_out initialized gandalf to: A Powerful Mage +pg_out initialized galadriel to: A Powerful Mage +I hear you've moving, Frodo? +I hear you've moving, Sam? +Inout Gandalf ... fh_forward returned: Gandalf +Inout Galadriel ... ph_forward returned: Galadriel +Inout Galadriel ... ph_forward2 returned: Galadriel +In Gandalf ... fh_out returned: yohoho +In Galadriel ... ph_out returned: yohoho +43 +44 diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution index d7550af32..e6ee874fc 100644 --- a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:261&, cpp2::impl::in, cpp2::impl::in) [with auto:261 = std::vector; cpp2::impl::in = const int]: Bounds safety violation +mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:263&, cpp2::impl::in, cpp2::impl::in) [with auto:263 = std::vector; cpp2::impl::in = const int]: Bounds safety violation diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output index 4ba9bb6e1..2f0a3d38f 100644 --- a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output +++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output @@ -1,41 +1,41 @@ In file included from mixed-bugfix-for-ufcs-non-local.cpp:6: ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | class finally_success + 2100 | constexpr auto is( std::optional const& x ) -> bool | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | finally(finally&& that) noexcept + 2137 | // | ^ mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | class finally_success + 2100 | constexpr auto is( std::optional const& x ) -> bool | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | finally(finally&& that) noexcept + 2137 | // | ^ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | class finally_success + 2100 | constexpr auto is( std::optional const& x ) -> bool | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | finally(finally&& that) noexcept + 2137 | // | ^ mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | class finally_success + 2100 | constexpr auto is( std::optional const& x ) -> bool | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | finally(finally&& that) noexcept + 2137 | // | ^ mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | class finally_success + 2100 | constexpr auto is( std::optional const& x ) -> bool | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | finally(finally&& that) noexcept + 2137 | // | ^ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-function-typeids.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-function-typeids.cpp.execution new file mode 100644 index 000000000..08f16f663 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-function-typeids.cpp.execution @@ -0,0 +1,17 @@ +hello world! +hello world! +Come in, Frodo +Come in, Sam +Come in awhile, but take some biscuits on your way out, Frodo! +Come in awhile, but take some biscuits on your way out, Sam! +fg_out initialized gandalf to: A Powerful Mage +pg_out initialized galadriel to: A Powerful Mage +I hear you've moving, Frodo? +I hear you've moving, Sam? +Inout Gandalf ... fh_forward returned: Gandalf +Inout Galadriel ... ph_forward returned: Galadriel +Inout Galadriel ... ph_forward2 returned: Galadriel +In Gandalf ... fh_out returned: yohoho +In Galadriel ... ph_out returned: yohoho +43 +44 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output index cd8f31a81..272a4fc8d 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output @@ -6,7 +6,7 @@ pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' b pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}' pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found -D:\a\cppfront\cppfront\include\cpp2util.h(823): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' +D:\a\cppfront\cppfront\include\cpp2util.h(828): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std' predefined C++ types (compiler internal)(347): note: see declaration of 'std' pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected @@ -19,4 +19,4 @@ pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argumen pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}' pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found -D:\a\cppfront\cppfront\include\cpp2util.h(823): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' +D:\a\cppfront\cppfront\include\cpp2util.h(828): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-function-typeids.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-function-typeids.cpp.execution new file mode 100644 index 000000000..08f16f663 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-function-typeids.cpp.execution @@ -0,0 +1,17 @@ +hello world! +hello world! +Come in, Frodo +Come in, Sam +Come in awhile, but take some biscuits on your way out, Frodo! +Come in awhile, but take some biscuits on your way out, Sam! +fg_out initialized gandalf to: A Powerful Mage +pg_out initialized galadriel to: A Powerful Mage +I hear you've moving, Frodo? +I hear you've moving, Sam? +Inout Gandalf ... fh_forward returned: Gandalf +Inout Galadriel ... ph_forward returned: Galadriel +Inout Galadriel ... ph_forward2 returned: Galadriel +In Gandalf ... fh_out returned: yohoho +In Galadriel ... ph_out returned: yohoho +43 +44 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-function-typeids.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-function-typeids.cpp.output new file mode 100644 index 000000000..962933802 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-function-typeids.cpp.output @@ -0,0 +1 @@ +pure2-function-typeids.cpp