Skip to content

Commit

Permalink
tests: add a basic test for static/dynamic api version
Browse files Browse the repository at this point in the history
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Jul 29, 2019
1 parent 7f26b93 commit 00aeac9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/hwloc/Makefile.am
Expand Up @@ -28,7 +28,9 @@ LDADD =

LOG_COMPILER = $(builddir)/wrapper.sh

check_PROGRAMS = hwloc_list_components \
check_PROGRAMS = \
hwloc_api_version \
hwloc_list_components \
hwloc_bitmap \
hwloc_bitmap_string \
hwloc_bitmap_compare_inclusion \
Expand Down
17 changes: 17 additions & 0 deletions tests/hwloc/hwloc_api_version.c
@@ -0,0 +1,17 @@
/*
* Copyright © 2019 Inria. All rights reserved.
* See COPYING in top-level directory.
*/

#include "hwloc.h"

#include <printf.h>
#include <assert.h>

int main(void)
{
unsigned static_version = HWLOC_API_VERSION;
unsigned dynamic_version = hwloc_get_api_version();
assert(static_version == dynamic_version);
return 0;
}

0 comments on commit 00aeac9

Please sign in to comment.