Added new test cases for latest wrapper#30
Conversation
|
@MohitMaliFtechiz This PR has to be based on #27, I don't understand how this can work otherwise. |
085f748 to
531e46b
Compare
@kelson42 , i have made this branch from #27 and after that added new test cases in it, Once #27 is merged i'll re base this PR on main branch. |
531e46b to
657da3b
Compare
|
currently test cases are failing of because Linux libzim tar file containing 0 bytes .so file, so i have open a ticket for it in libzim openzim/libzim#772 . |
657da3b to
7473909
Compare
|
For now i have made this branch from #31 to avoid the build failure because of |
|
@mgautierfr , I am getting some errors while adding new test cases, can you please help me out on these errors.
I have push all the latest test cases on this PR. Currently CI is not running, Can you please try to run these tests locally. |
|
@mgautierfr any update? |
|
@MohitMaliFtechiz First problem (setPtr) is fixed. I'm looking for the two others issues. But on my side, I face a new test failure where the illustration data is not equal to expected (test.java:137). It is probably because the String constructor interpret the bytes (and probably stop at first |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
=======================================
Coverage ? 42.39%
Complexity ? 18
=======================================
Files ? 24
Lines ? 92
Branches ? 6
=======================================
Hits ? 39
Misses ? 51
Partials ? 2 ☔ View full report in Codecov by Sentry. |
…for better readability
…st as we are generating the .so file in app/CMakeList now test/CMakeList file is unused so we are removing it
…only for running test cases, removed unnecessary check for directory in run_test.sh
…am for testing. In this commit we are compiling, running java test cases for gradle task, So we are removing the run_test.sh as it is unused now
… (libkiwix, libzim) , Now we are renameing the folders names via renameFolders method
… using the gradle tasks to compile and run test cases
…nuxBinding for better naming
…e , added remove book from library by id tests
…or getting books from library
Introduce a new set of wrapper (with a nice `2` postfix) with use a constructor taking a handle as parameter. It allow Book to have two constructor: - One creating a default empty (cpp) book. - One setting the wrapper around a exsiting cpp book.
Blob IS a `char[]`. C++ allow a char[] to be stored in a string but in java, a String is associated to a encoding. Content in a Blob may have no encoding so we cannot convert to a string. Fix the test part.
Correctly include `org_kiwix_libwzim_Query.h`. Property set the return type of setNativeQuery to void.
`Book::getIllustration(size)` return a `shared_ptr<Illustration>`. The current `buildWrapper` was creating a wrapper on a `shared_ptr<Illustration>` (so a `shared_ptr<shared_ptr<Illustration>>`) but we was converting to a `shared_ptr<Illustration>` and so we were doing wrong reads. By specializing the buildWrapper for `shared_ptr<T>`, we avoid the "double shared_ptr" and we are good.
`small.zim` doesn't seems to contain a xapian database, so searcher cannot work.
|
The branch now compile and tests are passing. |
Fixes #29
In this PR we are adding new test cases for latest wrapper.