You've already forked Zygisk-Assistant
mirror of
https://github.com/snake-4/Zygisk-Assistant.git
synced 2025-09-06 06:37:02 +00:00
Initial commit
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <system_error>
|
||||
|
||||
// class system_error
|
||||
|
||||
// system_error(error_code ec);
|
||||
|
||||
// Test is slightly non-portable
|
||||
|
||||
#include <system_error>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**) {
|
||||
std::system_error se(static_cast<int>(std::errc::not_a_directory),
|
||||
std::generic_category(), "some text");
|
||||
assert(se.code() == std::make_error_code(std::errc::not_a_directory));
|
||||
std::string what_message(se.what());
|
||||
assert(what_message.find("Not a directory") != std::string::npos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <system_error>
|
||||
|
||||
// class system_error
|
||||
|
||||
// system_error(error_code ec, const char* what_arg);
|
||||
|
||||
// Test is slightly non-portable
|
||||
|
||||
#include <system_error>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**) {
|
||||
std::string what_arg("test message");
|
||||
std::system_error se(make_error_code(std::errc::not_a_directory), what_arg.c_str());
|
||||
assert(se.code() == std::make_error_code(std::errc::not_a_directory));
|
||||
std::string what_message(se.what());
|
||||
assert(what_message.find(what_arg) != std::string::npos);
|
||||
assert(what_message.find("Not a directory") != std::string::npos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <system_error>
|
||||
|
||||
// class system_error
|
||||
|
||||
// system_error(error_code ec, const string& what_arg);
|
||||
|
||||
// Test is slightly non-portable
|
||||
|
||||
#include <system_error>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**) {
|
||||
std::string what_arg("test message");
|
||||
std::system_error se(make_error_code(std::errc::not_a_directory), what_arg);
|
||||
assert(se.code() == std::make_error_code(std::errc::not_a_directory));
|
||||
std::string what_message(se.what());
|
||||
assert(what_message.find(what_arg) != std::string::npos);
|
||||
assert(what_message.find("Not a directory") != std::string::npos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <system_error>
|
||||
|
||||
// class system_error
|
||||
|
||||
// system_error(int ev, const error_category& ecat);
|
||||
|
||||
// Test is slightly non-portable
|
||||
|
||||
#include <system_error>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**) {
|
||||
std::system_error se(static_cast<int>(std::errc::not_a_directory),
|
||||
std::generic_category());
|
||||
assert(se.code() == std::make_error_code(std::errc::not_a_directory));
|
||||
std::string what_message(se.what());
|
||||
assert(what_message.find("Not a directory") != std::string::npos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <system_error>
|
||||
|
||||
// class system_error
|
||||
|
||||
// system_error(int ev, const error_category& ecat, const char* what_arg);
|
||||
|
||||
// Test is slightly non-portable
|
||||
|
||||
#include <system_error>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**) {
|
||||
std::string what_arg("test message");
|
||||
std::system_error se(static_cast<int>(std::errc::not_a_directory),
|
||||
std::generic_category(), what_arg.c_str());
|
||||
assert(se.code() == std::make_error_code(std::errc::not_a_directory));
|
||||
std::string what_message(se.what());
|
||||
assert(what_message.find(what_arg) != std::string::npos);
|
||||
assert(what_message.find("Not a directory") != std::string::npos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <system_error>
|
||||
|
||||
// class system_error
|
||||
|
||||
// system_error(int ev, const error_category& ecat, const string& what_arg);
|
||||
|
||||
// Test is slightly non-portable
|
||||
|
||||
#include <system_error>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**) {
|
||||
std::string what_arg("test message");
|
||||
std::system_error se(static_cast<int>(std::errc::not_a_directory),
|
||||
std::generic_category(), what_arg);
|
||||
assert(se.code() == std::make_error_code(std::errc::not_a_directory));
|
||||
std::string what_message(se.what());
|
||||
assert(what_message.find(what_arg) != std::string::npos);
|
||||
assert(what_message.find("Not a directory") != std::string::npos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user