rn-leveldb 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (595) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +92 -0
  3. package/android/.project +34 -0
  4. package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
  5. package/android/CMakeLists.txt +69 -0
  6. package/android/build.gradle +125 -0
  7. package/android/cpp-adapter.cpp +19 -0
  8. package/android/gradle.properties +6 -0
  9. package/android/src/main/AndroidManifest.xml +4 -0
  10. package/android/src/main/java/com/reactnativeleveldb/LeveldbModule.java +57 -0
  11. package/android/src/main/java/com/reactnativeleveldb/LeveldbPackage.java +28 -0
  12. package/cpp/leveldb/.appveyor.yml +36 -0
  13. package/cpp/leveldb/.clang-format +18 -0
  14. package/cpp/leveldb/.travis.yml +88 -0
  15. package/cpp/leveldb/AUTHORS +12 -0
  16. package/cpp/leveldb/CMakeLists.txt +495 -0
  17. package/cpp/leveldb/CONTRIBUTING.md +36 -0
  18. package/cpp/leveldb/LICENSE +27 -0
  19. package/cpp/leveldb/NEWS +17 -0
  20. package/cpp/leveldb/README.md +231 -0
  21. package/cpp/leveldb/TODO +14 -0
  22. package/cpp/leveldb/benchmarks/db_bench.cc +990 -0
  23. package/cpp/leveldb/benchmarks/db_bench_sqlite3.cc +726 -0
  24. package/cpp/leveldb/benchmarks/db_bench_tree_db.cc +531 -0
  25. package/cpp/leveldb/cmake/leveldbConfig.cmake.in +9 -0
  26. package/cpp/leveldb/db/autocompact_test.cc +115 -0
  27. package/cpp/leveldb/db/builder.cc +82 -0
  28. package/cpp/leveldb/db/builder.h +30 -0
  29. package/cpp/leveldb/db/c.cc +562 -0
  30. package/cpp/leveldb/db/c_test.c +384 -0
  31. package/cpp/leveldb/db/corruption_test.cc +367 -0
  32. package/cpp/leveldb/db/db_impl.cc +1554 -0
  33. package/cpp/leveldb/db/db_impl.h +217 -0
  34. package/cpp/leveldb/db/db_iter.cc +318 -0
  35. package/cpp/leveldb/db/db_iter.h +26 -0
  36. package/cpp/leveldb/db/db_test.cc +2305 -0
  37. package/cpp/leveldb/db/dbformat.cc +136 -0
  38. package/cpp/leveldb/db/dbformat.h +224 -0
  39. package/cpp/leveldb/db/dbformat_test.cc +133 -0
  40. package/cpp/leveldb/db/dumpfile.cc +232 -0
  41. package/cpp/leveldb/db/fault_injection_test.cc +555 -0
  42. package/cpp/leveldb/db/filename.cc +141 -0
  43. package/cpp/leveldb/db/filename.h +83 -0
  44. package/cpp/leveldb/db/filename_test.cc +132 -0
  45. package/cpp/leveldb/db/leveldbutil.cc +64 -0
  46. package/cpp/leveldb/db/log_format.h +35 -0
  47. package/cpp/leveldb/db/log_reader.cc +274 -0
  48. package/cpp/leveldb/db/log_reader.h +112 -0
  49. package/cpp/leveldb/db/log_test.cc +563 -0
  50. package/cpp/leveldb/db/log_writer.cc +111 -0
  51. package/cpp/leveldb/db/log_writer.h +54 -0
  52. package/cpp/leveldb/db/memtable.cc +137 -0
  53. package/cpp/leveldb/db/memtable.h +87 -0
  54. package/cpp/leveldb/db/recovery_test.cc +339 -0
  55. package/cpp/leveldb/db/repair.cc +451 -0
  56. package/cpp/leveldb/db/skiplist.h +382 -0
  57. package/cpp/leveldb/db/skiplist_test.cc +373 -0
  58. package/cpp/leveldb/db/snapshot.h +95 -0
  59. package/cpp/leveldb/db/table_cache.cc +120 -0
  60. package/cpp/leveldb/db/table_cache.h +57 -0
  61. package/cpp/leveldb/db/version_edit.cc +257 -0
  62. package/cpp/leveldb/db/version_edit.h +106 -0
  63. package/cpp/leveldb/db/version_edit_test.cc +46 -0
  64. package/cpp/leveldb/db/version_set.cc +1562 -0
  65. package/cpp/leveldb/db/version_set.h +393 -0
  66. package/cpp/leveldb/db/version_set_test.cc +336 -0
  67. package/cpp/leveldb/db/write_batch.cc +150 -0
  68. package/cpp/leveldb/db/write_batch_internal.h +45 -0
  69. package/cpp/leveldb/db/write_batch_test.cc +137 -0
  70. package/cpp/leveldb/doc/benchmark.html +459 -0
  71. package/cpp/leveldb/doc/impl.md +172 -0
  72. package/cpp/leveldb/doc/index.md +523 -0
  73. package/cpp/leveldb/doc/log_format.md +75 -0
  74. package/cpp/leveldb/doc/table_format.md +107 -0
  75. package/cpp/leveldb/helpers/memenv/memenv.cc +390 -0
  76. package/cpp/leveldb/helpers/memenv/memenv.h +22 -0
  77. package/cpp/leveldb/helpers/memenv/memenv_test.cc +264 -0
  78. package/cpp/leveldb/include/leveldb/c.h +270 -0
  79. package/cpp/leveldb/include/leveldb/cache.h +111 -0
  80. package/cpp/leveldb/include/leveldb/comparator.h +64 -0
  81. package/cpp/leveldb/include/leveldb/db.h +167 -0
  82. package/cpp/leveldb/include/leveldb/dumpfile.h +28 -0
  83. package/cpp/leveldb/include/leveldb/env.h +417 -0
  84. package/cpp/leveldb/include/leveldb/export.h +33 -0
  85. package/cpp/leveldb/include/leveldb/filter_policy.h +72 -0
  86. package/cpp/leveldb/include/leveldb/iterator.h +112 -0
  87. package/cpp/leveldb/include/leveldb/options.h +187 -0
  88. package/cpp/leveldb/include/leveldb/slice.h +114 -0
  89. package/cpp/leveldb/include/leveldb/status.h +122 -0
  90. package/cpp/leveldb/include/leveldb/table.h +84 -0
  91. package/cpp/leveldb/include/leveldb/table_builder.h +93 -0
  92. package/cpp/leveldb/include/leveldb/write_batch.h +83 -0
  93. package/cpp/leveldb/issues/issue178_test.cc +90 -0
  94. package/cpp/leveldb/issues/issue200_test.cc +59 -0
  95. package/cpp/leveldb/issues/issue320_test.cc +131 -0
  96. package/cpp/leveldb/port/README.md +10 -0
  97. package/cpp/leveldb/port/port.h +19 -0
  98. package/cpp/leveldb/port/port_config.h.in +33 -0
  99. package/cpp/leveldb/port/port_example.h +100 -0
  100. package/cpp/leveldb/port/port_stdcxx.h +151 -0
  101. package/cpp/leveldb/port/thread_annotations.h +108 -0
  102. package/cpp/leveldb/table/block.cc +267 -0
  103. package/cpp/leveldb/table/block.h +44 -0
  104. package/cpp/leveldb/table/block_builder.cc +107 -0
  105. package/cpp/leveldb/table/block_builder.h +54 -0
  106. package/cpp/leveldb/table/filter_block.cc +106 -0
  107. package/cpp/leveldb/table/filter_block.h +68 -0
  108. package/cpp/leveldb/table/filter_block_test.cc +127 -0
  109. package/cpp/leveldb/table/format.cc +141 -0
  110. package/cpp/leveldb/table/format.h +99 -0
  111. package/cpp/leveldb/table/iterator.cc +76 -0
  112. package/cpp/leveldb/table/iterator_wrapper.h +92 -0
  113. package/cpp/leveldb/table/merger.cc +191 -0
  114. package/cpp/leveldb/table/merger.h +26 -0
  115. package/cpp/leveldb/table/table.cc +271 -0
  116. package/cpp/leveldb/table/table_builder.cc +265 -0
  117. package/cpp/leveldb/table/table_test.cc +834 -0
  118. package/cpp/leveldb/table/two_level_iterator.cc +171 -0
  119. package/cpp/leveldb/table/two_level_iterator.h +31 -0
  120. package/cpp/leveldb/third_party/benchmark/.clang-format +5 -0
  121. package/cpp/leveldb/third_party/benchmark/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  122. package/cpp/leveldb/third_party/benchmark/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  123. package/cpp/leveldb/third_party/benchmark/.github/workflows/build-and-test.yml +38 -0
  124. package/cpp/leveldb/third_party/benchmark/.github/workflows/pylint.yml +26 -0
  125. package/cpp/leveldb/third_party/benchmark/.github/workflows/test_bindings.yml +24 -0
  126. package/cpp/leveldb/third_party/benchmark/.travis-libcxx-setup.sh +28 -0
  127. package/cpp/leveldb/third_party/benchmark/.travis.yml +231 -0
  128. package/cpp/leveldb/third_party/benchmark/.ycm_extra_conf.py +115 -0
  129. package/cpp/leveldb/third_party/benchmark/AUTHORS +58 -0
  130. package/cpp/leveldb/third_party/benchmark/BUILD.bazel +44 -0
  131. package/cpp/leveldb/third_party/benchmark/CMakeLists.txt +287 -0
  132. package/cpp/leveldb/third_party/benchmark/CONTRIBUTING.md +58 -0
  133. package/cpp/leveldb/third_party/benchmark/CONTRIBUTORS +83 -0
  134. package/cpp/leveldb/third_party/benchmark/LICENSE +202 -0
  135. package/cpp/leveldb/third_party/benchmark/README.md +1323 -0
  136. package/cpp/leveldb/third_party/benchmark/WORKSPACE +51 -0
  137. package/cpp/leveldb/third_party/benchmark/_config.yml +1 -0
  138. package/cpp/leveldb/third_party/benchmark/appveyor.yml +50 -0
  139. package/cpp/leveldb/third_party/benchmark/bindings/python/BUILD +3 -0
  140. package/cpp/leveldb/third_party/benchmark/bindings/python/build_defs.bzl +25 -0
  141. package/cpp/leveldb/third_party/benchmark/bindings/python/google_benchmark/BUILD +38 -0
  142. package/cpp/leveldb/third_party/benchmark/bindings/python/google_benchmark/__init__.py +156 -0
  143. package/cpp/leveldb/third_party/benchmark/bindings/python/google_benchmark/benchmark.cc +180 -0
  144. package/cpp/leveldb/third_party/benchmark/bindings/python/google_benchmark/example.py +136 -0
  145. package/cpp/leveldb/third_party/benchmark/bindings/python/pybind11.BUILD +20 -0
  146. package/cpp/leveldb/third_party/benchmark/bindings/python/python_headers.BUILD +6 -0
  147. package/cpp/leveldb/third_party/benchmark/bindings/python/requirements.txt +2 -0
  148. package/cpp/leveldb/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake +74 -0
  149. package/cpp/leveldb/third_party/benchmark/cmake/CXXFeatureCheck.cmake +69 -0
  150. package/cpp/leveldb/third_party/benchmark/cmake/Config.cmake.in +1 -0
  151. package/cpp/leveldb/third_party/benchmark/cmake/GetGitVersion.cmake +54 -0
  152. package/cpp/leveldb/third_party/benchmark/cmake/GoogleTest.cmake +41 -0
  153. package/cpp/leveldb/third_party/benchmark/cmake/GoogleTest.cmake.in +58 -0
  154. package/cpp/leveldb/third_party/benchmark/cmake/benchmark.pc.in +12 -0
  155. package/cpp/leveldb/third_party/benchmark/cmake/gnu_posix_regex.cpp +12 -0
  156. package/cpp/leveldb/third_party/benchmark/cmake/llvm-toolchain.cmake +8 -0
  157. package/cpp/leveldb/third_party/benchmark/cmake/posix_regex.cpp +14 -0
  158. package/cpp/leveldb/third_party/benchmark/cmake/split_list.cmake +3 -0
  159. package/cpp/leveldb/third_party/benchmark/cmake/std_regex.cpp +10 -0
  160. package/cpp/leveldb/third_party/benchmark/cmake/steady_clock.cpp +7 -0
  161. package/cpp/leveldb/third_party/benchmark/cmake/thread_safety_attributes.cpp +4 -0
  162. package/cpp/leveldb/third_party/benchmark/conan/CMakeLists.txt +7 -0
  163. package/cpp/leveldb/third_party/benchmark/conan/test_package/CMakeLists.txt +10 -0
  164. package/cpp/leveldb/third_party/benchmark/conan/test_package/conanfile.py +19 -0
  165. package/cpp/leveldb/third_party/benchmark/conan/test_package/test_package.cpp +18 -0
  166. package/cpp/leveldb/third_party/benchmark/conanfile.py +79 -0
  167. package/cpp/leveldb/third_party/benchmark/dependencies.md +18 -0
  168. package/cpp/leveldb/third_party/benchmark/docs/AssemblyTests.md +147 -0
  169. package/cpp/leveldb/third_party/benchmark/docs/_config.yml +1 -0
  170. package/cpp/leveldb/third_party/benchmark/docs/releasing.md +16 -0
  171. package/cpp/leveldb/third_party/benchmark/docs/tools.md +203 -0
  172. package/cpp/leveldb/third_party/benchmark/include/benchmark/benchmark.h +1604 -0
  173. package/cpp/leveldb/third_party/benchmark/requirements.txt +2 -0
  174. package/cpp/leveldb/third_party/benchmark/setup.py +140 -0
  175. package/cpp/leveldb/third_party/benchmark/src/CMakeLists.txt +114 -0
  176. package/cpp/leveldb/third_party/benchmark/src/arraysize.h +33 -0
  177. package/cpp/leveldb/third_party/benchmark/src/benchmark.cc +499 -0
  178. package/cpp/leveldb/third_party/benchmark/src/benchmark_api_internal.cc +15 -0
  179. package/cpp/leveldb/third_party/benchmark/src/benchmark_api_internal.h +53 -0
  180. package/cpp/leveldb/third_party/benchmark/src/benchmark_main.cc +17 -0
  181. package/cpp/leveldb/third_party/benchmark/src/benchmark_name.cc +58 -0
  182. package/cpp/leveldb/third_party/benchmark/src/benchmark_register.cc +515 -0
  183. package/cpp/leveldb/third_party/benchmark/src/benchmark_register.h +108 -0
  184. package/cpp/leveldb/third_party/benchmark/src/benchmark_runner.cc +362 -0
  185. package/cpp/leveldb/third_party/benchmark/src/benchmark_runner.h +51 -0
  186. package/cpp/leveldb/third_party/benchmark/src/check.h +82 -0
  187. package/cpp/leveldb/third_party/benchmark/src/colorprint.cc +188 -0
  188. package/cpp/leveldb/third_party/benchmark/src/colorprint.h +33 -0
  189. package/cpp/leveldb/third_party/benchmark/src/commandlineflags.cc +228 -0
  190. package/cpp/leveldb/third_party/benchmark/src/commandlineflags.h +103 -0
  191. package/cpp/leveldb/third_party/benchmark/src/complexity.cc +238 -0
  192. package/cpp/leveldb/third_party/benchmark/src/complexity.h +55 -0
  193. package/cpp/leveldb/third_party/benchmark/src/console_reporter.cc +177 -0
  194. package/cpp/leveldb/third_party/benchmark/src/counter.cc +80 -0
  195. package/cpp/leveldb/third_party/benchmark/src/counter.h +32 -0
  196. package/cpp/leveldb/third_party/benchmark/src/csv_reporter.cc +154 -0
  197. package/cpp/leveldb/third_party/benchmark/src/cycleclock.h +211 -0
  198. package/cpp/leveldb/third_party/benchmark/src/internal_macros.h +102 -0
  199. package/cpp/leveldb/third_party/benchmark/src/json_reporter.cc +255 -0
  200. package/cpp/leveldb/third_party/benchmark/src/log.h +74 -0
  201. package/cpp/leveldb/third_party/benchmark/src/mutex.h +155 -0
  202. package/cpp/leveldb/third_party/benchmark/src/re.h +158 -0
  203. package/cpp/leveldb/third_party/benchmark/src/reporter.cc +105 -0
  204. package/cpp/leveldb/third_party/benchmark/src/sleep.cc +67 -0
  205. package/cpp/leveldb/third_party/benchmark/src/sleep.h +15 -0
  206. package/cpp/leveldb/third_party/benchmark/src/statistics.cc +193 -0
  207. package/cpp/leveldb/third_party/benchmark/src/statistics.h +37 -0
  208. package/cpp/leveldb/third_party/benchmark/src/string_util.cc +255 -0
  209. package/cpp/leveldb/third_party/benchmark/src/string_util.h +59 -0
  210. package/cpp/leveldb/third_party/benchmark/src/sysinfo.cc +716 -0
  211. package/cpp/leveldb/third_party/benchmark/src/thread_manager.h +64 -0
  212. package/cpp/leveldb/third_party/benchmark/src/thread_timer.h +86 -0
  213. package/cpp/leveldb/third_party/benchmark/src/timers.cc +245 -0
  214. package/cpp/leveldb/third_party/benchmark/src/timers.h +48 -0
  215. package/cpp/leveldb/third_party/benchmark/test/AssemblyTests.cmake +46 -0
  216. package/cpp/leveldb/third_party/benchmark/test/BUILD +73 -0
  217. package/cpp/leveldb/third_party/benchmark/test/CMakeLists.txt +263 -0
  218. package/cpp/leveldb/third_party/benchmark/test/args_product_test.cc +77 -0
  219. package/cpp/leveldb/third_party/benchmark/test/basic_test.cc +136 -0
  220. package/cpp/leveldb/third_party/benchmark/test/benchmark_gtest.cc +134 -0
  221. package/cpp/leveldb/third_party/benchmark/test/benchmark_name_gtest.cc +74 -0
  222. package/cpp/leveldb/third_party/benchmark/test/benchmark_test.cc +245 -0
  223. package/cpp/leveldb/third_party/benchmark/test/clobber_memory_assembly_test.cc +64 -0
  224. package/cpp/leveldb/third_party/benchmark/test/commandlineflags_gtest.cc +201 -0
  225. package/cpp/leveldb/third_party/benchmark/test/complexity_test.cc +213 -0
  226. package/cpp/leveldb/third_party/benchmark/test/cxx03_test.cc +63 -0
  227. package/cpp/leveldb/third_party/benchmark/test/diagnostics_test.cc +80 -0
  228. package/cpp/leveldb/third_party/benchmark/test/display_aggregates_only_test.cc +43 -0
  229. package/cpp/leveldb/third_party/benchmark/test/donotoptimize_assembly_test.cc +163 -0
  230. package/cpp/leveldb/third_party/benchmark/test/donotoptimize_test.cc +52 -0
  231. package/cpp/leveldb/third_party/benchmark/test/filter_test.cc +104 -0
  232. package/cpp/leveldb/third_party/benchmark/test/fixture_test.cc +51 -0
  233. package/cpp/leveldb/third_party/benchmark/test/internal_threading_test.cc +184 -0
  234. package/cpp/leveldb/third_party/benchmark/test/link_main_test.cc +8 -0
  235. package/cpp/leveldb/third_party/benchmark/test/map_test.cc +57 -0
  236. package/cpp/leveldb/third_party/benchmark/test/memory_manager_test.cc +44 -0
  237. package/cpp/leveldb/third_party/benchmark/test/multiple_ranges_test.cc +96 -0
  238. package/cpp/leveldb/third_party/benchmark/test/options_test.cc +75 -0
  239. package/cpp/leveldb/third_party/benchmark/test/output_test.h +213 -0
  240. package/cpp/leveldb/third_party/benchmark/test/output_test_helper.cc +515 -0
  241. package/cpp/leveldb/third_party/benchmark/test/register_benchmark_test.cc +184 -0
  242. package/cpp/leveldb/third_party/benchmark/test/report_aggregates_only_test.cc +39 -0
  243. package/cpp/leveldb/third_party/benchmark/test/reporter_output_test.cc +747 -0
  244. package/cpp/leveldb/third_party/benchmark/test/skip_with_error_test.cc +195 -0
  245. package/cpp/leveldb/third_party/benchmark/test/state_assembly_test.cc +68 -0
  246. package/cpp/leveldb/third_party/benchmark/test/statistics_gtest.cc +28 -0
  247. package/cpp/leveldb/third_party/benchmark/test/string_util_gtest.cc +153 -0
  248. package/cpp/leveldb/third_party/benchmark/test/templated_fixture_test.cc +28 -0
  249. package/cpp/leveldb/third_party/benchmark/test/user_counters_tabular_test.cc +285 -0
  250. package/cpp/leveldb/third_party/benchmark/test/user_counters_test.cc +531 -0
  251. package/cpp/leveldb/third_party/benchmark/test/user_counters_thousands_test.cc +173 -0
  252. package/cpp/leveldb/third_party/benchmark/tools/BUILD.bazel +19 -0
  253. package/cpp/leveldb/third_party/benchmark/tools/compare.py +429 -0
  254. package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test1_run1.json +119 -0
  255. package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test1_run2.json +119 -0
  256. package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test2_run.json +81 -0
  257. package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test3_run0.json +65 -0
  258. package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test3_run1.json +65 -0
  259. package/cpp/leveldb/third_party/benchmark/tools/gbench/__init__.py +8 -0
  260. package/cpp/leveldb/third_party/benchmark/tools/gbench/report.py +903 -0
  261. package/cpp/leveldb/third_party/benchmark/tools/gbench/util.py +163 -0
  262. package/cpp/leveldb/third_party/benchmark/tools/requirements.txt +1 -0
  263. package/cpp/leveldb/third_party/benchmark/tools/strip_asm.py +151 -0
  264. package/cpp/leveldb/third_party/googletest/.clang-format +4 -0
  265. package/cpp/leveldb/third_party/googletest/.travis.yml +73 -0
  266. package/cpp/leveldb/third_party/googletest/BUILD.bazel +179 -0
  267. package/cpp/leveldb/third_party/googletest/CMakeLists.txt +36 -0
  268. package/cpp/leveldb/third_party/googletest/CONTRIBUTING.md +142 -0
  269. package/cpp/leveldb/third_party/googletest/LICENSE +28 -0
  270. package/cpp/leveldb/third_party/googletest/README.md +132 -0
  271. package/cpp/leveldb/third_party/googletest/WORKSPACE +23 -0
  272. package/cpp/leveldb/third_party/googletest/appveyor.yml +154 -0
  273. package/cpp/leveldb/third_party/googletest/ci/build-linux-bazel.sh +37 -0
  274. package/cpp/leveldb/third_party/googletest/ci/build-platformio.sh +2 -0
  275. package/cpp/leveldb/third_party/googletest/ci/env-linux.sh +41 -0
  276. package/cpp/leveldb/third_party/googletest/ci/env-osx.sh +47 -0
  277. package/cpp/leveldb/third_party/googletest/ci/get-nprocessors.sh +48 -0
  278. package/cpp/leveldb/third_party/googletest/ci/install-linux.sh +49 -0
  279. package/cpp/leveldb/third_party/googletest/ci/install-osx.sh +40 -0
  280. package/cpp/leveldb/third_party/googletest/ci/install-platformio.sh +5 -0
  281. package/cpp/leveldb/third_party/googletest/ci/log-config.sh +51 -0
  282. package/cpp/leveldb/third_party/googletest/ci/travis.sh +44 -0
  283. package/cpp/leveldb/third_party/googletest/googlemock/CMakeLists.txt +233 -0
  284. package/cpp/leveldb/third_party/googletest/googlemock/CONTRIBUTORS +40 -0
  285. package/cpp/leveldb/third_party/googletest/googlemock/LICENSE +28 -0
  286. package/cpp/leveldb/third_party/googletest/googlemock/README.md +44 -0
  287. package/cpp/leveldb/third_party/googletest/googlemock/cmake/gmock.pc.in +10 -0
  288. package/cpp/leveldb/third_party/googletest/googlemock/cmake/gmock_main.pc.in +10 -0
  289. package/cpp/leveldb/third_party/googletest/googlemock/docs/cheat_sheet.md +770 -0
  290. package/cpp/leveldb/third_party/googletest/googlemock/docs/cook_book.md +4270 -0
  291. package/cpp/leveldb/third_party/googletest/googlemock/docs/for_dummies.md +700 -0
  292. package/cpp/leveldb/third_party/googletest/googlemock/docs/gmock_faq.md +396 -0
  293. package/cpp/leveldb/third_party/googletest/googlemock/docs/pump_manual.md +187 -0
  294. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-actions.h +1193 -0
  295. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-cardinalities.h +157 -0
  296. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-function-mocker.h +276 -0
  297. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h +1884 -0
  298. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h.pump +627 -0
  299. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h +752 -0
  300. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +227 -0
  301. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h +1097 -0
  302. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h.pump +346 -0
  303. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-matchers.h +4591 -0
  304. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-more-actions.h +162 -0
  305. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-more-matchers.h +92 -0
  306. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-nice-strict.h +215 -0
  307. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h +1985 -0
  308. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock.h +101 -0
  309. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/README.md +16 -0
  310. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +10 -0
  311. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +12 -0
  312. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h +36 -0
  313. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-port.h +39 -0
  314. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h +472 -0
  315. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h +87 -0
  316. package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/gmock-pp.h +271 -0
  317. package/cpp/leveldb/third_party/googletest/googlemock/scripts/README.md +5 -0
  318. package/cpp/leveldb/third_party/googletest/googlemock/scripts/fuse_gmock_files.py +240 -0
  319. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/LICENSE +203 -0
  320. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/README +34 -0
  321. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/README.cppclean +115 -0
  322. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  323. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/ast.py +1761 -0
  324. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class.py +248 -0
  325. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py +540 -0
  326. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/keywords.py +56 -0
  327. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/tokenize.py +284 -0
  328. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/utils.py +37 -0
  329. package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/gmock_gen.py +30 -0
  330. package/cpp/leveldb/third_party/googletest/googlemock/scripts/pump.py +856 -0
  331. package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-all.cc +46 -0
  332. package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-cardinalities.cc +155 -0
  333. package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-internal-utils.cc +200 -0
  334. package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-matchers.cc +462 -0
  335. package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-spec-builders.cc +892 -0
  336. package/cpp/leveldb/third_party/googletest/googlemock/src/gmock.cc +213 -0
  337. package/cpp/leveldb/third_party/googletest/googlemock/src/gmock_main.cc +72 -0
  338. package/cpp/leveldb/third_party/googletest/googlemock/test/BUILD.bazel +110 -0
  339. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-actions_test.cc +1507 -0
  340. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-cardinalities_test.cc +429 -0
  341. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-function-mocker_nc.cc +16 -0
  342. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-function-mocker_nc_test.py +43 -0
  343. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-function-mocker_test.cc +696 -0
  344. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-generated-actions_test.cc +1064 -0
  345. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-generated-function-mockers_test.cc +659 -0
  346. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-generated-matchers_test.cc +1323 -0
  347. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-internal-utils_test.cc +732 -0
  348. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-matchers_test.cc +6913 -0
  349. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-more-actions_test.cc +698 -0
  350. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-nice-strict_test.cc +500 -0
  351. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-port_test.cc +42 -0
  352. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-pp-string_test.cc +206 -0
  353. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-pp_test.cc +83 -0
  354. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-spec-builders_test.cc +2775 -0
  355. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_all_test.cc +49 -0
  356. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_ex_test.cc +80 -0
  357. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_leak_test.py +104 -0
  358. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_leak_test_.cc +99 -0
  359. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_link2_test.cc +39 -0
  360. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_link_test.cc +39 -0
  361. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_link_test.h +690 -0
  362. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_output_test.py +183 -0
  363. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_output_test_.cc +309 -0
  364. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_output_test_golden.txt +317 -0
  365. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_stress_test.cc +240 -0
  366. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_test.cc +181 -0
  367. package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_test_utils.py +108 -0
  368. package/cpp/leveldb/third_party/googletest/googlemock/test/pump_test.py +182 -0
  369. package/cpp/leveldb/third_party/googletest/googletest/CMakeLists.txt +329 -0
  370. package/cpp/leveldb/third_party/googletest/googletest/CONTRIBUTORS +38 -0
  371. package/cpp/leveldb/third_party/googletest/googletest/LICENSE +28 -0
  372. package/cpp/leveldb/third_party/googletest/googletest/README.md +244 -0
  373. package/cpp/leveldb/third_party/googletest/googletest/cmake/Config.cmake.in +9 -0
  374. package/cpp/leveldb/third_party/googletest/googletest/cmake/gtest.pc.in +9 -0
  375. package/cpp/leveldb/third_party/googletest/googletest/cmake/gtest_main.pc.in +10 -0
  376. package/cpp/leveldb/third_party/googletest/googletest/cmake/internal_utils.cmake +358 -0
  377. package/cpp/leveldb/third_party/googletest/googletest/cmake/libgtest.la.in +21 -0
  378. package/cpp/leveldb/third_party/googletest/googletest/docs/advanced.md +2567 -0
  379. package/cpp/leveldb/third_party/googletest/googletest/docs/faq.md +753 -0
  380. package/cpp/leveldb/third_party/googletest/googletest/docs/pkgconfig.md +219 -0
  381. package/cpp/leveldb/third_party/googletest/googletest/docs/primer.md +579 -0
  382. package/cpp/leveldb/third_party/googletest/googletest/docs/samples.md +22 -0
  383. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-death-test.h +343 -0
  384. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-matchers.h +750 -0
  385. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-message.h +219 -0
  386. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-param-test.h +514 -0
  387. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-printers.h +928 -0
  388. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-spi.h +238 -0
  389. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-test-part.h +184 -0
  390. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-typed-test.h +337 -0
  391. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest.h +2477 -0
  392. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest_pred_impl.h +359 -0
  393. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest_prod.h +61 -0
  394. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/custom/README.md +56 -0
  395. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/custom/gtest-port.h +37 -0
  396. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
  397. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/custom/gtest.h +37 -0
  398. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h +304 -0
  399. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h +211 -0
  400. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h +1411 -0
  401. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h +880 -0
  402. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-port-arch.h +111 -0
  403. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-port.h +2227 -0
  404. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-string.h +171 -0
  405. package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h +183 -0
  406. package/cpp/leveldb/third_party/googletest/googletest/samples/prime_tables.h +126 -0
  407. package/cpp/leveldb/third_party/googletest/googletest/samples/sample1.cc +66 -0
  408. package/cpp/leveldb/third_party/googletest/googletest/samples/sample1.h +41 -0
  409. package/cpp/leveldb/third_party/googletest/googletest/samples/sample10_unittest.cc +139 -0
  410. package/cpp/leveldb/third_party/googletest/googletest/samples/sample1_unittest.cc +151 -0
  411. package/cpp/leveldb/third_party/googletest/googletest/samples/sample2.cc +54 -0
  412. package/cpp/leveldb/third_party/googletest/googletest/samples/sample2.h +81 -0
  413. package/cpp/leveldb/third_party/googletest/googletest/samples/sample2_unittest.cc +107 -0
  414. package/cpp/leveldb/third_party/googletest/googletest/samples/sample3-inl.h +172 -0
  415. package/cpp/leveldb/third_party/googletest/googletest/samples/sample3_unittest.cc +149 -0
  416. package/cpp/leveldb/third_party/googletest/googletest/samples/sample4.cc +54 -0
  417. package/cpp/leveldb/third_party/googletest/googletest/samples/sample4.h +53 -0
  418. package/cpp/leveldb/third_party/googletest/googletest/samples/sample4_unittest.cc +53 -0
  419. package/cpp/leveldb/third_party/googletest/googletest/samples/sample5_unittest.cc +196 -0
  420. package/cpp/leveldb/third_party/googletest/googletest/samples/sample6_unittest.cc +224 -0
  421. package/cpp/leveldb/third_party/googletest/googletest/samples/sample7_unittest.cc +117 -0
  422. package/cpp/leveldb/third_party/googletest/googletest/samples/sample8_unittest.cc +154 -0
  423. package/cpp/leveldb/third_party/googletest/googletest/samples/sample9_unittest.cc +156 -0
  424. package/cpp/leveldb/third_party/googletest/googletest/scripts/README.md +5 -0
  425. package/cpp/leveldb/third_party/googletest/googletest/scripts/common.py +83 -0
  426. package/cpp/leveldb/third_party/googletest/googletest/scripts/fuse_gtest_files.py +253 -0
  427. package/cpp/leveldb/third_party/googletest/googletest/scripts/gen_gtest_pred_impl.py +734 -0
  428. package/cpp/leveldb/third_party/googletest/googletest/scripts/gtest-config.in +274 -0
  429. package/cpp/leveldb/third_party/googletest/googletest/scripts/release_docs.py +158 -0
  430. package/cpp/leveldb/third_party/googletest/googletest/scripts/run_with_path.py +32 -0
  431. package/cpp/leveldb/third_party/googletest/googletest/scripts/upload.py +1402 -0
  432. package/cpp/leveldb/third_party/googletest/googletest/scripts/upload_gtest.py +78 -0
  433. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-all.cc +48 -0
  434. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-death-test.cc +1653 -0
  435. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-filepath.cc +382 -0
  436. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-internal-inl.h +1211 -0
  437. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-matchers.cc +97 -0
  438. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-port.cc +1399 -0
  439. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-printers.cc +442 -0
  440. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-test-part.cc +108 -0
  441. package/cpp/leveldb/third_party/googletest/googletest/src/gtest-typed-test.cc +118 -0
  442. package/cpp/leveldb/third_party/googletest/googletest/src/gtest.cc +6180 -0
  443. package/cpp/leveldb/third_party/googletest/googletest/src/gtest_main.cc +54 -0
  444. package/cpp/leveldb/third_party/googletest/googletest/test/BUILD.bazel +529 -0
  445. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-break-on-failure-unittest.py +208 -0
  446. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-break-on-failure-unittest_.cc +86 -0
  447. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-catch-exceptions-test.py +236 -0
  448. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-catch-exceptions-test_.cc +293 -0
  449. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-color-test.py +127 -0
  450. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-color-test_.cc +62 -0
  451. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-death-test-test.cc +1516 -0
  452. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-death-test_ex_test.cc +92 -0
  453. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-env-var-test.py +117 -0
  454. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-env-var-test_.cc +122 -0
  455. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-filepath-test.cc +649 -0
  456. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-filter-unittest.py +639 -0
  457. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-filter-unittest_.cc +137 -0
  458. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-json-outfiles-test.py +191 -0
  459. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-json-output-unittest.py +778 -0
  460. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-list-tests-unittest.py +205 -0
  461. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-list-tests-unittest_.cc +156 -0
  462. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-listener-test.cc +518 -0
  463. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-message-test.cc +158 -0
  464. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-options-test.cc +216 -0
  465. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-output-test-golden-lin.txt +1137 -0
  466. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-output-test.py +346 -0
  467. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-output-test_.cc +1149 -0
  468. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test.py +63 -0
  469. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test_.cc +50 -0
  470. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test.py +62 -0
  471. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test_.cc +55 -0
  472. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-test.cc +1086 -0
  473. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-test.h +51 -0
  474. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test2-test.cc +61 -0
  475. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-port-test.cc +1272 -0
  476. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-printers-test.cc +1619 -0
  477. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-shuffle-test.py +323 -0
  478. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-shuffle-test_.cc +101 -0
  479. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-test-part-test.cc +230 -0
  480. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-test2_test.cc +61 -0
  481. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-throw-on-failure-test.py +168 -0
  482. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-throw-on-failure-test_.cc +71 -0
  483. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-uninitialized-test.py +67 -0
  484. package/cpp/leveldb/third_party/googletest/googletest/test/googletest-uninitialized-test_.cc +42 -0
  485. package/cpp/leveldb/third_party/googletest/googletest/test/gtest-typed-test2_test.cc +44 -0
  486. package/cpp/leveldb/third_party/googletest/googletest/test/gtest-typed-test_test.cc +462 -0
  487. package/cpp/leveldb/third_party/googletest/googletest/test/gtest-typed-test_test.h +65 -0
  488. package/cpp/leveldb/third_party/googletest/googletest/test/gtest-unittest-api_test.cc +341 -0
  489. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_all_test.cc +46 -0
  490. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_assert_by_exception_test.cc +116 -0
  491. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_environment_test.cc +188 -0
  492. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_help_test.py +170 -0
  493. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_help_test_.cc +45 -0
  494. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_json_test_utils.py +60 -0
  495. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_list_output_unittest.py +141 -0
  496. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_list_output_unittest_.cc +51 -0
  497. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_main_unittest.cc +44 -0
  498. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_no_test_unittest.cc +54 -0
  499. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_pred_impl_unittest.cc +2427 -0
  500. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_premature_exit_test.cc +126 -0
  501. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_prod_test.cc +56 -0
  502. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_repeat_test.cc +233 -0
  503. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_skip_check_output_test.py +59 -0
  504. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_skip_environment_check_output_test.py +54 -0
  505. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_skip_in_environment_setup_test.cc +49 -0
  506. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_skip_test.cc +55 -0
  507. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_sole_header_test.cc +56 -0
  508. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_stress_test.cc +248 -0
  509. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_test_macro_stack_footprint_test.cc +89 -0
  510. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_test_utils.py +314 -0
  511. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_testbridge_test.py +63 -0
  512. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_testbridge_test_.cc +43 -0
  513. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_throw_on_failure_ex_test.cc +90 -0
  514. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_unittest.cc +7496 -0
  515. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_outfile1_test_.cc +43 -0
  516. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_outfile2_test_.cc +43 -0
  517. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_outfiles_test.py +135 -0
  518. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_output_unittest.py +389 -0
  519. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_output_unittest_.cc +188 -0
  520. package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_test_utils.py +196 -0
  521. package/cpp/leveldb/third_party/googletest/googletest/test/production.cc +35 -0
  522. package/cpp/leveldb/third_party/googletest/googletest/test/production.h +54 -0
  523. package/cpp/leveldb/third_party/googletest/library.json +66 -0
  524. package/cpp/leveldb/third_party/googletest/platformio.ini +47 -0
  525. package/cpp/leveldb/util/arena.cc +66 -0
  526. package/cpp/leveldb/util/arena.h +71 -0
  527. package/cpp/leveldb/util/arena_test.cc +66 -0
  528. package/cpp/leveldb/util/bloom.cc +92 -0
  529. package/cpp/leveldb/util/bloom_test.cc +159 -0
  530. package/cpp/leveldb/util/cache.cc +401 -0
  531. package/cpp/leveldb/util/cache_test.cc +229 -0
  532. package/cpp/leveldb/util/coding.cc +166 -0
  533. package/cpp/leveldb/util/coding.h +122 -0
  534. package/cpp/leveldb/util/coding_test.cc +198 -0
  535. package/cpp/leveldb/util/comparator.cc +75 -0
  536. package/cpp/leveldb/util/crc32c.cc +380 -0
  537. package/cpp/leveldb/util/crc32c.h +43 -0
  538. package/cpp/leveldb/util/crc32c_test.cc +61 -0
  539. package/cpp/leveldb/util/env.cc +108 -0
  540. package/cpp/leveldb/util/env_posix.cc +893 -0
  541. package/cpp/leveldb/util/env_posix_test.cc +353 -0
  542. package/cpp/leveldb/util/env_posix_test_helper.h +28 -0
  543. package/cpp/leveldb/util/env_test.cc +240 -0
  544. package/cpp/leveldb/util/env_windows.cc +796 -0
  545. package/cpp/leveldb/util/env_windows_test.cc +65 -0
  546. package/cpp/leveldb/util/env_windows_test_helper.h +25 -0
  547. package/cpp/leveldb/util/filter_policy.cc +11 -0
  548. package/cpp/leveldb/util/hash.cc +55 -0
  549. package/cpp/leveldb/util/hash.h +19 -0
  550. package/cpp/leveldb/util/hash_test.cc +46 -0
  551. package/cpp/leveldb/util/histogram.cc +272 -0
  552. package/cpp/leveldb/util/histogram.h +44 -0
  553. package/cpp/leveldb/util/logging.cc +82 -0
  554. package/cpp/leveldb/util/logging.h +44 -0
  555. package/cpp/leveldb/util/logging_test.cc +145 -0
  556. package/cpp/leveldb/util/mutexlock.h +39 -0
  557. package/cpp/leveldb/util/no_destructor.h +46 -0
  558. package/cpp/leveldb/util/no_destructor_test.cc +49 -0
  559. package/cpp/leveldb/util/options.cc +14 -0
  560. package/cpp/leveldb/util/posix_logger.h +130 -0
  561. package/cpp/leveldb/util/random.h +63 -0
  562. package/cpp/leveldb/util/status.cc +77 -0
  563. package/cpp/leveldb/util/status_test.cc +44 -0
  564. package/cpp/leveldb/util/testutil.cc +51 -0
  565. package/cpp/leveldb/util/testutil.h +82 -0
  566. package/cpp/leveldb/util/windows_logger.h +124 -0
  567. package/cpp/react-native-leveldb.cpp +694 -0
  568. package/cpp/react-native-leveldb.h +4 -0
  569. package/ios/Leveldb.h +9 -0
  570. package/ios/Leveldb.mm +35 -0
  571. package/ios/Leveldb.xcodeproj/project.pbxproj +288 -0
  572. package/lib/commonjs/fake.js +181 -0
  573. package/lib/commonjs/fake.js.map +1 -0
  574. package/lib/commonjs/fake.test.js +30 -0
  575. package/lib/commonjs/fake.test.js.map +1 -0
  576. package/lib/commonjs/index.js +172 -0
  577. package/lib/commonjs/index.js.map +1 -0
  578. package/lib/commonjs/package.json +1 -0
  579. package/lib/module/fake.js +171 -0
  580. package/lib/module/fake.js.map +1 -0
  581. package/lib/module/fake.test.js +30 -0
  582. package/lib/module/fake.test.js.map +1 -0
  583. package/lib/module/index.js +165 -0
  584. package/lib/module/index.js.map +1 -0
  585. package/lib/typescript/fake.d.ts +34 -0
  586. package/lib/typescript/fake.d.ts.map +1 -0
  587. package/lib/typescript/fake.test.d.ts +2 -0
  588. package/lib/typescript/fake.test.d.ts.map +1 -0
  589. package/lib/typescript/index.d.ts +72 -0
  590. package/lib/typescript/index.d.ts.map +1 -0
  591. package/package.json +157 -0
  592. package/rn-leveldb.podspec +30 -0
  593. package/src/fake.test.ts +37 -0
  594. package/src/fake.ts +203 -0
  595. package/src/index.ts +291 -0
@@ -0,0 +1,928 @@
1
+ // Copyright 2007, Google Inc.
2
+ // All rights reserved.
3
+ //
4
+ // Redistribution and use in source and binary forms, with or without
5
+ // modification, are permitted provided that the following conditions are
6
+ // met:
7
+ //
8
+ // * Redistributions of source code must retain the above copyright
9
+ // notice, this list of conditions and the following disclaimer.
10
+ // * Redistributions in binary form must reproduce the above
11
+ // copyright notice, this list of conditions and the following disclaimer
12
+ // in the documentation and/or other materials provided with the
13
+ // distribution.
14
+ // * Neither the name of Google Inc. nor the names of its
15
+ // contributors may be used to endorse or promote products derived from
16
+ // this software without specific prior written permission.
17
+ //
18
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
+
30
+
31
+ // Google Test - The Google C++ Testing and Mocking Framework
32
+ //
33
+ // This file implements a universal value printer that can print a
34
+ // value of any type T:
35
+ //
36
+ // void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
37
+ //
38
+ // A user can teach this function how to print a class type T by
39
+ // defining either operator<<() or PrintTo() in the namespace that
40
+ // defines T. More specifically, the FIRST defined function in the
41
+ // following list will be used (assuming T is defined in namespace
42
+ // foo):
43
+ //
44
+ // 1. foo::PrintTo(const T&, ostream*)
45
+ // 2. operator<<(ostream&, const T&) defined in either foo or the
46
+ // global namespace.
47
+ //
48
+ // However if T is an STL-style container then it is printed element-wise
49
+ // unless foo::PrintTo(const T&, ostream*) is defined. Note that
50
+ // operator<<() is ignored for container types.
51
+ //
52
+ // If none of the above is defined, it will print the debug string of
53
+ // the value if it is a protocol buffer, or print the raw bytes in the
54
+ // value otherwise.
55
+ //
56
+ // To aid debugging: when T is a reference type, the address of the
57
+ // value is also printed; when T is a (const) char pointer, both the
58
+ // pointer value and the NUL-terminated string it points to are
59
+ // printed.
60
+ //
61
+ // We also provide some convenient wrappers:
62
+ //
63
+ // // Prints a value to a string. For a (const or not) char
64
+ // // pointer, the NUL-terminated string (but not the pointer) is
65
+ // // printed.
66
+ // std::string ::testing::PrintToString(const T& value);
67
+ //
68
+ // // Prints a value tersely: for a reference type, the referenced
69
+ // // value (but not the address) is printed; for a (const or not) char
70
+ // // pointer, the NUL-terminated string (but not the pointer) is
71
+ // // printed.
72
+ // void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
73
+ //
74
+ // // Prints value using the type inferred by the compiler. The difference
75
+ // // from UniversalTersePrint() is that this function prints both the
76
+ // // pointer and the NUL-terminated string for a (const or not) char pointer.
77
+ // void ::testing::internal::UniversalPrint(const T& value, ostream*);
78
+ //
79
+ // // Prints the fields of a tuple tersely to a string vector, one
80
+ // // element for each field. Tuple support must be enabled in
81
+ // // gtest-port.h.
82
+ // std::vector<string> UniversalTersePrintTupleFieldsToStrings(
83
+ // const Tuple& value);
84
+ //
85
+ // Known limitation:
86
+ //
87
+ // The print primitives print the elements of an STL-style container
88
+ // using the compiler-inferred type of *iter where iter is a
89
+ // const_iterator of the container. When const_iterator is an input
90
+ // iterator but not a forward iterator, this inferred type may not
91
+ // match value_type, and the print output may be incorrect. In
92
+ // practice, this is rarely a problem as for most containers
93
+ // const_iterator is a forward iterator. We'll fix this if there's an
94
+ // actual need for it. Note that this fix cannot rely on value_type
95
+ // being defined as many user-defined container types don't have
96
+ // value_type.
97
+
98
+ // GOOGLETEST_CM0001 DO NOT DELETE
99
+
100
+ #ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
101
+ #define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
102
+
103
+ #include <functional>
104
+ #include <ostream> // NOLINT
105
+ #include <sstream>
106
+ #include <string>
107
+ #include <tuple>
108
+ #include <type_traits>
109
+ #include <utility>
110
+ #include <vector>
111
+ #include "gtest/internal/gtest-internal.h"
112
+ #include "gtest/internal/gtest-port.h"
113
+
114
+ #if GTEST_HAS_ABSL
115
+ #include "absl/strings/string_view.h"
116
+ #include "absl/types/optional.h"
117
+ #include "absl/types/variant.h"
118
+ #endif // GTEST_HAS_ABSL
119
+
120
+ namespace testing {
121
+
122
+ // Definitions in the 'internal' and 'internal2' name spaces are
123
+ // subject to change without notice. DO NOT USE THEM IN USER CODE!
124
+ namespace internal2 {
125
+
126
+ // Prints the given number of bytes in the given object to the given
127
+ // ostream.
128
+ GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
129
+ size_t count,
130
+ ::std::ostream* os);
131
+
132
+ // For selecting which printer to use when a given type has neither <<
133
+ // nor PrintTo().
134
+ enum TypeKind {
135
+ kProtobuf, // a protobuf type
136
+ kConvertibleToInteger, // a type implicitly convertible to BiggestInt
137
+ // (e.g. a named or unnamed enum type)
138
+ #if GTEST_HAS_ABSL
139
+ kConvertibleToStringView, // a type implicitly convertible to
140
+ // absl::string_view
141
+ #endif
142
+ kOtherType // anything else
143
+ };
144
+
145
+ // TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
146
+ // by the universal printer to print a value of type T when neither
147
+ // operator<< nor PrintTo() is defined for T, where kTypeKind is the
148
+ // "kind" of T as defined by enum TypeKind.
149
+ template <typename T, TypeKind kTypeKind>
150
+ class TypeWithoutFormatter {
151
+ public:
152
+ // This default version is called when kTypeKind is kOtherType.
153
+ static void PrintValue(const T& value, ::std::ostream* os) {
154
+ PrintBytesInObjectTo(
155
+ static_cast<const unsigned char*>(
156
+ reinterpret_cast<const void*>(std::addressof(value))),
157
+ sizeof(value), os);
158
+ }
159
+ };
160
+
161
+ // We print a protobuf using its ShortDebugString() when the string
162
+ // doesn't exceed this many characters; otherwise we print it using
163
+ // DebugString() for better readability.
164
+ const size_t kProtobufOneLinerMaxLength = 50;
165
+
166
+ template <typename T>
167
+ class TypeWithoutFormatter<T, kProtobuf> {
168
+ public:
169
+ static void PrintValue(const T& value, ::std::ostream* os) {
170
+ std::string pretty_str = value.ShortDebugString();
171
+ if (pretty_str.length() > kProtobufOneLinerMaxLength) {
172
+ pretty_str = "\n" + value.DebugString();
173
+ }
174
+ *os << ("<" + pretty_str + ">");
175
+ }
176
+ };
177
+
178
+ template <typename T>
179
+ class TypeWithoutFormatter<T, kConvertibleToInteger> {
180
+ public:
181
+ // Since T has no << operator or PrintTo() but can be implicitly
182
+ // converted to BiggestInt, we print it as a BiggestInt.
183
+ //
184
+ // Most likely T is an enum type (either named or unnamed), in which
185
+ // case printing it as an integer is the desired behavior. In case
186
+ // T is not an enum, printing it as an integer is the best we can do
187
+ // given that it has no user-defined printer.
188
+ static void PrintValue(const T& value, ::std::ostream* os) {
189
+ const internal::BiggestInt kBigInt = value;
190
+ *os << kBigInt;
191
+ }
192
+ };
193
+
194
+ #if GTEST_HAS_ABSL
195
+ template <typename T>
196
+ class TypeWithoutFormatter<T, kConvertibleToStringView> {
197
+ public:
198
+ // Since T has neither operator<< nor PrintTo() but can be implicitly
199
+ // converted to absl::string_view, we print it as a absl::string_view.
200
+ //
201
+ // Note: the implementation is further below, as it depends on
202
+ // internal::PrintTo symbol which is defined later in the file.
203
+ static void PrintValue(const T& value, ::std::ostream* os);
204
+ };
205
+ #endif
206
+
207
+ // Prints the given value to the given ostream. If the value is a
208
+ // protocol message, its debug string is printed; if it's an enum or
209
+ // of a type implicitly convertible to BiggestInt, it's printed as an
210
+ // integer; otherwise the bytes in the value are printed. This is
211
+ // what UniversalPrinter<T>::Print() does when it knows nothing about
212
+ // type T and T has neither << operator nor PrintTo().
213
+ //
214
+ // A user can override this behavior for a class type Foo by defining
215
+ // a << operator in the namespace where Foo is defined.
216
+ //
217
+ // We put this operator in namespace 'internal2' instead of 'internal'
218
+ // to simplify the implementation, as much code in 'internal' needs to
219
+ // use << in STL, which would conflict with our own << were it defined
220
+ // in 'internal'.
221
+ //
222
+ // Note that this operator<< takes a generic std::basic_ostream<Char,
223
+ // CharTraits> type instead of the more restricted std::ostream. If
224
+ // we define it to take an std::ostream instead, we'll get an
225
+ // "ambiguous overloads" compiler error when trying to print a type
226
+ // Foo that supports streaming to std::basic_ostream<Char,
227
+ // CharTraits>, as the compiler cannot tell whether
228
+ // operator<<(std::ostream&, const T&) or
229
+ // operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more
230
+ // specific.
231
+ template <typename Char, typename CharTraits, typename T>
232
+ ::std::basic_ostream<Char, CharTraits>& operator<<(
233
+ ::std::basic_ostream<Char, CharTraits>& os, const T& x) {
234
+ TypeWithoutFormatter<T, (internal::IsAProtocolMessage<T>::value
235
+ ? kProtobuf
236
+ : std::is_convertible<
237
+ const T&, internal::BiggestInt>::value
238
+ ? kConvertibleToInteger
239
+ :
240
+ #if GTEST_HAS_ABSL
241
+ std::is_convertible<
242
+ const T&, absl::string_view>::value
243
+ ? kConvertibleToStringView
244
+ :
245
+ #endif
246
+ kOtherType)>::PrintValue(x, &os);
247
+ return os;
248
+ }
249
+
250
+ } // namespace internal2
251
+ } // namespace testing
252
+
253
+ // This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
254
+ // magic needed for implementing UniversalPrinter won't work.
255
+ namespace testing_internal {
256
+
257
+ // Used to print a value that is not an STL-style container when the
258
+ // user doesn't define PrintTo() for it.
259
+ template <typename T>
260
+ void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {
261
+ // With the following statement, during unqualified name lookup,
262
+ // testing::internal2::operator<< appears as if it was declared in
263
+ // the nearest enclosing namespace that contains both
264
+ // ::testing_internal and ::testing::internal2, i.e. the global
265
+ // namespace. For more details, refer to the C++ Standard section
266
+ // 7.3.4-1 [namespace.udir]. This allows us to fall back onto
267
+ // testing::internal2::operator<< in case T doesn't come with a <<
268
+ // operator.
269
+ //
270
+ // We cannot write 'using ::testing::internal2::operator<<;', which
271
+ // gcc 3.3 fails to compile due to a compiler bug.
272
+ using namespace ::testing::internal2; // NOLINT
273
+
274
+ // Assuming T is defined in namespace foo, in the next statement,
275
+ // the compiler will consider all of:
276
+ //
277
+ // 1. foo::operator<< (thanks to Koenig look-up),
278
+ // 2. ::operator<< (as the current namespace is enclosed in ::),
279
+ // 3. testing::internal2::operator<< (thanks to the using statement above).
280
+ //
281
+ // The operator<< whose type matches T best will be picked.
282
+ //
283
+ // We deliberately allow #2 to be a candidate, as sometimes it's
284
+ // impossible to define #1 (e.g. when foo is ::std, defining
285
+ // anything in it is undefined behavior unless you are a compiler
286
+ // vendor.).
287
+ *os << value;
288
+ }
289
+
290
+ } // namespace testing_internal
291
+
292
+ namespace testing {
293
+ namespace internal {
294
+
295
+ // FormatForComparison<ToPrint, OtherOperand>::Format(value) formats a
296
+ // value of type ToPrint that is an operand of a comparison assertion
297
+ // (e.g. ASSERT_EQ). OtherOperand is the type of the other operand in
298
+ // the comparison, and is used to help determine the best way to
299
+ // format the value. In particular, when the value is a C string
300
+ // (char pointer) and the other operand is an STL string object, we
301
+ // want to format the C string as a string, since we know it is
302
+ // compared by value with the string object. If the value is a char
303
+ // pointer but the other operand is not an STL string object, we don't
304
+ // know whether the pointer is supposed to point to a NUL-terminated
305
+ // string, and thus want to print it as a pointer to be safe.
306
+ //
307
+ // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
308
+
309
+ // The default case.
310
+ template <typename ToPrint, typename OtherOperand>
311
+ class FormatForComparison {
312
+ public:
313
+ static ::std::string Format(const ToPrint& value) {
314
+ return ::testing::PrintToString(value);
315
+ }
316
+ };
317
+
318
+ // Array.
319
+ template <typename ToPrint, size_t N, typename OtherOperand>
320
+ class FormatForComparison<ToPrint[N], OtherOperand> {
321
+ public:
322
+ static ::std::string Format(const ToPrint* value) {
323
+ return FormatForComparison<const ToPrint*, OtherOperand>::Format(value);
324
+ }
325
+ };
326
+
327
+ // By default, print C string as pointers to be safe, as we don't know
328
+ // whether they actually point to a NUL-terminated string.
329
+
330
+ #define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType) \
331
+ template <typename OtherOperand> \
332
+ class FormatForComparison<CharType*, OtherOperand> { \
333
+ public: \
334
+ static ::std::string Format(CharType* value) { \
335
+ return ::testing::PrintToString(static_cast<const void*>(value)); \
336
+ } \
337
+ }
338
+
339
+ GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char);
340
+ GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char);
341
+ GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t);
342
+ GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t);
343
+
344
+ #undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_
345
+
346
+ // If a C string is compared with an STL string object, we know it's meant
347
+ // to point to a NUL-terminated string, and thus can print it as a string.
348
+
349
+ #define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \
350
+ template <> \
351
+ class FormatForComparison<CharType*, OtherStringType> { \
352
+ public: \
353
+ static ::std::string Format(CharType* value) { \
354
+ return ::testing::PrintToString(value); \
355
+ } \
356
+ }
357
+
358
+ GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string);
359
+ GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string);
360
+
361
+ #if GTEST_HAS_STD_WSTRING
362
+ GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring);
363
+ GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring);
364
+ #endif
365
+
366
+ #undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_
367
+
368
+ // Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
369
+ // operand to be used in a failure message. The type (but not value)
370
+ // of the other operand may affect the format. This allows us to
371
+ // print a char* as a raw pointer when it is compared against another
372
+ // char* or void*, and print it as a C string when it is compared
373
+ // against an std::string object, for example.
374
+ //
375
+ // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
376
+ template <typename T1, typename T2>
377
+ std::string FormatForComparisonFailureMessage(
378
+ const T1& value, const T2& /* other_operand */) {
379
+ return FormatForComparison<T1, T2>::Format(value);
380
+ }
381
+
382
+ // UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
383
+ // value to the given ostream. The caller must ensure that
384
+ // 'ostream_ptr' is not NULL, or the behavior is undefined.
385
+ //
386
+ // We define UniversalPrinter as a class template (as opposed to a
387
+ // function template), as we need to partially specialize it for
388
+ // reference types, which cannot be done with function templates.
389
+ template <typename T>
390
+ class UniversalPrinter;
391
+
392
+ template <typename T>
393
+ void UniversalPrint(const T& value, ::std::ostream* os);
394
+
395
+ enum DefaultPrinterType {
396
+ kPrintContainer,
397
+ kPrintPointer,
398
+ kPrintFunctionPointer,
399
+ kPrintOther,
400
+ };
401
+ template <DefaultPrinterType type> struct WrapPrinterType {};
402
+
403
+ // Used to print an STL-style container when the user doesn't define
404
+ // a PrintTo() for it.
405
+ template <typename C>
406
+ void DefaultPrintTo(WrapPrinterType<kPrintContainer> /* dummy */,
407
+ const C& container, ::std::ostream* os) {
408
+ const size_t kMaxCount = 32; // The maximum number of elements to print.
409
+ *os << '{';
410
+ size_t count = 0;
411
+ for (typename C::const_iterator it = container.begin();
412
+ it != container.end(); ++it, ++count) {
413
+ if (count > 0) {
414
+ *os << ',';
415
+ if (count == kMaxCount) { // Enough has been printed.
416
+ *os << " ...";
417
+ break;
418
+ }
419
+ }
420
+ *os << ' ';
421
+ // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
422
+ // handle *it being a native array.
423
+ internal::UniversalPrint(*it, os);
424
+ }
425
+
426
+ if (count > 0) {
427
+ *os << ' ';
428
+ }
429
+ *os << '}';
430
+ }
431
+
432
+ // Used to print a pointer that is neither a char pointer nor a member
433
+ // pointer, when the user doesn't define PrintTo() for it. (A member
434
+ // variable pointer or member function pointer doesn't really point to
435
+ // a location in the address space. Their representation is
436
+ // implementation-defined. Therefore they will be printed as raw
437
+ // bytes.)
438
+ template <typename T>
439
+ void DefaultPrintTo(WrapPrinterType<kPrintPointer> /* dummy */,
440
+ T* p, ::std::ostream* os) {
441
+ if (p == nullptr) {
442
+ *os << "NULL";
443
+ } else {
444
+ // T is not a function type. We just call << to print p,
445
+ // relying on ADL to pick up user-defined << for their pointer
446
+ // types, if any.
447
+ *os << p;
448
+ }
449
+ }
450
+ template <typename T>
451
+ void DefaultPrintTo(WrapPrinterType<kPrintFunctionPointer> /* dummy */,
452
+ T* p, ::std::ostream* os) {
453
+ if (p == nullptr) {
454
+ *os << "NULL";
455
+ } else {
456
+ // T is a function type, so '*os << p' doesn't do what we want
457
+ // (it just prints p as bool). We want to print p as a const
458
+ // void*.
459
+ *os << reinterpret_cast<const void*>(p);
460
+ }
461
+ }
462
+
463
+ // Used to print a non-container, non-pointer value when the user
464
+ // doesn't define PrintTo() for it.
465
+ template <typename T>
466
+ void DefaultPrintTo(WrapPrinterType<kPrintOther> /* dummy */,
467
+ const T& value, ::std::ostream* os) {
468
+ ::testing_internal::DefaultPrintNonContainerTo(value, os);
469
+ }
470
+
471
+ // Prints the given value using the << operator if it has one;
472
+ // otherwise prints the bytes in it. This is what
473
+ // UniversalPrinter<T>::Print() does when PrintTo() is not specialized
474
+ // or overloaded for type T.
475
+ //
476
+ // A user can override this behavior for a class type Foo by defining
477
+ // an overload of PrintTo() in the namespace where Foo is defined. We
478
+ // give the user this option as sometimes defining a << operator for
479
+ // Foo is not desirable (e.g. the coding style may prevent doing it,
480
+ // or there is already a << operator but it doesn't do what the user
481
+ // wants).
482
+ template <typename T>
483
+ void PrintTo(const T& value, ::std::ostream* os) {
484
+ // DefaultPrintTo() is overloaded. The type of its first argument
485
+ // determines which version will be picked.
486
+ //
487
+ // Note that we check for container types here, prior to we check
488
+ // for protocol message types in our operator<<. The rationale is:
489
+ //
490
+ // For protocol messages, we want to give people a chance to
491
+ // override Google Mock's format by defining a PrintTo() or
492
+ // operator<<. For STL containers, other formats can be
493
+ // incompatible with Google Mock's format for the container
494
+ // elements; therefore we check for container types here to ensure
495
+ // that our format is used.
496
+ //
497
+ // Note that MSVC and clang-cl do allow an implicit conversion from
498
+ // pointer-to-function to pointer-to-object, but clang-cl warns on it.
499
+ // So don't use ImplicitlyConvertible if it can be helped since it will
500
+ // cause this warning, and use a separate overload of DefaultPrintTo for
501
+ // function pointers so that the `*os << p` in the object pointer overload
502
+ // doesn't cause that warning either.
503
+ DefaultPrintTo(
504
+ WrapPrinterType <
505
+ (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) &&
506
+ !IsRecursiveContainer<T>::value
507
+ ? kPrintContainer
508
+ : !std::is_pointer<T>::value
509
+ ? kPrintOther
510
+ : std::is_function<typename std::remove_pointer<T>::type>::value
511
+ ? kPrintFunctionPointer
512
+ : kPrintPointer > (),
513
+ value, os);
514
+ }
515
+
516
+ // The following list of PrintTo() overloads tells
517
+ // UniversalPrinter<T>::Print() how to print standard types (built-in
518
+ // types, strings, plain arrays, and pointers).
519
+
520
+ // Overloads for various char types.
521
+ GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
522
+ GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
523
+ inline void PrintTo(char c, ::std::ostream* os) {
524
+ // When printing a plain char, we always treat it as unsigned. This
525
+ // way, the output won't be affected by whether the compiler thinks
526
+ // char is signed or not.
527
+ PrintTo(static_cast<unsigned char>(c), os);
528
+ }
529
+
530
+ // Overloads for other simple built-in types.
531
+ inline void PrintTo(bool x, ::std::ostream* os) {
532
+ *os << (x ? "true" : "false");
533
+ }
534
+
535
+ // Overload for wchar_t type.
536
+ // Prints a wchar_t as a symbol if it is printable or as its internal
537
+ // code otherwise and also as its decimal code (except for L'\0').
538
+ // The L'\0' char is printed as "L'\\0'". The decimal code is printed
539
+ // as signed integer when wchar_t is implemented by the compiler
540
+ // as a signed type and is printed as an unsigned integer when wchar_t
541
+ // is implemented as an unsigned type.
542
+ GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
543
+
544
+ // Overloads for C strings.
545
+ GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
546
+ inline void PrintTo(char* s, ::std::ostream* os) {
547
+ PrintTo(ImplicitCast_<const char*>(s), os);
548
+ }
549
+
550
+ // signed/unsigned char is often used for representing binary data, so
551
+ // we print pointers to it as void* to be safe.
552
+ inline void PrintTo(const signed char* s, ::std::ostream* os) {
553
+ PrintTo(ImplicitCast_<const void*>(s), os);
554
+ }
555
+ inline void PrintTo(signed char* s, ::std::ostream* os) {
556
+ PrintTo(ImplicitCast_<const void*>(s), os);
557
+ }
558
+ inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
559
+ PrintTo(ImplicitCast_<const void*>(s), os);
560
+ }
561
+ inline void PrintTo(unsigned char* s, ::std::ostream* os) {
562
+ PrintTo(ImplicitCast_<const void*>(s), os);
563
+ }
564
+
565
+ // MSVC can be configured to define wchar_t as a typedef of unsigned
566
+ // short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
567
+ // type. When wchar_t is a typedef, defining an overload for const
568
+ // wchar_t* would cause unsigned short* be printed as a wide string,
569
+ // possibly causing invalid memory accesses.
570
+ #if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
571
+ // Overloads for wide C strings
572
+ GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
573
+ inline void PrintTo(wchar_t* s, ::std::ostream* os) {
574
+ PrintTo(ImplicitCast_<const wchar_t*>(s), os);
575
+ }
576
+ #endif
577
+
578
+ // Overload for C arrays. Multi-dimensional arrays are printed
579
+ // properly.
580
+
581
+ // Prints the given number of elements in an array, without printing
582
+ // the curly braces.
583
+ template <typename T>
584
+ void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
585
+ UniversalPrint(a[0], os);
586
+ for (size_t i = 1; i != count; i++) {
587
+ *os << ", ";
588
+ UniversalPrint(a[i], os);
589
+ }
590
+ }
591
+
592
+ // Overloads for ::std::string.
593
+ GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);
594
+ inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
595
+ PrintStringTo(s, os);
596
+ }
597
+
598
+ // Overloads for ::std::wstring.
599
+ #if GTEST_HAS_STD_WSTRING
600
+ GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);
601
+ inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
602
+ PrintWideStringTo(s, os);
603
+ }
604
+ #endif // GTEST_HAS_STD_WSTRING
605
+
606
+ #if GTEST_HAS_ABSL
607
+ // Overload for absl::string_view.
608
+ inline void PrintTo(absl::string_view sp, ::std::ostream* os) {
609
+ PrintTo(::std::string(sp), os);
610
+ }
611
+ #endif // GTEST_HAS_ABSL
612
+
613
+ inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
614
+
615
+ template <typename T>
616
+ void PrintTo(std::reference_wrapper<T> ref, ::std::ostream* os) {
617
+ UniversalPrinter<T&>::Print(ref.get(), os);
618
+ }
619
+
620
+ // Helper function for printing a tuple. T must be instantiated with
621
+ // a tuple type.
622
+ template <typename T>
623
+ void PrintTupleTo(const T&, std::integral_constant<size_t, 0>,
624
+ ::std::ostream*) {}
625
+
626
+ template <typename T, size_t I>
627
+ void PrintTupleTo(const T& t, std::integral_constant<size_t, I>,
628
+ ::std::ostream* os) {
629
+ PrintTupleTo(t, std::integral_constant<size_t, I - 1>(), os);
630
+ GTEST_INTENTIONAL_CONST_COND_PUSH_()
631
+ if (I > 1) {
632
+ GTEST_INTENTIONAL_CONST_COND_POP_()
633
+ *os << ", ";
634
+ }
635
+ UniversalPrinter<typename std::tuple_element<I - 1, T>::type>::Print(
636
+ std::get<I - 1>(t), os);
637
+ }
638
+
639
+ template <typename... Types>
640
+ void PrintTo(const ::std::tuple<Types...>& t, ::std::ostream* os) {
641
+ *os << "(";
642
+ PrintTupleTo(t, std::integral_constant<size_t, sizeof...(Types)>(), os);
643
+ *os << ")";
644
+ }
645
+
646
+ // Overload for std::pair.
647
+ template <typename T1, typename T2>
648
+ void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
649
+ *os << '(';
650
+ // We cannot use UniversalPrint(value.first, os) here, as T1 may be
651
+ // a reference type. The same for printing value.second.
652
+ UniversalPrinter<T1>::Print(value.first, os);
653
+ *os << ", ";
654
+ UniversalPrinter<T2>::Print(value.second, os);
655
+ *os << ')';
656
+ }
657
+
658
+ // Implements printing a non-reference type T by letting the compiler
659
+ // pick the right overload of PrintTo() for T.
660
+ template <typename T>
661
+ class UniversalPrinter {
662
+ public:
663
+ // MSVC warns about adding const to a function type, so we want to
664
+ // disable the warning.
665
+ GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180)
666
+
667
+ // Note: we deliberately don't call this PrintTo(), as that name
668
+ // conflicts with ::testing::internal::PrintTo in the body of the
669
+ // function.
670
+ static void Print(const T& value, ::std::ostream* os) {
671
+ // By default, ::testing::internal::PrintTo() is used for printing
672
+ // the value.
673
+ //
674
+ // Thanks to Koenig look-up, if T is a class and has its own
675
+ // PrintTo() function defined in its namespace, that function will
676
+ // be visible here. Since it is more specific than the generic ones
677
+ // in ::testing::internal, it will be picked by the compiler in the
678
+ // following statement - exactly what we want.
679
+ PrintTo(value, os);
680
+ }
681
+
682
+ GTEST_DISABLE_MSC_WARNINGS_POP_()
683
+ };
684
+
685
+ #if GTEST_HAS_ABSL
686
+
687
+ // Printer for absl::optional
688
+
689
+ template <typename T>
690
+ class UniversalPrinter<::absl::optional<T>> {
691
+ public:
692
+ static void Print(const ::absl::optional<T>& value, ::std::ostream* os) {
693
+ *os << '(';
694
+ if (!value) {
695
+ *os << "nullopt";
696
+ } else {
697
+ UniversalPrint(*value, os);
698
+ }
699
+ *os << ')';
700
+ }
701
+ };
702
+
703
+ // Printer for absl::variant
704
+
705
+ template <typename... T>
706
+ class UniversalPrinter<::absl::variant<T...>> {
707
+ public:
708
+ static void Print(const ::absl::variant<T...>& value, ::std::ostream* os) {
709
+ *os << '(';
710
+ absl::visit(Visitor{os}, value);
711
+ *os << ')';
712
+ }
713
+
714
+ private:
715
+ struct Visitor {
716
+ template <typename U>
717
+ void operator()(const U& u) const {
718
+ *os << "'" << GetTypeName<U>() << "' with value ";
719
+ UniversalPrint(u, os);
720
+ }
721
+ ::std::ostream* os;
722
+ };
723
+ };
724
+
725
+ #endif // GTEST_HAS_ABSL
726
+
727
+ // UniversalPrintArray(begin, len, os) prints an array of 'len'
728
+ // elements, starting at address 'begin'.
729
+ template <typename T>
730
+ void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
731
+ if (len == 0) {
732
+ *os << "{}";
733
+ } else {
734
+ *os << "{ ";
735
+ const size_t kThreshold = 18;
736
+ const size_t kChunkSize = 8;
737
+ // If the array has more than kThreshold elements, we'll have to
738
+ // omit some details by printing only the first and the last
739
+ // kChunkSize elements.
740
+ if (len <= kThreshold) {
741
+ PrintRawArrayTo(begin, len, os);
742
+ } else {
743
+ PrintRawArrayTo(begin, kChunkSize, os);
744
+ *os << ", ..., ";
745
+ PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
746
+ }
747
+ *os << " }";
748
+ }
749
+ }
750
+ // This overload prints a (const) char array compactly.
751
+ GTEST_API_ void UniversalPrintArray(
752
+ const char* begin, size_t len, ::std::ostream* os);
753
+
754
+ // This overload prints a (const) wchar_t array compactly.
755
+ GTEST_API_ void UniversalPrintArray(
756
+ const wchar_t* begin, size_t len, ::std::ostream* os);
757
+
758
+ // Implements printing an array type T[N].
759
+ template <typename T, size_t N>
760
+ class UniversalPrinter<T[N]> {
761
+ public:
762
+ // Prints the given array, omitting some elements when there are too
763
+ // many.
764
+ static void Print(const T (&a)[N], ::std::ostream* os) {
765
+ UniversalPrintArray(a, N, os);
766
+ }
767
+ };
768
+
769
+ // Implements printing a reference type T&.
770
+ template <typename T>
771
+ class UniversalPrinter<T&> {
772
+ public:
773
+ // MSVC warns about adding const to a function type, so we want to
774
+ // disable the warning.
775
+ GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180)
776
+
777
+ static void Print(const T& value, ::std::ostream* os) {
778
+ // Prints the address of the value. We use reinterpret_cast here
779
+ // as static_cast doesn't compile when T is a function type.
780
+ *os << "@" << reinterpret_cast<const void*>(&value) << " ";
781
+
782
+ // Then prints the value itself.
783
+ UniversalPrint(value, os);
784
+ }
785
+
786
+ GTEST_DISABLE_MSC_WARNINGS_POP_()
787
+ };
788
+
789
+ // Prints a value tersely: for a reference type, the referenced value
790
+ // (but not the address) is printed; for a (const) char pointer, the
791
+ // NUL-terminated string (but not the pointer) is printed.
792
+
793
+ template <typename T>
794
+ class UniversalTersePrinter {
795
+ public:
796
+ static void Print(const T& value, ::std::ostream* os) {
797
+ UniversalPrint(value, os);
798
+ }
799
+ };
800
+ template <typename T>
801
+ class UniversalTersePrinter<T&> {
802
+ public:
803
+ static void Print(const T& value, ::std::ostream* os) {
804
+ UniversalPrint(value, os);
805
+ }
806
+ };
807
+ template <typename T, size_t N>
808
+ class UniversalTersePrinter<T[N]> {
809
+ public:
810
+ static void Print(const T (&value)[N], ::std::ostream* os) {
811
+ UniversalPrinter<T[N]>::Print(value, os);
812
+ }
813
+ };
814
+ template <>
815
+ class UniversalTersePrinter<const char*> {
816
+ public:
817
+ static void Print(const char* str, ::std::ostream* os) {
818
+ if (str == nullptr) {
819
+ *os << "NULL";
820
+ } else {
821
+ UniversalPrint(std::string(str), os);
822
+ }
823
+ }
824
+ };
825
+ template <>
826
+ class UniversalTersePrinter<char*> {
827
+ public:
828
+ static void Print(char* str, ::std::ostream* os) {
829
+ UniversalTersePrinter<const char*>::Print(str, os);
830
+ }
831
+ };
832
+
833
+ #if GTEST_HAS_STD_WSTRING
834
+ template <>
835
+ class UniversalTersePrinter<const wchar_t*> {
836
+ public:
837
+ static void Print(const wchar_t* str, ::std::ostream* os) {
838
+ if (str == nullptr) {
839
+ *os << "NULL";
840
+ } else {
841
+ UniversalPrint(::std::wstring(str), os);
842
+ }
843
+ }
844
+ };
845
+ #endif
846
+
847
+ template <>
848
+ class UniversalTersePrinter<wchar_t*> {
849
+ public:
850
+ static void Print(wchar_t* str, ::std::ostream* os) {
851
+ UniversalTersePrinter<const wchar_t*>::Print(str, os);
852
+ }
853
+ };
854
+
855
+ template <typename T>
856
+ void UniversalTersePrint(const T& value, ::std::ostream* os) {
857
+ UniversalTersePrinter<T>::Print(value, os);
858
+ }
859
+
860
+ // Prints a value using the type inferred by the compiler. The
861
+ // difference between this and UniversalTersePrint() is that for a
862
+ // (const) char pointer, this prints both the pointer and the
863
+ // NUL-terminated string.
864
+ template <typename T>
865
+ void UniversalPrint(const T& value, ::std::ostream* os) {
866
+ // A workarond for the bug in VC++ 7.1 that prevents us from instantiating
867
+ // UniversalPrinter with T directly.
868
+ typedef T T1;
869
+ UniversalPrinter<T1>::Print(value, os);
870
+ }
871
+
872
+ typedef ::std::vector< ::std::string> Strings;
873
+
874
+ // Tersely prints the first N fields of a tuple to a string vector,
875
+ // one element for each field.
876
+ template <typename Tuple>
877
+ void TersePrintPrefixToStrings(const Tuple&, std::integral_constant<size_t, 0>,
878
+ Strings*) {}
879
+ template <typename Tuple, size_t I>
880
+ void TersePrintPrefixToStrings(const Tuple& t,
881
+ std::integral_constant<size_t, I>,
882
+ Strings* strings) {
883
+ TersePrintPrefixToStrings(t, std::integral_constant<size_t, I - 1>(),
884
+ strings);
885
+ ::std::stringstream ss;
886
+ UniversalTersePrint(std::get<I - 1>(t), &ss);
887
+ strings->push_back(ss.str());
888
+ }
889
+
890
+ // Prints the fields of a tuple tersely to a string vector, one
891
+ // element for each field. See the comment before
892
+ // UniversalTersePrint() for how we define "tersely".
893
+ template <typename Tuple>
894
+ Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
895
+ Strings result;
896
+ TersePrintPrefixToStrings(
897
+ value, std::integral_constant<size_t, std::tuple_size<Tuple>::value>(),
898
+ &result);
899
+ return result;
900
+ }
901
+
902
+ } // namespace internal
903
+
904
+ #if GTEST_HAS_ABSL
905
+ namespace internal2 {
906
+ template <typename T>
907
+ void TypeWithoutFormatter<T, kConvertibleToStringView>::PrintValue(
908
+ const T& value, ::std::ostream* os) {
909
+ internal::PrintTo(absl::string_view(value), os);
910
+ }
911
+ } // namespace internal2
912
+ #endif
913
+
914
+ template <typename T>
915
+ ::std::string PrintToString(const T& value) {
916
+ ::std::stringstream ss;
917
+ internal::UniversalTersePrinter<T>::Print(value, &ss);
918
+ return ss.str();
919
+ }
920
+
921
+ } // namespace testing
922
+
923
+ // Include any custom printer added by the local installation.
924
+ // We must include this header at the end to make sure it can use the
925
+ // declarations from this file.
926
+ #include "gtest/internal/custom/gtest-printers.h"
927
+
928
+ #endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_