Difference between revisions of "JS-ctypes"

Jump to navigation Jump to search
no edit summary
Line 48: Line 48:
'''Note''': The goal is to replace the component but until all components are ported, we'll have a duplication of the code in the tree. We need to port-back every addition to the comonent to the new library until it replaces the component completely.
'''Note''': The goal is to replace the component but until all components are ported, we'll have a duplication of the code in the tree. We need to port-back every addition to the comonent to the new library until it replaces the component completely.


* C++ Component code [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/components/zimAccessor/zimAccessor.cpp?revision=2920&view=markup example]
* C++ Component code [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/components/zimAccessor/zimAccessor.cpp?revision=HEAD&view=markup example]
* C++ library [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimAccessor/zimAccessor.cpp?revision=2920&view=markup example]
* C++ library [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimAccessor/zimAccessor.cpp?revision=HEAD&view=markup example]
* C++ library header [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimAccessor/zimAccessor.h?revision=2811&view=markup example]
* C++ library header [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimAccessor/zimAccessor.h?revision=HEAD&view=markup example]


Rules to embrace/respect:
Rules to embrace/respect:
Line 69: Line 69:
The idea here is just to make sure that all methods are available and working as expected.
The idea here is just to make sure that all methods are available and working as expected.


* C++ library [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimAccessor/zimAccessor.h?revision=2811&view=markup header file]
* C++ library [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimAccessor/zimAccessor.h?revision=HEAD&view=markup header file]
* C++ tester [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimTester/zimTester.cpp?revision=2920&view=markup source]
* C++ tester [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimTester/zimTester.cpp?revision=HEAD&view=markup source]


I'm not very proud of it, a lot of stuff are hard coded and while it gets a ZIM as argument, it expects the swahili zim to test everything.
I'm not very proud of it, a lot of stuff are hard coded and while it gets a ZIM as argument, it expects the swahili zim to test everything.
Line 133: Line 133:
}
}
</source></blockquote>
</source></blockquote>
=== Write a C program testing the C Wrapper/API ===
Instead of writing a program to test the features of the API, we should write unit tests but I have no prior experience with unit testing with C/C++ so I choose the loose way.
Feel free to improve that.
The idea here is just to make sure that all methods are available and working as expected.
'''Note''': This testing is more different than the previous C++ one as the API has changed while switching C in order to simplify it (make it look more like JS).
* C++ library [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimAccessor/zimAccessor.h?revision=HEAD&view=markup header file]
* C++ tester [http://kiwix.svn.sourceforge.net/viewvc/kiwix/moulinkiwix/src/zimTester/zimCTester.cpp?revision=HEAD&view=markup source]
I'm not very proud of it, a lot of stuff are hard coded and while it gets a ZIM as argument, it expects the swahili zim to test everything.


== Tips ==
== Tips ==
7,792

edits

Navigation menu