summaryrefslogtreecommitdiff
path: root/tests/test_lib.h
Commit message (Collapse)AuthorAgeFilesLines
* Moved testing resources to clar, and removed old tests directory.Ben Straub2012-03-311-54/+0
| | | | Removed the BUILD_CLAR CMake flag, and updated the readme.
* CMakefile: add -Wmissing-prototypes and fix warningsKirill A. Shutemov2011-08-301-0/+1
| | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
* cleanup: remove trailing spacesKirill A. Shutemov2011-07-011-1/+1
| | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
* test: Properly show error messagesVicent Marti2011-06-281-0/+1
|
* test_lib: add return value to git_testschu2011-05-181-1/+2
| | | | | | | Save the return value of functions not passing must_pass() and report the returned error. Signed-off-by: schu <schu-github@schulog.org>
* Cleanup the testing toolkitVicent Marti2011-03-031-16/+23
| | | | | | | | | | | | | | | | | | | Tests are now declared with detailed descriptions and a short test name: BEGIN_TEST(the_test0, "this is an example test that does something") ... END_TEST Modules are declared through a simple macro interface: BEGIN_MODULE(mod_name) ADD_TEST(the_test0); ... END_MODULE Error messages when tests fail have been greatly improved. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Make the test return an error code on failureVicent Marti2011-02-021-2/+2
| | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Rewrite the unit testing suiteVicent Marti2011-02-021-93/+31
| | | | | | | | | | | NIH Enterprises presents: a new testing system based on CuTesT, which is faster than our previous one and fortunately uses no preprocessing on the source files, which means we can run that from CMake. The test suites have been gathered together into bigger files (one file per suite, testing each of the different submodules of the library). Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Change the library include fileVicent Marti2010-12-061-1/+1
| | | | | | | | | | | | Libgit2 is now officially include as #include "<git2.h>" or indidividual files may be included as #include <git2/index.h> Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix some coding style issuesRamsay Jones2010-02-281-1/+1
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Use a 64 bit off_t throughout the library and tests on POSIXRamsay Jones2010-01-201-1/+6
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Add noreturn declaration compatible with the MSVC compiler.Julio Espinoza-Sokal2009-06-161-2/+3
| | | | | | | | | | | | MSVC provides a compiler declaration to declare that a function never returns. This declaration is required in front of the function definition rather than at the end, but fortunately gcc is compatible with this location as well. Explicit returns are no longer required after calls to test_die. Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
* Add git_oid_cpy, git_oid_cmp as inline functionsShawn O. Pearce2008-11-031-0/+8
| | | | | | | | | | These are easily built off the standard C library functions memcpy and memcmp. By marking these inline we stand a good chance of the C compiler replacing the entire thing with tight machine code, because many compilers will actually inline a memcmp or memcpy when the 3rd argument (the size) is a constant value. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Move GIT_NORETURN into test_lib.h onlyShawn O. Pearce2008-11-031-1/+8
| | | | | | | | We should never have a noreturn style function in the library itself, as such a function would prevent the calling application from handling error conditions the way it wants. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Create a basic test suite for the library and test oid functionsShawn O. Pearce2008-11-011-0/+85
This is a horribly simple test suite that makes it fairly easy to put together some basic function level unit tests on the library. Its patterned somewhat after the test suite in git.git, but also after the "Check" test library. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>