jaclang 0.6.1__py3-none-any.whl → 0.6.2__py3-none-any.whl

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 (889) hide show
  1. jaclang/cli/.gitignore +3 -0
  2. jaclang/cli/cli.md +190 -0
  3. jaclang/compiler/.gitignore +1 -0
  4. jaclang/compiler/passes/main/tests/fixtures/autoimpl.impl/getme.impl.jac +3 -0
  5. jaclang/compiler/passes/main/tests/fixtures/autoimpl.impl.jac +3 -0
  6. jaclang/compiler/passes/main/tests/fixtures/autoimpl.jac +9 -0
  7. jaclang/compiler/passes/main/tests/fixtures/autoimpl.something.else.impl.jac +3 -0
  8. jaclang/compiler/passes/main/tests/fixtures/base.jac +13 -0
  9. jaclang/compiler/passes/main/tests/fixtures/base2.jac +14 -0
  10. jaclang/compiler/passes/main/tests/fixtures/blip.jac +2 -0
  11. jaclang/compiler/passes/main/tests/fixtures/codegentext.jac +31 -0
  12. jaclang/compiler/passes/main/tests/fixtures/decls.jac +10 -0
  13. jaclang/compiler/passes/main/tests/fixtures/defs_and_uses.jac +44 -0
  14. jaclang/compiler/passes/main/tests/fixtures/fstrings.jac +4 -0
  15. jaclang/compiler/passes/main/tests/fixtures/func.jac +18 -0
  16. jaclang/compiler/passes/main/tests/fixtures/func2.jac +8 -0
  17. jaclang/compiler/passes/main/tests/fixtures/game1.jac +15 -0
  18. jaclang/compiler/passes/main/tests/fixtures/impl/defs1.jac +8 -0
  19. jaclang/compiler/passes/main/tests/fixtures/impl/defs2.jac +8 -0
  20. jaclang/compiler/passes/main/tests/fixtures/impl/imps.jac +11 -0
  21. jaclang/compiler/passes/main/tests/fixtures/multi_def_err.jac +7 -0
  22. jaclang/compiler/passes/main/tests/fixtures/registry.jac +36 -0
  23. jaclang/compiler/passes/tool/tests/fixtures/corelib.jac +480 -0
  24. jaclang/compiler/passes/tool/tests/fixtures/corelib_fmt.jac +480 -0
  25. jaclang/compiler/passes/tool/tests/fixtures/genai/essay_review.jac +36 -0
  26. jaclang/compiler/passes/tool/tests/fixtures/genai/expert_answer.jac +17 -0
  27. jaclang/compiler/passes/tool/tests/fixtures/genai/joke_gen.jac +32 -0
  28. jaclang/compiler/passes/tool/tests/fixtures/genai/odd_word_out.jac +27 -0
  29. jaclang/compiler/passes/tool/tests/fixtures/genai/personality_finder.jac +35 -0
  30. jaclang/compiler/passes/tool/tests/fixtures/genai/text_to_type.jac +25 -0
  31. jaclang/compiler/passes/tool/tests/fixtures/genai/translator.jac +13 -0
  32. jaclang/compiler/passes/tool/tests/fixtures/genai/wikipedia.jac +63 -0
  33. jaclang/compiler/passes/tool/tests/fixtures/multi_def_err.dot +39 -0
  34. jaclang/compiler/passes/tool/tests/fixtures/multi_def_err.jac +7 -0
  35. jaclang/compiler/passes/tool/tests/fixtures/multi_def_err.txt +20 -0
  36. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/ability_impl_long_comprehension.jac +15 -0
  37. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/call_with_many_parameters.jac +24 -0
  38. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/entry_main.jac +4 -0
  39. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/long_line_nested_dict_access.jac +10 -0
  40. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/multiline_fstrings.jac +16 -0
  41. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/nested_dict.jac +15 -0
  42. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/nested_loop_and_incrementer.jac +13 -0
  43. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/simple_walker.jac +25 -0
  44. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/try_block_and_walker_spawn_and_fstrings.jac +26 -0
  45. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/tuple_iteration_and_not_negation.jac +20 -0
  46. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/type_annotation.jac +3 -0
  47. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/walker_decl_only.jac +12 -0
  48. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/walker_with_default_values_types_and_docstrings.jac +18 -0
  49. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/walker_with_inline_ability_impl.jac +8 -0
  50. jaclang/compiler/passes/tool/tests/fixtures/simple_walk.jac +47 -0
  51. jaclang/compiler/passes/tool/tests/fixtures/simple_walk_fmt.jac +47 -0
  52. jaclang/compiler/tests/fixtures/fam.jac +67 -0
  53. jaclang/compiler/tests/fixtures/hello_world.jac +5 -0
  54. jaclang/compiler/tests/fixtures/kwesc.jac +5 -0
  55. jaclang/compiler/tests/fixtures/mod_doc_test.jac +1 -0
  56. jaclang/compiler/tests/fixtures/staticcheck.jac +20 -0
  57. jaclang/compiler/tests/fixtures/stuff.jac +6 -0
  58. jaclang/plugin/tests/fixtures/impl_match.jac +9 -0
  59. jaclang/plugin/tests/fixtures/impl_match_impl.jac +3 -0
  60. jaclang/plugin/tests/fixtures/simple_node_connection.jac +55 -0
  61. jaclang/plugin/tests/fixtures/simple_persistent.jac +41 -0
  62. jaclang/tests/fixtures/abc.jac +73 -0
  63. jaclang/tests/fixtures/access_checker.jac +19 -0
  64. jaclang/tests/fixtures/access_modifier.jac +49 -0
  65. jaclang/tests/fixtures/aott_raise.jac +25 -0
  66. jaclang/tests/fixtures/arithmetic_bug.jac +13 -0
  67. jaclang/tests/fixtures/assign_compr.jac +15 -0
  68. jaclang/tests/fixtures/assign_compr_dup.jac +15 -0
  69. jaclang/tests/fixtures/builtin_dotgen.jac +41 -0
  70. jaclang/tests/fixtures/chandra_bugs.jac +11 -0
  71. jaclang/tests/fixtures/chandra_bugs2.jac +26 -0
  72. jaclang/tests/fixtures/circle_pysolo.py +91 -0
  73. jaclang/tests/fixtures/deep/deeper/deep_outer_import.jac +9 -0
  74. jaclang/tests/fixtures/deep/deeper/deep_outer_import2.jac +9 -0
  75. jaclang/tests/fixtures/deep/deeper/snd_lev.jac +6 -0
  76. jaclang/tests/fixtures/deep/mycode.jac +4 -0
  77. jaclang/tests/fixtures/deep/one_lev.jac +6 -0
  78. jaclang/tests/fixtures/deep/one_lev_dup.jac +6 -0
  79. jaclang/tests/fixtures/deep/one_lev_dup_py.py +6 -0
  80. jaclang/tests/fixtures/deep_import.jac +7 -0
  81. jaclang/tests/fixtures/deferred_field.jac +13 -0
  82. jaclang/tests/fixtures/disconn.jac +29 -0
  83. jaclang/tests/fixtures/edge_node_walk.jac +46 -0
  84. jaclang/tests/fixtures/edge_ops.jac +45 -0
  85. jaclang/tests/fixtures/edges_walk.jac +38 -0
  86. jaclang/tests/fixtures/enum_inside_archtype.jac +20 -0
  87. jaclang/tests/fixtures/err.jac +5 -0
  88. jaclang/tests/fixtures/err2.jac +5 -0
  89. jaclang/tests/fixtures/game1.jac +15 -0
  90. jaclang/tests/fixtures/gendot_bubble_sort.jac +77 -0
  91. jaclang/tests/fixtures/guess_game.jac +47 -0
  92. jaclang/tests/fixtures/has_goodness.jac +15 -0
  93. jaclang/tests/fixtures/hashcheck.jac +12 -0
  94. jaclang/tests/fixtures/hashcheck_dup.jac +12 -0
  95. jaclang/tests/fixtures/hello.jac +5 -0
  96. jaclang/tests/fixtures/hello_nc.jac +5 -0
  97. jaclang/tests/fixtures/ignore.jac +43 -0
  98. jaclang/tests/fixtures/ignore_dup.jac +43 -0
  99. jaclang/tests/fixtures/impl_grab.impl.jac +4 -0
  100. jaclang/tests/fixtures/impl_grab.jac +2 -0
  101. jaclang/tests/fixtures/inherit_check.jac +33 -0
  102. jaclang/tests/fixtures/jacsamp.jac +6 -0
  103. jaclang/tests/fixtures/jp_importer.jac +17 -0
  104. jaclang/tests/fixtures/lambda.jac +6 -0
  105. jaclang/tests/fixtures/maxfail_run_test.jac +5 -0
  106. jaclang/tests/fixtures/mtest.impl.jac +6 -0
  107. jaclang/tests/fixtures/mtest.jac +6 -0
  108. jaclang/tests/fixtures/needs_import.jac +18 -0
  109. jaclang/tests/fixtures/needs_import_1.jac +6 -0
  110. jaclang/tests/fixtures/needs_import_2.jac +6 -0
  111. jaclang/tests/fixtures/needs_import_3.jac +6 -0
  112. jaclang/tests/fixtures/needs_import_dup.jac +18 -0
  113. jaclang/tests/fixtures/package_import.jac +6 -0
  114. jaclang/tests/fixtures/pyfunc.py +11 -0
  115. jaclang/tests/fixtures/pyfunc_1.py +311 -0
  116. jaclang/tests/fixtures/pyfunc_2.py +279 -0
  117. jaclang/tests/fixtures/pyfunc_3.py +310 -0
  118. jaclang/tests/fixtures/random_check.jac +70 -0
  119. jaclang/tests/fixtures/raw_byte_string.jac +18 -0
  120. jaclang/tests/fixtures/registry.jac +37 -0
  121. jaclang/tests/fixtures/run_test.jac +5 -0
  122. jaclang/tests/fixtures/semstr.jac +33 -0
  123. jaclang/tests/fixtures/simple_archs.jac +26 -0
  124. jaclang/tests/fixtures/slice_vals.jac +7 -0
  125. jaclang/tests/fixtures/sub_abil_sep.jac +15 -0
  126. jaclang/tests/fixtures/sub_abil_sep_multilev.jac +17 -0
  127. jaclang/tests/fixtures/try_finally.jac +34 -0
  128. jaclang/tests/fixtures/tupleunpack.jac +6 -0
  129. jaclang/tests/fixtures/tuplytuples.jac +8 -0
  130. jaclang/tests/fixtures/type_info.jac +19 -0
  131. jaclang/tests/fixtures/with_context.jac +30 -0
  132. jaclang/tests/fixtures/with_llm_function.jac +33 -0
  133. jaclang/tests/fixtures/with_llm_lower.jac +45 -0
  134. jaclang/tests/fixtures/with_llm_method.jac +51 -0
  135. jaclang/tests/fixtures/with_llm_type.jac +52 -0
  136. jaclang/tests/test_cli.py +239 -0
  137. jaclang/tests/test_language.py +807 -0
  138. jaclang/tests/test_man_code.py +148 -0
  139. jaclang/tests/test_reference.py +95 -0
  140. jaclang/tests/test_settings.py +46 -0
  141. jaclang/vendor/LICENSE +18 -0
  142. jaclang/vendor/mypy/stubgen.py +0 -0
  143. jaclang/vendor/mypy/stubgenc.py +0 -0
  144. jaclang/vendor/mypy/typeshed/LICENSE +237 -0
  145. jaclang/vendor/mypy/typeshed/stdlib/VERSIONS +308 -0
  146. jaclang/vendor/mypy/typeshed/stdlib/__future__.pyi +41 -0
  147. jaclang/vendor/mypy/typeshed/stdlib/__main__.pyi +3 -0
  148. jaclang/vendor/mypy/typeshed/stdlib/_ast.pyi +632 -0
  149. jaclang/vendor/mypy/typeshed/stdlib/_bisect.pyi +106 -0
  150. jaclang/vendor/mypy/typeshed/stdlib/_bootlocale.pyi +1 -0
  151. jaclang/vendor/mypy/typeshed/stdlib/_codecs.pyi +198 -0
  152. jaclang/vendor/mypy/typeshed/stdlib/_collections_abc.pyi +94 -0
  153. jaclang/vendor/mypy/typeshed/stdlib/_compat_pickle.pyi +8 -0
  154. jaclang/vendor/mypy/typeshed/stdlib/_compression.pyi +25 -0
  155. jaclang/vendor/mypy/typeshed/stdlib/_csv.pyi +90 -0
  156. jaclang/vendor/mypy/typeshed/stdlib/_ctypes.pyi +219 -0
  157. jaclang/vendor/mypy/typeshed/stdlib/_curses.pyi +600 -0
  158. jaclang/vendor/mypy/typeshed/stdlib/_decimal.pyi +316 -0
  159. jaclang/vendor/mypy/typeshed/stdlib/_dummy_thread.pyi +43 -0
  160. jaclang/vendor/mypy/typeshed/stdlib/_dummy_threading.pyi +185 -0
  161. jaclang/vendor/mypy/typeshed/stdlib/_heapq.pyi +11 -0
  162. jaclang/vendor/mypy/typeshed/stdlib/_imp.pyi +32 -0
  163. jaclang/vendor/mypy/typeshed/stdlib/_json.pyi +49 -0
  164. jaclang/vendor/mypy/typeshed/stdlib/_locale.pyi +100 -0
  165. jaclang/vendor/mypy/typeshed/stdlib/_markupbase.pyi +16 -0
  166. jaclang/vendor/mypy/typeshed/stdlib/_msi.pyi +92 -0
  167. jaclang/vendor/mypy/typeshed/stdlib/_operator.pyi +172 -0
  168. jaclang/vendor/mypy/typeshed/stdlib/_osx_support.pyi +55 -0
  169. jaclang/vendor/mypy/typeshed/stdlib/_posixsubprocess.pyi +32 -0
  170. jaclang/vendor/mypy/typeshed/stdlib/_py_abc.pyi +17 -0
  171. jaclang/vendor/mypy/typeshed/stdlib/_pydecimal.pyi +43 -0
  172. jaclang/vendor/mypy/typeshed/stdlib/_random.pyi +12 -0
  173. jaclang/vendor/mypy/typeshed/stdlib/_sitebuiltins.pyi +18 -0
  174. jaclang/vendor/mypy/typeshed/stdlib/_socket.pyi +851 -0
  175. jaclang/vendor/mypy/typeshed/stdlib/_stat.pyi +103 -0
  176. jaclang/vendor/mypy/typeshed/stdlib/_thread.pyi +63 -0
  177. jaclang/vendor/mypy/typeshed/stdlib/_threading_local.pyi +17 -0
  178. jaclang/vendor/mypy/typeshed/stdlib/_tkinter.pyi +120 -0
  179. jaclang/vendor/mypy/typeshed/stdlib/_tracemalloc.pyi +17 -0
  180. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/README.md +34 -0
  181. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/__init__.pyi +374 -0
  182. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/dbapi.pyi +45 -0
  183. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/wsgi.pyi +51 -0
  184. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/xml.pyi +13 -0
  185. jaclang/vendor/mypy/typeshed/stdlib/_warnings.pyi +65 -0
  186. jaclang/vendor/mypy/typeshed/stdlib/_weakref.pyi +45 -0
  187. jaclang/vendor/mypy/typeshed/stdlib/_weakrefset.pyi +51 -0
  188. jaclang/vendor/mypy/typeshed/stdlib/_winapi.pyi +275 -0
  189. jaclang/vendor/mypy/typeshed/stdlib/abc.pyi +61 -0
  190. jaclang/vendor/mypy/typeshed/stdlib/aifc.pyi +99 -0
  191. jaclang/vendor/mypy/typeshed/stdlib/antigravity.pyi +3 -0
  192. jaclang/vendor/mypy/typeshed/stdlib/argparse.pyi +675 -0
  193. jaclang/vendor/mypy/typeshed/stdlib/array.pyi +111 -0
  194. jaclang/vendor/mypy/typeshed/stdlib/ast.pyi +287 -0
  195. jaclang/vendor/mypy/typeshed/stdlib/asynchat.pyi +21 -0
  196. jaclang/vendor/mypy/typeshed/stdlib/asyncio/__init__.pyi +41 -0
  197. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_events.pyi +519 -0
  198. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_futures.pyi +21 -0
  199. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_subprocess.pyi +71 -0
  200. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_tasks.pyi +13 -0
  201. jaclang/vendor/mypy/typeshed/stdlib/asyncio/constants.pyi +20 -0
  202. jaclang/vendor/mypy/typeshed/stdlib/asyncio/coroutines.pyi +32 -0
  203. jaclang/vendor/mypy/typeshed/stdlib/asyncio/events.pyi +669 -0
  204. jaclang/vendor/mypy/typeshed/stdlib/asyncio/exceptions.pyi +43 -0
  205. jaclang/vendor/mypy/typeshed/stdlib/asyncio/format_helpers.pyi +26 -0
  206. jaclang/vendor/mypy/typeshed/stdlib/asyncio/futures.pyi +61 -0
  207. jaclang/vendor/mypy/typeshed/stdlib/asyncio/locks.pyi +131 -0
  208. jaclang/vendor/mypy/typeshed/stdlib/asyncio/log.pyi +3 -0
  209. jaclang/vendor/mypy/typeshed/stdlib/asyncio/mixins.pyi +9 -0
  210. jaclang/vendor/mypy/typeshed/stdlib/asyncio/proactor_events.pyi +72 -0
  211. jaclang/vendor/mypy/typeshed/stdlib/asyncio/protocols.pyi +40 -0
  212. jaclang/vendor/mypy/typeshed/stdlib/asyncio/queues.pyi +49 -0
  213. jaclang/vendor/mypy/typeshed/stdlib/asyncio/runners.pyi +44 -0
  214. jaclang/vendor/mypy/typeshed/stdlib/asyncio/selector_events.pyi +8 -0
  215. jaclang/vendor/mypy/typeshed/stdlib/asyncio/sslproto.pyi +189 -0
  216. jaclang/vendor/mypy/typeshed/stdlib/asyncio/staggered.pyi +13 -0
  217. jaclang/vendor/mypy/typeshed/stdlib/asyncio/streams.pyi +172 -0
  218. jaclang/vendor/mypy/typeshed/stdlib/asyncio/subprocess.pyi +234 -0
  219. jaclang/vendor/mypy/typeshed/stdlib/asyncio/taskgroups.pyi +36 -0
  220. jaclang/vendor/mypy/typeshed/stdlib/asyncio/tasks.pyi +566 -0
  221. jaclang/vendor/mypy/typeshed/stdlib/asyncio/threads.pyi +11 -0
  222. jaclang/vendor/mypy/typeshed/stdlib/asyncio/timeouts.pyi +22 -0
  223. jaclang/vendor/mypy/typeshed/stdlib/asyncio/transports.pyi +64 -0
  224. jaclang/vendor/mypy/typeshed/stdlib/asyncio/trsock.pyi +140 -0
  225. jaclang/vendor/mypy/typeshed/stdlib/asyncio/unix_events.pyi +268 -0
  226. jaclang/vendor/mypy/typeshed/stdlib/asyncio/windows_events.pyi +108 -0
  227. jaclang/vendor/mypy/typeshed/stdlib/asyncio/windows_utils.pyi +59 -0
  228. jaclang/vendor/mypy/typeshed/stdlib/asyncore.pyi +99 -0
  229. jaclang/vendor/mypy/typeshed/stdlib/atexit.pyi +14 -0
  230. jaclang/vendor/mypy/typeshed/stdlib/audioop.pyi +50 -0
  231. jaclang/vendor/mypy/typeshed/stdlib/base64.pyi +76 -0
  232. jaclang/vendor/mypy/typeshed/stdlib/bdb.pyi +133 -0
  233. jaclang/vendor/mypy/typeshed/stdlib/binascii.pyi +45 -0
  234. jaclang/vendor/mypy/typeshed/stdlib/binhex.pyi +47 -0
  235. jaclang/vendor/mypy/typeshed/stdlib/bisect.pyi +4 -0
  236. jaclang/vendor/mypy/typeshed/stdlib/builtins.pyi +2310 -0
  237. jaclang/vendor/mypy/typeshed/stdlib/bz2.pyi +177 -0
  238. jaclang/vendor/mypy/typeshed/stdlib/cProfile.pyi +49 -0
  239. jaclang/vendor/mypy/typeshed/stdlib/calendar.pyi +248 -0
  240. jaclang/vendor/mypy/typeshed/stdlib/cgi.pyi +122 -0
  241. jaclang/vendor/mypy/typeshed/stdlib/cgitb.pyi +44 -0
  242. jaclang/vendor/mypy/typeshed/stdlib/chunk.pyi +26 -0
  243. jaclang/vendor/mypy/typeshed/stdlib/cmath.pyi +38 -0
  244. jaclang/vendor/mypy/typeshed/stdlib/cmd.pyi +52 -0
  245. jaclang/vendor/mypy/typeshed/stdlib/code.pyi +46 -0
  246. jaclang/vendor/mypy/typeshed/stdlib/codecs.pyi +344 -0
  247. jaclang/vendor/mypy/typeshed/stdlib/codeop.pyi +17 -0
  248. jaclang/vendor/mypy/typeshed/stdlib/collections/__init__.pyi +571 -0
  249. jaclang/vendor/mypy/typeshed/stdlib/collections/abc.pyi +2 -0
  250. jaclang/vendor/mypy/typeshed/stdlib/colorsys.pyi +20 -0
  251. jaclang/vendor/mypy/typeshed/stdlib/compileall.pyi +111 -0
  252. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/__init__.pyi +32 -0
  253. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/_base.pyi +137 -0
  254. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/process.pyi +272 -0
  255. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/thread.pyi +86 -0
  256. jaclang/vendor/mypy/typeshed/stdlib/configparser.pyi +449 -0
  257. jaclang/vendor/mypy/typeshed/stdlib/contextlib.pyi +274 -0
  258. jaclang/vendor/mypy/typeshed/stdlib/contextvars.pyi +67 -0
  259. jaclang/vendor/mypy/typeshed/stdlib/copy.pyi +16 -0
  260. jaclang/vendor/mypy/typeshed/stdlib/copyreg.pyi +32 -0
  261. jaclang/vendor/mypy/typeshed/stdlib/crypt.pyi +12 -0
  262. jaclang/vendor/mypy/typeshed/stdlib/csv.pyi +147 -0
  263. jaclang/vendor/mypy/typeshed/stdlib/ctypes/__init__.pyi +211 -0
  264. jaclang/vendor/mypy/typeshed/stdlib/ctypes/_endian.pyi +29 -0
  265. jaclang/vendor/mypy/typeshed/stdlib/ctypes/util.pyi +6 -0
  266. jaclang/vendor/mypy/typeshed/stdlib/ctypes/wintypes.pyi +298 -0
  267. jaclang/vendor/mypy/typeshed/stdlib/curses/__init__.pyi +25 -0
  268. jaclang/vendor/mypy/typeshed/stdlib/curses/ascii.pyi +63 -0
  269. jaclang/vendor/mypy/typeshed/stdlib/curses/has_key.pyi +4 -0
  270. jaclang/vendor/mypy/typeshed/stdlib/curses/panel.pyi +25 -0
  271. jaclang/vendor/mypy/typeshed/stdlib/curses/textpad.pyi +15 -0
  272. jaclang/vendor/mypy/typeshed/stdlib/dataclasses.pyi +323 -0
  273. jaclang/vendor/mypy/typeshed/stdlib/datetime.pyi +334 -0
  274. jaclang/vendor/mypy/typeshed/stdlib/dbm/__init__.pyi +98 -0
  275. jaclang/vendor/mypy/typeshed/stdlib/dbm/dumb.pyi +34 -0
  276. jaclang/vendor/mypy/typeshed/stdlib/dbm/gnu.pyi +44 -0
  277. jaclang/vendor/mypy/typeshed/stdlib/dbm/ndbm.pyi +40 -0
  278. jaclang/vendor/mypy/typeshed/stdlib/decimal.pyi +5 -0
  279. jaclang/vendor/mypy/typeshed/stdlib/difflib.pyi +169 -0
  280. jaclang/vendor/mypy/typeshed/stdlib/dis.pyi +190 -0
  281. jaclang/vendor/mypy/typeshed/stdlib/distutils/__init__.pyi +5 -0
  282. jaclang/vendor/mypy/typeshed/stdlib/distutils/archive_util.pyi +22 -0
  283. jaclang/vendor/mypy/typeshed/stdlib/distutils/bcppcompiler.pyi +3 -0
  284. jaclang/vendor/mypy/typeshed/stdlib/distutils/ccompiler.pyi +183 -0
  285. jaclang/vendor/mypy/typeshed/stdlib/distutils/cmd.pyi +88 -0
  286. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/__init__.pyi +0 -0
  287. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist.pyi +25 -0
  288. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_dumb.pyi +21 -0
  289. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_msi.pyi +45 -0
  290. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_packager.pyi +0 -0
  291. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_rpm.pyi +52 -0
  292. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_wininst.pyi +21 -0
  293. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build.pyi +31 -0
  294. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_clib.pyi +27 -0
  295. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_ext.pyi +50 -0
  296. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_py.pyi +44 -0
  297. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_scripts.pyi +24 -0
  298. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/check.pyi +39 -0
  299. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/clean.pyi +17 -0
  300. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/config.pyi +91 -0
  301. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install.pyi +63 -0
  302. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_data.pyi +19 -0
  303. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_egg_info.pyi +18 -0
  304. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_headers.pyi +16 -0
  305. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_lib.pyi +25 -0
  306. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_scripts.pyi +18 -0
  307. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/register.pyi +18 -0
  308. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/sdist.pyi +42 -0
  309. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/upload.pyi +17 -0
  310. jaclang/vendor/mypy/typeshed/stdlib/distutils/config.pyi +17 -0
  311. jaclang/vendor/mypy/typeshed/stdlib/distutils/core.pyi +59 -0
  312. jaclang/vendor/mypy/typeshed/stdlib/distutils/cygwinccompiler.pyi +20 -0
  313. jaclang/vendor/mypy/typeshed/stdlib/distutils/debug.pyi +1 -0
  314. jaclang/vendor/mypy/typeshed/stdlib/distutils/dep_util.pyi +3 -0
  315. jaclang/vendor/mypy/typeshed/stdlib/distutils/dir_util.pyi +21 -0
  316. jaclang/vendor/mypy/typeshed/stdlib/distutils/dist.pyi +155 -0
  317. jaclang/vendor/mypy/typeshed/stdlib/distutils/errors.pyi +19 -0
  318. jaclang/vendor/mypy/typeshed/stdlib/distutils/extension.pyi +36 -0
  319. jaclang/vendor/mypy/typeshed/stdlib/distutils/fancy_getopt.pyi +37 -0
  320. jaclang/vendor/mypy/typeshed/stdlib/distutils/file_util.pyi +14 -0
  321. jaclang/vendor/mypy/typeshed/stdlib/distutils/filelist.pyi +78 -0
  322. jaclang/vendor/mypy/typeshed/stdlib/distutils/log.pyi +25 -0
  323. jaclang/vendor/mypy/typeshed/stdlib/distutils/msvccompiler.pyi +3 -0
  324. jaclang/vendor/mypy/typeshed/stdlib/distutils/spawn.pyi +4 -0
  325. jaclang/vendor/mypy/typeshed/stdlib/distutils/sysconfig.pyi +24 -0
  326. jaclang/vendor/mypy/typeshed/stdlib/distutils/text_file.pyi +23 -0
  327. jaclang/vendor/mypy/typeshed/stdlib/distutils/unixccompiler.pyi +3 -0
  328. jaclang/vendor/mypy/typeshed/stdlib/distutils/util.pyi +50 -0
  329. jaclang/vendor/mypy/typeshed/stdlib/distutils/version.pyi +36 -0
  330. jaclang/vendor/mypy/typeshed/stdlib/doctest.pyi +282 -0
  331. jaclang/vendor/mypy/typeshed/stdlib/dummy_threading.pyi +2 -0
  332. jaclang/vendor/mypy/typeshed/stdlib/email/__init__.pyi +37 -0
  333. jaclang/vendor/mypy/typeshed/stdlib/email/_header_value_parser.pyi +392 -0
  334. jaclang/vendor/mypy/typeshed/stdlib/email/_policybase.pyi +51 -0
  335. jaclang/vendor/mypy/typeshed/stdlib/email/base64mime.pyi +22 -0
  336. jaclang/vendor/mypy/typeshed/stdlib/email/charset.pyi +39 -0
  337. jaclang/vendor/mypy/typeshed/stdlib/email/contentmanager.pyi +11 -0
  338. jaclang/vendor/mypy/typeshed/stdlib/email/encoders.pyi +8 -0
  339. jaclang/vendor/mypy/typeshed/stdlib/email/errors.pyi +39 -0
  340. jaclang/vendor/mypy/typeshed/stdlib/email/feedparser.pyi +31 -0
  341. jaclang/vendor/mypy/typeshed/stdlib/email/generator.pyi +42 -0
  342. jaclang/vendor/mypy/typeshed/stdlib/email/header.pyi +41 -0
  343. jaclang/vendor/mypy/typeshed/stdlib/email/headerregistry.pyi +214 -0
  344. jaclang/vendor/mypy/typeshed/stdlib/email/iterators.pyi +19 -0
  345. jaclang/vendor/mypy/typeshed/stdlib/email/message.pyi +220 -0
  346. jaclang/vendor/mypy/typeshed/stdlib/email/mime/__init__.pyi +0 -0
  347. jaclang/vendor/mypy/typeshed/stdlib/email/mime/application.pyi +17 -0
  348. jaclang/vendor/mypy/typeshed/stdlib/email/mime/audio.pyi +17 -0
  349. jaclang/vendor/mypy/typeshed/stdlib/email/mime/base.pyi +15 -0
  350. jaclang/vendor/mypy/typeshed/stdlib/email/mime/image.pyi +17 -0
  351. jaclang/vendor/mypy/typeshed/stdlib/email/mime/message.pyi +10 -0
  352. jaclang/vendor/mypy/typeshed/stdlib/email/mime/multipart.pyi +18 -0
  353. jaclang/vendor/mypy/typeshed/stdlib/email/mime/nonmultipart.pyi +5 -0
  354. jaclang/vendor/mypy/typeshed/stdlib/email/mime/text.pyi +14 -0
  355. jaclang/vendor/mypy/typeshed/stdlib/email/parser.pyi +44 -0
  356. jaclang/vendor/mypy/typeshed/stdlib/email/policy.pyi +51 -0
  357. jaclang/vendor/mypy/typeshed/stdlib/email/quoprimime.pyi +30 -0
  358. jaclang/vendor/mypy/typeshed/stdlib/email/utils.pyi +84 -0
  359. jaclang/vendor/mypy/typeshed/stdlib/encodings/__init__.pyi +10 -0
  360. jaclang/vendor/mypy/typeshed/stdlib/encodings/utf_8.pyi +25 -0
  361. jaclang/vendor/mypy/typeshed/stdlib/encodings/utf_8_sig.pyi +28 -0
  362. jaclang/vendor/mypy/typeshed/stdlib/ensurepip/__init__.pyi +12 -0
  363. jaclang/vendor/mypy/typeshed/stdlib/enum.pyi +347 -0
  364. jaclang/vendor/mypy/typeshed/stdlib/errno.pyi +222 -0
  365. jaclang/vendor/mypy/typeshed/stdlib/faulthandler.pyi +20 -0
  366. jaclang/vendor/mypy/typeshed/stdlib/fcntl.pyi +155 -0
  367. jaclang/vendor/mypy/typeshed/stdlib/filecmp.pyi +62 -0
  368. jaclang/vendor/mypy/typeshed/stdlib/fileinput.pyi +246 -0
  369. jaclang/vendor/mypy/typeshed/stdlib/fnmatch.pyi +9 -0
  370. jaclang/vendor/mypy/typeshed/stdlib/formatter.pyi +92 -0
  371. jaclang/vendor/mypy/typeshed/stdlib/fractions.pyi +152 -0
  372. jaclang/vendor/mypy/typeshed/stdlib/ftplib.pyi +214 -0
  373. jaclang/vendor/mypy/typeshed/stdlib/functools.pyi +261 -0
  374. jaclang/vendor/mypy/typeshed/stdlib/gc.pyi +39 -0
  375. jaclang/vendor/mypy/typeshed/stdlib/genericpath.pyi +62 -0
  376. jaclang/vendor/mypy/typeshed/stdlib/getopt.pyi +15 -0
  377. jaclang/vendor/mypy/typeshed/stdlib/getpass.pyi +8 -0
  378. jaclang/vendor/mypy/typeshed/stdlib/gettext.pyi +200 -0
  379. jaclang/vendor/mypy/typeshed/stdlib/glob.pyi +50 -0
  380. jaclang/vendor/mypy/typeshed/stdlib/graphlib.pyi +28 -0
  381. jaclang/vendor/mypy/typeshed/stdlib/grp.pyi +22 -0
  382. jaclang/vendor/mypy/typeshed/stdlib/gzip.pyi +162 -0
  383. jaclang/vendor/mypy/typeshed/stdlib/hashlib.pyi +191 -0
  384. jaclang/vendor/mypy/typeshed/stdlib/heapq.pyi +36 -0
  385. jaclang/vendor/mypy/typeshed/stdlib/hmac.pyi +45 -0
  386. jaclang/vendor/mypy/typeshed/stdlib/html/__init__.pyi +6 -0
  387. jaclang/vendor/mypy/typeshed/stdlib/html/entities.pyi +6 -0
  388. jaclang/vendor/mypy/typeshed/stdlib/html/parser.pyi +40 -0
  389. jaclang/vendor/mypy/typeshed/stdlib/http/__init__.pyi +105 -0
  390. jaclang/vendor/mypy/typeshed/stdlib/http/client.pyi +283 -0
  391. jaclang/vendor/mypy/typeshed/stdlib/http/cookiejar.pyi +206 -0
  392. jaclang/vendor/mypy/typeshed/stdlib/http/cookies.pyi +67 -0
  393. jaclang/vendor/mypy/typeshed/stdlib/http/server.pyi +93 -0
  394. jaclang/vendor/mypy/typeshed/stdlib/imaplib.pyi +221 -0
  395. jaclang/vendor/mypy/typeshed/stdlib/imghdr.pyi +17 -0
  396. jaclang/vendor/mypy/typeshed/stdlib/imp.pyi +75 -0
  397. jaclang/vendor/mypy/typeshed/stdlib/importlib/__init__.pyi +24 -0
  398. jaclang/vendor/mypy/typeshed/stdlib/importlib/_abc.pyi +15 -0
  399. jaclang/vendor/mypy/typeshed/stdlib/importlib/abc.pyi +195 -0
  400. jaclang/vendor/mypy/typeshed/stdlib/importlib/machinery.pyi +214 -0
  401. jaclang/vendor/mypy/typeshed/stdlib/importlib/metadata/__init__.pyi +310 -0
  402. jaclang/vendor/mypy/typeshed/stdlib/importlib/metadata/_meta.pyi +40 -0
  403. jaclang/vendor/mypy/typeshed/stdlib/importlib/readers.pyi +68 -0
  404. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/__init__.pyi +66 -0
  405. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/abc.pyi +12 -0
  406. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/readers.pyi +14 -0
  407. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/simple.pyi +55 -0
  408. jaclang/vendor/mypy/typeshed/stdlib/importlib/simple.pyi +16 -0
  409. jaclang/vendor/mypy/typeshed/stdlib/importlib/util.pyi +57 -0
  410. jaclang/vendor/mypy/typeshed/stdlib/inspect.pyi +709 -0
  411. jaclang/vendor/mypy/typeshed/stdlib/io.pyi +222 -0
  412. jaclang/vendor/mypy/typeshed/stdlib/ipaddress.pyi +229 -0
  413. jaclang/vendor/mypy/typeshed/stdlib/itertools.pyi +394 -0
  414. jaclang/vendor/mypy/typeshed/stdlib/json/__init__.pyi +69 -0
  415. jaclang/vendor/mypy/typeshed/stdlib/json/decoder.pyi +34 -0
  416. jaclang/vendor/mypy/typeshed/stdlib/json/encoder.pyi +38 -0
  417. jaclang/vendor/mypy/typeshed/stdlib/json/tool.pyi +1 -0
  418. jaclang/vendor/mypy/typeshed/stdlib/keyword.pyi +21 -0
  419. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/__init__.pyi +0 -0
  420. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/btm_matcher.pyi +32 -0
  421. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixer_base.pyi +44 -0
  422. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/__init__.pyi +0 -0
  423. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi +8 -0
  424. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -0
  425. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -0
  426. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -0
  427. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi +16 -0
  428. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_except.pyi +14 -0
  429. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi +8 -0
  430. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -0
  431. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -0
  432. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi +9 -0
  433. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -0
  434. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_future.pyi +8 -0
  435. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -0
  436. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -0
  437. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -0
  438. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_import.pyi +16 -0
  439. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi +21 -0
  440. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi +6 -0
  441. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_input.pyi +11 -0
  442. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi +9 -0
  443. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -0
  444. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -0
  445. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -0
  446. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_long.pyi +7 -0
  447. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_map.pyi +9 -0
  448. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -0
  449. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -0
  450. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi +8 -0
  451. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_next.pyi +19 -0
  452. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -0
  453. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -0
  454. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi +12 -0
  455. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi +8 -0
  456. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_print.pyi +12 -0
  457. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi +8 -0
  458. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -0
  459. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -0
  460. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi +9 -0
  461. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi +17 -0
  462. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi +8 -0
  463. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -0
  464. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -0
  465. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -0
  466. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi +8 -0
  467. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi +17 -0
  468. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_types.pyi +8 -0
  469. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -0
  470. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi +18 -0
  471. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -0
  472. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -0
  473. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -0
  474. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi +9 -0
  475. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/main.pyi +46 -0
  476. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/__init__.pyi +9 -0
  477. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/driver.pyi +40 -0
  478. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/grammar.pyi +24 -0
  479. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/literals.pyi +7 -0
  480. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/parse.pyi +36 -0
  481. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/pgen.pyi +52 -0
  482. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/token.pyi +67 -0
  483. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi +98 -0
  484. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pygram.pyi +114 -0
  485. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pytree.pyi +142 -0
  486. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/refactor.pyi +122 -0
  487. jaclang/vendor/mypy/typeshed/stdlib/linecache.pyi +29 -0
  488. jaclang/vendor/mypy/typeshed/stdlib/locale.pyi +165 -0
  489. jaclang/vendor/mypy/typeshed/stdlib/logging/__init__.pyi +685 -0
  490. jaclang/vendor/mypy/typeshed/stdlib/logging/config.pyi +161 -0
  491. jaclang/vendor/mypy/typeshed/stdlib/logging/handlers.pyi +315 -0
  492. jaclang/vendor/mypy/typeshed/stdlib/lzma.pyi +213 -0
  493. jaclang/vendor/mypy/typeshed/stdlib/mailbox.pyi +306 -0
  494. jaclang/vendor/mypy/typeshed/stdlib/mailcap.pyi +15 -0
  495. jaclang/vendor/mypy/typeshed/stdlib/marshal.pyi +35 -0
  496. jaclang/vendor/mypy/typeshed/stdlib/math.pyi +134 -0
  497. jaclang/vendor/mypy/typeshed/stdlib/mimetypes.pyi +50 -0
  498. jaclang/vendor/mypy/typeshed/stdlib/mmap.pyi +126 -0
  499. jaclang/vendor/mypy/typeshed/stdlib/modulefinder.pyi +84 -0
  500. jaclang/vendor/mypy/typeshed/stdlib/msilib/__init__.pyi +237 -0
  501. jaclang/vendor/mypy/typeshed/stdlib/msilib/schema.pyi +107 -0
  502. jaclang/vendor/mypy/typeshed/stdlib/msilib/sequence.pyi +13 -0
  503. jaclang/vendor/mypy/typeshed/stdlib/msilib/text.pyi +7 -0
  504. jaclang/vendor/mypy/typeshed/stdlib/msvcrt.pyi +32 -0
  505. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/__init__.pyi +94 -0
  506. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/connection.pyi +94 -0
  507. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/context.pyi +235 -0
  508. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/dummy/__init__.pyi +83 -0
  509. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/dummy/connection.pyi +50 -0
  510. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/forkserver.pyi +36 -0
  511. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/heap.pyi +38 -0
  512. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/managers.pyi +270 -0
  513. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/pool.pyi +137 -0
  514. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_fork.pyi +23 -0
  515. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_forkserver.pyi +16 -0
  516. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi +20 -0
  517. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi +30 -0
  518. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/process.pyi +39 -0
  519. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/queues.pyi +43 -0
  520. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/reduction.pyi +118 -0
  521. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/resource_sharer.pyi +20 -0
  522. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/resource_tracker.pyi +18 -0
  523. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/shared_memory.pyi +44 -0
  524. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/sharedctypes.pyi +140 -0
  525. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/spawn.pyi +34 -0
  526. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/synchronize.pyi +66 -0
  527. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/util.pyi +83 -0
  528. jaclang/vendor/mypy/typeshed/stdlib/netrc.pyi +28 -0
  529. jaclang/vendor/mypy/typeshed/stdlib/nis.pyi +9 -0
  530. jaclang/vendor/mypy/typeshed/stdlib/nntplib.pyi +151 -0
  531. jaclang/vendor/mypy/typeshed/stdlib/nt.pyi +114 -0
  532. jaclang/vendor/mypy/typeshed/stdlib/ntpath.pyi +119 -0
  533. jaclang/vendor/mypy/typeshed/stdlib/nturl2path.pyi +2 -0
  534. jaclang/vendor/mypy/typeshed/stdlib/numbers.pyi +154 -0
  535. jaclang/vendor/mypy/typeshed/stdlib/opcode.pyi +68 -0
  536. jaclang/vendor/mypy/typeshed/stdlib/operator.pyi +110 -0
  537. jaclang/vendor/mypy/typeshed/stdlib/optparse.pyi +290 -0
  538. jaclang/vendor/mypy/typeshed/stdlib/os/__init__.pyi +1317 -0
  539. jaclang/vendor/mypy/typeshed/stdlib/os/path.pyi +8 -0
  540. jaclang/vendor/mypy/typeshed/stdlib/ossaudiodev.pyi +131 -0
  541. jaclang/vendor/mypy/typeshed/stdlib/parser.pyi +28 -0
  542. jaclang/vendor/mypy/typeshed/stdlib/pathlib.pyi +282 -0
  543. jaclang/vendor/mypy/typeshed/stdlib/pdb.pyi +223 -0
  544. jaclang/vendor/mypy/typeshed/stdlib/pickle.pyi +286 -0
  545. jaclang/vendor/mypy/typeshed/stdlib/pickletools.pyi +173 -0
  546. jaclang/vendor/mypy/typeshed/stdlib/pipes.pyi +16 -0
  547. jaclang/vendor/mypy/typeshed/stdlib/pkgutil.pyi +61 -0
  548. jaclang/vendor/mypy/typeshed/stdlib/platform.pyi +56 -0
  549. jaclang/vendor/mypy/typeshed/stdlib/plistlib.pyi +176 -0
  550. jaclang/vendor/mypy/typeshed/stdlib/poplib.pyi +78 -0
  551. jaclang/vendor/mypy/typeshed/stdlib/posix.pyi +363 -0
  552. jaclang/vendor/mypy/typeshed/stdlib/posixpath.pyi +171 -0
  553. jaclang/vendor/mypy/typeshed/stdlib/pprint.pyi +122 -0
  554. jaclang/vendor/mypy/typeshed/stdlib/profile.pyi +43 -0
  555. jaclang/vendor/mypy/typeshed/stdlib/pstats.pyi +85 -0
  556. jaclang/vendor/mypy/typeshed/stdlib/pty.pyi +21 -0
  557. jaclang/vendor/mypy/typeshed/stdlib/pwd.pyi +36 -0
  558. jaclang/vendor/mypy/typeshed/stdlib/py_compile.pyi +40 -0
  559. jaclang/vendor/mypy/typeshed/stdlib/pyclbr.pyi +97 -0
  560. jaclang/vendor/mypy/typeshed/stdlib/pydoc.pyi +309 -0
  561. jaclang/vendor/mypy/typeshed/stdlib/pydoc_data/__init__.pyi +0 -0
  562. jaclang/vendor/mypy/typeshed/stdlib/pydoc_data/topics.pyi +1 -0
  563. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/__init__.pyi +94 -0
  564. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/errors.pyi +49 -0
  565. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/model.pyi +11 -0
  566. jaclang/vendor/mypy/typeshed/stdlib/queue.pyi +62 -0
  567. jaclang/vendor/mypy/typeshed/stdlib/quopri.pyi +17 -0
  568. jaclang/vendor/mypy/typeshed/stdlib/random.pyi +160 -0
  569. jaclang/vendor/mypy/typeshed/stdlib/re.pyi +376 -0
  570. jaclang/vendor/mypy/typeshed/stdlib/readline.pyi +40 -0
  571. jaclang/vendor/mypy/typeshed/stdlib/reprlib.pyi +65 -0
  572. jaclang/vendor/mypy/typeshed/stdlib/resource.pyi +116 -0
  573. jaclang/vendor/mypy/typeshed/stdlib/rlcompleter.pyi +9 -0
  574. jaclang/vendor/mypy/typeshed/stdlib/runpy.pyi +31 -0
  575. jaclang/vendor/mypy/typeshed/stdlib/sched.pyi +56 -0
  576. jaclang/vendor/mypy/typeshed/stdlib/secrets.pyi +24 -0
  577. jaclang/vendor/mypy/typeshed/stdlib/select.pyi +162 -0
  578. jaclang/vendor/mypy/typeshed/stdlib/selectors.pyi +85 -0
  579. jaclang/vendor/mypy/typeshed/stdlib/shelve.pyi +64 -0
  580. jaclang/vendor/mypy/typeshed/stdlib/shlex.pyi +47 -0
  581. jaclang/vendor/mypy/typeshed/stdlib/shutil.pyi +239 -0
  582. jaclang/vendor/mypy/typeshed/stdlib/signal.pyi +208 -0
  583. jaclang/vendor/mypy/typeshed/stdlib/site.pyi +33 -0
  584. jaclang/vendor/mypy/typeshed/stdlib/smtpd.pyi +102 -0
  585. jaclang/vendor/mypy/typeshed/stdlib/smtplib.pyi +223 -0
  586. jaclang/vendor/mypy/typeshed/stdlib/sndhdr.pyi +14 -0
  587. jaclang/vendor/mypy/typeshed/stdlib/socket.pyi +881 -0
  588. jaclang/vendor/mypy/typeshed/stdlib/socketserver.pyi +195 -0
  589. jaclang/vendor/mypy/typeshed/stdlib/spwd.pyi +43 -0
  590. jaclang/vendor/mypy/typeshed/stdlib/sqlite3/__init__.pyi +1 -0
  591. jaclang/vendor/mypy/typeshed/stdlib/sqlite3/dbapi2.pyi +519 -0
  592. jaclang/vendor/mypy/typeshed/stdlib/sre_compile.pyi +11 -0
  593. jaclang/vendor/mypy/typeshed/stdlib/sre_constants.pyi +132 -0
  594. jaclang/vendor/mypy/typeshed/stdlib/sre_parse.pyi +110 -0
  595. jaclang/vendor/mypy/typeshed/stdlib/ssl.pyi +559 -0
  596. jaclang/vendor/mypy/typeshed/stdlib/stat.pyi +1 -0
  597. jaclang/vendor/mypy/typeshed/stdlib/statistics.pyi +151 -0
  598. jaclang/vendor/mypy/typeshed/stdlib/string.pyi +112 -0
  599. jaclang/vendor/mypy/typeshed/stdlib/stringprep.pyi +27 -0
  600. jaclang/vendor/mypy/typeshed/stdlib/struct.pyi +43 -0
  601. jaclang/vendor/mypy/typeshed/stdlib/subprocess.pyi +2638 -0
  602. jaclang/vendor/mypy/typeshed/stdlib/sunau.pyi +86 -0
  603. jaclang/vendor/mypy/typeshed/stdlib/symbol.pyi +93 -0
  604. jaclang/vendor/mypy/typeshed/stdlib/symtable.pyi +63 -0
  605. jaclang/vendor/mypy/typeshed/stdlib/sys/__init__.pyi +396 -0
  606. jaclang/vendor/mypy/typeshed/stdlib/sys/_monitoring.pyi +54 -0
  607. jaclang/vendor/mypy/typeshed/stdlib/sysconfig.pyi +52 -0
  608. jaclang/vendor/mypy/typeshed/stdlib/syslog.pyi +48 -0
  609. jaclang/vendor/mypy/typeshed/stdlib/tabnanny.pyi +18 -0
  610. jaclang/vendor/mypy/typeshed/stdlib/tarfile.pyi +486 -0
  611. jaclang/vendor/mypy/typeshed/stdlib/telnetlib.pyi +129 -0
  612. jaclang/vendor/mypy/typeshed/stdlib/tempfile.pyi +521 -0
  613. jaclang/vendor/mypy/typeshed/stdlib/termios.pyi +273 -0
  614. jaclang/vendor/mypy/typeshed/stdlib/textwrap.pyi +107 -0
  615. jaclang/vendor/mypy/typeshed/stdlib/this.pyi +2 -0
  616. jaclang/vendor/mypy/typeshed/stdlib/threading.pyi +212 -0
  617. jaclang/vendor/mypy/typeshed/stdlib/time.pyi +122 -0
  618. jaclang/vendor/mypy/typeshed/stdlib/timeit.pyi +46 -0
  619. jaclang/vendor/mypy/typeshed/stdlib/tkinter/__init__.pyi +3950 -0
  620. jaclang/vendor/mypy/typeshed/stdlib/tkinter/colorchooser.pyi +28 -0
  621. jaclang/vendor/mypy/typeshed/stdlib/tkinter/commondialog.pyi +16 -0
  622. jaclang/vendor/mypy/typeshed/stdlib/tkinter/constants.pyi +80 -0
  623. jaclang/vendor/mypy/typeshed/stdlib/tkinter/dialog.pyi +21 -0
  624. jaclang/vendor/mypy/typeshed/stdlib/tkinter/dnd.pyi +20 -0
  625. jaclang/vendor/mypy/typeshed/stdlib/tkinter/filedialog.pyi +173 -0
  626. jaclang/vendor/mypy/typeshed/stdlib/tkinter/font.pyi +148 -0
  627. jaclang/vendor/mypy/typeshed/stdlib/tkinter/messagebox.pyi +60 -0
  628. jaclang/vendor/mypy/typeshed/stdlib/tkinter/scrolledtext.pyi +10 -0
  629. jaclang/vendor/mypy/typeshed/stdlib/tkinter/simpledialog.pyi +54 -0
  630. jaclang/vendor/mypy/typeshed/stdlib/tkinter/tix.pyi +395 -0
  631. jaclang/vendor/mypy/typeshed/stdlib/tkinter/ttk.pyi +1276 -0
  632. jaclang/vendor/mypy/typeshed/stdlib/token.pyi +159 -0
  633. jaclang/vendor/mypy/typeshed/stdlib/tokenize.pyi +185 -0
  634. jaclang/vendor/mypy/typeshed/stdlib/tomllib.pyi +12 -0
  635. jaclang/vendor/mypy/typeshed/stdlib/trace.pyi +114 -0
  636. jaclang/vendor/mypy/typeshed/stdlib/traceback.pyi +297 -0
  637. jaclang/vendor/mypy/typeshed/stdlib/tracemalloc.pyi +142 -0
  638. jaclang/vendor/mypy/typeshed/stdlib/tty.pyi +30 -0
  639. jaclang/vendor/mypy/typeshed/stdlib/turtle.pyi +830 -0
  640. jaclang/vendor/mypy/typeshed/stdlib/types.pyi +647 -0
  641. jaclang/vendor/mypy/typeshed/stdlib/typing.pyi +1059 -0
  642. jaclang/vendor/mypy/typeshed/stdlib/typing_extensions.pyi +524 -0
  643. jaclang/vendor/mypy/typeshed/stdlib/unicodedata.pyi +71 -0
  644. jaclang/vendor/mypy/typeshed/stdlib/unittest/__init__.pyi +72 -0
  645. jaclang/vendor/mypy/typeshed/stdlib/unittest/_log.pyi +34 -0
  646. jaclang/vendor/mypy/typeshed/stdlib/unittest/async_case.pyi +28 -0
  647. jaclang/vendor/mypy/typeshed/stdlib/unittest/case.pyi +481 -0
  648. jaclang/vendor/mypy/typeshed/stdlib/unittest/loader.pyi +71 -0
  649. jaclang/vendor/mypy/typeshed/stdlib/unittest/main.pyi +75 -0
  650. jaclang/vendor/mypy/typeshed/stdlib/unittest/mock.pyi +468 -0
  651. jaclang/vendor/mypy/typeshed/stdlib/unittest/result.pyi +59 -0
  652. jaclang/vendor/mypy/typeshed/stdlib/unittest/runner.pyi +83 -0
  653. jaclang/vendor/mypy/typeshed/stdlib/unittest/signals.pyi +15 -0
  654. jaclang/vendor/mypy/typeshed/stdlib/unittest/suite.pyi +26 -0
  655. jaclang/vendor/mypy/typeshed/stdlib/unittest/util.pyi +31 -0
  656. jaclang/vendor/mypy/typeshed/stdlib/urllib/__init__.pyi +0 -0
  657. jaclang/vendor/mypy/typeshed/stdlib/urllib/error.pyi +27 -0
  658. jaclang/vendor/mypy/typeshed/stdlib/urllib/parse.pyi +245 -0
  659. jaclang/vendor/mypy/typeshed/stdlib/urllib/request.pyi +544 -0
  660. jaclang/vendor/mypy/typeshed/stdlib/urllib/response.pyi +50 -0
  661. jaclang/vendor/mypy/typeshed/stdlib/urllib/robotparser.pyi +20 -0
  662. jaclang/vendor/mypy/typeshed/stdlib/uu.pyi +23 -0
  663. jaclang/vendor/mypy/typeshed/stdlib/uuid.pyi +100 -0
  664. jaclang/vendor/mypy/typeshed/stdlib/warnings.pyi +144 -0
  665. jaclang/vendor/mypy/typeshed/stdlib/wave.pyi +87 -0
  666. jaclang/vendor/mypy/typeshed/stdlib/weakref.pyi +173 -0
  667. jaclang/vendor/mypy/typeshed/stdlib/webbrowser.pyi +80 -0
  668. jaclang/vendor/mypy/typeshed/stdlib/winreg.pyi +120 -0
  669. jaclang/vendor/mypy/typeshed/stdlib/winsound.pyi +28 -0
  670. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/__init__.pyi +0 -0
  671. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/handlers.pyi +109 -0
  672. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/headers.pyi +28 -0
  673. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/simple_server.pyi +49 -0
  674. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/types.pyi +44 -0
  675. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/util.pyi +31 -0
  676. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/validate.pyi +52 -0
  677. jaclang/vendor/mypy/typeshed/stdlib/xdrlib.pyi +63 -0
  678. jaclang/vendor/mypy/typeshed/stdlib/xml/__init__.pyi +1 -0
  679. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/NodeFilter.pyi +19 -0
  680. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/__init__.pyi +72 -0
  681. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/domreg.pyi +12 -0
  682. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/expatbuilder.pyi +111 -0
  683. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/minicompat.pyi +22 -0
  684. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/minidom.pyi +467 -0
  685. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/pulldom.pyi +101 -0
  686. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/xmlbuilder.pyi +110 -0
  687. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementInclude.pyi +35 -0
  688. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementPath.pyi +49 -0
  689. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementTree.pyi +367 -0
  690. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/__init__.pyi +0 -0
  691. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/cElementTree.pyi +1 -0
  692. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/__init__.pyi +1 -0
  693. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/__init__.pyi +1 -0
  694. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/errors.pyi +1 -0
  695. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/model.pyi +1 -0
  696. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/__init__.pyi +34 -0
  697. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/_exceptions.pyi +21 -0
  698. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/handler.pyi +59 -0
  699. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/saxutils.pyi +71 -0
  700. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/xmlreader.pyi +89 -0
  701. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/__init__.pyi +0 -0
  702. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/client.pyi +348 -0
  703. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/server.pyi +186 -0
  704. jaclang/vendor/mypy/typeshed/stdlib/xxlimited.pyi +22 -0
  705. jaclang/vendor/mypy/typeshed/stdlib/zipapp.pyi +20 -0
  706. jaclang/vendor/mypy/typeshed/stdlib/zipfile/__init__.pyi +355 -0
  707. jaclang/vendor/mypy/typeshed/stdlib/zipfile/_path.pyi +105 -0
  708. jaclang/vendor/mypy/typeshed/stdlib/zipimport.pyi +40 -0
  709. jaclang/vendor/mypy/typeshed/stdlib/zlib.pyi +63 -0
  710. jaclang/vendor/mypy/typeshed/stdlib/zoneinfo/__init__.pyi +45 -0
  711. jaclang/vendor/mypy/typeshed/stubs/mypy-extensions/@tests/stubtest_allowlist.txt +2 -0
  712. jaclang/vendor/mypy/typeshed/stubs/mypy-extensions/METADATA.toml +4 -0
  713. jaclang/vendor/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi +238 -0
  714. jaclang/vendor/mypy/xml/mypy-html.css +104 -0
  715. jaclang/vendor/mypy/xml/mypy-html.xslt +81 -0
  716. jaclang/vendor/mypy/xml/mypy-txt.xslt +100 -0
  717. jaclang/vendor/mypy/xml/mypy.xsd +50 -0
  718. jaclang/vendor/mypyc/.readthedocs.yaml +18 -0
  719. jaclang/vendor/mypyc/README.md +133 -0
  720. jaclang/vendor/mypyc/doc/Makefile +20 -0
  721. jaclang/vendor/mypyc/doc/bool_operations.rst +27 -0
  722. jaclang/vendor/mypyc/doc/compilation_units.rst +20 -0
  723. jaclang/vendor/mypyc/doc/conf.py +59 -0
  724. jaclang/vendor/mypyc/doc/cpython-timings.md +25 -0
  725. jaclang/vendor/mypyc/doc/dev-intro.md +548 -0
  726. jaclang/vendor/mypyc/doc/dict_operations.rst +59 -0
  727. jaclang/vendor/mypyc/doc/differences_from_python.rst +332 -0
  728. jaclang/vendor/mypyc/doc/float_operations.rst +50 -0
  729. jaclang/vendor/mypyc/doc/future.md +42 -0
  730. jaclang/vendor/mypyc/doc/getting_started.rst +240 -0
  731. jaclang/vendor/mypyc/doc/index.rst +61 -0
  732. jaclang/vendor/mypyc/doc/int_operations.rst +162 -0
  733. jaclang/vendor/mypyc/doc/introduction.rst +150 -0
  734. jaclang/vendor/mypyc/doc/list_operations.rst +65 -0
  735. jaclang/vendor/mypyc/doc/make.bat +35 -0
  736. jaclang/vendor/mypyc/doc/native_classes.rst +206 -0
  737. jaclang/vendor/mypyc/doc/native_operations.rst +55 -0
  738. jaclang/vendor/mypyc/doc/performance_tips_and_tricks.rst +244 -0
  739. jaclang/vendor/mypyc/doc/set_operations.rst +47 -0
  740. jaclang/vendor/mypyc/doc/str_operations.rst +35 -0
  741. jaclang/vendor/mypyc/doc/tuple_operations.rst +33 -0
  742. jaclang/vendor/mypyc/doc/using_type_annotations.rst +398 -0
  743. jaclang/vendor/mypyc/external/googletest/LICENSE +28 -0
  744. jaclang/vendor/mypyc/external/googletest/README.md +280 -0
  745. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-death-test.h +294 -0
  746. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-message.h +250 -0
  747. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-param-test.h +1444 -0
  748. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-param-test.h.pump +510 -0
  749. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-printers.h +993 -0
  750. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-spi.h +232 -0
  751. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-test-part.h +179 -0
  752. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-typed-test.h +263 -0
  753. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest.h +2236 -0
  754. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest_pred_impl.h +358 -0
  755. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest_prod.h +58 -0
  756. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest-port.h +69 -0
  757. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
  758. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest.h +41 -0
  759. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-death-test-internal.h +319 -0
  760. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-filepath.h +206 -0
  761. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-internal.h +1238 -0
  762. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-linked_ptr.h +243 -0
  763. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util-generated.h +5146 -0
  764. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +286 -0
  765. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util.h +731 -0
  766. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-port-arch.h +93 -0
  767. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-port.h +2560 -0
  768. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-string.h +167 -0
  769. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-tuple.h +1020 -0
  770. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-tuple.h.pump +347 -0
  771. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-type-util.h +3331 -0
  772. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-type-util.h.pump +297 -0
  773. jaclang/vendor/mypyc/external/googletest/make/Makefile +61 -0
  774. jaclang/vendor/mypyc/external/googletest/src/gtest-all.cc +48 -0
  775. jaclang/vendor/mypyc/external/googletest/src/gtest-death-test.cc +1342 -0
  776. jaclang/vendor/mypyc/external/googletest/src/gtest-filepath.cc +387 -0
  777. jaclang/vendor/mypyc/external/googletest/src/gtest-internal-inl.h +1183 -0
  778. jaclang/vendor/mypyc/external/googletest/src/gtest-port.cc +1259 -0
  779. jaclang/vendor/mypyc/external/googletest/src/gtest-printers.cc +373 -0
  780. jaclang/vendor/mypyc/external/googletest/src/gtest-test-part.cc +110 -0
  781. jaclang/vendor/mypyc/external/googletest/src/gtest-typed-test.cc +118 -0
  782. jaclang/vendor/mypyc/external/googletest/src/gtest.cc +5388 -0
  783. jaclang/vendor/mypyc/external/googletest/src/gtest_main.cc +38 -0
  784. jaclang/vendor/mypyc/lib-rt/CPy.h +643 -0
  785. jaclang/vendor/mypyc/lib-rt/bytes_ops.c +143 -0
  786. jaclang/vendor/mypyc/lib-rt/dict_ops.c +446 -0
  787. jaclang/vendor/mypyc/lib-rt/exc_ops.c +259 -0
  788. jaclang/vendor/mypyc/lib-rt/float_ops.c +192 -0
  789. jaclang/vendor/mypyc/lib-rt/generic_ops.c +64 -0
  790. jaclang/vendor/mypyc/lib-rt/getargs.c +450 -0
  791. jaclang/vendor/mypyc/lib-rt/getargsfast.c +569 -0
  792. jaclang/vendor/mypyc/lib-rt/init.c +13 -0
  793. jaclang/vendor/mypyc/lib-rt/int_ops.c +803 -0
  794. jaclang/vendor/mypyc/lib-rt/list_ops.c +335 -0
  795. jaclang/vendor/mypyc/lib-rt/misc_ops.c +942 -0
  796. jaclang/vendor/mypyc/lib-rt/module_shim.tmpl +18 -0
  797. jaclang/vendor/mypyc/lib-rt/mypyc_util.h +118 -0
  798. jaclang/vendor/mypyc/lib-rt/pythoncapi_compat.h +497 -0
  799. jaclang/vendor/mypyc/lib-rt/pythonsupport.h +548 -0
  800. jaclang/vendor/mypyc/lib-rt/set_ops.c +17 -0
  801. jaclang/vendor/mypyc/lib-rt/setup.py +76 -0
  802. jaclang/vendor/mypyc/lib-rt/str_ops.c +241 -0
  803. jaclang/vendor/mypyc/lib-rt/test_capi.cc +585 -0
  804. jaclang/vendor/mypyc/lib-rt/tuple_ops.c +61 -0
  805. jaclang/vendor/mypyc/test-data/alwaysdefined.test +732 -0
  806. jaclang/vendor/mypyc/test-data/analysis.test +603 -0
  807. jaclang/vendor/mypyc/test-data/commandline.test +245 -0
  808. jaclang/vendor/mypyc/test-data/driver/driver.py +50 -0
  809. jaclang/vendor/mypyc/test-data/exceptions-freq.test +125 -0
  810. jaclang/vendor/mypyc/test-data/exceptions.test +713 -0
  811. jaclang/vendor/mypyc/test-data/fixtures/ir.py +850 -0
  812. jaclang/vendor/mypyc/test-data/fixtures/testutil.py +117 -0
  813. jaclang/vendor/mypyc/test-data/fixtures/typing-full.pyi +212 -0
  814. jaclang/vendor/mypyc/test-data/irbuild-any.test +238 -0
  815. jaclang/vendor/mypyc/test-data/irbuild-basic.test +3690 -0
  816. jaclang/vendor/mypyc/test-data/irbuild-bool.test +463 -0
  817. jaclang/vendor/mypyc/test-data/irbuild-bytes.test +184 -0
  818. jaclang/vendor/mypyc/test-data/irbuild-classes.test +1303 -0
  819. jaclang/vendor/mypyc/test-data/irbuild-constant-fold.test +480 -0
  820. jaclang/vendor/mypyc/test-data/irbuild-dict.test +585 -0
  821. jaclang/vendor/mypyc/test-data/irbuild-dunders.test +223 -0
  822. jaclang/vendor/mypyc/test-data/irbuild-float.test +497 -0
  823. jaclang/vendor/mypyc/test-data/irbuild-generics.test +151 -0
  824. jaclang/vendor/mypyc/test-data/irbuild-glue-methods.test +437 -0
  825. jaclang/vendor/mypyc/test-data/irbuild-i16.test +526 -0
  826. jaclang/vendor/mypyc/test-data/irbuild-i32.test +598 -0
  827. jaclang/vendor/mypyc/test-data/irbuild-i64.test +2164 -0
  828. jaclang/vendor/mypyc/test-data/irbuild-int.test +235 -0
  829. jaclang/vendor/mypyc/test-data/irbuild-isinstance.test +109 -0
  830. jaclang/vendor/mypyc/test-data/irbuild-lists.test +547 -0
  831. jaclang/vendor/mypyc/test-data/irbuild-match.test +1708 -0
  832. jaclang/vendor/mypyc/test-data/irbuild-math.test +64 -0
  833. jaclang/vendor/mypyc/test-data/irbuild-nested.test +807 -0
  834. jaclang/vendor/mypyc/test-data/irbuild-optional.test +536 -0
  835. jaclang/vendor/mypyc/test-data/irbuild-set.test +838 -0
  836. jaclang/vendor/mypyc/test-data/irbuild-singledispatch.test +257 -0
  837. jaclang/vendor/mypyc/test-data/irbuild-statements.test +1149 -0
  838. jaclang/vendor/mypyc/test-data/irbuild-str.test +314 -0
  839. jaclang/vendor/mypyc/test-data/irbuild-strip-asserts.test +12 -0
  840. jaclang/vendor/mypyc/test-data/irbuild-try.test +523 -0
  841. jaclang/vendor/mypyc/test-data/irbuild-tuple.test +462 -0
  842. jaclang/vendor/mypyc/test-data/irbuild-u8.test +543 -0
  843. jaclang/vendor/mypyc/test-data/irbuild-unreachable.test +241 -0
  844. jaclang/vendor/mypyc/test-data/irbuild-vectorcall.test +153 -0
  845. jaclang/vendor/mypyc/test-data/refcount.test +1588 -0
  846. jaclang/vendor/mypyc/test-data/run-async.test +145 -0
  847. jaclang/vendor/mypyc/test-data/run-attrs.test +318 -0
  848. jaclang/vendor/mypyc/test-data/run-bench.test +196 -0
  849. jaclang/vendor/mypyc/test-data/run-bools.test +229 -0
  850. jaclang/vendor/mypyc/test-data/run-bytes.test +302 -0
  851. jaclang/vendor/mypyc/test-data/run-classes.test +2505 -0
  852. jaclang/vendor/mypyc/test-data/run-dicts.test +334 -0
  853. jaclang/vendor/mypyc/test-data/run-dunders.test +945 -0
  854. jaclang/vendor/mypyc/test-data/run-exceptions.test +448 -0
  855. jaclang/vendor/mypyc/test-data/run-floats.test +516 -0
  856. jaclang/vendor/mypyc/test-data/run-functions.test +1310 -0
  857. jaclang/vendor/mypyc/test-data/run-generators.test +681 -0
  858. jaclang/vendor/mypyc/test-data/run-i16.test +338 -0
  859. jaclang/vendor/mypyc/test-data/run-i32.test +336 -0
  860. jaclang/vendor/mypyc/test-data/run-i64.test +1519 -0
  861. jaclang/vendor/mypyc/test-data/run-imports.test +265 -0
  862. jaclang/vendor/mypyc/test-data/run-integers.test +540 -0
  863. jaclang/vendor/mypyc/test-data/run-lists.test +411 -0
  864. jaclang/vendor/mypyc/test-data/run-loops.test +485 -0
  865. jaclang/vendor/mypyc/test-data/run-match.test +283 -0
  866. jaclang/vendor/mypyc/test-data/run-math.test +106 -0
  867. jaclang/vendor/mypyc/test-data/run-misc.test +1168 -0
  868. jaclang/vendor/mypyc/test-data/run-multimodule.test +887 -0
  869. jaclang/vendor/mypyc/test-data/run-mypy-sim.test +138 -0
  870. jaclang/vendor/mypyc/test-data/run-primitives.test +375 -0
  871. jaclang/vendor/mypyc/test-data/run-python37.test +159 -0
  872. jaclang/vendor/mypyc/test-data/run-python38.test +88 -0
  873. jaclang/vendor/mypyc/test-data/run-sets.test +150 -0
  874. jaclang/vendor/mypyc/test-data/run-singledispatch.test +698 -0
  875. jaclang/vendor/mypyc/test-data/run-strings.test +641 -0
  876. jaclang/vendor/mypyc/test-data/run-traits.test +411 -0
  877. jaclang/vendor/mypyc/test-data/run-tuples.test +258 -0
  878. jaclang/vendor/mypyc/test-data/run-u8.test +303 -0
  879. jaclang/vendor/pluggy/LICENSE +21 -0
  880. jaclang-0.6.2.dist-info/METADATA +110 -0
  881. jaclang-0.6.2.dist-info/RECORD +1305 -0
  882. {jaclang-0.6.1.dist-info → jaclang-0.6.2.dist-info}/WHEEL +1 -2
  883. jaclang-0.6.2.dist-info/entry_points.txt +3 -0
  884. jaclang/compiler/generated/jac_parser.py +0 -4069
  885. jaclang-0.6.1.dist-info/METADATA +0 -17
  886. jaclang-0.6.1.dist-info/RECORD +0 -430
  887. jaclang-0.6.1.dist-info/entry_points.txt +0 -2
  888. jaclang-0.6.1.dist-info/top_level.txt +0 -1
  889. /jaclang/{compiler/generated/__init__.py → vendor/mypy/typeshed/stdlib/concurrent/__init__.pyi} +0 -0
