Go to the documentation of this file.
   18 #include <gtest/gtest.h> 
   26 #if defined(OPENSSL_WINDOWS) 
   55       << 
"ERR_get_error returned value before an error was added.";
 
   60   int peeked_line, 
line, peeked_flags, 
flags;
 
   61   const char *peeked_file, *
file, *peeked_data, *
data;
 
   67   EXPECT_EQ(peeked_packed_error, packed_error);
 
   80 TEST(ErrTest, ClearError) {
 
   82       << 
"ERR_get_error returned value before an error was added.";
 
   97   for (
size_t i = 0; 
i <= 
sizeof(
buf); 
i++) {
 
  111   size_t suffix_len = strlen(
suffix);
 
  112   size_t str_len = strlen(
str);
 
  113   if (str_len < suffix_len) {
 
  116   return strcmp(
str + str_len - suffix_len, 
suffix) == 0;
 
  120   int expected_line = __LINE__ + 1;
 
  133 TEST(ErrTest, SaveAndRestore) {
 
  162   for (
unsigned i = 0; 
i < 2; 
i++) {
 
  208   for (
int i = 0; 
i < 2; 
i++) {
 
  225 #if defined(OPENSSL_WINDOWS) 
  226 TEST(ErrTest, PreservesLastError) {
 
  227   SetLastError(ERROR_INVALID_FUNCTION);
 
  229   EXPECT_EQ(
static_cast<DWORD
>(ERROR_INVALID_FUNCTION), GetLastError());
 
  232 TEST(ErrTest, PreservesErrno) {
 
  244       "error:0e000044:common libcrypto routines:OPENSSL_internal:internal " 
  250       "error:0e000044:common libcrypto routines:OPENSSL_internal:internal " 
  256       "error:0e000044:common libcrypto routines:OPENSSL_internal:internal " 
  259   EXPECT_STREQ(
"error:0e000044:common libcrypto routines:OPENSSL_internal:",
 
  263   EXPECT_STREQ(
"error:0e000044:common libcrypto routines:OPENSSL_interna:",
 
  265   EXPECT_STREQ(
"error:0e000044:common libcrypto routines:OPENSSL_intern:",
 
  
const grpc_generator::File * file
#define OPENSSL_PUT_ERROR(library, reason)
std::string Print(const T &value)
#define ERR_get_error_line_data
static bool HasSuffix(const char *str, const char *suffix)
OPENSSL_EXPORT pem_password_cb void * u
#define ERR_lib_error_string
#define ERR_peek_error_line_data
#define ERR_get_error_line
#define SCOPED_TRACE(message)
#define ERR_GET_REASON(packed_error)
#define EXPECT_NE(val1, val2)
Status UnknownError(absl::string_view message)
#define ERR_GET_LIB(packed_error)
#define ERR_R_INTERNAL_ERROR
#define ERR_PACK(lib, reason)
OPENSSL_MSVC_PRAGMA(warning(disable:4702))
#define ERR_error_string_n
#define ERR_remove_thread_state
int push(void *desc, unsigned char *buf, unsigned len)
#define EXPECT_STREQ(s1, s2)
#define ERR_restore_state
unsigned char suffix[65536]
#define ERR_add_error_data
#define ASSERT_TRUE(condition)
#define EXPECT_PRED2(pred, v1, v2)
#define EXPECT_TRUE(condition)
#define ASSERT_EQ(val1, val2)
#define ERR_reason_error_string
grpc
Author(s): 
autogenerated on Fri May 16 2025 02:58:19