1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-03 14:52:21 +02:00
pgbackrest/libc/t/sanity.t
David Steele 8efcc38304 Improvements in C codebase:
* Update C naming conventions.
* Use int datatype wherever possible.
* Better separation of C source from Perl interface.
2017-09-30 10:44:03 -04:00

23 lines
861 B
Perl

####################################################################################################################################
# Sanity Tests for C Library
#
# Basic test to ensure the C library loads and has been compiled correctly.
####################################################################################################################################
use strict;
use warnings;
use Carp;
use English '-no_match_vars';
# Set number of tests
use Test::More tests => 2;
# Make sure the module loads without errors
BEGIN {use_ok('pgBackRest::LibC')};
# Load the module dynamically so it does not interfere with the test above
require pgBackRest::LibC;
pgBackRest::LibC->import(qw(:debug));
# UVSIZE determines the pointer and long long int size. This needs to be 8 to indicate 64-bit types are available.
ok (&UVSIZE == 8, 'UVSIZE == 8');