Skip to content
Snippets Groups Projects
Commit 57323bb6 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Added a simple unit test example. Test can be run using 'make check' and new...

Added a simple unit test example. Test can be run using 'make check' and new tests are added by editing tests/Makefile.am


Former-commit-id: 40f040fbc4575da0d40f3bb3968bd988351499e6
parent 5e442461
No related branches found
No related tags found
1 merge request!41Added a simple unit test example.
...@@ -40,6 +40,7 @@ m4/lt~obsolete.m4 ...@@ -40,6 +40,7 @@ m4/lt~obsolete.m4
/install-sh /install-sh
/missing /missing
/stamp-h1 /stamp-h1
/test-driver
# Object files # Object files
.deps/ .deps/
...@@ -48,6 +49,9 @@ m4/lt~obsolete.m4 ...@@ -48,6 +49,9 @@ m4/lt~obsolete.m4
*.obj *.obj
*.elf *.elf
# Test results
*.trs
# Precompiled Headers # Precompiled Headers
*.gch *.gch
*.pch *.pch
......
# This file is part of SWIFT. # This file is part of SWIFT.
# Coypright (c) 2012 pedro.gonnet@durham.ac.uk. # Coypright (c) 2012 pedro.gonnet@durham.ac.uk.
# 2015 matthieu.schaller@durham.ac.uk.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
# Show the way... # Show the way...
SUBDIRS = src examples doc SUBDIRS = src examples doc tests
# Non-standard files that should be part of the distribution. # Non-standard files that should be part of the distribution.
EXTRA_DIST = INSTALL.swift EXTRA_DIST = INSTALL.swift
...@@ -313,7 +313,7 @@ DX_INIT_DOXYGEN(libswift,doc/Doxyfile,doc/) ...@@ -313,7 +313,7 @@ DX_INIT_DOXYGEN(libswift,doc/Doxyfile,doc/)
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$ac_cv_path_ac_pt_DX_DOXYGEN" != ""]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "$ac_cv_path_ac_pt_DX_DOXYGEN" != ""])
# Handle .in files. # Handle .in files.
AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile doc/Makefile doc/Doxyfile]) AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile doc/Makefile doc/Doxyfile tests/Makefile])
# Report general configuration. # Report general configuration.
AC_MSG_RESULT([ AC_MSG_RESULT([
......
# This file is part of SWIFT.
# Coypright (c) 2015 matthieu.schaller@durham.ac.uk.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Add the source directory and debug to CFLAGS
AM_CFLAGS = -I../src -DCPU_TPS=2.67e9 $(HDF5_CPPFLAGS)
AM_LDFLAGS = ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS) $(HDF5_LIBS)
# List of test programs to compile
TESTS = testGreetings
# List of programs and scripts to run in the test suite
check_PROGRAMS = testGreetings
# Sources for the individual programs
testGreetings_SOURCES = testGreetings.c
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (C) 2015 Matthieu Schaller (matthieu.schaller@durham.ac.uk).
*
* This program is free software: you can 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 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#include "swift.h"
int main() {
greetings();
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment