Skip to content

Commit 970fa57

Browse files
carenasgitster
authored andcommitted
test-lib: add prerequisite for 64-bit platforms
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 <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent df7000c commit 970fa57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

t/test-lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,10 @@ build_option () {
16421642
sed -ne "s/^$1: //p"
16431643
}
16441644

1645+
test_lazy_prereq SIZE_T_IS_64BIT '
1646+
test 8 -eq "$(build_option sizeof-size_t)"
1647+
'
1648+
16451649
test_lazy_prereq LONG_IS_64BIT '
16461650
test 8 -le "$(build_option sizeof-long)"
16471651
'

0 commit comments

Comments
 (0)