summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-11-01 18:14:22 -0700
committerShawn O. Pearce <spearce@spearce.org>2008-11-01 18:24:39 -0700
commit15bffce9f7ce45f3b17d9357931667485a890455 (patch)
treed4594747a02e72be9399b3a54018676e0799be22 /include
parent16a67770b7d8d72317c4b775213c23a8bd74f5e0 (diff)
downloadlibgit2-15bffce9f7ce45f3b17d9357931667485a890455.tar.gz
Create a basic test suite for the library and test oid functions
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>
Diffstat (limited to 'include')
-rw-r--r--include/git/common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git/common.h b/include/git/common.h
index 45bb34841..98822557c 100644
--- a/include/git/common.h
+++ b/include/git/common.h
@@ -43,6 +43,20 @@
# define GIT_EXTERN(type) type
#endif
+/** Declare a function never returns to the caller. */
+#ifdef __GNUC__
+# define GIT_NORETURN __attribute__((__noreturn__))
+#else
+# define GIT_NORETURN /* empty */
+#endif
+
+/** Declare a function's takes printf style arguments. */
+#ifdef __GNUC__
+# define GIT_FORMAT_PRINTF(a,b) __attribute__((format (printf, a, b)))
+#else
+# define GIT_FORMAT_PRINTF(a,b) /* empty */
+#endif
+
/**
* @file git/common.h
* @brief Git common platform definitions