libgit2/tests/t0001-errno.c
Shawn O. Pearce 4260699b37 Rename the test cases to run in specific orders
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>
2008-12-31 11:16:41 -08:00

15 lines
330 B
C

#include "test_lib.h"
#include "errors.h"
#include <string.h>
BEGIN_TEST(errno_zero_on_init)
must_be_true(git_errno == 0);
END_TEST
BEGIN_TEST(set_ENOTOID)
must_be_true(GIT_ENOTOID != 0);
git_errno = GIT_ENOTOID;
must_be_true(git_errno == GIT_ENOTOID);
must_pass(strcmp(git_strerror(git_errno), "Not a git oid"));
END_TEST