Skip to content

Commit

Permalink
test-lib: add prerequisite for 64-bit platforms
Browse files Browse the repository at this point in the history
Allow tests that assume a 64-bit `size_t` to be skipped in 32-bit
platforms and regardless of the size of `long`.

This imitates the `LONG_IS_64BIT` prerequisite.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
carenas authored and gitster committed Dec 9, 2022
1 parent abd4d67 commit a244dc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,10 @@ build_option () {
sed -ne "s/^$1: //p"
}

test_lazy_prereq SIZE_T_IS_64BIT '
test 8 -eq "$(build_option sizeof-size_t)"
'

test_lazy_prereq LONG_IS_64BIT '
test 8 -le "$(build_option sizeof-long)"
'
Expand Down

0 comments on commit a244dc5

Please sign in to comment.