@@ -0,0 +1,1238 @@
1
+ // Copyright 2005, 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: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
31
+ //
32
+ // The Google C++ Testing Framework (Google Test)
33
+ //
34
+ // This header file declares functions and macros used internally by
35
+ // Google Test. They are subject to change without notice.
36
+
37
+ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
38
+ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
39
+
40
+ #include "gtest/internal/gtest-port.h"
41
+
42
+ #if GTEST_OS_LINUX
43
+ # include <stdlib.h>
44
+ # include <sys/types.h>
45
+ # include <sys/wait.h>
46
+ # include <unistd.h>
47
+ #endif // GTEST_OS_LINUX
48
+
49
+ #if GTEST_HAS_EXCEPTIONS
50
+ # include <stdexcept>
51
+ #endif
52
+
53
+ #include <ctype.h>
54
+ #include <float.h>
55
+ #include <string.h>
56
+ #include <iomanip>
57
+ #include <limits>
58
+ #include <map>
59
+ #include <set>
60
+ #include <string>
61
+ #include <vector>
62
+
63
+ #include "gtest/gtest-message.h"
64
+ #include "gtest/internal/gtest-string.h"
65
+ #include "gtest/internal/gtest-filepath.h"
66
+ #include "gtest/internal/gtest-type-util.h"
67
+
68
+ // Due to C++ preprocessor weirdness, we need double indirection to
69
+ // concatenate two tokens when one of them is __LINE__. Writing
70
+ //
71
+ // foo ## __LINE__
72
+ //
73
+ // will result in the token foo__LINE__, instead of foo followed by
74
+ // the current line number. For more details, see
75
+ // http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6
76
+ #define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
77
+ #define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
78
+
79
+ class ProtocolMessage;
80
+ namespace proto2 { class Message; }
81
+
82
+ namespace testing {
83
+
84
+ // Forward declarations.
85
+
86
+ class AssertionResult; // Result of an assertion.
87
+ class Message; // Represents a failure message.
88
+ class Test; // Represents a test.
89
+ class TestInfo; // Information about a test.
90
+ class TestPartResult; // Result of a test part.
91
+ class UnitTest; // A collection of test cases.
92
+
93
+ template <typename T>
94
+ ::std::string PrintToString(const T& value);
95
+
96
+ namespace internal {
97
+
98
+ struct TraceInfo; // Information about a trace point.
99
+ class ScopedTrace; // Implements scoped trace.
100
+ class TestInfoImpl; // Opaque implementation of TestInfo
101
+ class UnitTestImpl; // Opaque implementation of UnitTest
102
+
103
+ // The text used in failure messages to indicate the start of the
104
+ // stack trace.
105
+ GTEST_API_ extern const char kStackTraceMarker[];
106
+
107
+ // Two overloaded helpers for checking at compile time whether an
108
+ // expression is a null pointer literal (i.e. NULL or any 0-valued
109
+ // compile-time integral constant). Their return values have
110
+ // different sizes, so we can use sizeof() to test which version is
111
+ // picked by the compiler. These helpers have no implementations, as
112
+ // we only need their signatures.
113
+ //
114
+ // Given IsNullLiteralHelper(x), the compiler will pick the first
115
+ // version if x can be implicitly converted to Secret*, and pick the
116
+ // second version otherwise. Since Secret is a secret and incomplete
117
+ // type, the only expression a user can write that has type Secret* is
118
+ // a null pointer literal. Therefore, we know that x is a null
119
+ // pointer literal if and only if the first version is picked by the
120
+ // compiler.
121
+ char IsNullLiteralHelper(Secret* p);
122
+ char (&IsNullLiteralHelper(...))[2]; // NOLINT
123
+
124
+ // A compile-time bool constant that is true if and only if x is a
125
+ // null pointer literal (i.e. NULL or any 0-valued compile-time
126
+ // integral constant).
127
+ #ifdef GTEST_ELLIPSIS_NEEDS_POD_
128
+ // We lose support for NULL detection where the compiler doesn't like
129
+ // passing non-POD classes through ellipsis (...).
130
+ # define GTEST_IS_NULL_LITERAL_(x) false
131
+ #else
132
+ # define GTEST_IS_NULL_LITERAL_(x) \
133
+ (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
134
+ #endif // GTEST_ELLIPSIS_NEEDS_POD_
135
+
136
+ // Appends the user-supplied message to the Google-Test-generated message.
137
+ GTEST_API_ std::string AppendUserMessage(
138
+ const std::string& gtest_msg, const Message& user_msg);
139
+
140
+ #if GTEST_HAS_EXCEPTIONS
141
+
142
+ // This exception is thrown by (and only by) a failed Google Test
143
+ // assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions
144
+ // are enabled). We derive it from std::runtime_error, which is for
145
+ // errors presumably detectable only at run time. Since
146
+ // std::runtime_error inherits from std::exception, many testing
147
+ // frameworks know how to extract and print the message inside it.
148
+ class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error {
149
+ public:
150
+ explicit GoogleTestFailureException(const TestPartResult& failure);
151
+ };
152
+
153
+ #endif // GTEST_HAS_EXCEPTIONS
154
+
155
+ // A helper class for creating scoped traces in user programs.
156
+ class GTEST_API_ ScopedTrace {
157
+ public:
158
+ // The c'tor pushes the given source file location and message onto
159
+ // a trace stack maintained by Google Test.
160
+ ScopedTrace(const char* file, int line, const Message& message);
161
+
162
+ // The d'tor pops the info pushed by the c'tor.
163
+ //
164
+ // Note that the d'tor is not virtual in order to be efficient.
165
+ // Don't inherit from ScopedTrace!
166
+ ~ScopedTrace();
167
+
168
+ private:
169
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);
170
+ } GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its
171
+ // c'tor and d'tor. Therefore it doesn't
172
+ // need to be used otherwise.
173
+
174
+ namespace edit_distance {
175
+ // Returns the optimal edits to go from 'left' to 'right'.
176
+ // All edits cost the same, with replace having lower priority than
177
+ // add/remove.
178
+ // Simple implementation of the Wagner–Fischer algorithm.
179
+ // See http://en.wikipedia.org/wiki/Wagner-Fischer_algorithm
180
+ enum EditType { kMatch, kAdd, kRemove, kReplace };
181
+ GTEST_API_ std::vector<EditType> CalculateOptimalEdits(
182
+ const std::vector<size_t>& left, const std::vector<size_t>& right);
183
+
184
+ // Same as above, but the input is represented as strings.
185
+ GTEST_API_ std::vector<EditType> CalculateOptimalEdits(
186
+ const std::vector<std::string>& left,
187
+ const std::vector<std::string>& right);
188
+
189
+ // Create a diff of the input strings in Unified diff format.
190
+ GTEST_API_ std::string CreateUnifiedDiff(const std::vector<std::string>& left,
191
+ const std::vector<std::string>& right,
192
+ size_t context = 2);
193
+
194
+ } // namespace edit_distance
195
+
196
+ // Calculate the diff between 'left' and 'right' and return it in unified diff
197
+ // format.
198
+ // If not null, stores in 'total_line_count' the total number of lines found
199
+ // in left + right.
200
+ GTEST_API_ std::string DiffStrings(const std::string& left,
201
+ const std::string& right,
202
+ size_t* total_line_count);
203
+
204
+ // Constructs and returns the message for an equality assertion
205
+ // (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
206
+ //
207
+ // The first four parameters are the expressions used in the assertion
208
+ // and their values, as strings. For example, for ASSERT_EQ(foo, bar)
209
+ // where foo is 5 and bar is 6, we have:
210
+ //
211
+ // expected_expression: "foo"
212
+ // actual_expression: "bar"
213
+ // expected_value: "5"
214
+ // actual_value: "6"
215
+ //
216
+ // The ignoring_case parameter is true iff the assertion is a
217
+ // *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
218
+ // be inserted into the message.
219
+ GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
220
+ const char* actual_expression,
221
+ const std::string& expected_value,
222
+ const std::string& actual_value,
223
+ bool ignoring_case);
224
+
225
+ // Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
226
+ GTEST_API_ std::string GetBoolAssertionFailureMessage(
227
+ const AssertionResult& assertion_result,
228
+ const char* expression_text,
229
+ const char* actual_predicate_value,
230
+ const char* expected_predicate_value);
231
+
232
+ // This template class represents an IEEE floating-point number
233
+ // (either single-precision or double-precision, depending on the
234
+ // template parameters).
235
+ //
236
+ // The purpose of this class is to do more sophisticated number
237
+ // comparison. (Due to round-off error, etc, it's very unlikely that
238
+ // two floating-points will be equal exactly. Hence a naive
239
+ // comparison by the == operation often doesn't work.)
240
+ //
241
+ // Format of IEEE floating-point:
242
+ //
243
+ // The most-significant bit being the leftmost, an IEEE
244
+ // floating-point looks like
245
+ //
246
+ // sign_bit exponent_bits fraction_bits
247
+ //
248
+ // Here, sign_bit is a single bit that designates the sign of the
249
+ // number.
250
+ //
251
+ // For float, there are 8 exponent bits and 23 fraction bits.
252
+ //
253
+ // For double, there are 11 exponent bits and 52 fraction bits.
254
+ //
255
+ // More details can be found at
256
+ // http://en.wikipedia.org/wiki/IEEE_floating-point_standard.
257
+ //
258
+ // Template parameter:
259
+ //
260
+ // RawType: the raw floating-point type (either float or double)
261
+ template <typename RawType>
262
+ class FloatingPoint {
263
+ public:
264
+ // Defines the unsigned integer type that has the same size as the
265
+ // floating point number.
266
+ typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;
267
+
268
+ // Constants.
269
+
270
+ // # of bits in a number.
271
+ static const size_t kBitCount = 8*sizeof(RawType);
272
+
273
+ // # of fraction bits in a number.
274
+ static const size_t kFractionBitCount =
275
+ std::numeric_limits<RawType>::digits - 1;
276
+
277
+ // # of exponent bits in a number.
278
+ static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;
279
+
280
+ // The mask for the sign bit.
281
+ static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);
282
+
283
+ // The mask for the fraction bits.
284
+ static const Bits kFractionBitMask =
285
+ ~static_cast<Bits>(0) >> (kExponentBitCount + 1);
286
+
287
+ // The mask for the exponent bits.
288
+ static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);
289
+
290
+ // How many ULP's (Units in the Last Place) we want to tolerate when
291
+ // comparing two numbers. The larger the value, the more error we
292
+ // allow. A 0 value means that two numbers must be exactly the same
293
+ // to be considered equal.
294
+ //
295
+ // The maximum error of a single floating-point operation is 0.5
296
+ // units in the last place. On Intel CPU's, all floating-point
297
+ // calculations are done with 80-bit precision, while double has 64
298
+ // bits. Therefore, 4 should be enough for ordinary use.
299
+ //
300
+ // See the following article for more details on ULP:
301
+ // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
302
+ static const size_t kMaxUlps = 4;
303
+
304
+ // Constructs a FloatingPoint from a raw floating-point number.
305
+ //
306
+ // On an Intel CPU, passing a non-normalized NAN (Not a Number)
307
+ // around may change its bits, although the new value is guaranteed
308
+ // to be also a NAN. Therefore, don't expect this constructor to
309
+ // preserve the bits in x when x is a NAN.
310
+ explicit FloatingPoint(const RawType& x) { u_.value_ = x; }
311
+
312
+ // Static methods
313
+
314
+ // Reinterprets a bit pattern as a floating-point number.
315
+ //
316
+ // This function is needed to test the AlmostEquals() method.
317
+ static RawType ReinterpretBits(const Bits bits) {
318
+ FloatingPoint fp(0);
319
+ fp.u_.bits_ = bits;
320
+ return fp.u_.value_;
321
+ }
322
+
323
+ // Returns the floating-point number that represent positive infinity.
324
+ static RawType Infinity() {
325
+ return ReinterpretBits(kExponentBitMask);
326
+ }
327
+
328
+ // Returns the maximum representable finite floating-point number.
329
+ static RawType Max();
330
+
331
+ // Non-static methods
332
+
333
+ // Returns the bits that represents this number.
334
+ const Bits &bits() const { return u_.bits_; }
335
+
336
+ // Returns the exponent bits of this number.
337
+ Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
338
+
339
+ // Returns the fraction bits of this number.
340
+ Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }
341
+
342
+ // Returns the sign bit of this number.
343
+ Bits sign_bit() const { return kSignBitMask & u_.bits_; }
344
+
345
+ // Returns true iff this is NAN (not a number).
346
+ bool is_nan() const {
347
+ // It's a NAN if the exponent bits are all ones and the fraction
348
+ // bits are not entirely zeros.
349
+ return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
350
+ }
351
+
352
+ // Returns true iff this number is at most kMaxUlps ULP's away from
353
+ // rhs. In particular, this function:
354
+ //
355
+ // - returns false if either number is (or both are) NAN.
356
+ // - treats really large numbers as almost equal to infinity.
357
+ // - thinks +0.0 and -0.0 are 0 DLP's apart.
358
+ bool AlmostEquals(const FloatingPoint& rhs) const {
359
+ // The IEEE standard says that any comparison operation involving
360
+ // a NAN must return false.
361
+ if (is_nan() || rhs.is_nan()) return false;
362
+
363
+ return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)
364
+ <= kMaxUlps;
365
+ }
366
+
367
+ private:
368
+ // The data type used to store the actual floating-point number.
369
+ union FloatingPointUnion {
370
+ RawType value_; // The raw floating-point number.
371
+ Bits bits_; // The bits that represent the number.
372
+ };
373
+
374
+ // Converts an integer from the sign-and-magnitude representation to
375
+ // the biased representation. More precisely, let N be 2 to the
376
+ // power of (kBitCount - 1), an integer x is represented by the
377
+ // unsigned number x + N.
378
+ //
379
+ // For instance,
380
+ //
381
+ // -N + 1 (the most negative number representable using
382
+ // sign-and-magnitude) is represented by 1;
383
+ // 0 is represented by N; and
384
+ // N - 1 (the biggest number representable using
385
+ // sign-and-magnitude) is represented by 2N - 1.
386
+ //
387
+ // Read http://en.wikipedia.org/wiki/Signed_number_representations
388
+ // for more details on signed number representations.
389
+ static Bits SignAndMagnitudeToBiased(const Bits &sam) {
390
+ if (kSignBitMask & sam) {
391
+ // sam represents a negative number.
392
+ return ~sam + 1;
393
+ } else {
394
+ // sam represents a positive number.
395
+ return kSignBitMask | sam;
396
+ }
397
+ }
398
+
399
+ // Given two numbers in the sign-and-magnitude representation,
400
+ // returns the distance between them as an unsigned number.
401
+ static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1,
402
+ const Bits &sam2) {
403
+ const Bits biased1 = SignAndMagnitudeToBiased(sam1);
404
+ const Bits biased2 = SignAndMagnitudeToBiased(sam2);
405
+ return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
406
+ }
407
+
408
+ FloatingPointUnion u_;
409
+ };
410
+
411
+ // We cannot use std::numeric_limits<T>::max() as it clashes with the max()
412
+ // macro defined by <windows.h>.
413
+ template <>
414
+ inline float FloatingPoint<float>::Max() { return FLT_MAX; }
415
+ template <>
416
+ inline double FloatingPoint<double>::Max() { return DBL_MAX; }
417
+
418
+ // Typedefs the instances of the FloatingPoint template class that we
419
+ // care to use.
420
+ typedef FloatingPoint<float> Float;
421
+ typedef FloatingPoint<double> Double;
422
+
423
+ // In order to catch the mistake of putting tests that use different
424
+ // test fixture classes in the same test case, we need to assign
425
+ // unique IDs to fixture classes and compare them. The TypeId type is
426
+ // used to hold such IDs. The user should treat TypeId as an opaque
427
+ // type: the only operation allowed on TypeId values is to compare
428
+ // them for equality using the == operator.
429
+ typedef const void* TypeId;
430
+
431
+ template <typename T>
432
+ class TypeIdHelper {
433
+ public:
434
+ // dummy_ must not have a const type. Otherwise an overly eager
435
+ // compiler (e.g. MSVC 7.1 & 8.0) may try to merge
436
+ // TypeIdHelper<T>::dummy_ for different Ts as an "optimization".
437
+ static bool dummy_;
438
+ };
439
+
440
+ template <typename T>
441
+ bool TypeIdHelper<T>::dummy_ = false;
442
+
443
+ // GetTypeId<T>() returns the ID of type T. Different values will be
444
+ // returned for different types. Calling the function twice with the
445
+ // same type argument is guaranteed to return the same ID.
446
+ template <typename T>
447
+ TypeId GetTypeId() {
448
+ // The compiler is required to allocate a different
449
+ // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
450
+ // the template. Therefore, the address of dummy_ is guaranteed to
451
+ // be unique.
452
+ return &(TypeIdHelper<T>::dummy_);
453
+ }
454
+
455
+ // Returns the type ID of ::testing::Test. Always call this instead
456
+ // of GetTypeId< ::testing::Test>() to get the type ID of
457
+ // ::testing::Test, as the latter may give the wrong result due to a
458
+ // suspected linker bug when compiling Google Test as a Mac OS X
459
+ // framework.
460
+ GTEST_API_ TypeId GetTestTypeId();
461
+
462
+ // Defines the abstract factory interface that creates instances
463
+ // of a Test object.
464
+ class TestFactoryBase {
465
+ public:
466
+ virtual ~TestFactoryBase() {}
467
+
468
+ // Creates a test instance to run. The instance is both created and destroyed
469
+ // within TestInfoImpl::Run()
470
+ virtual Test* CreateTest() = 0;
471
+
472
+ protected:
473
+ TestFactoryBase() {}
474
+
475
+ private:
476
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase);
477
+ };
478
+
479
+ // This class provides implementation of TeastFactoryBase interface.
480
+ // It is used in TEST and TEST_F macros.
481
+ template <class TestClass>
482
+ class TestFactoryImpl : public TestFactoryBase {
483
+ public:
484
+ virtual Test* CreateTest() { return new TestClass; }
485
+ };
486
+
487
+ #if GTEST_OS_WINDOWS
488
+
489
+ // Predicate-formatters for implementing the HRESULT checking macros
490
+ // {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}
491
+ // We pass a long instead of HRESULT to avoid causing an
492
+ // include dependency for the HRESULT type.
493
+ GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,
494
+ long hr); // NOLINT
495
+ GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,
496
+ long hr); // NOLINT
497
+
498
+ #endif // GTEST_OS_WINDOWS
499
+
500
+ // Types of SetUpTestCase() and TearDownTestCase() functions.
501
+ typedef void (*SetUpTestCaseFunc)();
502
+ typedef void (*TearDownTestCaseFunc)();
503
+
504
+ struct CodeLocation {
505
+ CodeLocation(const string& a_file, int a_line) : file(a_file), line(a_line) {}
506
+
507
+ string file;
508
+ int line;
509
+ };
510
+
511
+ // Creates a new TestInfo object and registers it with Google Test;
512
+ // returns the created object.
513
+ //
514
+ // Arguments:
515
+ //
516
+ // test_case_name: name of the test case
517
+ // name: name of the test
518
+ // type_param the name of the test's type parameter, or NULL if
519
+ // this is not a typed or a type-parameterized test.
520
+ // value_param text representation of the test's value parameter,
521
+ // or NULL if this is not a type-parameterized test.
522
+ // code_location: code location where the test is defined
523
+ // fixture_class_id: ID of the test fixture class
524
+ // set_up_tc: pointer to the function that sets up the test case
525
+ // tear_down_tc: pointer to the function that tears down the test case
526
+ // factory: pointer to the factory that creates a test object.
527
+ // The newly created TestInfo instance will assume
528
+ // ownership of the factory object.
529
+ GTEST_API_ TestInfo* MakeAndRegisterTestInfo(
530
+ const char* test_case_name,
531
+ const char* name,
532
+ const char* type_param,
533
+ const char* value_param,
534
+ CodeLocation code_location,
535
+ TypeId fixture_class_id,
536
+ SetUpTestCaseFunc set_up_tc,
537
+ TearDownTestCaseFunc tear_down_tc,
538
+ TestFactoryBase* factory);
539
+
540
+ // If *pstr starts with the given prefix, modifies *pstr to be right
541
+ // past the prefix and returns true; otherwise leaves *pstr unchanged
542
+ // and returns false. None of pstr, *pstr, and prefix can be NULL.
543
+ GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);
544
+
545
+ #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
546
+
547
+ // State of the definition of a type-parameterized test case.
548
+ class GTEST_API_ TypedTestCasePState {
549
+ public:
550
+ TypedTestCasePState() : registered_(false) {}
551
+
552
+ // Adds the given test name to defined_test_names_ and return true
553
+ // if the test case hasn't been registered; otherwise aborts the
554
+ // program.
555
+ bool AddTestName(const char* file, int line, const char* case_name,
556
+ const char* test_name) {
557
+ if (registered_) {
558
+ fprintf(stderr, "%s Test %s must be defined before "
559
+ "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n",
560
+ FormatFileLocation(file, line).c_str(), test_name, case_name);
561
+ fflush(stderr);
562
+ posix::Abort();
563
+ }
564
+ registered_tests_.insert(
565
+ ::std::make_pair(test_name, CodeLocation(file, line)));
566
+ return true;
567
+ }
568
+
569
+ bool TestExists(const std::string& test_name) const {
570
+ return registered_tests_.count(test_name) > 0;
571
+ }
572
+
573
+ const CodeLocation& GetCodeLocation(const std::string& test_name) const {
574
+ RegisteredTestsMap::const_iterator it = registered_tests_.find(test_name);
575
+ GTEST_CHECK_(it != registered_tests_.end());
576
+ return it->second;
577
+ }
578
+
579
+ // Verifies that registered_tests match the test names in
580
+ // defined_test_names_; returns registered_tests if successful, or
581
+ // aborts the program otherwise.
582
+ const char* VerifyRegisteredTestNames(
583
+ const char* file, int line, const char* registered_tests);
584
+
585
+ private:
586
+ typedef ::std::map<std::string, CodeLocation> RegisteredTestsMap;
587
+
588
+ bool registered_;
589
+ RegisteredTestsMap registered_tests_;
590
+ };
591
+
592
+ // Skips to the first non-space char after the first comma in 'str';
593
+ // returns NULL if no comma is found in 'str'.
594
+ inline const char* SkipComma(const char* str) {
595
+ const char* comma = strchr(str, ',');
596
+ if (comma == NULL) {
597
+ return NULL;
598
+ }
599
+ while (IsSpace(*(++comma))) {}
600
+ return comma;
601
+ }
602
+
603
+ // Returns the prefix of 'str' before the first comma in it; returns
604
+ // the entire string if it contains no comma.
605
+ inline std::string GetPrefixUntilComma(const char* str) {
606
+ const char* comma = strchr(str, ',');
607
+ return comma == NULL ? str : std::string(str, comma);
608
+ }
609
+
610
+ // Splits a given string on a given delimiter, populating a given
611
+ // vector with the fields.
612
+ void SplitString(const ::std::string& str, char delimiter,
613
+ ::std::vector< ::std::string>* dest);
614
+
615
+ // TypeParameterizedTest<Fixture, TestSel, Types>::Register()
616
+ // registers a list of type-parameterized tests with Google Test. The
617
+ // return value is insignificant - we just need to return something
618
+ // such that we can call this function in a namespace scope.
619
+ //
620
+ // Implementation note: The GTEST_TEMPLATE_ macro declares a template
621
+ // template parameter. It's defined in gtest-type-util.h.
622
+ template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>
623
+ class TypeParameterizedTest {
624
+ public:
625
+ // 'index' is the index of the test in the type list 'Types'
626
+ // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase,
627
+ // Types). Valid values for 'index' are [0, N - 1] where N is the
628
+ // length of Types.
629
+ static bool Register(const char* prefix,
630
+ CodeLocation code_location,
631
+ const char* case_name, const char* test_names,
632
+ int index) {
633
+ typedef typename Types::Head Type;
634
+ typedef Fixture<Type> FixtureClass;
635
+ typedef typename GTEST_BIND_(TestSel, Type) TestClass;
636
+
637
+ // First, registers the first type-parameterized test in the type
638
+ // list.
639
+ MakeAndRegisterTestInfo(
640
+ (std::string(prefix) + (prefix[0] == '\0' ? "" : "/") + case_name + "/"
641
+ + StreamableToString(index)).c_str(),
642
+ StripTrailingSpaces(GetPrefixUntilComma(test_names)).c_str(),
643
+ GetTypeName<Type>().c_str(),
644
+ NULL, // No value parameter.
645
+ code_location,
646
+ GetTypeId<FixtureClass>(),
647
+ TestClass::SetUpTestCase,
648
+ TestClass::TearDownTestCase,
649
+ new TestFactoryImpl<TestClass>);
650
+
651
+ // Next, recurses (at compile time) with the tail of the type list.
652
+ return TypeParameterizedTest<Fixture, TestSel, typename Types::Tail>
653
+ ::Register(prefix, code_location, case_name, test_names, index + 1);
654
+ }
655
+ };
656
+
657
+ // The base case for the compile time recursion.
658
+ template <GTEST_TEMPLATE_ Fixture, class TestSel>
659
+ class TypeParameterizedTest<Fixture, TestSel, Types0> {
660
+ public:
661
+ static bool Register(const char* /*prefix*/, CodeLocation,
662
+ const char* /*case_name*/, const char* /*test_names*/,
663
+ int /*index*/) {
664
+ return true;
665
+ }
666
+ };
667
+
668
+ // TypeParameterizedTestCase<Fixture, Tests, Types>::Register()
669
+ // registers *all combinations* of 'Tests' and 'Types' with Google
670
+ // Test. The return value is insignificant - we just need to return
671
+ // something such that we can call this function in a namespace scope.
672
+ template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
673
+ class TypeParameterizedTestCase {
674
+ public:
675
+ static bool Register(const char* prefix, CodeLocation code_location,
676
+ const TypedTestCasePState* state,
677
+ const char* case_name, const char* test_names) {
678
+ std::string test_name = StripTrailingSpaces(
679
+ GetPrefixUntilComma(test_names));
680
+ if (!state->TestExists(test_name)) {
681
+ fprintf(stderr, "Failed to get code location for test %s.%s at %s.",
682
+ case_name, test_name.c_str(),
683
+ FormatFileLocation(code_location.file.c_str(),
684
+ code_location.line).c_str());
685
+ fflush(stderr);
686
+ posix::Abort();
687
+ }
688
+ const CodeLocation& test_location = state->GetCodeLocation(test_name);
689
+
690
+ typedef typename Tests::Head Head;
691
+
692
+ // First, register the first test in 'Test' for each type in 'Types'.
693
+ TypeParameterizedTest<Fixture, Head, Types>::Register(
694
+ prefix, test_location, case_name, test_names, 0);
695
+
696
+ // Next, recurses (at compile time) with the tail of the test list.
697
+ return TypeParameterizedTestCase<Fixture, typename Tests::Tail, Types>
698
+ ::Register(prefix, code_location, state,
699
+ case_name, SkipComma(test_names));
700
+ }
701
+ };
702
+
703
+ // The base case for the compile time recursion.
704
+ template <GTEST_TEMPLATE_ Fixture, typename Types>
705
+ class TypeParameterizedTestCase<Fixture, Templates0, Types> {
706
+ public:
707
+ static bool Register(const char* /*prefix*/, CodeLocation,
708
+ const TypedTestCasePState* /*state*/,
709
+ const char* /*case_name*/, const char* /*test_names*/) {
710
+ return true;
711
+ }
712
+ };
713
+
714
+ #endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
715
+
716
+ // Returns the current OS stack trace as an std::string.
717
+ //
718
+ // The maximum number of stack frames to be included is specified by
719
+ // the gtest_stack_trace_depth flag. The skip_count parameter
720
+ // specifies the number of top frames to be skipped, which doesn't
721
+ // count against the number of frames to be included.
722
+ //
723
+ // For example, if Foo() calls Bar(), which in turn calls
724
+ // GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
725
+ // the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
726
+ GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(
727
+ UnitTest* unit_test, int skip_count);
728
+
729
+ // Helpers for suppressing warnings on unreachable code or constant
730
+ // condition.
731
+
732
+ // Always returns true.
733
+ GTEST_API_ bool AlwaysTrue();
734
+
735
+ // Always returns false.
736
+ inline bool AlwaysFalse() { return !AlwaysTrue(); }
737
+
738
+ // Helper for suppressing false warning from Clang on a const char*
739
+ // variable declared in a conditional expression always being NULL in
740
+ // the else branch.
741
+ struct GTEST_API_ ConstCharPtr {
742
+ ConstCharPtr(const char* str) : value(str) {}
743
+ operator bool() const { return true; }
744
+ const char* value;
745
+ };
746
+
747
+ // A simple Linear Congruential Generator for generating random
748
+ // numbers with a uniform distribution. Unlike rand() and srand(), it
749
+ // doesn't use global state (and therefore can't interfere with user
750
+ // code). Unlike rand_r(), it's portable. An LCG isn't very random,
751
+ // but it's good enough for our purposes.
752
+ class GTEST_API_ Random {
753
+ public:
754
+ static const UInt32 kMaxRange = 1u << 31;
755
+
756
+ explicit Random(UInt32 seed) : state_(seed) {}
757
+
758
+ void Reseed(UInt32 seed) { state_ = seed; }
759
+
760
+ // Generates a random number from [0, range). Crashes if 'range' is
761
+ // 0 or greater than kMaxRange.
762
+ UInt32 Generate(UInt32 range);
763
+
764
+ private:
765
+ UInt32 state_;
766
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);
767
+ };
768
+
769
+ // Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a
770
+ // compiler error iff T1 and T2 are different types.
771
+ template <typename T1, typename T2>
772
+ struct CompileAssertTypesEqual;
773
+
774
+ template <typename T>
775
+ struct CompileAssertTypesEqual<T, T> {
776
+ };
777
+
778
+ // Removes the reference from a type if it is a reference type,
779
+ // otherwise leaves it unchanged. This is the same as
780
+ // tr1::remove_reference, which is not widely available yet.
781
+ template <typename T>
782
+ struct RemoveReference { typedef T type; }; // NOLINT
783
+ template <typename T>
784
+ struct RemoveReference<T&> { typedef T type; }; // NOLINT
785
+
786
+ // A handy wrapper around RemoveReference that works when the argument
787
+ // T depends on template parameters.
788
+ #define GTEST_REMOVE_REFERENCE_(T) \
789
+ typename ::testing::internal::RemoveReference<T>::type
790
+
791
+ // Removes const from a type if it is a const type, otherwise leaves
792
+ // it unchanged. This is the same as tr1::remove_const, which is not
793
+ // widely available yet.
794
+ template <typename T>
795
+ struct RemoveConst { typedef T type; }; // NOLINT
796
+ template <typename T>
797
+ struct RemoveConst<const T> { typedef T type; }; // NOLINT
798
+
799
+ // MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above
800
+ // definition to fail to remove the const in 'const int[3]' and 'const
801
+ // char[3][4]'. The following specialization works around the bug.
802
+ template <typename T, size_t N>
803
+ struct RemoveConst<const T[N]> {
804
+ typedef typename RemoveConst<T>::type type[N];
805
+ };
806
+
807
+ #if defined(_MSC_VER) && _MSC_VER < 1400
808
+ // This is the only specialization that allows VC++ 7.1 to remove const in
809
+ // 'const int[3] and 'const int[3][4]'. However, it causes trouble with GCC
810
+ // and thus needs to be conditionally compiled.
811
+ template <typename T, size_t N>
812
+ struct RemoveConst<T[N]> {
813
+ typedef typename RemoveConst<T>::type type[N];
814
+ };
815
+ #endif
816
+
817
+ // A handy wrapper around RemoveConst that works when the argument
818
+ // T depends on template parameters.
819
+ #define GTEST_REMOVE_CONST_(T) \
820
+ typename ::testing::internal::RemoveConst<T>::type
821
+
822
+ // Turns const U&, U&, const U, and U all into U.
823
+ #define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
824
+ GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
825
+
826
+ // Adds reference to a type if it is not a reference type,
827
+ // otherwise leaves it unchanged. This is the same as
828
+ // tr1::add_reference, which is not widely available yet.
829
+ template <typename T>
830
+ struct AddReference { typedef T& type; }; // NOLINT
831
+ template <typename T>
832
+ struct AddReference<T&> { typedef T& type; }; // NOLINT
833
+
834
+ // A handy wrapper around AddReference that works when the argument T
835
+ // depends on template parameters.
836
+ #define GTEST_ADD_REFERENCE_(T) \
837
+ typename ::testing::internal::AddReference<T>::type
838
+
839
+ // Adds a reference to const on top of T as necessary. For example,
840
+ // it transforms
841
+ //
842
+ // char ==> const char&
843
+ // const char ==> const char&
844
+ // char& ==> const char&
845
+ // const char& ==> const char&
846
+ //
847
+ // The argument T must depend on some template parameters.
848
+ #define GTEST_REFERENCE_TO_CONST_(T) \
849
+ GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))
850
+
851
+ // ImplicitlyConvertible<From, To>::value is a compile-time bool
852
+ // constant that's true iff type From can be implicitly converted to
853
+ // type To.
854
+ template <typename From, typename To>
855
+ class ImplicitlyConvertible {
856
+ private:
857
+ // We need the following helper functions only for their types.
858
+ // They have no implementations.
859
+
860
+ // MakeFrom() is an expression whose type is From. We cannot simply
861
+ // use From(), as the type From may not have a public default
862
+ // constructor.
863
+ static typename AddReference<From>::type MakeFrom();
864
+
865
+ // These two functions are overloaded. Given an expression
866
+ // Helper(x), the compiler will pick the first version if x can be
867
+ // implicitly converted to type To; otherwise it will pick the
868
+ // second version.
869
+ //
870
+ // The first version returns a value of size 1, and the second
871
+ // version returns a value of size 2. Therefore, by checking the
872
+ // size of Helper(x), which can be done at compile time, we can tell
873
+ // which version of Helper() is used, and hence whether x can be
874
+ // implicitly converted to type To.
875
+ static char Helper(To);
876
+ static char (&Helper(...))[2]; // NOLINT
877
+
878
+ // We have to put the 'public' section after the 'private' section,
879
+ // or MSVC refuses to compile the code.
880
+ public:
881
+ #if defined(__BORLANDC__)
882
+ // C++Builder cannot use member overload resolution during template
883
+ // instantiation. The simplest workaround is to use its C++0x type traits
884
+ // functions (C++Builder 2009 and above only).
885
+ static const bool value = __is_convertible(From, To);
886
+ #else
887
+ // MSVC warns about implicitly converting from double to int for
888
+ // possible loss of data, so we need to temporarily disable the
889
+ // warning.
890
+ GTEST_DISABLE_MSC_WARNINGS_PUSH_(4244)
891
+ static const bool value =
892
+ sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
893
+ GTEST_DISABLE_MSC_WARNINGS_POP_()
894
+ #endif // __BORLANDC__
895
+ };
896
+ template <typename From, typename To>
897
+ const bool ImplicitlyConvertible<From, To>::value;
898
+
899
+ // IsAProtocolMessage<T>::value is a compile-time bool constant that's
900
+ // true iff T is type ProtocolMessage, proto2::Message, or a subclass
901
+ // of those.
902
+ template <typename T>
903
+ struct IsAProtocolMessage
904
+ : public bool_constant<
905
+ ImplicitlyConvertible<const T*, const ::ProtocolMessage*>::value ||
906
+ ImplicitlyConvertible<const T*, const ::proto2::Message*>::value> {
907
+ };
908
+
909
+ // When the compiler sees expression IsContainerTest<C>(0), if C is an
910
+ // STL-style container class, the first overload of IsContainerTest
911
+ // will be viable (since both C::iterator* and C::const_iterator* are
912
+ // valid types and NULL can be implicitly converted to them). It will
913
+ // be picked over the second overload as 'int' is a perfect match for
914
+ // the type of argument 0. If C::iterator or C::const_iterator is not
915
+ // a valid type, the first overload is not viable, and the second
916
+ // overload will be picked. Therefore, we can determine whether C is
917
+ // a container class by checking the type of IsContainerTest<C>(0).
918
+ // The value of the expression is insignificant.
919
+ //
920
+ // Note that we look for both C::iterator and C::const_iterator. The
921
+ // reason is that C++ injects the name of a class as a member of the
922
+ // class itself (e.g. you can refer to class iterator as either
923
+ // 'iterator' or 'iterator::iterator'). If we look for C::iterator
924
+ // only, for example, we would mistakenly think that a class named
925
+ // iterator is an STL container.
926
+ //
927
+ // Also note that the simpler approach of overloading
928
+ // IsContainerTest(typename C::const_iterator*) and
929
+ // IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.
930
+ typedef int IsContainer;
931
+ template <class C>
932
+ IsContainer IsContainerTest(int /* dummy */,
933
+ typename C::iterator* /* it */ = NULL,
934
+ typename C::const_iterator* /* const_it */ = NULL) {
935
+ return 0;
936
+ }
937
+
938
+ typedef char IsNotContainer;
939
+ template <class C>
940
+ IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; }
941
+
942
+ // EnableIf<condition>::type is void when 'Cond' is true, and
943
+ // undefined when 'Cond' is false. To use SFINAE to make a function
944
+ // overload only apply when a particular expression is true, add
945
+ // "typename EnableIf<expression>::type* = 0" as the last parameter.
946
+ template<bool> struct EnableIf;
947
+ template<> struct EnableIf<true> { typedef void type; }; // NOLINT
948
+
949
+ // Utilities for native arrays.
950
+
951
+ // ArrayEq() compares two k-dimensional native arrays using the
952
+ // elements' operator==, where k can be any integer >= 0. When k is
953
+ // 0, ArrayEq() degenerates into comparing a single pair of values.
954
+
955
+ template <typename T, typename U>
956
+ bool ArrayEq(const T* lhs, size_t size, const U* rhs);
957
+
958
+ // This generic version is used when k is 0.
959
+ template <typename T, typename U>
960
+ inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; }
961
+
962
+ // This overload is used when k >= 1.
963
+ template <typename T, typename U, size_t N>
964
+ inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) {
965
+ return internal::ArrayEq(lhs, N, rhs);
966
+ }
967
+
968
+ // This helper reduces code bloat. If we instead put its logic inside
969
+ // the previous ArrayEq() function, arrays with different sizes would
970
+ // lead to different copies of the template code.
971
+ template <typename T, typename U>
972
+ bool ArrayEq(const T* lhs, size_t size, const U* rhs) {
973
+ for (size_t i = 0; i != size; i++) {
974
+ if (!internal::ArrayEq(lhs[i], rhs[i]))
975
+ return false;
976
+ }
977
+ return true;
978
+ }
979
+
980
+ // Finds the first element in the iterator range [begin, end) that
981
+ // equals elem. Element may be a native array type itself.
982
+ template <typename Iter, typename Element>
983
+ Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {
984
+ for (Iter it = begin; it != end; ++it) {
985
+ if (internal::ArrayEq(*it, elem))
986
+ return it;
987
+ }
988
+ return end;
989
+ }
990
+
991
+ // CopyArray() copies a k-dimensional native array using the elements'
992
+ // operator=, where k can be any integer >= 0. When k is 0,
993
+ // CopyArray() degenerates into copying a single value.
994
+
995
+ template <typename T, typename U>
996
+ void CopyArray(const T* from, size_t size, U* to);
997
+
998
+ // This generic version is used when k is 0.
999
+ template <typename T, typename U>
1000
+ inline void CopyArray(const T& from, U* to) { *to = from; }
1001
+
1002
+ // This overload is used when k >= 1.
1003
+ template <typename T, typename U, size_t N>
1004
+ inline void CopyArray(const T(&from)[N], U(*to)[N]) {
1005
+ internal::CopyArray(from, N, *to);
1006
+ }
1007
+
1008
+ // This helper reduces code bloat. If we instead put its logic inside
1009
+ // the previous CopyArray() function, arrays with different sizes
1010
+ // would lead to different copies of the template code.
1011
+ template <typename T, typename U>
1012
+ void CopyArray(const T* from, size_t size, U* to) {
1013
+ for (size_t i = 0; i != size; i++) {
1014
+ internal::CopyArray(from[i], to + i);
1015
+ }
1016
+ }
1017
+
1018
+ // The relation between an NativeArray object (see below) and the
1019
+ // native array it represents.
1020
+ // We use 2 different structs to allow non-copyable types to be used, as long
1021
+ // as RelationToSourceReference() is passed.
1022
+ struct RelationToSourceReference {};
1023
+ struct RelationToSourceCopy {};
1024
+
1025
+ // Adapts a native array to a read-only STL-style container. Instead
1026
+ // of the complete STL container concept, this adaptor only implements
1027
+ // members useful for Google Mock's container matchers. New members
1028
+ // should be added as needed. To simplify the implementation, we only
1029
+ // support Element being a raw type (i.e. having no top-level const or
1030
+ // reference modifier). It's the client's responsibility to satisfy
1031
+ // this requirement. Element can be an array type itself (hence
1032
+ // multi-dimensional arrays are supported).
1033
+ template <typename Element>
1034
+ class NativeArray {
1035
+ public:
1036
+ // STL-style container typedefs.
1037
+ typedef Element value_type;
1038
+ typedef Element* iterator;
1039
+ typedef const Element* const_iterator;
1040
+
1041
+ // Constructs from a native array. References the source.
1042
+ NativeArray(const Element* array, size_t count, RelationToSourceReference) {
1043
+ InitRef(array, count);
1044
+ }
1045
+
1046
+ // Constructs from a native array. Copies the source.
1047
+ NativeArray(const Element* array, size_t count, RelationToSourceCopy) {
1048
+ InitCopy(array, count);
1049
+ }
1050
+
1051
+ // Copy constructor.
1052
+ NativeArray(const NativeArray& rhs) {
1053
+ (this->*rhs.clone_)(rhs.array_, rhs.size_);
1054
+ }
1055
+
1056
+ ~NativeArray() {
1057
+ if (clone_ != &NativeArray::InitRef)
1058
+ delete[] array_;
1059
+ }
1060
+
1061
+ // STL-style container methods.
1062
+ size_t size() const { return size_; }
1063
+ const_iterator begin() const { return array_; }
1064
+ const_iterator end() const { return array_ + size_; }
1065
+ bool operator==(const NativeArray& rhs) const {
1066
+ return size() == rhs.size() &&
1067
+ ArrayEq(begin(), size(), rhs.begin());
1068
+ }
1069
+
1070
+ private:
1071
+ enum {
1072
+ kCheckTypeIsNotConstOrAReference = StaticAssertTypeEqHelper<
1073
+ Element, GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>::value,
1074
+ };
1075
+
1076
+ // Initializes this object with a copy of the input.
1077
+ void InitCopy(const Element* array, size_t a_size) {
1078
+ Element* const copy = new Element[a_size];
1079
+ CopyArray(array, a_size, copy);
1080
+ array_ = copy;
1081
+ size_ = a_size;
1082
+ clone_ = &NativeArray::InitCopy;
1083
+ }
1084
+
1085
+ // Initializes this object with a reference of the input.
1086
+ void InitRef(const Element* array, size_t a_size) {
1087
+ array_ = array;
1088
+ size_ = a_size;
1089
+ clone_ = &NativeArray::InitRef;
1090
+ }
1091
+
1092
+ const Element* array_;
1093
+ size_t size_;
1094
+ void (NativeArray::*clone_)(const Element*, size_t);
1095
+
1096
+ GTEST_DISALLOW_ASSIGN_(NativeArray);
1097
+ };
1098
+
1099
+ } // namespace internal
1100
+ } // namespace testing
1101
+
1102
+ #define GTEST_MESSAGE_AT_(file, line, message, result_type) \
1103
+ ::testing::internal::AssertHelper(result_type, file, line, message) \
1104
+ = ::testing::Message()
1105
+
1106
+ #define GTEST_MESSAGE_(message, result_type) \
1107
+ GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
1108
+
1109
+ #define GTEST_FATAL_FAILURE_(message) \
1110
+ return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
1111
+
1112
+ #define GTEST_NONFATAL_FAILURE_(message) \
1113
+ GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
1114
+
1115
+ #define GTEST_SUCCESS_(message) \
1116
+ GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
1117
+
1118
+ // Suppresses MSVC warnings 4072 (unreachable code) for the code following
1119
+ // statement if it returns or throws (or doesn't return or throw in some
1120
+ // situations).
1121
+ #define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
1122
+ if (::testing::internal::AlwaysTrue()) { statement; }
1123
+
1124
+ #define GTEST_TEST_THROW_(statement, expected_exception, fail) \
1125
+ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1126
+ if (::testing::internal::ConstCharPtr gtest_msg = "") { \
1127
+ bool gtest_caught_expected = false; \
1128
+ try { \
1129
+ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
1130
+ } \
1131
+ catch (expected_exception const&) { \
1132
+ gtest_caught_expected = true; \
1133
+ } \
1134
+ catch (...) { \
1135
+ gtest_msg.value = \
1136
+ "Expected: " #statement " throws an exception of type " \
1137
+ #expected_exception ".\n Actual: it throws a different type."; \
1138
+ goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
1139
+ } \
1140
+ if (!gtest_caught_expected) { \
1141
+ gtest_msg.value = \
1142
+ "Expected: " #statement " throws an exception of type " \
1143
+ #expected_exception ".\n Actual: it throws nothing."; \
1144
+ goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
1145
+ } \
1146
+ } else \
1147
+ GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \
1148
+ fail(gtest_msg.value)
1149
+
1150
+ #define GTEST_TEST_NO_THROW_(statement, fail) \
1151
+ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1152
+ if (::testing::internal::AlwaysTrue()) { \
1153
+ try { \
1154
+ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
1155
+ } \
1156
+ catch (...) { \
1157
+ goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
1158
+ } \
1159
+ } else \
1160
+ GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
1161
+ fail("Expected: " #statement " doesn't throw an exception.\n" \
1162
+ " Actual: it throws.")
1163
+
1164
+ #define GTEST_TEST_ANY_THROW_(statement, fail) \
1165
+ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1166
+ if (::testing::internal::AlwaysTrue()) { \
1167
+ bool gtest_caught_any = false; \
1168
+ try { \
1169
+ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
1170
+ } \
1171
+ catch (...) { \
1172
+ gtest_caught_any = true; \
1173
+ } \
1174
+ if (!gtest_caught_any) { \
1175
+ goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
1176
+ } \
1177
+ } else \
1178
+ GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
1179
+ fail("Expected: " #statement " throws an exception.\n" \
1180
+ " Actual: it doesn't.")
1181
+
1182
+
1183
+ // Implements Boolean test assertions such as EXPECT_TRUE. expression can be
1184
+ // either a boolean expression or an AssertionResult. text is a textual
1185
+ // represenation of expression as it was passed into the EXPECT_TRUE.
1186
+ #define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
1187
+ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1188
+ if (const ::testing::AssertionResult gtest_ar_ = \
1189
+ ::testing::AssertionResult(expression)) \
1190
+ ; \
1191
+ else \
1192
+ fail(::testing::internal::GetBoolAssertionFailureMessage(\
1193
+ gtest_ar_, text, #actual, #expected).c_str())
1194
+
1195
+ #define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
1196
+ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1197
+ if (::testing::internal::AlwaysTrue()) { \
1198
+ ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
1199
+ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
1200
+ if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
1201
+ goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
1202
+ } \
1203
+ } else \
1204
+ GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
1205
+ fail("Expected: " #statement " doesn't generate new fatal " \
1206
+ "failures in the current thread.\n" \
1207
+ " Actual: it does.")
1208
+
1209
+ // Expands to the name of the class that implements the given test.
1210
+ #define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
1211
+ test_case_name##_##test_name##_Test
1212
+
1213
+ // Helper macro for defining tests.
1214
+ #define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\
1215
+ class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
1216
+ public:\
1217
+ GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
1218
+ private:\
1219
+ virtual void TestBody();\
1220
+ static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
1221
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(\
1222
+ GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
1223
+ };\
1224
+ \
1225
+ ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
1226
+ ::test_info_ =\
1227
+ ::testing::internal::MakeAndRegisterTestInfo(\
1228
+ #test_case_name, #test_name, NULL, NULL, \
1229
+ ::testing::internal::CodeLocation(__FILE__, __LINE__), \
1230
+ (parent_id), \
1231
+ parent_class::SetUpTestCase, \
1232
+ parent_class::TearDownTestCase, \
1233
+ new ::testing::internal::TestFactoryImpl<\
1234
+ GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
1235
+ void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
1236
+
1237
+ #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
1238
+