proxygen
VarintTest.cpp File Reference
#include <folly/Varint.h>
#include <array>
#include <initializer_list>
#include <random>
#include <vector>
#include <glog/logging.h>
#include <folly/Benchmark.h>
#include <folly/Random.h>
#include <folly/portability/GTest.h>

Go to the source code of this file.

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 
 folly::test
 

Functions

 DEFINE_int32 (random_seed, folly::randomNumberSeed(),"random seed")
 
void folly::test::testVarint (uint64_t val, std::initializer_list< uint8_t > bytes)
 
 folly::test::TEST (Varint, Interface)
 
 folly::test::TEST (Varint, Simple)
 
void folly::test::testVarintFail (std::initializer_list< uint8_t > bytes)
 
 folly::test::TEST (Varint, Fail)
 
 folly::test::TEST (ZigZag, Simple)
 
int main (int argc, char *argv[])
 

Function Documentation

DEFINE_int32 ( random_seed  ,
folly::randomNumberSeed()  ,
"random seed  
)
int main ( int  argc,
char *  argv[] 
)

Definition at line 203 of file VarintTest.cpp.

References testing::InitGoogleTest(), RUN_ALL_TESTS(), and folly::runBenchmarksOnFlag().

203  {
205  gflags::ParseCommandLineFlags(&argc, &argv, true);
206  google::InitGoogleLogging(argv[0]);
207  int ret = RUN_ALL_TESTS();
208  if (ret == 0) {
209  folly::test::generateRandomValues();
211  }
212  return ret;
213 }
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition: gtest.h:2232
char ** argv
bool runBenchmarksOnFlag()
Definition: Benchmark.h:48
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: gtest.cc:5370