Commit 77de0411 authored by Nicolas Burrus's avatar Nicolas Burrus
Browse files

Index: ChangeLog

from  Nicolas Burrus  <burrus_n@lrde.epita.fr>

        * configure.ac: Add olena/tests/core directory.

Index: olena/ChangeLog
from  Nicolas Burrus  <burrus_n@lrde.epita.fr>

        * oln/core/w_window1d.hh, oln/core/w_window2d.hh,
        oln/core/w_window3d.hh: Restore a corrected version of set
        methods.
        * tests/core/Makefile.am, tests/core/runtests: New files.
        * tests/core/tests/w_window: New test.

        * tests/types/tests/int_u5c: New test.

    prcs2git-id: 8.37
parent 2591c21e
......@@ -4,7 +4,7 @@
(doc/Makefile.am 142 1043333462 e/0_Makefile.a 1.14)
(olena/oln/core/internal/real_image3d.hh 4336 1047072898 d/3_real_image 1.6)
(metalic/tests/check/main.cc 226 1017340236 e/43_main.cc 1.1)
(olena/oln/core/w_window3d.hh 3187 1051703014 c/17_w_window3d 1.8)
(olena/oln/core/w_window3d.hh 3605 1051893844 c/17_w_window3d 1.9)
(doc/dev/build.texi 9679 1045816900 p/42_build.texi 1.9)
(olena/oln/convert/force.hh 2147 1047072898 20_force.hh 1.6)
(doc/dev/thanks.texi 3332 1049920315 p/40_thanks.tex 1.4)
......@@ -48,6 +48,7 @@
(metalic/tests/array/gen_test.cc 10905 1046711214 f/34_gen_test.c 1.11.1.3)
(config/oln-local.m4 3543 1047490026 p/37_oln-local. 1.5)
(metalic/mlc/Makefile.am 504 1047072898 q/33_Makefile.a 1.7)
(olena/tests/core/tests/w_window 494 1051893844 s/8_w_window 1.1)
(doc/dev/oln-dev.texi 2777 1049920315 j/1_oln-dev.te 1.6.1.2)
(olena/oln/arith/internal/opdecls.hh 11902 1047049040 b/22_opdecls.hh 1.6)
(olena/oln/convert/nrgbhsl.hh 4309 1047072898 12_nrgbhsl.hh 1.9)
......@@ -99,7 +100,7 @@
(olena/oln/topo/inter-pixel/internal/dir.hh 2347 1049118738 r/48_dir.hh 1.1)
(olena/oln/morpho/gradient.hh 1751 1046369269 b/3_gradient.h 1.6)
(integre/ntg/yiq.hh 1909 1047049040 i/23_yiq.hh 1.3.1.2)
(configure.ac 12542 1049583896 3_configure. 1.47.1.1.1.1.1.4.1.14)
(configure.ac 12566 1051893844 3_configure. 1.47.1.1.1.1.1.4.1.15)
(olena/oln/arith/logic.hh 2389 1047049040 b/24_logic.hh 1.6.1.2)
(olena/oln/topo/combinatorial-map/internal/zeta.hh 2148 1049118738 r/43_zeta.hh 1.1)
(metalic/tests/array/gen_test_utils/postlude 60 1026208207 f/31_postlude 1.1)
......@@ -123,7 +124,7 @@
(olena/oln/topo/inter-pixel/inter-pixel.hxx 2028 1049118738 r/31_inter-pixe 1.3)
(attic/oln-ChangeLog 90565 1041965925 6_ChangeLog 1.50.1.98.1.5)
(olena/oln/Makefile.am 5511 1049462965 q/47_Makefile.a 1.3.1.1)
(olena/ChangeLog 40127 1051703014 o/30_ChangeLog 1.27.1.36.1.1)
(olena/ChangeLog 40443 1051893844 o/30_ChangeLog 1.27.1.36.1.2)
(doc/ref/ref-types.tex 20386 1049920315 g/34_ref-types. 1.6)
(olena/tests/convol/slow_sum_2d_1.cc 1123 1047049040 f/41_slow_sum_2 1.2.1.4)
(integre/tests/types/tests/int_u4 49 1030531145 h/19_int_u4 1.1)
......@@ -154,6 +155,7 @@
(olena/tests/arith/runtests 2172 1045569366 o/45_runtests 1.8)
(tools/utilities/morpho/generate_morpho.sh 4537 1045569366 i/30_generate_m 1.3.1.5.1.2)
(olena/oln/core/border1d.hh 3244 1042737226 d/34_border1d.h 1.4)
(integre/tests/types/tests/int_u5c 72 1051893844 s/11_int_u5c 1.1)
(olena/tests/topo/Makefile.am 415 1049118738 r/26_Makefile.a 1.3)
(olena/oln/core/pred_image.hh 1729 1047072898 c/24_pred_image 1.5)
(doc/ref/processing.tpl 7420 1047077746 d/48_processing 1.16)
......@@ -220,6 +222,7 @@
(integre/tests/types/tests/int_sc1 231 1030375657 g/37_int_sc1 1.2)
(integre/tests/types/tests/conv2 106 1039105505 g/42_conv2 1.2)
(integre/tests/types/tests/optrait1a 697 1047049040 h/25_optrait1a 1.2)
(olena/tests/core/runtests 2172 1051893844 s/9_runtests 1.1)
(integre/tests/types/tests/int_sc2 168 1030375252 g/36_int_sc2 1.1)
(olena/oln/core/dpoint3d.hxx 3059 1042737226 d/22_dpoint3d.h 1.4)
(integre/tests/types/tests/optrait1b 917 1047060405 h/26_optrait1b 1.2)
......@@ -438,7 +441,7 @@
(metalic/tests/check/Makefile.flags 131 1046782660 e/36_Makefile.f 1.12.1.3)
(olena/oln/core/bkd_iter1d.hh 2530 1047072898 d/38_bkd_iter1d 1.8)
(olena/oln/morpho/closing.inc 2046 1047049040 44_closing.in 1.7)
(olena/oln/core/w_window1d.hh 3095 1051703014 c/19_w_window1d 1.8)
(olena/oln/core/w_window1d.hh 3477 1051893844 c/19_w_window1d 1.9)
(doc/dev/design.texi 1525 1044886023 q/5_design.tex 1.2)
(doc/dev/install.texi 1005 1045816900 p/43_install.te 1.3)
(integre/ntg/nrgb.hh 3615 1047049040 i/19_nrgb.hh 1.5.1.2)
......@@ -470,6 +473,7 @@
(olena/oln/core/internal/image1d.hh 3956 1047072898 d/16_image1d.hh 1.8)
(olena/oln/level/fill.hh 1714 1043018093 32_fill.hh 1.4)
(tools/lib/getopt1.c 4601 1043138750 p/28_getopt1.c 1.1)
(olena/tests/core/Makefile.am 330 1051893844 s/10_Makefile.a 1.1)
(integre/ntg/cast.hh 5433 1047049040 i/26_cast.hh 1.3.1.2)
(olena/oln/convert/nrgbxyz.hh 3188 1047072898 16_nrgbxyz.hh 1.6)
(metalic/mlc/array/1d.hh 5349 1047049040 f/23_array1d.hh 1.8)
......@@ -512,7 +516,7 @@
(integre/ntg/optraits_cycle.hh 2830 1047049040 g/16_optraits_c 1.11.1.4)
(olena/oln/topo/dmap.hh 4554 1047049040 p/2_dmap.hh 1.5)
(olena/oln/core/structelt.hh 1738 1047072898 c/25_structelt. 1.5)
(ChangeLog 11905 1049920315 o/33_ChangeLog 1.37.1.15)
(ChangeLog 12009 1051893844 o/33_ChangeLog 1.37.1.16)
(integre/tests/types/tests/int6 61 1030375252 g/46_int6 1.1)
(olena/oln/morpho/hit_or_miss.inc 10084 1047049040 42_hit_or_mis 1.9)
(olena/oln/convol/fast_gaussian.hxx 8581 1047049040 25_fast_gauss 1.7.1.2)
......@@ -530,7 +534,7 @@
(bootstrap.sh 272 1047485594 j/16_bootstrap. 1.10)
(tools/swilena/src/swilena_conversions.i 934 1039630292 o/15_swilena_co 1.1)
(olena/oln/arith/ops.hh 2737 1046453201 b/23_ops.hh 1.5.1.2.1.1)
(olena/oln/core/w_window2d.hh 3512 1051703014 c/18_w_window2d 1.6.1.3)
(olena/oln/core/w_window2d.hh 3911 1051893844 c/18_w_window2d 1.6.1.4)
(olena/tests/topo/test-inter-pixel.ref 192 1049118738 r/39_test-inter 1.2)
(olena/tests/morpho/Makefile.am 195 1046524058 e/32_Makefile.a 1.12)
(olena/tests/README 4977 1039648472 f/4_README 1.4)
......
2003-05-02 Nicolas Burrus <burrus_n@lrde.epita.fr>
* configure.ac: Add olena/tests/core directory.
2003-04-09 Nicolas Burrus <burrus_n@lrde.epita.fr>
* Makefile.am: Generate UPGRADING.
......
......@@ -123,6 +123,7 @@ OLN_COLLECTION([OLN_TOP],
OLN_TESTS([arith])
OLN_TESTS([convert])
OLN_TESTS([convol])
OLN_TESTS([core])
OLN_TESTS([io])
OLN_TESTS([morpho])
OLN_TESTS([sanity])
......
int_u32s i(4294967295U);
i = i + int_u32s(1);
return i != 4294967295U;
2003-05-02 Nicolas Burrus <burrus_n@lrde.epita.fr>
* oln/core/w_window1d.hh, oln/core/w_window2d.hh,
oln/core/w_window3d.hh: Restore a corrected version of set
methods.
* tests/core/Makefile.am, tests/core/runtests: New files.
* tests/core/tests/w_window: New test.
* tests/types/tests/int_u5c: New test.
2003-04-30 Nicolas Burrus <burrus_n@lrde.epita.fr>
* oln/core/w_window1d.hh, oln/core/w_window2d.hh,
......
......@@ -67,6 +67,26 @@ namespace oln {
return *this;
}
T& set(const dpoint1d& dp, T weight)
{
// if the dp exists, return a ref to the existing entry
for (unsigned i = 0; i < card(); ++i)
if (_dp[i] == dp)
{
_w[i] = weight;
return _w[i];
}
// otherwise, create new entry
add(dp, weight);
return _w.back();
}
T& set(coord col)
{
return set(dpoint1d(col));
}
coord delta() const
{
return _delta;
......
......@@ -79,6 +79,27 @@ namespace oln {
add(row, col, arr[i++]);
}
T& set(const dpoint2d& dp, T weight)
{
// if the dp exists, return a ref to the existing entry
for (unsigned i = 0; i < card(); ++i)
if (_dp[i] == dp)
{
_w[i] = weight;
return _w[i];
}
// otherwise, create new entry
add(dp, weight);
return _w.back();
}
T& set(coord row, coord col)
{
return set(dpoint2d(row, col));
}
coord delta() const
{
return _delta;
......
......@@ -69,6 +69,26 @@ namespace oln {
return *this;
}
T& set(const dpoint3d& dp, T weight)
{
// if the dp exists, return a ref to the existing entry
for (unsigned i = 0; i < card(); ++i)
if (_dp[i] == dp)
{
_w[i] = weight;
return _w[i];
}
// otherwise, create new entry
add(dp, weight);
return _w.back();
}
T& set(coord slice, coord row, coord col)
{
return set(dpoint3d(slice, row, col));
}
coord delta() const
{
return _delta;
......
EXTRA_DIST = tests runtests
check-local:
TOP_SRCDIR=$(top_srcdir) SRCDIR=$(srcdir) \
TOP_BUILDDIR=$(top_builddir) \
LDFLAGS="$(LDFLAGS)" \
CPPFLAGS="$(CPPFLAGS) $(DEFS) -I$(top_builddir)" \
CXXFLAGS="$(CXXFLAGS) $(CXXFLAGS_OPTIMIZE) $(CXXFLAGS_STRICT_ERRORS)" \
$(SHELL) $(srcdir)/runtests
distclean-local:
rm -rf runs
#!/bin/sh
if test "x$VERBOSE" != x; then
verb='echo'
quiet=''
else
verb=':'
quiet='-q'
fi
exec 6>&2
. ../check/defs || exit 1
exec 2>&6
failures=0
indir=${SRCDIR-.}/tests
rundir=runs
test -d $rundir || mkdir $rundir
# If no tests were given on the command line, get the list from $indir.
if test $# = 0; then
set dummy $indir/*
shift
fi
for test; do
# We want only the basename of $test.
test=`basename "$test"`
fail=0
dir=$rundir/$test
input=$indir/$test
rm -rf $dir
mkdir $dir
# Build the source code to compile.
src=$dir/$test.cc
cat $input >>$src
# Build the compile script (using such a script make it easier
# to debug failures);
cat >$dir/try <<EOF
dir="\$2"
exec 6>&2
if test "x\$1" = "x-q"; then
exec 2>$dir/cxx.errors
else
echo $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS $dir/$test.cc
fi
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS "$dir/$test.cc" -o "$dir/test$EXEEXT" || exit 50
if test "x\$1" = "x-q"; then
exec 2>$dir/run.errors
else
echo $dir/test$EXEEXT
fi
$dir/test$EXEEXT
estatus=\$?
exec 2>&6
echo \$estatus > $dir/exit.status
exit \$estatus
EOF
chmod +x $dir/try
# Do we expect a failure?
expected=ok
grep '//.*ABORT' $input >/dev/null && expected=abort
grep '//.*COMPFAIL' $input >/dev/null && expected=compfail
# Do we know the test fails ?
xfail=no
grep '//.*XFAIL' $input >/dev/null && xfail=yes
# Run the test.
$verb ========== Running $test... >&2
($SHELL $dir/try "$quiet" "$dir")
estatus=$?
msg="";
case $expected:$estatus in
ok:0 | compfail:50 | abort:134) rm -rf "$dir" ;;
*:50) msg="(doesn't compile)" ;;
*:134) msg="(aborts at run-time)" ;;
compfail:*) msg="(compiles!)" ;;
abort:*) msg="(doesn't abort!)" ;;
ok:*) msg="(exits with \$?=$estatus)" ;;
*) ;;
esac
if test -d $dir; then
if test "$xfail" = "no"; then
echo "FAIL: $test $msg" >&2
failures=`expr $failures + 1`
else
echo "XFAIL: $test $msg" >&2
fi
else
echo "PASS: $test" >&2
fi
done
echo ========================================>&2
if test $failures = 0; then
echo No failures. >&2
exit 0
else
echo $failures failures. >&2
exit 1
fi
#include <oln/core/w_window1d.hh>
#include <oln/core/w_window2d.hh>
#include <oln/core/w_window3d.hh>
#include <ntg/all.hh>
#include <cassert>
using namespace oln;
using namespace ntg;
int main()
{
w_window1d<int> w1d;
w_window2d<int_u8> w2d;
w_window3d<int_s32> w3d;
int x1d = w1d.set(dpoint1d(0), 5);
int x2d = w2d.set(dpoint2d(0, 5), 4);
assert(x2d == 4);
x2d = w2d.set(dpoint2d(0, 5), 5);
int x3d = w3d.set(dpoint3d(0, 2, 4), 5);
return !(x1d == x2d && x2d == x3d);
}
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Olena")
(Project-Version oln 8 36)
(Parent-Version oln 8 35)
(Version-Log "Index: olena/ChangeLog
(Project-Version oln 8 37)
(Parent-Version oln 8 36)
(Version-Log "Index: ChangeLog
from Nicolas Burrus <burrus_n@lrde.epita.fr>
* configure.ac: Add olena/tests/core directory.
Index: olena/ChangeLog
from Nicolas Burrus <burrus_n@lrde.epita.fr>
* oln/core/w_window1d.hh, oln/core/w_window2d.hh,
oln/core/w_window3d.hh: Remove useless and broken set methods.
oln/core/w_window3d.hh: Restore a corrected version of set
methods.
* tests/core/Makefile.am, tests/core/runtests: New files.
* tests/core/tests/w_window: New test.
* tests/types/tests/int_u5c: New test.
")
(New-Version-Log "")
(Checkin-Time "Wed, 30 Apr 2003 13:43:34 +0200")
(Checkin-Time "Fri, 02 May 2003 18:44:04 +0200")
(Checkin-Login burrus_n)
;; diff-ignore tests/data/.*pbm$
;; diff-ignore img/.*pbm$
......@@ -77,6 +88,7 @@ from Nicolas Burrus <burrus_n@lrde.epita.fr>
"oln-"
"stamp-vti$"
"^\\(BUILD\\|FAQ\\|INSTALL\\|README\\|THANKS\\)$"
"^CODING_STYLE$"
"olena/img/se9.ppbm"
"olena/img/neighbor.ppbm"
"^olena/tests/check/defs$"
......@@ -88,15 +100,17 @@ from Nicolas Burrus <burrus_n@lrde.epita.fr>
"olena/img/lena.pppm"
"olena/img/lena128.pgm"
"olena/img/lena.ppbm"
"olena/img/lena16b.ppgm"
"olena/img/lena16b.pgm"
"olena/img/neighbor9.ppbm"))
(Project-Keywords)
(Files
(ChangeLog (oln/o/33_ChangeLog 1.37.1.15 640))
(ChangeLog (oln/o/33_ChangeLog 1.37.1.16 640))
(doc/ChangeLog (oln/o/31_ChangeLog 1.31 640))
(integre/ChangeLog (oln/q/35_ChangeLog 1.12.1.1 640))
(metalic/ChangeLog (oln/q/30_ChangeLog 1.3.1.15 640))
(olena/ChangeLog (oln/o/30_ChangeLog 1.27.1.36.1.1 640))
(olena/ChangeLog (oln/o/30_ChangeLog 1.27.1.36.1.2 640))
(tools/ChangeLog (oln/o/32_ChangeLog 1.10.1.7 640))
(tools/swilena/ChangeLog (oln/n/37_ChangeLog 1.7 640))
......@@ -108,7 +122,7 @@ from Nicolas Burrus <burrus_n@lrde.epita.fr>
(cleanup.sh (oln/o/29_cleanup.sh 1.5 750))
(configure.ac (oln/3_configure. 1.47.1.1.1.1.1.4.1.14 640))
(configure.ac (oln/3_configure. 1.47.1.1.1.1.1.4.1.15 640))
(doc/demo/image.cc (oln/d/46_image.cc 1.5 640))
(doc/demo/Makefile.am (oln/d/44_Makefile.a 1.16 640))
......@@ -252,9 +266,9 @@ from Nicolas Burrus <burrus_n@lrde.epita.fr>
(olena/oln/core/window.hh (oln/c/16_window.hh 1.7 640))
(olena/oln/core/winiter.hh (oln/c/12_winiter.hh 1.4 640))
(olena/oln/core/winneighb.hh (oln/c/11_winneighb. 1.5 640))
(olena/oln/core/w_window1d.hh (oln/c/19_w_window1d 1.8 640))
(olena/oln/core/w_window2d.hh (oln/c/18_w_window2d 1.6.1.3 640))
(olena/oln/core/w_window3d.hh (oln/c/17_w_window3d 1.8 640))
(olena/oln/core/w_window1d.hh (oln/c/19_w_window1d 1.9 640))
(olena/oln/core/w_window2d.hh (oln/c/18_w_window2d 1.6.1.4 640))
(olena/oln/core/w_window3d.hh (oln/c/17_w_window3d 1.9 640))
(olena/oln/core/w_window.hh (oln/c/20_w_window.h 1.6 640))
(olena/oln/io/base.hh (oln/b/20_base.hh 1.5 640))
(olena/oln/io/base.hxx (oln/b/18_base.hxx 1.4 640))
......@@ -830,6 +844,20 @@ from Nicolas Burrus <burrus_n@lrde.epita.fr>
;; to version 8.34(w), by burrus_n:
(integre/tests/types/tests/builtin1 (oln/s/7_builtin1 1.1 640))
;; Files added by populate at Fri, 02 May 2003 18:18:44 +0200,
;; to version 8.36(w), by nes:
(olena/tests/core/tests/w_window (oln/s/8_w_window 1.1 640))
(olena/tests/core/runtests (oln/s/9_runtests 1.1 750))
(olena/tests/core/Makefile.am (oln/s/10_Makefile.a 1.1 640))
;; Files added by populate at Fri, 02 May 2003 18:19:59 +0200,
;; to version 8.36(w), by nes:
(integre/tests/types/tests/int_u5c (oln/s/11_int_u5c 1.1 640))
)
(Merge-Parents
(8.36 complete)
)
(Merge-Parents)
(New-Merge-Parents)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment