rj_schema 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (323) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +4 -0
  3. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +16 -0
  4. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +141 -0
  5. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +126 -0
  6. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +202 -0
  7. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +40 -0
  8. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +28 -0
  9. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +224 -0
  10. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +333 -0
  11. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +146 -0
  12. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +562 -0
  13. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +3675 -0
  14. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +280 -0
  15. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +132 -0
  16. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +12 -0
  17. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +439 -0
  18. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +628 -0
  19. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +19 -0
  20. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +525 -0
  21. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +3250 -0
  22. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +11 -0
  23. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +439 -0
  24. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +624 -0
  25. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +534 -0
  26. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +3342 -0
  27. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +12 -0
  28. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +439 -0
  29. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +628 -0
  30. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +556 -0
  31. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +3432 -0
  32. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +12 -0
  33. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +439 -0
  34. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +628 -0
  35. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +1205 -0
  36. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +147 -0
  37. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +2377 -0
  38. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +794 -0
  39. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +1095 -0
  40. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +291 -0
  41. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +2179 -0
  42. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +672 -0
  43. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +397 -0
  44. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +161 -0
  45. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +4399 -0
  46. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +246 -0
  47. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +58 -0
  48. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +1847 -0
  49. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +94 -0
  50. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +8 -0
  51. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +10 -0
  52. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +39 -0
  53. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +46 -0
  54. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +279 -0
  55. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +136 -0
  56. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +511 -0
  57. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +91 -0
  58. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +101 -0
  59. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +32 -0
  60. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +191 -0
  61. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +15 -0
  62. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +187 -0
  63. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +201 -0
  64. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +32 -0
  65. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +82 -0
  66. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +19 -0
  67. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +88 -0
  68. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +101 -0
  69. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +32 -0
  70. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +84 -0
  71. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +19 -0
  72. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +90 -0
  73. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +103 -0
  74. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +240 -0
  75. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +203 -0
  76. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +35 -0
  77. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +115 -0
  78. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  79. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +1733 -0
  80. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +227 -0
  81. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +448 -0
  82. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +59 -0
  83. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +287 -0
  84. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +41 -0
  85. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +31 -0
  86. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +303 -0
  87. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +640 -0
  88. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +1387 -0
  89. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +78 -0
  90. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +47 -0
  91. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +156 -0
  92. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +174 -0
  93. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +498 -0
  94. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +823 -0
  95. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +183 -0
  96. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +54 -0
  97. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +1411 -0
  98. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +428 -0
  99. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +1228 -0
  100. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +622 -0
  101. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +127 -0
  102. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +1286 -0
  103. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +699 -0
  104. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +5648 -0
  105. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +708 -0
  106. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +424 -0
  107. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +43 -0
  108. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +2644 -0
  109. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +51 -0
  110. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +81 -0
  111. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +108 -0
  112. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +100 -0
  113. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +40 -0
  114. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +40 -0
  115. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +669 -0
  116. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +180 -0
  117. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +291 -0
  118. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +310 -0
  119. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +322 -0
  120. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +220 -0
  121. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +112 -0
  122. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +157 -0
  123. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +286 -0
  124. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +37 -0
  125. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +28 -0
  126. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +310 -0
  127. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +280 -0
  128. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +242 -0
  129. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +138 -0
  130. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +54 -0
  131. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +38 -0
  132. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +40 -0
  133. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +82 -0
  134. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +88 -0
  135. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +68 -0
  136. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +2182 -0
  137. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +126 -0
  138. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +14 -0
  139. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +1087 -0
  140. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +502 -0
  141. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +177 -0
  142. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +14 -0
  143. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +2096 -0
  144. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +12 -0
  145. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +886 -0
  146. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +497 -0
  147. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +177 -0
  148. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +93 -0
  149. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +2178 -0
  150. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +14 -0
  151. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +1038 -0
  152. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +501 -0
  153. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +177 -0
  154. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +14 -0
  155. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +93 -0
  156. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +2181 -0
  157. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +14 -0
  158. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +1082 -0
  159. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +501 -0
  160. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +177 -0
  161. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +14 -0
  162. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +93 -0
  163. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +93 -0
  164. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +294 -0
  165. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +250 -0
  166. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +1444 -0
  167. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +510 -0
  168. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +993 -0
  169. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +232 -0
  170. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +179 -0
  171. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +263 -0
  172. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +2236 -0
  173. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +358 -0
  174. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +58 -0
  175. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +69 -0
  176. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
  177. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +41 -0
  178. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +319 -0
  179. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +206 -0
  180. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +1238 -0
  181. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +243 -0
  182. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +5146 -0
  183. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +286 -0
  184. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +731 -0
  185. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +93 -0
  186. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +2554 -0
  187. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +167 -0
  188. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +1020 -0
  189. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +347 -0
  190. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +3331 -0
  191. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +297 -0
  192. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +363 -0
  193. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +74 -0
  194. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +82 -0
  195. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +45 -0
  196. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +126 -0
  197. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +45 -0
  198. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +126 -0
  199. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +129 -0
  200. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +129 -0
  201. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +164 -0
  202. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +164 -0
  203. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +147 -0
  204. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +147 -0
  205. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +123 -0
  206. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +68 -0
  207. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +43 -0
  208. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +144 -0
  209. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +153 -0
  210. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +56 -0
  211. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +85 -0
  212. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +109 -0
  213. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +172 -0
  214. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +151 -0
  215. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +46 -0
  216. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +53 -0
  217. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +45 -0
  218. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +199 -0
  219. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +224 -0
  220. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +130 -0
  221. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +173 -0
  222. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +160 -0
  223. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +83 -0
  224. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +253 -0
  225. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +730 -0
  226. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +274 -0
  227. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +855 -0
  228. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +158 -0
  229. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +59 -0
  230. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1387 -0
  231. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +78 -0
  232. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +48 -0
  233. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +1342 -0
  234. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +387 -0
  235. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +1183 -0
  236. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +1259 -0
  237. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +373 -0
  238. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +110 -0
  239. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +118 -0
  240. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +5388 -0
  241. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +38 -0
  242. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +93 -0
  243. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +1427 -0
  244. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +662 -0
  245. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +154 -0
  246. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +311 -0
  247. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +159 -0
  248. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +215 -0
  249. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +65 -0
  250. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +1055 -0
  251. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +57 -0
  252. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +1304 -0
  253. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +1635 -0
  254. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +208 -0
  255. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +320 -0
  256. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +45 -0
  257. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +380 -0
  258. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +66 -0
  259. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +341 -0
  260. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +47 -0
  261. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +212 -0
  262. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +88 -0
  263. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +237 -0
  264. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +311 -0
  265. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +130 -0
  266. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +71 -0
  267. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +117 -0
  268. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +126 -0
  269. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +192 -0
  270. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +636 -0
  271. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +140 -0
  272. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +172 -0
  273. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +46 -0
  274. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +207 -0
  275. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +157 -0
  276. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +45 -0
  277. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +56 -0
  278. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +340 -0
  279. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +1062 -0
  280. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +743 -0
  281. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +2427 -0
  282. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +127 -0
  283. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +57 -0
  284. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +253 -0
  285. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +325 -0
  286. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +103 -0
  287. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +57 -0
  288. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +256 -0
  289. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +320 -0
  290. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +92 -0
  291. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +171 -0
  292. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +72 -0
  293. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +70 -0
  294. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +43 -0
  295. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +7706 -0
  296. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +49 -0
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +49 -0
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +132 -0
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +308 -0
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +181 -0
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +194 -0
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +36 -0
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +55 -0
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +30 -0
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +17 -0
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +41 -0
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +32 -0
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +18 -0
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +8 -0
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +30 -0
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +28 -0
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +457 -0
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +62 -0
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +63 -0
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +59 -0
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +68 -0
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +65 -0
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +100 -0
  319. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +1135 -0
  320. data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +15 -0
  321. data/ext/rj_schema/rj_schema.cpp +64 -41
  322. data/lib/rj_schema.rb +1 -1
  323. metadata +378 -5
