Skip to contentSkip to conversation

Test code for htonll, ntohll

PATCH New Torsten Bögershausen 1 participant 1 message Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Test code for htonll, ntohll

test-endianess.c adds test code for htonl(), ntohll() and the recently introduced ntohll() and htonll()

The test is called in t0070

---
 .gitignore             |    1 +
 Makefile               |    3 +++
 t/t0070-fundamental.sh |    3 +++
 test-endianess.c       |   58 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 65 insertions(+)
 create mode 100644 test-endianess.c
.gitignore +1 -0
index 66199ed..750e7d8 100644
@@ -183,6 +183,7 @@
 /test-date
 /test-delta
 /test-dump-cache-tree
+/test-endianess
 /test-scrap-cache-tree
 /test-genrandom
 /test-index-version
Makefile +3 -0
index 07b0626..50957c7 100644
@@ -555,6 +555,7 @@ TEST_PROGRAMS_NEED_X += test-ctype
 TEST_PROGRAMS_NEED_X += test-date
 TEST_PROGRAMS_NEED_X += test-delta
 TEST_PROGRAMS_NEED_X += test-dump-cache-tree
+TEST_PROGRAMS_NEED_X += test-endianess
 TEST_PROGRAMS_NEED_X += test-genrandom
 TEST_PROGRAMS_NEED_X += test-hashmap
 TEST_PROGRAMS_NEED_X += test-index-version
@@ -2275,6 +2276,8 @@ test-date$X: date.o ctype.o
 
 test-delta$X: diff-delta.o patch-delta.o
 
+test-endianess$X: test-endianess.c
+
 test-line-buffer$X: vcs-svn/lib.a
 
 test-parse-options$X: parse-options.o parse-options-cb.o
t/t0070-fundamental.sh +3 -0
index 5ed69a6..dc687da 100755
@@ -33,5 +33,8 @@ test_expect_success 'check for a bug in the regex routines' '
 	# if this test fails, re-build git with NO_REGEX=1
 	test-regex
 '
+test_expect_success 'test endianess, htonll(), ntohll()' '
+	test-endianess
+'
 
 test_done
test-endianess.c new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
1.7.10.4