|
From: <kin...@us...> - 2025-09-09 14:43:55
|
Revision: 7376
http://sourceforge.net/p/teem/code/7376
Author: kindlmann
Date: 2025-09-09 14:43:50 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
CTesting is working again for Teem v2
Modified Paths:
--------------
teem/trunk/tests/ctest/CMakeLists.txt
teem/trunk/tests/ctest/gage/CMakeLists.txt
teem/trunk/tests/ctest/gage/probeMulti.c
teem/trunk/tests/ctest/gage/probePolynomial.c
teem/trunk/tests/ctest/gage/probeScl.c
teem/trunk/tests/ctest/gage/tsbp.c
teem/trunk/tests/ctest/meet/CMakeLists.txt
teem/trunk/tests/ctest/meet/buildinfo.c
teem/trunk/tests/ctest/meet/enmall.c
teem/trunk/tests/ctest/meet/kernall.c
teem/trunk/tests/ctest/meet/probeSS.c
teem/trunk/tests/ctest/nrrd/CMakeLists.txt
teem/trunk/tests/ctest/ten/CMakeLists.txt
teem/trunk/tests/ctest/ten/glyphBqd.c
teem/trunk/tests/ctest/ten/tendlist.c
Modified: teem/trunk/tests/ctest/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,11 +1,14 @@
# tests/ctest/CMakeLists.txt: Test driver for Teem's CTest-based tests
# Copyright (C) 2025 University of Chicago
# See ../../LICENSE.txt for licensing terms
+
+# Note: these tests are very incomplete. It is unclear how much of Teem's
+# future development will hinge on CTest-based testing, now that the
+# Python/CFFI bindings offer a more convenient way to call into Teem. But they
+# do test something useful, and now for the Teem v2 re-write they work again.
+
+# To run tests (from top-level):
#
-# Note: these tests are very incomplete. It is unclear how much of Teem's future
-# development will hinge on CTest-based testing, now that the Python/CFFI bindings
-# offer a more convenient way to call into Teem. But to use them (from top-level):
-#
# # for running tests locally
# cmake -S . -B <builddir> -DBUILD_TESTING=ON
# cmake --build <builddir>
@@ -14,13 +17,13 @@
# ctest -V # verbose
#
# # for submitting dashboard
-# cd build
+# cd <builddir>
# ctest -D Nightly # or Experimental, Continuous
###-------------------------------------------------------------------------------------
# Basic set-up
-message(STATUS "Setting up testing")
+message(STATUS "Setting up testing in tests/ctest/")
# Make sure tests can see headers generated by the build system
include_directories(${CMAKE_BINARY_DIR}/include)
@@ -108,7 +111,7 @@
# The Tests (such as they are)
#
# These are the component libraries that have tests; more added as time permits
-# (TEEM_LIB_LIST) except that most (those yearning for tests) are commented out
+# TEEM_LIB_LIST except that most (those libs yearning for tests) are commented out
add_subdirectory(air)
# add_subdirectory(hest)
add_subdirectory(biff)
@@ -118,7 +121,7 @@
add_subdirectory(unrrdu)
# add_subdirectory(alan)
# add_subdirectory(tijk)
-#add_subdirectory(gage) # TOFIX
+add_subdirectory(gage)
# add_subdirectory(dye)
# add_subdirectory(bane)
# add_subdirectory(limn)
@@ -125,10 +128,10 @@
# add_subdirectory(echo)
# add_subdirectory(hoover)
# add_subdirectory(seek)
-#add_subdirectory(ten) # TOFIX
+add_subdirectory(ten)
# add_subdirectory(elf)
# add_subdirectory(pull)
# add_subdirectory(coil)
# add_subdirectory(push)
# add_subdirectory(mite)
-#add_subdirectory(meet) # TOFIX
+add_subdirectory(meet)
Modified: teem/trunk/tests/ctest/gage/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/gage/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,36 +1,12 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library 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
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_sbp tsbp.c)
-target_link_libraries(test_sbp teem)
-add_test(NAME stackBlurParm COMMAND $<TARGET_FILE:test_sbp> -sbp 0-5-4.2)
+teem_create_test_bin(gage_tsbp tsbp.c)
+teem_add_test(gage_tsbp ARGS -sbp 0-5-4.2)
-add_executable(test_probeScl probeScl.c)
-target_link_libraries(test_probeScl teem)
-add_test(NAME probeScl COMMAND $<TARGET_FILE:test_probeScl>)
+teem_create_test_bin(gage_probeScl probeScl.c)
+teem_add_test(gage_probeScl)
-add_executable(test_probePolynomial probePolynomial.c)
-target_link_libraries(test_probePolynomial teem)
-add_test(NAME probePolynomial COMMAND $<TARGET_FILE:test_probePolynomial>)
+teem_create_test_bin(gage_probePolynomial probePolynomial.c)
+teem_add_test(gage_probePolynomial)
-add_executable(test_probeMulti probeMulti.c)
-target_link_libraries(test_probeMulti teem)
-add_test(NAME probeMulti COMMAND $<TARGET_FILE:test_probeMulti>)
+teem_create_test_bin(gage_probeMulti probeMulti.c)
+teem_add_test(gage_probeMulti)
Modified: teem/trunk/tests/ctest/gage/probeMulti.c
===================================================================
--- teem/trunk/tests/ctest/gage/probeMulti.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/probeMulti.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/gage.h"
+#include <teem/gage.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/gage/probePolynomial.c
===================================================================
--- teem/trunk/tests/ctest/gage/probePolynomial.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/probePolynomial.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/gage.h"
+#include <teem/gage.h>
#define PROBE "probePolynomial"
@@ -40,40 +38,38 @@
** dx = dy = dz = 0 to evaluate the polynomial itself
*/
static double
-polyeval(double coef[POWER_MAX+1][POWER_MAX+1][POWER_MAX+1],
- unsigned int dx, unsigned int dy, unsigned int dz,
- const double pos[3]) {
+polyeval(double coef[POWER_MAX + 1][POWER_MAX + 1][POWER_MAX + 1], unsigned int dx,
+ unsigned int dy, unsigned int dz, const double pos[3]) {
unsigned int xi, yi, zi;
- double tmp, ret,
- xp[POWER_MAX+1], yp[POWER_MAX+1], zp[POWER_MAX+1],
- dc[POWER_MAX+1][POWER_MAX+1] = {
- {1.0, 1.0, 1.0, 1.0}, /* how coeffs are scaled for 0th derivative */
- {0.0, 1.0, 2.0, 3.0}, /* how coeffs are scaled for 1st derivative */
- {0.0, 0.0, 2.0, 6.0}, /* how coeffs are scaled for 2nd derivative */
- {0.0, 0.0, 0.0, 6.0}}; /* how coeffs are scaled for 3rd derivative */
+ double tmp, ret, xp[POWER_MAX + 1], yp[POWER_MAX + 1], zp[POWER_MAX + 1],
+ dc[POWER_MAX + 1][POWER_MAX + 1]
+ = {{1.0, 1.0, 1.0, 1.0}, /* how coeffs are scaled for 0th derivative */
+ {0.0, 1.0, 2.0, 3.0}, /* how coeffs are scaled for 1st derivative */
+ {0.0, 0.0, 2.0, 6.0}, /* how coeffs are scaled for 2nd derivative */
+ {0.0, 0.0, 0.0, 6.0}}; /* how coeffs are scaled for 3rd derivative */
tmp = 1.0;
- for (xi=0; xi<=POWER_MAX; xi++) {
+ for (xi = 0; xi <= POWER_MAX; xi++) {
xp[xi] = tmp;
tmp *= pos[0];
}
tmp = 1.0;
- for (yi=0; yi<=POWER_MAX; yi++) {
+ for (yi = 0; yi <= POWER_MAX; yi++) {
yp[yi] = tmp;
tmp *= pos[1];
}
tmp = 1.0;
- for (zi=0; zi<=POWER_MAX; zi++) {
+ for (zi = 0; zi <= POWER_MAX; zi++) {
zp[zi] = tmp;
tmp *= pos[2];
}
ret = 0.0;
- for (xi=dx; xi<=POWER_MAX; xi++) {
- for (yi=dy; yi<=POWER_MAX; yi++) {
- for (zi=dz; zi<=POWER_MAX; zi++) {
- ret += (coef[xi][yi][zi]*xp[xi-dx]*yp[yi-dy]*zp[zi-dz]
- *dc[dx][xi]*dc[dy][yi]*dc[dz][zi]);
+ for (xi = dx; xi <= POWER_MAX; xi++) {
+ for (yi = dy; yi <= POWER_MAX; yi++) {
+ for (zi = dz; zi <= POWER_MAX; zi++) {
+ ret += (coef[xi][yi][zi] * xp[xi - dx] * yp[yi - dy] * zp[zi - dz] * dc[dx][xi]
+ * dc[dy][yi] * dc[dz][zi]);
}
}
}
@@ -91,8 +87,8 @@
ELL_3V_NORM(vec, vec, tmp);
airNormalRand_r(clen + 0, clen + 1, rng);
/* rician noise, actually */
- clen[0] = lenexp + lensig*clen[0];
- clen[1] = lensig*clen[1];
+ clen[0] = lenexp + lensig * clen[0];
+ clen[1] = lensig * clen[1];
len = ELL_2V_LEN(clen);
ELL_3V_SCALE(vec, len, vec);
}
@@ -104,12 +100,12 @@
*/
static gageContext *
makeVolume(Nrrd *nin, unsigned int sx, unsigned int sy, unsigned int sz,
- double coef[POWER_MAX+1][POWER_MAX+1][POWER_MAX+1],
+ double coef[POWER_MAX + 1][POWER_MAX + 1][POWER_MAX + 1],
airRandMTState *rng) {
- static const char me[]="makeVolume";
- double spcOrig[NRRD_SPACE_DIM_MAX], spcVec[3][NRRD_SPACE_DIM_MAX],
- angle10, angle20, angle21, ooff[3], aperm=0.6, lexp=0.1, lstdv=0.04,
- kparm[NRRD_KERNEL_PARMS_NUM];
+ static const char me[] = "makeVolume";
+ double spcOrig[NRRD_SPACE_DIM_MAX], spcVec[3][NRRD_SPACE_DIM_MAX], angle10, angle20,
+ angle21, ooff[3], aperm = 0.6, lexp = 0.1, lstdv = 0.04,
+ kparm[NRRD_KERNEL_PARMS_NUM];
gageContext *gctx;
gagePerVolume *gpvl;
unsigned int xi, yi, zi;
@@ -121,52 +117,46 @@
do {
randvec(spcVec[1], lexp, lstdv, rng);
angle10 = ell_3v_angle_d(spcVec[1], spcVec[0]);
- } while (!( AIR_IN_OP(AIR_PI*(1-aperm)/2, angle10, AIR_PI*(1+aperm)/2) ));
+ } while (!(AIR_IN_OP(AIR_PI * (1 - aperm) / 2, angle10, AIR_PI * (1 + aperm) / 2)));
do {
randvec(spcVec[2], lexp, lstdv, rng);
angle20 = ell_3v_angle_d(spcVec[2], spcVec[0]);
angle21 = ell_3v_angle_d(spcVec[2], spcVec[1]);
- } while (!( AIR_IN_OP(AIR_PI*(1-aperm)/2, angle20, AIR_PI*(1+aperm)/2) &&
- AIR_IN_OP(AIR_PI*(1-aperm)/2, angle21, AIR_PI*(1+aperm)/2) ));
+ } while (!(AIR_IN_OP(AIR_PI * (1 - aperm) / 2, angle20, AIR_PI * (1 + aperm) / 2)
+ && AIR_IN_OP(AIR_PI * (1 - aperm) / 2, angle21, AIR_PI * (1 + aperm) / 2)));
/* center volume near origin */
airNormalRand_r(ooff + 0, ooff + 1, rng);
airNormalRand_r(ooff + 2, NULL, rng);
ELL_3V_SET(spcOrig, 0.0, 0.0, 0.0);
- ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sx)/2.0 + 2*ooff[0], spcVec[0]);
- ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sy)/2.0 + 2*ooff[1], spcVec[1]);
- ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sz)/2.0 + 2*ooff[1], spcVec[2]);
+ ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sx) / 2.0 + 2 * ooff[0], spcVec[0]);
+ ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sy) / 2.0 + 2 * ooff[1], spcVec[1]);
+ ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sz) / 2.0 + 2 * ooff[1], spcVec[2]);
/* allocate data */
- if (nrrdMaybeAlloc_va(nin, nrrdTypeDouble, 3,
- AIR_CAST(size_t, sx),
- AIR_CAST(size_t, sy),
- AIR_CAST(size_t, sz))
+ if (nrrdMaybeAlloc_va(nin, nrrdTypeDouble, 3, AIR_CAST(size_t, sx),
+ AIR_CAST(size_t, sy), AIR_CAST(size_t, sz))
|| nrrdSpaceSet(nin, nrrdSpaceRightAnteriorSuperior)
|| nrrdSpaceOriginSet(nin, spcOrig)) {
biffMovef(PROBE, NRRD, "%s: trouble setting volume", me);
- airMopError(submop); return NULL;
+ airMopError(submop);
+ return NULL;
}
- nrrdAxisInfoSet_va(nin, nrrdAxisInfoSpaceDirection,
- spcVec[0],
- spcVec[1],
- spcVec[2]);
- nrrdAxisInfoSet_va(nin, nrrdAxisInfoCenter,
- nrrdCenterCell,
- nrrdCenterCell,
+ nrrdAxisInfoSet_va(nin, nrrdAxisInfoSpaceDirection, spcVec[0], spcVec[1], spcVec[2]);
+ nrrdAxisInfoSet_va(nin, nrrdAxisInfoCenter, nrrdCenterCell, nrrdCenterCell,
nrrdCenterCell);
/* set data */
{
double *ddata = AIR_CAST(double *, nin->data);
- for (zi=0; zi<sz; zi++) {
+ for (zi = 0; zi < sz; zi++) {
double pos[3];
- for (yi=0; yi<sy; yi++) {
- for (xi=0; xi<sx; xi++) {
+ for (yi = 0; yi < sy; yi++) {
+ for (xi = 0; xi < sx; xi++) {
ELL_3V_SCALE_ADD2(pos, 1.0, spcOrig, xi, spcVec[0]);
ELL_3V_SCALE_ADD2(pos, 1.0, pos, yi, spcVec[1]);
ELL_3V_SCALE_ADD2(pos, 1.0, pos, zi, spcVec[2]);
- ddata[xi + sx*(yi + sy*zi)] = polyeval(coef, 0, 0, 0, pos);
+ ddata[xi + sx * (yi + sy * zi)] = polyeval(coef, 0, 0, 0, pos);
}
}
}
@@ -192,7 +182,8 @@
if (!EE) EE |= gageUpdate(gctx);
if (EE) {
biffMovef(PROBE, GAGE, "%s: trouble setting up gage", me);
- airMopError(submop); return NULL;
+ airMopError(submop);
+ return NULL;
}
airMopOkay(submop);
@@ -207,7 +198,7 @@
airRandMTState *rng;
Nrrd *nin;
unsigned int xi, yi, zi, runNum, runIdx;
- double coef[POWER_MAX+1][POWER_MAX+1][POWER_MAX+1], pos[3], epsilon;
+ double coef[POWER_MAX + 1][POWER_MAX + 1][POWER_MAX + 1], pos[3], epsilon;
const double *vmeas, *gmeas, *hmeas;
gageContext *gctx;
@@ -221,7 +212,7 @@
epsilon = 1e-8;
runNum = 30;
- for (runIdx=0; runIdx<runNum; runIdx++) {
+ for (runIdx = 0; runIdx < runNum; runIdx++) {
unsigned int sx, sy, sz, probeNum;
double avgDiff;
airArray *submop;
@@ -228,9 +219,9 @@
submop = airMopNew();
/* set random coefficients in polynomial */
- for (xi=0; xi<=POWER_MAX; xi++) {
- for (yi=0; yi<=POWER_MAX; yi++) {
- for (zi=0; zi<=POWER_MAX; zi++) {
+ for (xi = 0; xi <= POWER_MAX; xi++) {
+ for (yi = 0; yi <= POWER_MAX; yi++) {
+ for (zi = 0; zi <= POWER_MAX; zi++) {
if (xi + yi + zi > POWER_MAX) {
coef[xi][yi][zi] = 0.0;
} else {
@@ -243,11 +234,14 @@
sx = 20 + airRandInt_r(rng, 120);
sy = 20 + airRandInt_r(rng, 120);
sz = 20 + airRandInt_r(rng, 120);
- fprintf(stderr, "%u: %u %u %u: ", runIdx, sx, sy, sz); fflush(stderr);
+ fprintf(stderr, "%u: %u %u %u: ", runIdx, sx, sy, sz);
+ fflush(stderr);
if (!(gctx = makeVolume(nin, sx, sy, sz, coef, rng))) {
airMopAdd(mop, err = biffGetDone(PROBE), airFree, airMopAlways);
fprintf(stderr, "trouble creating volume:\n%s", err);
- airMopError(submop); airMopError(mop); return 1;
+ airMopError(submop);
+ airMopError(mop);
+ return 1;
}
airMopAdd(submop, gctx, (airMopper)gageContextNix, airMopAlways);
vmeas = gageAnswerPointer(gctx, gctx->pvl[0], gageSclValue);
@@ -254,8 +248,7 @@
gmeas = gageAnswerPointer(gctx, gctx->pvl[0], gageSclGradVec);
hmeas = gageAnswerPointer(gctx, gctx->pvl[0], gageSclHessian);
ELL_3V_SET(pos, 0, 0, 0);
- gageProbeSpace(gctx, pos[0], pos[1], pos[2],
- AIR_FALSE /* indexSpace */,
+ gageProbeSpace(gctx, pos[0], pos[1], pos[2], AIR_FALSE /* indexSpace */,
AIR_TRUE /* clamp */);
probeNum = 0;
avgDiff = 0.0;
@@ -263,8 +256,8 @@
visited positions the gage-measured values, gradients, and
hessians are the same as the analytical ones */
do {
- double vanal, ganal[3], hanal[9], vdiff, gdiff[3], hdiff[9],
- step[3], stepSize = 0.2;
+ double vanal, ganal[3], hanal[9], vdiff, gdiff[3], hdiff[9], step[3],
+ stepSize = 0.2;
probeNum++;
vanal = polyeval(coef, 0, 0, 0, pos);
ganal[0] = polyeval(coef, 1, 0, 0, pos);
@@ -282,21 +275,22 @@
vdiff = fabs(vmeas[0] - vanal);
ELL_3V_SUB(gdiff, gmeas, ganal);
ELL_3M_SUB(hdiff, hmeas, hanal);
- if (vdiff > epsilon ||
- ELL_3V_LEN(gdiff) > epsilon ||
- ELL_3M_FROB(hdiff) > epsilon) {
- fprintf(stderr, "at (%g,%g,%g) one diff %.17g %.17g %.17g "
+ if (vdiff > epsilon || ELL_3V_LEN(gdiff) > epsilon
+ || ELL_3M_FROB(hdiff) > epsilon) {
+ fprintf(stderr,
+ "at (%g,%g,%g) one diff %.17g %.17g %.17g "
"> eps %.17g\n",
- pos[0], pos[1], pos[2], vdiff,
- ELL_3V_LEN(gdiff), ELL_3M_FROB(hdiff), epsilon);
- airMopError(submop); airMopError(mop); return 1;
+ pos[0], pos[1], pos[2], vdiff, ELL_3V_LEN(gdiff), ELL_3M_FROB(hdiff),
+ epsilon);
+ airMopError(submop);
+ airMopError(mop);
+ return 1;
}
avgDiff += vdiff + ELL_3V_LEN(gdiff) + ELL_3M_FROB(hdiff);
airNormalRand_r(step + 0, step + 1, rng);
airNormalRand_r(step + 2, NULL, rng);
ELL_3V_SCALE_INCR(pos, stepSize, step);
- gageProbeSpace(gctx, pos[0], pos[1], pos[2],
- AIR_FALSE /* indexSpace */,
+ gageProbeSpace(gctx, pos[0], pos[1], pos[2], AIR_FALSE /* indexSpace */,
AIR_TRUE /* clamp */);
} while (!gctx->edgeFrac);
avgDiff /= probeNum;
Modified: teem/trunk/tests/ctest/gage/probeScl.c
===================================================================
--- teem/trunk/tests/ctest/gage/probeScl.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/probeScl.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,26 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/gage.h"
-#include <testDataPath.h>
+#include <teem/gage.h>
+#include <testutil.h>
/*
** Tests:
@@ -83,7 +81,7 @@
nscl = nrrdNew();
airMopAdd(mop, nscl, (airMopper)nrrdNuke, airMopAlways);
- fullname = testDataPathPrefix("fmob-c4h.nrrd");
+ fullname = teemTestDataPath("fmob-c4h.nrrd");
airMopAdd(mop, fullname, airFree, airMopAlways);
if (nrrdLoad(nscl, fullname, NULL)) {
char *err;
@@ -204,7 +202,7 @@
char *corrfn, explain[AIR_STRLEN_LARGE + 1];
int pret, differ;
- corrfn = testDataPathPrefix("test/probeSclAns.nrrd");
+ corrfn = teemTestDataPath("test/probeSclAns.nrrd");
airMopAdd(mop, corrfn, airFree, airMopAlways);
ncorr = nrrdNew();
airMopAdd(mop, ncorr, (airMopper)nrrdNuke, airMopAlways);
Modified: teem/trunk/tests/ctest/gage/tsbp.c
===================================================================
--- teem/trunk/tests/ctest/gage/tsbp.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/tsbp.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/gage.h"
+#include <teem/gage.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/meet/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/meet/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,43 +1,19 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library 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
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_enmall enmall.c)
-target_link_libraries(test_enmall teem)
-add_test(NAME enmall COMMAND $<TARGET_FILE:test_enmall>)
+teem_create_test_bin(meet_enmall enmall.c)
+teem_add_test(meet_enmall)
-add_executable(test_kernall kernall.c)
-target_link_libraries(test_kernall teem)
-add_test(NAME kernall COMMAND $<TARGET_FILE:test_kernall>)
+teem_create_test_bin(meet_kernall kernall.c)
+teem_add_test(meet_kernall)
-add_executable(test_buildinfo buildinfo.c)
-target_link_libraries(test_buildinfo teem)
-add_test(NAME buildinfo COMMAND $<TARGET_FILE:test_buildinfo>)
+teem_create_test_bin(meet_buildinfo buildinfo.c)
+teem_add_test(meet_buildinfo)
-add_executable(test_probeSS probeSS.c)
-target_link_libraries(test_probeSS teem)
-add_test(NAME probeSS_box01 COMMAND $<TARGET_FILE:test_probeSS> -k box -supp 1.0 -pnum 1500)
-add_test(NAME probeSS_cos01 COMMAND $<TARGET_FILE:test_probeSS> -k cos -supp 1.0 -pnum 1500)
-add_test(NAME probeSS_cos02 COMMAND $<TARGET_FILE:test_probeSS> -k cos -supp 2.0 -pnum 1200)
-add_test(NAME probeSS_cos04 COMMAND $<TARGET_FILE:test_probeSS> -k cos -supp 4.0 -pnum 1000)
-add_test(NAME probeSS_cos10 COMMAND $<TARGET_FILE:test_probeSS> -k cos -supp 9.0 -pnum 800)
-add_test(NAME probeSS_ctmr02 COMMAND $<TARGET_FILE:test_probeSS> -k ctmr -supp 2.0 -pnum 1300)
-add_test(NAME probeSS_ctmr04 COMMAND $<TARGET_FILE:test_probeSS> -k ctmr -supp 4.0 -pnum 1300)
-add_test(NAME probeSS_ctmr10 COMMAND $<TARGET_FILE:test_probeSS> -k ctmr -supp 9.0 -pnum 1300)
+teem_create_test_bin(meet_probeSS probeSS.c)
+teem_add_test(meet_probeSS NAME meet_probeSS_box01 ARGS -k box -supp 1.0 -pnum 1500)
+teem_add_test(meet_probeSS NAME meet_probeSS_cos01 ARGS -k cos -supp 1.0 -pnum 1500)
+teem_add_test(meet_probeSS NAME meet_probeSS_cos02 ARGS -k cos -supp 2.0 -pnum 1200)
+teem_add_test(meet_probeSS NAME meet_probeSS_cos04 ARGS -k cos -supp 4.0 -pnum 1000)
+teem_add_test(meet_probeSS NAME meet_probeSS_cos10 ARGS -k cos -supp 9.0 -pnum 800)
+teem_add_test(meet_probeSS NAME meet_probeSS_ctmr02 ARGS -k ctmr -supp 2.0 -pnum 1300)
+teem_add_test(meet_probeSS NAME meet_probeSS_ctmr04 ARGS -k ctmr -supp 4.0 -pnum 1300)
+teem_add_test(meet_probeSS NAME meet_probeSS_ctmr10 ARGS -k ctmr -supp 9.0 -pnum 1300)
Modified: teem/trunk/tests/ctest/meet/buildinfo.c
===================================================================
--- teem/trunk/tests/ctest/meet/buildinfo.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/buildinfo.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/meet.h"
+#include <teem/meet.h>
/*
** describes how this Teem was built
@@ -37,7 +35,6 @@
/* some of the things from airSanity */
printf("airMyEndian() == %d\n", airMyEndian());
- printf("AIR_QNANHIBIT == %d\n", AIR_QNANHIBIT);
printf("sizeof(size_t) = %s; sizeof(void*) = %s\n",
airSprintSize_t(stmp1, sizeof(size_t)),
airSprintSize_t(stmp2, sizeof(void *)));
Modified: teem/trunk/tests/ctest/meet/enmall.c
===================================================================
--- teem/trunk/tests/ctest/meet/enmall.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/enmall.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/meet.h"
+#include <teem/meet.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/meet/kernall.c
===================================================================
--- teem/trunk/tests/ctest/meet/kernall.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/kernall.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/meet.h"
+#include <teem/meet.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/meet/probeSS.c
===================================================================
--- teem/trunk/tests/ctest/meet/probeSS.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/probeSS.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/meet.h"
+#include <teem/meet.h>
/*
** Tests:
@@ -553,7 +551,7 @@
}
static int
-multiAnswerCompare(multiAnswer *man1, multiAnswer *man2) {
+multiAnswerCompare(multiAnswer *man1, multiAnswer *man2, double eps) {
static const char me[] = "multiAnswerCompare";
unsigned int si, slen;
@@ -567,12 +565,17 @@
slen = AIR_MIN(man1->slen, man2->slen);
#endif
for (si = 0; si < slen; si++) {
- if (man1->san[si] != man2->san[si]) {
+ double v1 = man1->san[si], v2 = man2->san[si];
+ double avg = (fabs(v1) + fabs(v2)) / 2;
+ double diff = fabs(v1 - v2) / (avg ? avg : 1);
+ if (diff > eps) {
/* HEY should track down which part of which answer,
in man1 and man2, is different, which was the
purpose of recording ispec and sidx */
- biffAddf(BKEY, "%s: man1->san[si] %.17g != man2->san[si] %.17g", me, man1->san[si],
- man2->san[si]);
+ biffAddf(
+ BKEY,
+ "%s: relerr(man1->san[si] %.17g , man2->san[si] %.17g) = %.17g > eps %.17g", me,
+ man1->san[si], man2->san[si], diff, eps);
return 1;
}
}
@@ -804,7 +807,8 @@
multiAnswerCollect(man[kindIdx]);
multiAnswerCollect(manComp[kindIdx]);
- if (multiAnswerCompare(manComp[kindIdx], man[kindIdx])) {
+ /* HEY HEY why on earth can't this be exactly the same? */
+ if (multiAnswerCompare(manComp[kindIdx], man[kindIdx], 1e-7)) {
biffAddf(BKEY, "%s: on point %u of kindIdx %u", me, probeIdx, kindIdx);
return 1;
}
Modified: teem/trunk/tests/ctest/nrrd/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/nrrd/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/nrrd/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -8,12 +8,12 @@
teem_add_test(nrrd_tload)
teem_create_test_bin(nrrd_tskip tskip.c USE_TMPDIR)
-teem_add_test(nrrd_tskip NAME tskip11p ARGS -s 101 102 103 -p 66 81 -o tsA.raw tsA.nhdr)
-teem_add_test(nrrd_tskip NAME tskip11n ARGS -s 101 102 103 -p 66 81 -ns -o tsB.raw tsB.nhdr)
-teem_add_test(nrrd_tskip NAME tskip01p ARGS -s 101 102 103 -p 0 99 -o tsC.raw tsC.nhdr)
-teem_add_test(nrrd_tskip NAME tskip01n ARGS -s 101 102 103 -p 0 99 -ns -o tsD.raw tsD.nhdr)
-teem_add_test(nrrd_tskip NAME tskip10p ARGS -s 101 102 103 -p 77 0 -o tsE.raw tsE.nhdr)
-teem_add_test(nrrd_tskip NAME tskip10n ARGS -s 101 102 103 -p 77 0 -ns -o tsF.raw tsF.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip11p ARGS -s 101 102 103 -p 66 81 -o tsA.raw tsA.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip11n ARGS -s 101 102 103 -p 66 81 -ns -o tsB.raw tsB.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip01p ARGS -s 101 102 103 -p 0 99 -o tsC.raw tsC.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip01n ARGS -s 101 102 103 -p 0 99 -ns -o tsD.raw tsD.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip10p ARGS -s 101 102 103 -p 77 0 -o tsE.raw tsE.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip10n ARGS -s 101 102 103 -p 77 0 -ns -o tsF.raw tsF.nhdr)
teem_create_test_bin(nrrd_macros macros.c)
teem_add_test(nrrd_macros)
Modified: teem/trunk/tests/ctest/ten/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/ten/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/ten/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,28 +1,6 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library 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
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_tendlist tendlist.c)
-target_link_libraries(test_tendlist teem)
-add_test(NAME tendlist COMMAND $<TARGET_FILE:test_tendlist>)
+teem_create_test_bin(ten_tendlist tendlist.c)
+teem_add_test(ten_tendlist)
-add_executable(test_glyphBqd glyphBqd.c)
-target_link_libraries(test_glyphBqd teem)
-add_test(NAME glyphBqd COMMAND $<TARGET_FILE:test_glyphBqd>)
+teem_create_test_bin(ten_glyphBqd glyphBqd.c)
+teem_add_test(ten_glyphBqd)
Modified: teem/trunk/tests/ctest/ten/glyphBqd.c
===================================================================
--- teem/trunk/tests/ctest/ten/glyphBqd.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/ten/glyphBqd.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,26 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/ten.h"
-#include <testDataPath.h>
+#include <teem/ten.h>
+#include <testutil.h>
/*
** Tests:
@@ -43,7 +41,7 @@
sz = 100;
betaMaxNum = AIR_CAST(unsigned int, sizeof(betaMax) / sizeof(double));
if (nrrdMaybeAlloc_va(nabc, nrrdTypeDouble, 3, AIR_CAST(size_t, 3),
- AIR_CAST(size_t, sz), AIR_CAST(size_t, sz * betaMaxNum))) {
+ AIR_CAST(size_t, sz), AIR_CAST(size_t, sz *betaMaxNum))) {
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "trouble allocating:\n%s", err);
airMopError(mop);
@@ -61,7 +59,7 @@
}
}
- refname = testDataPathPrefix("test/tenGlyphBqdAbcUv.nrrd");
+ refname = teemTestDataPath("test/tenGlyphBqdAbcUv.nrrd");
airMopAdd(mop, refname, airFree, airMopAlways);
nref = nrrdNew();
airMopAdd(mop, nref, (airMopper)nrrdNuke, airMopAlways);
Modified: teem/trunk/tests/ctest/ten/tendlist.c
===================================================================
--- teem/trunk/tests/ctest/ten/tendlist.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/ten/tendlist.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library 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
- Lesser General Public License for more details.
+ This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/ten.h"
+#include <teem/ten.h>
/*
** Tests:
@@ -50,11 +48,10 @@
tci = 0;
do {
- fprintf(out, "%s: ################### BEGIN tend %s\n",
- me, tendCmdList[tci]->name);
+ fprintf(out, "%s: ################### BEGIN tend %s\n", me, tendCmdList[tci]->name);
ret = tendCmdList[tci]->main(0, NULL, tendCmdList[tci]->name, hparm);
- fprintf(out, "%s: ################### END tend %s (ret=%d)\n",
- me, tendCmdList[tci]->name, ret);
+ fprintf(out, "%s: ################### END tend %s (ret=%d)\n", me,
+ tendCmdList[tci]->name, ret);
tci++;
} while (tendCmdList[tci]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|