@@ -0,0 +1,662 @@
1
+ // Copyright 2008, 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
+ // Authors: keith.ray@gmail.com (Keith Ray)
31
+ //
32
+ // Google Test filepath utilities
33
+ //
34
+ // This file tests classes and functions used internally by
35
+ // Google Test. They are subject to change without notice.
36
+ //
37
+ // This file is #included from gtest_unittest.cc, to avoid changing
38
+ // build or make-files for some existing Google Test clients. Do not
39
+ // #include this file anywhere else!
40
+
41
+ #include "gtest/internal/gtest-filepath.h"
42
+ #include "gtest/gtest.h"
43
+
44
+ // Indicates that this translation unit is part of Google Test's
45
+ // implementation. It must come before gtest-internal-inl.h is
46
+ // included, or there will be a compiler error. This trick is to
47
+ // prevent a user from accidentally including gtest-internal-inl.h in
48
+ // his code.
49
+ #define GTEST_IMPLEMENTATION_ 1
50
+ #include "src/gtest-internal-inl.h"
51
+ #undef GTEST_IMPLEMENTATION_
52
+
53
+ #if GTEST_OS_WINDOWS_MOBILE
54
+ # include <windows.h> // NOLINT
55
+ #elif GTEST_OS_WINDOWS
56
+ # include <direct.h> // NOLINT
57
+ #endif // GTEST_OS_WINDOWS_MOBILE
58
+
59
+ namespace testing {
60
+ namespace internal {
61
+ namespace {
62
+
63
+ #if GTEST_OS_WINDOWS_MOBILE
64
+ // TODO(wan@google.com): Move these to the POSIX adapter section in
65
+ // gtest-port.h.
66
+
67
+ // Windows CE doesn't have the remove C function.
68
+ int remove(const char* path) {
69
+ LPCWSTR wpath = String::AnsiToUtf16(path);
70
+ int ret = DeleteFile(wpath) ? 0 : -1;
71
+ delete [] wpath;
72
+ return ret;
73
+ }
74
+ // Windows CE doesn't have the _rmdir C function.
75
+ int _rmdir(const char* path) {
76
+ FilePath filepath(path);
77
+ LPCWSTR wpath = String::AnsiToUtf16(
78
+ filepath.RemoveTrailingPathSeparator().c_str());
79
+ int ret = RemoveDirectory(wpath) ? 0 : -1;
80
+ delete [] wpath;
81
+ return ret;
82
+ }
83
+
84
+ #else
85
+
86
+ TEST(GetCurrentDirTest, ReturnsCurrentDir) {
87
+ const FilePath original_dir = FilePath::GetCurrentDir();
88
+ EXPECT_FALSE(original_dir.IsEmpty());
89
+
90
+ posix::ChDir(GTEST_PATH_SEP_);
91
+ const FilePath cwd = FilePath::GetCurrentDir();
92
+ posix::ChDir(original_dir.c_str());
93
+
94
+ # if GTEST_OS_WINDOWS
95
+
96
+ // Skips the ":".
97
+ const char* const cwd_without_drive = strchr(cwd.c_str(), ':');
98
+ ASSERT_TRUE(cwd_without_drive != NULL);
99
+ EXPECT_STREQ(GTEST_PATH_SEP_, cwd_without_drive + 1);
100
+
101
+ # else
102
+
103
+ EXPECT_EQ(GTEST_PATH_SEP_, cwd.string());
104
+
105
+ # endif
106
+ }
107
+
108
+ #endif // GTEST_OS_WINDOWS_MOBILE
109
+
110
+ TEST(IsEmptyTest, ReturnsTrueForEmptyPath) {
111
+ EXPECT_TRUE(FilePath("").IsEmpty());
112
+ }
113
+
114
+ TEST(IsEmptyTest, ReturnsFalseForNonEmptyPath) {
115
+ EXPECT_FALSE(FilePath("a").IsEmpty());
116
+ EXPECT_FALSE(FilePath(".").IsEmpty());
117
+ EXPECT_FALSE(FilePath("a/b").IsEmpty());
118
+ EXPECT_FALSE(FilePath("a\\b\\").IsEmpty());
119
+ }
120
+
121
+ // RemoveDirectoryName "" -> ""
122
+ TEST(RemoveDirectoryNameTest, WhenEmptyName) {
123
+ EXPECT_EQ("", FilePath("").RemoveDirectoryName().string());
124
+ }
125
+
126
+ // RemoveDirectoryName "afile" -> "afile"
127
+ TEST(RemoveDirectoryNameTest, ButNoDirectory) {
128
+ EXPECT_EQ("afile",
129
+ FilePath("afile").RemoveDirectoryName().string());
130
+ }
131
+
132
+ // RemoveDirectoryName "/afile" -> "afile"
133
+ TEST(RemoveDirectoryNameTest, RootFileShouldGiveFileName) {
134
+ EXPECT_EQ("afile",
135
+ FilePath(GTEST_PATH_SEP_ "afile").RemoveDirectoryName().string());
136
+ }
137
+
138
+ // RemoveDirectoryName "adir/" -> ""
139
+ TEST(RemoveDirectoryNameTest, WhereThereIsNoFileName) {
140
+ EXPECT_EQ("",
141
+ FilePath("adir" GTEST_PATH_SEP_).RemoveDirectoryName().string());
142
+ }
143
+
144
+ // RemoveDirectoryName "adir/afile" -> "afile"
145
+ TEST(RemoveDirectoryNameTest, ShouldGiveFileName) {
146
+ EXPECT_EQ("afile",
147
+ FilePath("adir" GTEST_PATH_SEP_ "afile").RemoveDirectoryName().string());
148
+ }
149
+
150
+ // RemoveDirectoryName "adir/subdir/afile" -> "afile"
151
+ TEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileName) {
152
+ EXPECT_EQ("afile",
153
+ FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile")
154
+ .RemoveDirectoryName().string());
155
+ }
156
+
157
+ #if GTEST_HAS_ALT_PATH_SEP_
158
+
159
+ // Tests that RemoveDirectoryName() works with the alternate separator
160
+ // on Windows.
161
+
162
+ // RemoveDirectoryName("/afile") -> "afile"
163
+ TEST(RemoveDirectoryNameTest, RootFileShouldGiveFileNameForAlternateSeparator) {
164
+ EXPECT_EQ("afile", FilePath("/afile").RemoveDirectoryName().string());
165
+ }
166
+
167
+ // RemoveDirectoryName("adir/") -> ""
168
+ TEST(RemoveDirectoryNameTest, WhereThereIsNoFileNameForAlternateSeparator) {
169
+ EXPECT_EQ("", FilePath("adir/").RemoveDirectoryName().string());
170
+ }
171
+
172
+ // RemoveDirectoryName("adir/afile") -> "afile"
173
+ TEST(RemoveDirectoryNameTest, ShouldGiveFileNameForAlternateSeparator) {
174
+ EXPECT_EQ("afile", FilePath("adir/afile").RemoveDirectoryName().string());
175
+ }
176
+
177
+ // RemoveDirectoryName("adir/subdir/afile") -> "afile"
178
+ TEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileNameForAlternateSeparator) {
179
+ EXPECT_EQ("afile",
180
+ FilePath("adir/subdir/afile").RemoveDirectoryName().string());
181
+ }
182
+
183
+ #endif
184
+
185
+ // RemoveFileName "" -> "./"
186
+ TEST(RemoveFileNameTest, EmptyName) {
187
+ #if GTEST_OS_WINDOWS_MOBILE
188
+ // On Windows CE, we use the root as the current directory.
189
+ EXPECT_EQ(GTEST_PATH_SEP_, FilePath("").RemoveFileName().string());
190
+ #else
191
+ EXPECT_EQ("." GTEST_PATH_SEP_, FilePath("").RemoveFileName().string());
192
+ #endif
193
+ }
194
+
195
+ // RemoveFileName "adir/" -> "adir/"
196
+ TEST(RemoveFileNameTest, ButNoFile) {
197
+ EXPECT_EQ("adir" GTEST_PATH_SEP_,
198
+ FilePath("adir" GTEST_PATH_SEP_).RemoveFileName().string());
199
+ }
200
+
201
+ // RemoveFileName "adir/afile" -> "adir/"
202
+ TEST(RemoveFileNameTest, GivesDirName) {
203
+ EXPECT_EQ("adir" GTEST_PATH_SEP_,
204
+ FilePath("adir" GTEST_PATH_SEP_ "afile").RemoveFileName().string());
205
+ }
206
+
207
+ // RemoveFileName "adir/subdir/afile" -> "adir/subdir/"
208
+ TEST(RemoveFileNameTest, GivesDirAndSubDirName) {
209
+ EXPECT_EQ("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_,
210
+ FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile")
211
+ .RemoveFileName().string());
212
+ }
213
+
214
+ // RemoveFileName "/afile" -> "/"
215
+ TEST(RemoveFileNameTest, GivesRootDir) {
216
+ EXPECT_EQ(GTEST_PATH_SEP_,
217
+ FilePath(GTEST_PATH_SEP_ "afile").RemoveFileName().string());
218
+ }
219
+
220
+ #if GTEST_HAS_ALT_PATH_SEP_
221
+
222
+ // Tests that RemoveFileName() works with the alternate separator on
223
+ // Windows.
224
+
225
+ // RemoveFileName("adir/") -> "adir/"
226
+ TEST(RemoveFileNameTest, ButNoFileForAlternateSeparator) {
227
+ EXPECT_EQ("adir" GTEST_PATH_SEP_,
228
+ FilePath("adir/").RemoveFileName().string());
229
+ }
230
+
231
+ // RemoveFileName("adir/afile") -> "adir/"
232
+ TEST(RemoveFileNameTest, GivesDirNameForAlternateSeparator) {
233
+ EXPECT_EQ("adir" GTEST_PATH_SEP_,
234
+ FilePath("adir/afile").RemoveFileName().string());
235
+ }
236
+
237
+ // RemoveFileName("adir/subdir/afile") -> "adir/subdir/"
238
+ TEST(RemoveFileNameTest, GivesDirAndSubDirNameForAlternateSeparator) {
239
+ EXPECT_EQ("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_,
240
+ FilePath("adir/subdir/afile").RemoveFileName().string());
241
+ }
242
+
243
+ // RemoveFileName("/afile") -> "\"
244
+ TEST(RemoveFileNameTest, GivesRootDirForAlternateSeparator) {
245
+ EXPECT_EQ(GTEST_PATH_SEP_, FilePath("/afile").RemoveFileName().string());
246
+ }
247
+
248
+ #endif
249
+
250
+ TEST(MakeFileNameTest, GenerateWhenNumberIsZero) {
251
+ FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"),
252
+ 0, "xml");
253
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.string());
254
+ }
255
+
256
+ TEST(MakeFileNameTest, GenerateFileNameNumberGtZero) {
257
+ FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"),
258
+ 12, "xml");
259
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar_12.xml", actual.string());
260
+ }
261
+
262
+ TEST(MakeFileNameTest, GenerateFileNameWithSlashNumberIsZero) {
263
+ FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_),
264
+ FilePath("bar"), 0, "xml");
265
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.string());
266
+ }
267
+
268
+ TEST(MakeFileNameTest, GenerateFileNameWithSlashNumberGtZero) {
269
+ FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_),
270
+ FilePath("bar"), 12, "xml");
271
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar_12.xml", actual.string());
272
+ }
273
+
274
+ TEST(MakeFileNameTest, GenerateWhenNumberIsZeroAndDirIsEmpty) {
275
+ FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"),
276
+ 0, "xml");
277
+ EXPECT_EQ("bar.xml", actual.string());
278
+ }
279
+
280
+ TEST(MakeFileNameTest, GenerateWhenNumberIsNotZeroAndDirIsEmpty) {
281
+ FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"),
282
+ 14, "xml");
283
+ EXPECT_EQ("bar_14.xml", actual.string());
284
+ }
285
+
286
+ TEST(ConcatPathsTest, WorksWhenDirDoesNotEndWithPathSep) {
287
+ FilePath actual = FilePath::ConcatPaths(FilePath("foo"),
288
+ FilePath("bar.xml"));
289
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.string());
290
+ }
291
+
292
+ TEST(ConcatPathsTest, WorksWhenPath1EndsWithPathSep) {
293
+ FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_),
294
+ FilePath("bar.xml"));
295
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.string());
296
+ }
297
+
298
+ TEST(ConcatPathsTest, Path1BeingEmpty) {
299
+ FilePath actual = FilePath::ConcatPaths(FilePath(""),
300
+ FilePath("bar.xml"));
301
+ EXPECT_EQ("bar.xml", actual.string());
302
+ }
303
+
304
+ TEST(ConcatPathsTest, Path2BeingEmpty) {
305
+ FilePath actual = FilePath::ConcatPaths(FilePath("foo"), FilePath(""));
306
+ EXPECT_EQ("foo" GTEST_PATH_SEP_, actual.string());
307
+ }
308
+
309
+ TEST(ConcatPathsTest, BothPathBeingEmpty) {
310
+ FilePath actual = FilePath::ConcatPaths(FilePath(""),
311
+ FilePath(""));
312
+ EXPECT_EQ("", actual.string());
313
+ }
314
+
315
+ TEST(ConcatPathsTest, Path1ContainsPathSep) {
316
+ FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_ "bar"),
317
+ FilePath("foobar.xml"));
318
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_ "foobar.xml",
319
+ actual.string());
320
+ }
321
+
322
+ TEST(ConcatPathsTest, Path2ContainsPathSep) {
323
+ FilePath actual = FilePath::ConcatPaths(
324
+ FilePath("foo" GTEST_PATH_SEP_),
325
+ FilePath("bar" GTEST_PATH_SEP_ "bar.xml"));
326
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_ "bar.xml",
327
+ actual.string());
328
+ }
329
+
330
+ TEST(ConcatPathsTest, Path2EndsWithPathSep) {
331
+ FilePath actual = FilePath::ConcatPaths(FilePath("foo"),
332
+ FilePath("bar" GTEST_PATH_SEP_));
333
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_, actual.string());
334
+ }
335
+
336
+ // RemoveTrailingPathSeparator "" -> ""
337
+ TEST(RemoveTrailingPathSeparatorTest, EmptyString) {
338
+ EXPECT_EQ("", FilePath("").RemoveTrailingPathSeparator().string());
339
+ }
340
+
341
+ // RemoveTrailingPathSeparator "foo" -> "foo"
342
+ TEST(RemoveTrailingPathSeparatorTest, FileNoSlashString) {
343
+ EXPECT_EQ("foo", FilePath("foo").RemoveTrailingPathSeparator().string());
344
+ }
345
+
346
+ // RemoveTrailingPathSeparator "foo/" -> "foo"
347
+ TEST(RemoveTrailingPathSeparatorTest, ShouldRemoveTrailingSeparator) {
348
+ EXPECT_EQ("foo",
349
+ FilePath("foo" GTEST_PATH_SEP_).RemoveTrailingPathSeparator().string());
350
+ #if GTEST_HAS_ALT_PATH_SEP_
351
+ EXPECT_EQ("foo", FilePath("foo/").RemoveTrailingPathSeparator().string());
352
+ #endif
353
+ }
354
+
355
+ // RemoveTrailingPathSeparator "foo/bar/" -> "foo/bar/"
356
+ TEST(RemoveTrailingPathSeparatorTest, ShouldRemoveLastSeparator) {
357
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar",
358
+ FilePath("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_)
359
+ .RemoveTrailingPathSeparator().string());
360
+ }
361
+
362
+ // RemoveTrailingPathSeparator "foo/bar" -> "foo/bar"
363
+ TEST(RemoveTrailingPathSeparatorTest, ShouldReturnUnmodified) {
364
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar",
365
+ FilePath("foo" GTEST_PATH_SEP_ "bar")
366
+ .RemoveTrailingPathSeparator().string());
367
+ }
368
+
369
+ TEST(DirectoryTest, RootDirectoryExists) {
370
+ #if GTEST_OS_WINDOWS // We are on Windows.
371
+ char current_drive[_MAX_PATH]; // NOLINT
372
+ current_drive[0] = static_cast<char>(_getdrive() + 'A' - 1);
373
+ current_drive[1] = ':';
374
+ current_drive[2] = '\\';
375
+ current_drive[3] = '\0';
376
+ EXPECT_TRUE(FilePath(current_drive).DirectoryExists());
377
+ #else
378
+ EXPECT_TRUE(FilePath("/").DirectoryExists());
379
+ #endif // GTEST_OS_WINDOWS
380
+ }
381
+
382
+ #if GTEST_OS_WINDOWS
383
+ TEST(DirectoryTest, RootOfWrongDriveDoesNotExists) {
384
+ const int saved_drive_ = _getdrive();
385
+ // Find a drive that doesn't exist. Start with 'Z' to avoid common ones.
386
+ for (char drive = 'Z'; drive >= 'A'; drive--)
387
+ if (_chdrive(drive - 'A' + 1) == -1) {
388
+ char non_drive[_MAX_PATH]; // NOLINT
389
+ non_drive[0] = drive;
390
+ non_drive[1] = ':';
391
+ non_drive[2] = '\\';
392
+ non_drive[3] = '\0';
393
+ EXPECT_FALSE(FilePath(non_drive).DirectoryExists());
394
+ break;
395
+ }
396
+ _chdrive(saved_drive_);
397
+ }
398
+ #endif // GTEST_OS_WINDOWS
399
+
400
+ #if !GTEST_OS_WINDOWS_MOBILE
401
+ // Windows CE _does_ consider an empty directory to exist.
402
+ TEST(DirectoryTest, EmptyPathDirectoryDoesNotExist) {
403
+ EXPECT_FALSE(FilePath("").DirectoryExists());
404
+ }
405
+ #endif // !GTEST_OS_WINDOWS_MOBILE
406
+
407
+ TEST(DirectoryTest, CurrentDirectoryExists) {
408
+ #if GTEST_OS_WINDOWS // We are on Windows.
409
+ # ifndef _WIN32_CE // Windows CE doesn't have a current directory.
410
+
411
+ EXPECT_TRUE(FilePath(".").DirectoryExists());
412
+ EXPECT_TRUE(FilePath(".\\").DirectoryExists());
413
+
414
+ # endif // _WIN32_CE
415
+ #else
416
+ EXPECT_TRUE(FilePath(".").DirectoryExists());
417
+ EXPECT_TRUE(FilePath("./").DirectoryExists());
418
+ #endif // GTEST_OS_WINDOWS
419
+ }
420
+
421
+ // "foo/bar" == foo//bar" == "foo///bar"
422
+ TEST(NormalizeTest, MultipleConsecutiveSepaparatorsInMidstring) {
423
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar",
424
+ FilePath("foo" GTEST_PATH_SEP_ "bar").string());
425
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar",
426
+ FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").string());
427
+ EXPECT_EQ("foo" GTEST_PATH_SEP_ "bar",
428
+ FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_
429
+ GTEST_PATH_SEP_ "bar").string());
430
+ }
431
+
432
+ // "/bar" == //bar" == "///bar"
433
+ TEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringStart) {
434
+ EXPECT_EQ(GTEST_PATH_SEP_ "bar",
435
+ FilePath(GTEST_PATH_SEP_ "bar").string());
436
+ EXPECT_EQ(GTEST_PATH_SEP_ "bar",
437
+ FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").string());
438
+ EXPECT_EQ(GTEST_PATH_SEP_ "bar",
439
+ FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").string());
440
+ }
441
+
442
+ // "foo/" == foo//" == "foo///"
443
+ TEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringEnd) {
444
+ EXPECT_EQ("foo" GTEST_PATH_SEP_,
445
+ FilePath("foo" GTEST_PATH_SEP_).string());
446
+ EXPECT_EQ("foo" GTEST_PATH_SEP_,
447
+ FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_).string());
448
+ EXPECT_EQ("foo" GTEST_PATH_SEP_,
449
+ FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_).string());
450
+ }
451
+
452
+ #if GTEST_HAS_ALT_PATH_SEP_
453
+
454
+ // Tests that separators at the end of the string are normalized
455
+ // regardless of their combination (e.g. "foo\" =="foo/\" ==
456
+ // "foo\\/").
457
+ TEST(NormalizeTest, MixAlternateSeparatorAtStringEnd) {
458
+ EXPECT_EQ("foo" GTEST_PATH_SEP_,
459
+ FilePath("foo/").string());
460
+ EXPECT_EQ("foo" GTEST_PATH_SEP_,
461
+ FilePath("foo" GTEST_PATH_SEP_ "/").string());
462
+ EXPECT_EQ("foo" GTEST_PATH_SEP_,
463
+ FilePath("foo//" GTEST_PATH_SEP_).string());
464
+ }
465
+
466
+ #endif
467
+
468
+ TEST(AssignmentOperatorTest, DefaultAssignedToNonDefault) {
469
+ FilePath default_path;
470
+ FilePath non_default_path("path");
471
+ non_default_path = default_path;
472
+ EXPECT_EQ("", non_default_path.string());
473
+ EXPECT_EQ("", default_path.string()); // RHS var is unchanged.
474
+ }
475
+
476
+ TEST(AssignmentOperatorTest, NonDefaultAssignedToDefault) {
477
+ FilePath non_default_path("path");
478
+ FilePath default_path;
479
+ default_path = non_default_path;
480
+ EXPECT_EQ("path", default_path.string());
481
+ EXPECT_EQ("path", non_default_path.string()); // RHS var is unchanged.
482
+ }
483
+
484
+ TEST(AssignmentOperatorTest, ConstAssignedToNonConst) {
485
+ const FilePath const_default_path("const_path");
486
+ FilePath non_default_path("path");
487
+ non_default_path = const_default_path;
488
+ EXPECT_EQ("const_path", non_default_path.string());
489
+ }
490
+
491
+ class DirectoryCreationTest : public Test {
492
+ protected:
493
+ virtual void SetUp() {
494
+ testdata_path_.Set(FilePath(
495
+ TempDir() + GetCurrentExecutableName().string() +
496
+ "_directory_creation" GTEST_PATH_SEP_ "test" GTEST_PATH_SEP_));
497
+ testdata_file_.Set(testdata_path_.RemoveTrailingPathSeparator());
498
+
499
+ unique_file0_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"),
500
+ 0, "txt"));
501
+ unique_file1_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"),
502
+ 1, "txt"));
503
+
504
+ remove(testdata_file_.c_str());
505
+ remove(unique_file0_.c_str());
506
+ remove(unique_file1_.c_str());
507
+ posix::RmDir(testdata_path_.c_str());
508
+ }
509
+
510
+ virtual void TearDown() {
511
+ remove(testdata_file_.c_str());
512
+ remove(unique_file0_.c_str());
513
+ remove(unique_file1_.c_str());
514
+ posix::RmDir(testdata_path_.c_str());
515
+ }
516
+
517
+ void CreateTextFile(const char* filename) {
518
+ FILE* f = posix::FOpen(filename, "w");
519
+ fprintf(f, "text\n");
520
+ fclose(f);
521
+ }
522
+
523
+ // Strings representing a directory and a file, with identical paths
524
+ // except for the trailing separator character that distinquishes
525
+ // a directory named 'test' from a file named 'test'. Example names:
526
+ FilePath testdata_path_; // "/tmp/directory_creation/test/"
527
+ FilePath testdata_file_; // "/tmp/directory_creation/test"
528
+ FilePath unique_file0_; // "/tmp/directory_creation/test/unique.txt"
529
+ FilePath unique_file1_; // "/tmp/directory_creation/test/unique_1.txt"
530
+ };
531
+
532
+ TEST_F(DirectoryCreationTest, CreateDirectoriesRecursively) {
533
+ EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.string();
534
+ EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());
535
+ EXPECT_TRUE(testdata_path_.DirectoryExists());
536
+ }
537
+
538
+ TEST_F(DirectoryCreationTest, CreateDirectoriesForAlreadyExistingPath) {
539
+ EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.string();
540
+ EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());
541
+ // Call 'create' again... should still succeed.
542
+ EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());
543
+ }
544
+
545
+ TEST_F(DirectoryCreationTest, CreateDirectoriesAndUniqueFilename) {
546
+ FilePath file_path(FilePath::GenerateUniqueFileName(testdata_path_,
547
+ FilePath("unique"), "txt"));
548
+ EXPECT_EQ(unique_file0_.string(), file_path.string());
549
+ EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file not there
550
+
551
+ testdata_path_.CreateDirectoriesRecursively();
552
+ EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file still not there
553
+ CreateTextFile(file_path.c_str());
554
+ EXPECT_TRUE(file_path.FileOrDirectoryExists());
555
+
556
+ FilePath file_path2(FilePath::GenerateUniqueFileName(testdata_path_,
557
+ FilePath("unique"), "txt"));
558
+ EXPECT_EQ(unique_file1_.string(), file_path2.string());
559
+ EXPECT_FALSE(file_path2.FileOrDirectoryExists()); // file not there
560
+ CreateTextFile(file_path2.c_str());
561
+ EXPECT_TRUE(file_path2.FileOrDirectoryExists());
562
+ }
563
+
564
+ TEST_F(DirectoryCreationTest, CreateDirectoriesFail) {
565
+ // force a failure by putting a file where we will try to create a directory.
566
+ CreateTextFile(testdata_file_.c_str());
567
+ EXPECT_TRUE(testdata_file_.FileOrDirectoryExists());
568
+ EXPECT_FALSE(testdata_file_.DirectoryExists());
569
+ EXPECT_FALSE(testdata_file_.CreateDirectoriesRecursively());
570
+ }
571
+
572
+ TEST(NoDirectoryCreationTest, CreateNoDirectoriesForDefaultXmlFile) {
573
+ const FilePath test_detail_xml("test_detail.xml");
574
+ EXPECT_FALSE(test_detail_xml.CreateDirectoriesRecursively());
575
+ }
576
+
577
+ TEST(FilePathTest, DefaultConstructor) {
578
+ FilePath fp;
579
+ EXPECT_EQ("", fp.string());
580
+ }
581
+
582
+ TEST(FilePathTest, CharAndCopyConstructors) {
583
+ const FilePath fp("spicy");
584
+ EXPECT_EQ("spicy", fp.string());
585
+
586
+ const FilePath fp_copy(fp);
587
+ EXPECT_EQ("spicy", fp_copy.string());
588
+ }
589
+
590
+ TEST(FilePathTest, StringConstructor) {
591
+ const FilePath fp(std::string("cider"));
592
+ EXPECT_EQ("cider", fp.string());
593
+ }
594
+
595
+ TEST(FilePathTest, Set) {
596
+ const FilePath apple("apple");
597
+ FilePath mac("mac");
598
+ mac.Set(apple); // Implement Set() since overloading operator= is forbidden.
599
+ EXPECT_EQ("apple", mac.string());
600
+ EXPECT_EQ("apple", apple.string());
601
+ }
602
+
603
+ TEST(FilePathTest, ToString) {
604
+ const FilePath file("drink");
605
+ EXPECT_EQ("drink", file.string());
606
+ }
607
+
608
+ TEST(FilePathTest, RemoveExtension) {
609
+ EXPECT_EQ("app", FilePath("app.cc").RemoveExtension("cc").string());
610
+ EXPECT_EQ("app", FilePath("app.exe").RemoveExtension("exe").string());
611
+ EXPECT_EQ("APP", FilePath("APP.EXE").RemoveExtension("exe").string());
612
+ }
613
+
614
+ TEST(FilePathTest, RemoveExtensionWhenThereIsNoExtension) {
615
+ EXPECT_EQ("app", FilePath("app").RemoveExtension("exe").string());
616
+ }
617
+
618
+ TEST(FilePathTest, IsDirectory) {
619
+ EXPECT_FALSE(FilePath("cola").IsDirectory());
620
+ EXPECT_TRUE(FilePath("koala" GTEST_PATH_SEP_).IsDirectory());
621
+ #if GTEST_HAS_ALT_PATH_SEP_
622
+ EXPECT_TRUE(FilePath("koala/").IsDirectory());
623
+ #endif
624
+ }
625
+
626
+ TEST(FilePathTest, IsAbsolutePath) {
627
+ EXPECT_FALSE(FilePath("is" GTEST_PATH_SEP_ "relative").IsAbsolutePath());
628
+ EXPECT_FALSE(FilePath("").IsAbsolutePath());
629
+ #if GTEST_OS_WINDOWS
630
+ EXPECT_TRUE(FilePath("c:\\" GTEST_PATH_SEP_ "is_not"
631
+ GTEST_PATH_SEP_ "relative").IsAbsolutePath());
632
+ EXPECT_FALSE(FilePath("c:foo" GTEST_PATH_SEP_ "bar").IsAbsolutePath());
633
+ EXPECT_TRUE(FilePath("c:/" GTEST_PATH_SEP_ "is_not"
634
+ GTEST_PATH_SEP_ "relative").IsAbsolutePath());
635
+ #else
636
+ EXPECT_TRUE(FilePath(GTEST_PATH_SEP_ "is_not" GTEST_PATH_SEP_ "relative")
637
+ .IsAbsolutePath());
638
+ #endif // GTEST_OS_WINDOWS
639
+ }
640
+
641
+ TEST(FilePathTest, IsRootDirectory) {
642
+ #if GTEST_OS_WINDOWS
643
+ EXPECT_TRUE(FilePath("a:\\").IsRootDirectory());
644
+ EXPECT_TRUE(FilePath("Z:/").IsRootDirectory());
645
+ EXPECT_TRUE(FilePath("e://").IsRootDirectory());
646
+ EXPECT_FALSE(FilePath("").IsRootDirectory());
647
+ EXPECT_FALSE(FilePath("b:").IsRootDirectory());
648
+ EXPECT_FALSE(FilePath("b:a").IsRootDirectory());
649
+ EXPECT_FALSE(FilePath("8:/").IsRootDirectory());
650
+ EXPECT_FALSE(FilePath("c|/").IsRootDirectory());
651
+ #else
652
+ EXPECT_TRUE(FilePath("/").IsRootDirectory());
653
+ EXPECT_TRUE(FilePath("//").IsRootDirectory());
654
+ EXPECT_FALSE(FilePath("").IsRootDirectory());
655
+ EXPECT_FALSE(FilePath("\\").IsRootDirectory());
656
+ EXPECT_FALSE(FilePath("/x").IsRootDirectory());
657
+ #endif
658
+ }
659
+
660
+ } // namespace
661
+ } // namespace internal
662
+ } // namespace testing