Namespaces | Macros
coded_stream_unittest.cc File Reference
#include <memory>
#include <vector>
#include <google/protobuf/io/coded_stream.h>
#include <limits.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/testing/googletest.h>
#include <gtest/gtest.h>
#include <google/protobuf/stubs/casts.h>
#include <google/protobuf/port_def.inc>
Include dependency graph for coded_stream_unittest.cc:

Go to the source code of this file.

Namespaces

 google
 
 google::protobuf
 
 google::protobuf::io
 

Macros

#define TEST_1D(FIXTURE, NAME, CASES)
 
#define TEST_2D(FIXTURE, NAME, CASES1, CASES2)
 
#define ULL(x)   PROTOBUF_ULONGLONG(x)
 

Macro Definition Documentation

◆ TEST_1D

#define TEST_1D (   FIXTURE,
  NAME,
  CASES 
)
Value:
class FIXTURE##_##NAME##_DD : public FIXTURE { \
protected: \
template <typename CaseType> \
void DoSingleCase(const CaseType& CASES##_case); \
}; \
TEST_F(FIXTURE##_##NAME##_DD, NAME) { \
for (int i = 0; i < GOOGLE_ARRAYSIZE(CASES); i++) { \
SCOPED_TRACE(testing::Message() \
<< #CASES " case #" << i << ": " << CASES[i]); \
DoSingleCase(CASES[i]); \
} \
} \
\
template <typename CaseType> \
void FIXTURE##_##NAME##_DD::DoSingleCase(const CaseType& CASES##_case)

Definition at line 89 of file coded_stream_unittest.cc.

◆ TEST_2D

#define TEST_2D (   FIXTURE,
  NAME,
  CASES1,
  CASES2 
)
Value:
class FIXTURE##_##NAME##_DD : public FIXTURE { \
protected: \
template <typename CaseType1, typename CaseType2> \
void DoSingleCase(const CaseType1& CASES1##_case, \
const CaseType2& CASES2##_case); \
}; \
TEST_F(FIXTURE##_##NAME##_DD, NAME) { \
for (int i = 0; i < GOOGLE_ARRAYSIZE(CASES1); i++) { \
for (int j = 0; j < GOOGLE_ARRAYSIZE(CASES2); j++) { \
SCOPED_TRACE(testing::Message() \
<< #CASES1 " case #" << i << ": " << CASES1[i] << ", " \
<< #CASES2 " case #" << j << ": " << CASES2[j]); \
DoSingleCase(CASES1[i], CASES2[j]); \
} \
} \
} \
\
template <typename CaseType1, typename CaseType2> \
void FIXTURE##_##NAME##_DD::DoSingleCase(const CaseType1& CASES1##_case, \
const CaseType2& CASES2##_case)

Definition at line 107 of file coded_stream_unittest.cc.

◆ ULL

#define ULL (   x)    PROTOBUF_ULONGLONG(x)

Definition at line 57 of file coded_stream_unittest.cc.

Variable Documentation

◆ backup_amount_

int backup_amount_

Definition at line 1351 of file coded_stream_unittest.cc.

◆ buffer_

char buffer_[1024]
staticprotected

Definition at line 136 of file coded_stream_unittest.cc.

◆ buffer_count_

int64 buffer_count_
private

Definition at line 1355 of file coded_stream_unittest.cc.

◆ bytes

uint8 bytes[sizeof(uint64)]

Definition at line 153 of file coded_stream_unittest.cc.

◆ can_parse

bool can_parse

Definition at line 407 of file coded_stream_unittest.cc.

◆ kBufferSize

const int kBufferSize = 1024 * 64
staticprotected

Definition at line 135 of file coded_stream_unittest.cc.

◆ size

int size

Definition at line 154 of file coded_stream_unittest.cc.

◆ value

uint64 value

Definition at line 155 of file coded_stream_unittest.cc.

NAME
string NAME
TEST_F
#define TEST_F(test_fixture, test_name)
Definition: gtest.h:2398
testing::Message
Definition: gtest-message.h:90
GOOGLE_ARRAYSIZE
#define GOOGLE_ARRAYSIZE(a)
Definition: macros.h:88
gmock_output_test._
_
Definition: gmock_output_test.py:173
i
int i
Definition: gmock-matchers_test.cc:764


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:02