From: Daniel Arndt Date: Thu, 18 Jan 2018 17:10:45 +0000 (+0100) Subject: Provide HDF5 quicktest X-Git-Tag: v9.0.0-rc1~548^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db8450eb7c3cd099be86eff6672e5b0523b62008;p=dealii.git Provide HDF5 quicktest --- diff --git a/tests/quick_tests/CMakeLists.txt b/tests/quick_tests/CMakeLists.txt index bebfa03d6a..8bf68570ba 100644 --- a/tests/quick_tests/CMakeLists.txt +++ b/tests/quick_tests/CMakeLists.txt @@ -143,6 +143,11 @@ IF (DEAL_II_WITH_GSL) make_quicktest("gsl" ${_mybuild} "") ENDIF() +# Test HDF5 +IF (DEAL_II_WITH_HDF5) + make_quicktest("hdf5" ${_mybuild} "") +ENDIF() + # Test Nanoflann IF (DEAL_II_WITH_NANOFLANN) make_quicktest("nanoflann" ${_mybuild} "") diff --git a/tests/quick_tests/hdf5.cc b/tests/quick_tests/hdf5.cc new file mode 100644 index 0000000000..bc267758b6 --- /dev/null +++ b/tests/quick_tests/hdf5.cc @@ -0,0 +1,32 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2018 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + +// Test HDF5. Copy-paste from https://support.hdfgroup.org/HDF5/Tutor/crtfile.html + +#include +#include + +int main() +{ + hid_t file_id; + herr_t status; + + /* Create a new file using default properties. */ + file_id = H5Fcreate("file.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Terminate access to the file. */ + status = H5Fclose(file_id); + std::remove ("file.h5"); +}