# HG changeset patch # User Jaroslav Hajek # Date 1263368664 -3600 # Node ID 655ab6f6c369cac6c5b892ee9ed427c1cb8b5949 # Parent dd70982c81a3081d057667671e27c5bdf31fbc54 add tests for built-in class overloads diff -r dd70982c81a3 -r 655ab6f6c369 test/ChangeLog --- a/test/ChangeLog Tue Jan 12 23:05:17 2010 +0100 +++ b/test/ChangeLog Wed Jan 13 08:44:24 2010 +0100 @@ -1,3 +1,10 @@ +2010-01-13 Jaroslav Hajek + + * build_bc_overload_tests.sh: New shell script. + * build_bc_overloads_expected.m: New source (not normally used). + * bc_overloads_expected: New text file. + * Makefile.am: Build test_bc_overloads.m. + 2009-12-25 John W. Eaton * fntests.m (hastests): Use regexp instead of findstr and only diff -r dd70982c81a3 -r 655ab6f6c369 test/Makefile.am --- a/test/Makefile.am Tue Jan 12 23:05:17 2010 +0100 +++ b/test/Makefile.am Wed Jan 13 08:44:24 2010 +0100 @@ -62,19 +62,26 @@ include @Snork/module.mk include @Spork/module.mk -check: test_sparse.m +check: test_sparse.m test_bc_overloads.m $(top_builddir)/run-octave --norc --silent --no-history $(srcdir)/fntests.m $(srcdir) test_sparse.m: build_sparse_tests.sh $(srcdir)/build_sparse_tests.sh +test_bc_overloads.m: build_bc_overload_tests.sh bc_overloads_expected + $(srcdir)/build_bc_overload_tests.sh + EXTRA_DIST = \ ChangeLog \ build_sparse_tests.sh \ + build_bc_overload_tests.sh \ + bc_overloads_expected \ + build_bc_overloads_expected.m \ $(FCN_FILES) CLEANFILES = \ - test_sparse.m + test_sparse.m \ + test_bc_overloads.m DISTCLEANFILES = \ fntests.log diff -r dd70982c81a3 -r 655ab6f6c369 test/bc_overloads_expected --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/bc_overloads_expected Wed Jan 13 08:44:24 2010 +0100 @@ -0,0 +1,225 @@ +double double double +double single single +double logical double +double char double +double int8 int8 +double int16 int16 +double int32 int32 +double int64 int64 +double uint8 uint8 +double uint16 uint16 +double uint32 uint32 +double uint64 uint64 +double cell cell +double struct struct +double function_handle function_handle +single double single +single single single +single logical single +single char single +single int8 int8 +single int16 int16 +single int32 int32 +single int64 int64 +single uint8 uint8 +single uint16 uint16 +single uint32 uint32 +single uint64 uint64 +single cell cell +single struct struct +single function_handle function_handle +logical double double +logical single single +logical logical logical +logical char char +logical int8 int8 +logical int16 int16 +logical int32 int32 +logical int64 int64 +logical uint8 uint8 +logical uint16 uint16 +logical uint32 uint32 +logical uint64 uint64 +logical cell cell +logical struct struct +logical function_handle function_handle +char double char +char single single +char logical char +char char char +char int8 int8 +char int16 int16 +char int32 int32 +char int64 int64 +char uint8 uint8 +char uint16 uint16 +char uint32 uint32 +char uint64 uint64 +char cell cell +char struct struct +char function_handle function_handle +int8 double int8 +int8 single int8 +int8 logical int8 +int8 char int8 +int8 int8 int8 +int8 int16 int8 +int8 int32 int8 +int8 int64 int8 +int8 uint8 int8 +int8 uint16 int8 +int8 uint32 int8 +int8 uint64 int8 +int8 cell cell +int8 struct struct +int8 function_handle function_handle +int16 double int16 +int16 single int16 +int16 logical int16 +int16 char int16 +int16 int8 int16 +int16 int16 int16 +int16 int32 int16 +int16 int64 int16 +int16 uint8 int16 +int16 uint16 int16 +int16 uint32 int16 +int16 uint64 int16 +int16 cell cell +int16 struct struct +int16 function_handle function_handle +int32 double int32 +int32 single int32 +int32 logical int32 +int32 char int32 +int32 int8 int32 +int32 int16 int32 +int32 int32 int32 +int32 int64 int32 +int32 uint8 int32 +int32 uint16 int32 +int32 uint32 int32 +int32 uint64 int32 +int32 cell cell +int32 struct struct +int32 function_handle function_handle +int64 double int64 +int64 single int64 +int64 logical int64 +int64 char int64 +int64 int8 int64 +int64 int16 int64 +int64 int32 int64 +int64 int64 int64 +int64 uint8 int64 +int64 uint16 int64 +int64 uint32 int64 +int64 uint64 int64 +int64 cell cell +int64 struct struct +int64 function_handle function_handle +uint8 double uint8 +uint8 single uint8 +uint8 logical uint8 +uint8 char uint8 +uint8 int8 uint8 +uint8 int16 uint8 +uint8 int32 uint8 +uint8 int64 uint8 +uint8 uint8 uint8 +uint8 uint16 uint8 +uint8 uint32 uint8 +uint8 uint64 uint8 +uint8 cell cell +uint8 struct struct +uint8 function_handle function_handle +uint16 double uint16 +uint16 single uint16 +uint16 logical uint16 +uint16 char uint16 +uint16 int8 uint16 +uint16 int16 uint16 +uint16 int32 uint16 +uint16 int64 uint16 +uint16 uint8 uint16 +uint16 uint16 uint16 +uint16 uint32 uint16 +uint16 uint64 uint16 +uint16 cell cell +uint16 struct struct +uint16 function_handle function_handle +uint32 double uint32 +uint32 single uint32 +uint32 logical uint32 +uint32 char uint32 +uint32 int8 uint32 +uint32 int16 uint32 +uint32 int32 uint32 +uint32 int64 uint32 +uint32 uint8 uint32 +uint32 uint16 uint32 +uint32 uint32 uint32 +uint32 uint64 uint32 +uint32 cell cell +uint32 struct struct +uint32 function_handle function_handle +uint64 double uint64 +uint64 single uint64 +uint64 logical uint64 +uint64 char uint64 +uint64 int8 uint64 +uint64 int16 uint64 +uint64 int32 uint64 +uint64 int64 uint64 +uint64 uint8 uint64 +uint64 uint16 uint64 +uint64 uint32 uint64 +uint64 uint64 uint64 +uint64 cell cell +uint64 struct struct +uint64 function_handle function_handle +cell double cell +cell single cell +cell logical cell +cell char cell +cell int8 cell +cell int16 cell +cell int32 cell +cell int64 cell +cell uint8 cell +cell uint16 cell +cell uint32 cell +cell uint64 cell +cell cell cell +cell struct cell +cell function_handle function_handle +struct double struct +struct single struct +struct logical struct +struct char struct +struct int8 struct +struct int16 struct +struct int32 struct +struct int64 struct +struct uint8 struct +struct uint16 struct +struct uint32 struct +struct uint64 struct +struct cell struct +struct struct struct +struct function_handle function_handle +function_handle double function_handle +function_handle single function_handle +function_handle logical function_handle +function_handle char function_handle +function_handle int8 function_handle +function_handle int16 function_handle +function_handle int32 function_handle +function_handle int64 function_handle +function_handle uint8 function_handle +function_handle uint16 function_handle +function_handle uint32 function_handle +function_handle uint64 function_handle +function_handle cell function_handle +function_handle struct function_handle +function_handle function_handle function_handle diff -r dd70982c81a3 -r 655ab6f6c369 test/build_bc_overload_tests.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/build_bc_overload_tests.sh Wed Jan 13 08:44:24 2010 +0100 @@ -0,0 +1,92 @@ +#!/bin/sh + +# Copyright (C) 2010 VZLU Prague +# +# This file is part of Octave. +# +# Octave 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. +# +# Octave 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 Octave; see the file COPYING. If not, see +# . + +CLASSES="double single char logical int8 int16 int32 int64 \ +uint8 uint16 uint32 uint64 struct cell function_handle" + +for class in $CLASSES ; do + DIR=\@$class + test -d $DIR || mkdir $DIR || { echo "error: could not create $DIR" ; exit ; } + cat > $DIR/tbcover.m < tbcover.m < test_bc_overloads.m <> test_bc_overloads.m <> test_bc_overloads.m <