1
0

add test and enable debugging symbols.

This commit is contained in:
Nathan TeBlunthuis 2025-07-05 11:24:50 -07:00
parent d811bc7a1c
commit 714e52f9fe
2 changed files with 11 additions and 2 deletions

View File

@ -18,8 +18,8 @@ my_extension = setuptools.Extension(
"pywikidiff2",
sources=cpp_sources,
include_dirs=[],
extra_compile_args=["-Wall", "-std=c++17", "-fPIC","-lthai","-lstdc++"],
extra_link_args=["-lthai", "-lstdc++"],
extra_compile_args=["-Wall", "-std=c++17", "-fPIC","-lthai","-lstdc++","-O0"],
extra_link_args=["-lthai", "-lstdc++","-fPIC","-g","-O0"],
language="c++",
)

View File

@ -14,6 +14,15 @@ print(obj.final_split_threshold())
res = obj.inline_json_diff("help! \n I'm alive", "help! \n dead I am")
print(res)
print(obj.num_context_lines())
res = obj.inline_json_diff(open("test/err_last_text",'r').read(),
open("test/err_text",'r').read(),
numContextLines=10000)
res = obj.inline_json_diff("",
open("test/1295229484",'r').read(),
numContextLines=1000)
res = obj.inline_json_diff(open("test/1285792388",'r').read(),
open("test/1295229484",'r').read(),
numContextLines=1000)