summaryrefslogtreecommitdiff
path: root/tests/t0000-oid.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename the test cases to run in specific ordersShawn O. Pearce2008-12-311-208/+0
| | | | | | | | | | | | | This way we can be fairly certain we run tests of lower-level parts of the library before we run tests of higher-level more complex parts. If there is any problem in a lower-level part of the library, the earlier test will identify it and stop, making it easire to troubleshoot the failure. A rough naming guide has been added for the test suite to explain the current category structure. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add routines to convert git_oid to hex stringsShawn O. Pearce2008-12-021-0/+56
| | | | | | | | | [sp: Credit for some of this implementation goes to Pieter, I started off a patch he proposed for libgit2 but reworked enough of it that I don't want to blame him for any bugs.] Suggested-by: Pieter de Bie <pdebie@ai.rug.nl> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add git_oid_cpy, git_oid_cmp as inline functionsShawn O. Pearce2008-11-031-0/+69
| | | | | | | | | | 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>
* Add an extra oid test to verify control characters aren't readShawn O. Pearce2008-11-031-0/+37
| | | | | | | We only want hex digits to be read, any other character in the 8-bit character set is invalid within an id string. 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/+46
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>