summaryrefslogtreecommitdiffstats
path: root/libcxx/test/libcxx/depr/exception.unexpected
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/libcxx/depr/exception.unexpected')
-rw-r--r--libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp4
-rw-r--r--libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp4
-rw-r--r--libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp4
-rw-r--r--libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp4
4 files changed, 12 insertions, 4 deletions
diff --git a/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
index 4d49440fc63..ca14271f02d 100644
--- a/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
+++ b/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
@@ -23,7 +23,7 @@ void f3()
std::exit(0);
}
-int main()
+int main(int, char**)
{
std::unexpected_handler old = std::get_unexpected();
@@ -38,4 +38,6 @@ int main()
std::set_terminate(f3);
(*old)();
assert(0);
+
+ return 0;
}
diff --git a/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
index 43836f4fb9b..dd861941a44 100644
--- a/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
+++ b/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
@@ -22,7 +22,7 @@ void f3()
std::exit(0);
}
-int main()
+int main(int, char**)
{
std::unexpected_handler old = std::set_unexpected(f1);
// verify there is a previous unexpected handler
@@ -33,4 +33,6 @@ int main()
std::set_terminate(f3);
(*old)();
assert(0);
+
+ return 0;
}
diff --git a/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
index e4d85e1f2da..b9bdabe0e76 100644
--- a/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
+++ b/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
@@ -19,9 +19,11 @@ void fexit()
std::exit(0);
}
-int main()
+int main(int, char**)
{
std::set_unexpected(fexit);
std::unexpected();
assert(false);
+
+ return 0;
}
diff --git a/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp b/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp
index 6a854912857..0388cfaf7ad 100644
--- a/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp
+++ b/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp
@@ -14,9 +14,11 @@
void f() {}
-int main() {
+int main(int, char**) {
using T = std::unexpected_handler; // expected-error {{no type named 'unexpected_handler' in namespace 'std'}}
std::unexpected(); // expected-error {{no member named 'unexpected' in namespace 'std'}}
std::get_unexpected(); // expected-error {{no member named 'get_unexpected' in namespace 'std'}}
std::set_unexpected(f); // expected-error {{no type named 'set_unexpected' in namespace 'std'}}
+
+ return 0;
}
OpenPOWER on IntegriCloud