diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/development_tools | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'modules/development_tools')
197 files changed, 24282 insertions, 0 deletions
diff --git a/modules/development_tools/Makefile b/modules/development_tools/Makefile new file mode 100755 index 000000000..185f38926 --- /dev/null +++ b/modules/development_tools/Makefile @@ -0,0 +1,1041 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# modules/development_tools/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006 - INRIA - Sylvestre LEDRU +# +# This file is distributed under the same license as the Scilab package. + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr> +# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +# +# This file must be used under the terms of the CeCILL. +# This source file is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at +# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +# + +########## +### Makefile included stuff +### Target, variable, suffixes which are supposed to be useful in every makefile.am +########## + + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/scilab +pkgincludedir = $(includedir)/scilab +pkglibdir = $(libdir)/scilab +pkglibexecdir = $(libexecdir)/scilab +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs +am__append_1 = java +subdir = modules/development_tools +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \ + $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \ + $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \ + $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \ + $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \ + $(top_srcdir)/m4/intel_compiler.m4 \ + $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \ + $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \ + $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \ + $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \ + $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdevelopment_tools_la_datadir)" \ + "$(DESTDIR)$(libdevelopment_tools_la_etcdir)" \ + "$(DESTDIR)$(libdevelopment_tools_la_rootdir)" +DATA = $(libdevelopment_tools_la_data_DATA) \ + $(libdevelopment_tools_la_etc_DATA) \ + $(libdevelopment_tools_la_root_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing aclocal-1.14 +ALL_LINGUAS = en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ +ALL_LINGUAS_DOC = en_US fr_FR pt_BR ja_JP ru_RU +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +ANT = /usr/bin/ant +ANTLR = /usr/share/java/antlr.jar +AR = ar +ARPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -larpack +ASM3 = /usr/share/java/asm3-3.3.2.jar +AUTOCONF = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoconf +AUTOHEADER = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoheader +AUTOMAKE = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing automake-1.14 +AVALON_FRAMEWORK = /home/shashank/scilab-master_5.5.2/thirdparty/avalon-framework.jar +AWK = mawk +BATIK = /home/shashank/scilab-master_5.5.2/thirdparty/batik-all-1.7.jar +BLAS_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lblas +CC = gcc +CCACHE = +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CHECKSTYLE = +COBERTURA = /usr/share/java/cobertura.jar +COMMONS_BEANUTILS = +COMMONS_IO = /home/shashank/scilab-master_5.5.2/thirdparty/commons-io.jar +COMMONS_LOGGING = /home/shashank/scilab-master_5.5.2/thirdparty/commons-logging.jar +CPP = gcc -E +CPPFLAGS = +CURL_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +CURL_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/curl-config +CURL_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lcurl -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lssl -lcrypto -lrt -lz +CURL_VERSION = libcurl 7.19.7 +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEMOTOOLS_ENABLE = yes +DEPDIR = .deps +DLLTOOL = false +DOCBOOK_ROOT = /home/shashank/scilab-master_5.5.2/thirdparty/docbook/ +DOXYGEN_BIN = +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +ECJ = /home/shashank/scilab-master_5.5.2/thirdparty/ecj.jar +EGREP = /bin/grep -E +EXEEXT = +F77 = gfortran +FFLAGS = -g -O2 +FFTW3_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lfftw3 +FFTW_ENABLE = yes +FGREP = /bin/grep -F +FLEXDOCK = /home/shashank/scilab-master_5.5.2/thirdparty/flexdock-1.2.4.jar +FLIBS = -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lpthread -ldl -lcurses -lgfortran -lm -lquadmath +FOP = /home/shashank/scilab-master_5.5.2/thirdparty/fop.jar +FREEHEP_GRAPHICS2D = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphics2d.jar +FREEHEP_GRAPHICSIO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio.jar +FREEHEP_GRAPHICSIO_EMF = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio-emf.jar +FREEHEP_IO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-io.jar +FREEHEP_UTIL = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-util.jar +GENHTML = +GETTEXT_MACRO_VERSION = 0.19 +GIWS_BIN = +GLUEGEN2_RT = /home/shashank/scilab-master_5.5.2/thirdparty/gluegen2-rt.jar +GMSGFMT = /usr/bin/msgfmt +GMSGFMT_015 = /usr/bin/msgfmt +GRAPHICS_ENABLE = yes +GREP = /bin/grep +GUI_ENABLE = yes +HDF5_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +HDF5_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lhdf5 -lhdf5_hl +HELP_ENABLE = yes +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLLIBS = +INTL_MACOSX_LIBS = +JAR = /usr/lib/jvm/java-8-openjdk-amd64/bin/jar +JAVA = /usr/lib/jvm/java-8-openjdk-amd64/bin/java +JAVAC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javac +JAVAC_DEBUG = off +JAVADOC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc +JAVAH = /usr/lib/jvm/java-8-openjdk-amd64/bin/javah +JAVASCI_ENABLE = yes +JAVA_ENABLE = yes +JAVA_G = /usr/lib/jvm/java-8-openjdk-amd64/bin/java +JAVA_HOME = /usr/lib/jvm/java-8-openjdk-amd64 +JAVA_JNI_INCLUDE = -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux +JAVA_JNI_LIBS = -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 -ljava -lverify -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm +JDB = /usr/lib/jvm/java-8-openjdk-amd64/bin/jdb +JEUCLID_CORE = /home/shashank/scilab-master_5.5.2/thirdparty/jeuclid-core.jar +JGRAPHX = /home/shashank/scilab-master_5.5.2/thirdparty/jgraphx.jar +JHALL = /home/shashank/scilab-master_5.5.2/thirdparty/jhall.jar +JLATEXMATH = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-1.0.3.jar +JLATEXMATH_FOP = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-fop-1.0.3.jar +JOGL2 = /home/shashank/scilab-master_5.5.2/thirdparty/jogl2.jar +JROSETTA_API = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-API.jar +JROSETTA_ENGINE = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-engine.jar +JUNIT4 = /usr/share/java/junit4.jar +LAPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -llapack +LCOV = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = -Wl,--no-as-needed +LIBICONV = -liconv +LIBINTL = +LIBM = -lm +LIBOBJS = +LIBS = -lpthread -ldl -lcurses -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LOGGING_LEVEL = SEVERE +LOOKS = /home/shashank/scilab-master_5.5.2/thirdparty/looks-2.1.1.jar +LTLIBICONV = -liconv +LTLIBINTL = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing makeinfo +MANIFEST_TOOL = : +MATIO_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +MATIO_ENABLE = yes +MATIO_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lm -lz -lmatio -lhdf5 +MKDIR_P = /bin/mkdir -p +MPI_ENABLE = no +MSGCAT = /usr/bin/msgcat +MSGFMT = /usr/bin/msgfmt +MSGFMT_015 = /usr/bin/msgfmt +MSGMERGE = /usr/bin/msgmerge +NM = nm +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OCAMLC = ocamlc +OCAMLDEP = ocamldep +OCAMLLEX = ocamllex +OCAMLOPT = ocamlopt +OCAMLYACC = ocamlyacc +OPENMPI_CC = +OPENMPI_CFLAGS = +OPENMPI_CXX = +OPENMPI_CXXFLAGS = +OPENMPI_LIBS = +OPENMP_CFLAGS = -fopenmp +OPENMP_CXXFLAGS = -fopenmp +OPENMP_ENABLE = yes +OPENMP_LIBS = -lgomp -lstdc++ +OTOOL = +OTOOL64 = +PACKAGE = scilab +PACKAGE_BUGREPORT = http://bugzilla.scilab.org/ +PACKAGE_NAME = Scilab +PACKAGE_STRING = Scilab 5 +PACKAGE_TARNAME = scilab +PACKAGE_URL = +PACKAGE_VERSION = 5 +PATH_SEPARATOR = : +PCRE_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +PCRE_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/pcre-config +PCRE_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lpcreposix -lpcre +PCRE_VERSION = 8.35 +PKG_CONFIG = /usr/bin/pkg-config +POSUB = po +POW_LIB = +PYTHON = +RANLIB = ranlib +RELOCATABLE = no +RT_LIB = -lrt +SAXON = /home/shashank/scilab-master_5.5.2/thirdparty/saxon9he.jar +SCILAB_BINARY_VERSION = 5.5.2 +SCILAB_LIBRARY_VERSION = 5:5:2 +SCILAB_VERSION_MAINTENANCE = 2 +SCILAB_VERSION_MAJOR = 5 +SCILAB_VERSION_MINOR = 5 +SCIRENDERER = ${modules.dir}/scirenderer/${build.jar.dir}/scirenderer.jar +SCIRENDERER_CP = $SCILAB/modules/scirenderer/jar/scirenderer.jar +SCI_CFLAGS = -D_LARGEFILE64_SOURCE -DNDEBUG -m64 -fno-stack-protector +SCI_CXXFLAGS = -DNDEBUG -fno-stack-protector +SCI_FFLAGS = -DNDEBUG -m64 -fPIC +SCI_LDFLAGS = +SED = /bin/sed +SET_MAKE = +SET_RELOCATABLE = +SHELL = /bin/bash +SKINLF = /home/shashank/scilab-master_5.5.2/thirdparty/skinlf.jar +SPLINT = no +STRIP = strip +SWIG_BIN = +SWIG_JAVA = +SWIG_RUNTIME_LIBS_DIR = +SWIG_SCILAB = +TCLTK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -ltk8.5 -L/home/shashank/scilab-master_5.5.2/usr/lib -ltcl8.5 -ldl +TCL_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include +TK_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include +UMFPACK_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +UMFPACK_ENABLE = yes +UMFPACK_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lumfpack -lamd +USE_NLS = yes +VERSION = 5 +WITH_OCAML = +WITH_TKSCI = yes +XCOS_ENABLE = yes +XGETTEXT = /usr/bin/xgettext +XGETTEXT_015 = /usr/bin/xgettext +XGETTEXT_EXTRA_OPTIONS = +XMKMF = +XMLGRAPHICS_COMMONS = /home/shashank/scilab-master_5.5.2/thirdparty/xmlgraphics-commons-1.4.jar +XML_APIS_EXT = /home/shashank/scilab-master_5.5.2/thirdparty/xml-apis-ext.jar +XML_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/xml2-config +XML_FLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include/libxml2 +XML_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lxml2 -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lz -lm -ldl +XML_VERSION = 2.9.1 +X_CFLAGS = +X_EXTRA_LIBS = +X_LIBS = +X_PRE_LIBS = +abs_builddir = /home/shashank/scilab-master_5.5.2/modules/development_tools +abs_srcdir = /home/shashank/scilab-master_5.5.2/modules/development_tools +abs_top_builddir = /home/shashank/scilab-master_5.5.2 +abs_top_srcdir = /home/shashank/scilab-master_5.5.2 +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +ac_ct_F77 = gfortran +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +cxx_present = yes +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/shashank/scilab-master_5.5.2/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../../ +top_builddir = ../.. +top_srcdir = ../.. + +#### Target ###### +modulename = development_tools + +#### development_tools : Conf files #### +libdevelopment_tools_la_rootdir = $(mydatadir) +libdevelopment_tools_la_root_DATA = license.txt +#### development_tools : init scripts #### +libdevelopment_tools_la_etcdir = $(mydatadir)/etc +libdevelopment_tools_la_etc_DATA = etc/development_tools.quit etc/development_tools.start +#### development_tools : test level data file #### +libdevelopment_tools_la_datadir = $(mydatadir)/data +libdevelopment_tools_la_data_DATA = data/test_run_level.xml +MACROSDIRSEXT = macros/assert + +# Where all the Scilab stuff is installed (macros, help, ...) +mydatadir = $(pkgdatadir)/modules/$(modulename) + +# Set AM_* SCI detected settings +AM_CPPFLAGS = $(SCI_CPPFLAGS) +AM_CFLAGS = $(SCI_CFLAGS) +AM_CXXFLAGS = $(SCI_CXXFLAGS) +# append includes to AM_FFLAGS to manage fortran includes +AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/ + +# Tag shared libraries with the Scilab version +AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION) + +# splint options +SPLINT_OPTIONS = -weak -booltype BOOL + +########################### JAVA ###################################### +#### We are delegating java compilation to ant... Thanks to that +#### the procedure will be the same with Microsoft Windows (C) +#### and Linux/Unix +####################################################################### +TARGETS_ALL = $(am__append_1) + +################ MACROS ###################### +# Rule to build a macro +# NOT USED AT THE MOMENT +SUFFIXES = .sci + +########### INSTALL DOCUMENTATION ################### + +# Install documentation files into the right target +# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because +# automake needs the html files to be present which is not the case when +# we are building Scilab + +# Where it should be installed +pkgdocdir = $(mydatadir) + +# What is the mask of the help source +DOCMASKXML = *.xml + +# What is the mask of the MathML sources +DOCMASKMML = *.mml + +########### INSTALL DATA ################### +# Install macros, help & demos +# Where it should be installed +pkgmacrosdir = $(mydatadir) +# Which directory we process +MACRODIRS = macros/ +# Mask of the Scilab sources macros +MACROMASK = *.sci +# Mask of the Scilab executable sources macros +MACROBUILDMASK = *.sce +# Mask of the Scilab compiled macros +MACROBINMASK = *.bin +# List of the standard directory for tests +TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java +# Where the demos should be installed +pkgdemosdir = $(mydatadir) +# List of the standard directory for demos +DEMOS_DIR = demos +# List of the standard directory for examples +EXAMPLES_DIR = examples +# Where to export JAVA archives (.jar) +JARDIR = jar/ +# JAR files mask +JARMASK = *.jar +# Chapter file +HELP_CHAPTERDIR = help/ +HELP_CHAPTERFILE = addchapter.sce +HELP_CHAPTERLANG = en_US fr_FR pt_BR +all: all-am + +.SUFFIXES: +.SUFFIXES: .sci .bin +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/development_tools/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign modules/development_tools/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/Makefile.incl.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-libdevelopment_tools_la_dataDATA: $(libdevelopment_tools_la_data_DATA) + @$(NORMAL_INSTALL) + @list='$(libdevelopment_tools_la_data_DATA)'; test -n "$(libdevelopment_tools_la_datadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdevelopment_tools_la_datadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdevelopment_tools_la_datadir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libdevelopment_tools_la_datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libdevelopment_tools_la_datadir)" || exit $$?; \ + done + +uninstall-libdevelopment_tools_la_dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(libdevelopment_tools_la_data_DATA)'; test -n "$(libdevelopment_tools_la_datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdevelopment_tools_la_datadir)'; $(am__uninstall_files_from_dir) +install-libdevelopment_tools_la_etcDATA: $(libdevelopment_tools_la_etc_DATA) + @$(NORMAL_INSTALL) + @list='$(libdevelopment_tools_la_etc_DATA)'; test -n "$(libdevelopment_tools_la_etcdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdevelopment_tools_la_etcdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdevelopment_tools_la_etcdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libdevelopment_tools_la_etcdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libdevelopment_tools_la_etcdir)" || exit $$?; \ + done + +uninstall-libdevelopment_tools_la_etcDATA: + @$(NORMAL_UNINSTALL) + @list='$(libdevelopment_tools_la_etc_DATA)'; test -n "$(libdevelopment_tools_la_etcdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdevelopment_tools_la_etcdir)'; $(am__uninstall_files_from_dir) +install-libdevelopment_tools_la_rootDATA: $(libdevelopment_tools_la_root_DATA) + @$(NORMAL_INSTALL) + @list='$(libdevelopment_tools_la_root_DATA)'; test -n "$(libdevelopment_tools_la_rootdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdevelopment_tools_la_rootdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdevelopment_tools_la_rootdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libdevelopment_tools_la_rootdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libdevelopment_tools_la_rootdir)" || exit $$?; \ + done + +uninstall-libdevelopment_tools_la_rootDATA: + @$(NORMAL_UNINSTALL) + @list='$(libdevelopment_tools_la_root_DATA)'; test -n "$(libdevelopment_tools_la_rootdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdevelopment_tools_la_rootdir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(DATA) all-local +installdirs: + for dir in "$(DESTDIR)$(libdevelopment_tools_la_datadir)" "$(DESTDIR)$(libdevelopment_tools_la_etcdir)" "$(DESTDIR)$(libdevelopment_tools_la_rootdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local \ + install-libdevelopment_tools_la_dataDATA \ + install-libdevelopment_tools_la_etcDATA \ + install-libdevelopment_tools_la_rootDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: install-html-local + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libdevelopment_tools_la_dataDATA \ + uninstall-libdevelopment_tools_la_etcDATA \ + uninstall-libdevelopment_tools_la_rootDATA + +.MAKE: check-am install-am install-strip + +.PHONY: all all-am all-local check check-am check-local clean \ + clean-generic clean-libtool clean-local cscopelist-am ctags-am \ + distclean distclean-generic distclean-libtool distclean-local \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-data-local \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-html-local install-info \ + install-info-am install-libdevelopment_tools_la_dataDATA \ + install-libdevelopment_tools_la_etcDATA \ + install-libdevelopment_tools_la_rootDATA install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am \ + uninstall-libdevelopment_tools_la_dataDATA \ + uninstall-libdevelopment_tools_la_etcDATA \ + uninstall-libdevelopment_tools_la_rootDATA + + +# This target enables tests for Scilab +check-local: $(top_builddir)/scilab-bin test + if test -d $(mydatadir)/tests; then \ + @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \ + fi +check-code: + if test -f build.xml; then \ + $(ANT) checkstyle; \ + fi + if test -x "$(SPLINT)"; then \ + $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \ + fi +java: +# Some configurations needs to export JAVA_HOME in the current env + @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \ + if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ + if test -f build.xml -a $$USEANT -eq 1; then \ + $(ANT); \ + fi + +clean-java: +# Some configurations needs to export JAVA_HOME in the current env + @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \ + if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ + if test -f build.xml -a $$USEANT -eq 1; then \ + $(ANT) clean; \ + fi; + +# If the user request for the SWIG generation of the wrappers Java => C/C++ +# We call the target swig-build on the variable SWIG_WRAPPERS + +#swig: $(SWIG_WRAPPERS) +# @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \ +# SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \ +# if test -n "$(SWIG_WRAPPERS)"; then \ +# for file in $(SWIG_WRAPPERS) ; do \ +# echo "Swig process of $$file (Java) ..."; \ +# $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \ +# done; \ +# fi + +#swig-scilab: $(SWIG_SCILAB_WRAPPERS) +# @SWIG_OUTDIR=src/swig/; \ +# if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \ +# for file in $(SWIG_SCILAB_WRAPPERS) ; do \ +# echo "Swig process of $$file (Scilab) ..."; \ +# $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \ +# done; \ +# fi + +# If the user request for the SWIG generation of the wrappers Java => C/C++ +# We call the target swig-build on the variable SWIG_WRAPPERS + +#giws: $(GIWS_WRAPPERS) +# @GIWS_OUTPUTDIR=src/jni/; \ +# MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \ +# if test -n "$(GIWS_WRAPPERS)"; then \ +# for file in $(GIWS_WRAPPERS) ; do \ +# echo "GIWS process of $$file ..."; \ +# if test -z "$(GIWS_OPTIONS)"; then \ +# $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \ +# else \ +# echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \ +# $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \ +# fi \ +# done; \ +# fi + +#giws-exception: +# @GIWS_OUTPUTDIR=src/jni/;\ +# echo "GIWS: Generation of exception class ..."; \ +# $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR + +macros: + -@( if test ! -x $(top_builddir)/scilab-bin; then \ + echo "Error : Cannot build $< : Scilab has not been built"; \ + else \ + $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\ + fi) + +# Removes the macros +clean-macros: +# Removes macros (*.bin generated from .sci) + @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \ + echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \ + rm -f $(builddir)/$$dir/$(MACROBINMASK); \ + done + +test: +# More tests could be added here + @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ + if test -f build.xml -a $$USEANT -eq 1; then \ + $(ANT) test; \ + fi + +all-local: $(TARGETS_ALL) + +.sci.bin: + -@( if test ! -x $(top_builddir)/scilab-bin; then \ + echo "Error : Cannot build $< : Scilab has not been build"; \ + else \ + echo "Creating $@"; \ + $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \ + fi ) + +install-html-local: + +install-data-local-local: +# Mainly for javasci + @if test -d $(srcdir)/javadoc; then \ + cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \ + fi +# If the user wants the help sources to be installed + @echo "-------- Install of XML sources of help files --------"; \ + for lang in $(ALL_LINGUAS); do \ + if test -d $(srcdir)/help/$$lang; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \ + if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \ + for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \ + done ; \ + fi; \ + fi; \ + done; \ + @echo "-------- Install of MathML sources --------"; \ + if test -d $(srcdir)/help/mml/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \ + if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \ + for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \ + done ; \ + fi; \ + fi +install-data-local: +# Install the tests + @echo "-------- Install tests (if any) --------"; \ + for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \ + if test -d $(srcdir)/$$dir/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \ + for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \ + if test -d "$(srcdir)/$$dir/$$file"; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \ + $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \ + $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \ + fi \ + done; \ + fi; \ + done +# Install the help chapter + @echo "-------- Install the help chapter (if any) --------"; \ + for lang in $(HELP_CHAPTERLANG); do \ + HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \ + if test -f $$HELPFILE; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \ + echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \ + $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \ + fi; \ + done +# Install the demos & examples + @echo "-------- Install demos & examples (if any) --------"; \ + for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \ + if test -d $(srcdir)/$$dir/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \ + for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \ + if test -d "$(srcdir)/$$dir/$$file"; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \ + $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \ + $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \ + fi \ + done; \ + fi; \ + done +# Install the macros + @echo "-------- Install macros (if any) --------"; \ + for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \ + $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \ + if test -d $(srcdir)/$$dir/; then \ + FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\ + if test -n "$(MACROSSPECIALEXT)"; then \ + specialExtDir=""; \ + for specialExt in $(MACROSSPECIALEXT); do \ + specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \ + done; \ + FILELIST="$$FILELIST $$specialExtDir"; \ + fi; \ + for file in `ls -1 $$FILELIST 2>/dev/null`; do \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \ + done; \ + fi; \ + done +# Install java files (.jar) + @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \ + echo "-------- Install jar files --------"; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \ + for file in $(srcdir)/$(JARDIR)$(JARMASK); do\ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \ + done ; \ + fi + +########### CLEAN ################### +# Clean help (generated automatically by Scilab) +# It used to clean the macro (clean-macros) but this was causing +# make clean && make to fail Scilab startup +clean-local: clean-java +#clean-local: + +distclean-local: + rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_* + +.PHONY: macros java swig giws + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/modules/development_tools/Makefile.am b/modules/development_tools/Makefile.am new file mode 100755 index 000000000..5fdd8a87b --- /dev/null +++ b/modules/development_tools/Makefile.am @@ -0,0 +1,23 @@ +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006 - INRIA - Sylvestre LEDRU +# +# This file is distributed under the same license as the Scilab package. + + +#### Target ###### +modulename=development_tools + + +#### development_tools : Conf files #### +libdevelopment_tools_la_rootdir = $(mydatadir) +libdevelopment_tools_la_root_DATA = license.txt +#### development_tools : init scripts #### +libdevelopment_tools_la_etcdir = $(mydatadir)/etc +libdevelopment_tools_la_etc_DATA = etc/development_tools.quit etc/development_tools.start +#### development_tools : test level data file #### +libdevelopment_tools_la_datadir = $(mydatadir)/data +libdevelopment_tools_la_data_DATA = data/test_run_level.xml + +MACROSDIRSEXT = macros/assert + +include $(top_srcdir)/Makefile.incl.am diff --git a/modules/development_tools/Makefile.in b/modules/development_tools/Makefile.in new file mode 100755 index 000000000..bd8dde485 --- /dev/null +++ b/modules/development_tools/Makefile.in @@ -0,0 +1,1041 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006 - INRIA - Sylvestre LEDRU +# +# This file is distributed under the same license as the Scilab package. + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr> +# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +# +# This file must be used under the terms of the CeCILL. +# This source file is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at +# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +# + +########## +### Makefile included stuff +### Target, variable, suffixes which are supposed to be useful in every makefile.am +########## + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs +@NEED_JAVA_TRUE@am__append_1 = java +subdir = modules/development_tools +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \ + $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \ + $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \ + $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \ + $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \ + $(top_srcdir)/m4/intel_compiler.m4 \ + $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \ + $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \ + $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \ + $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \ + $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdevelopment_tools_la_datadir)" \ + "$(DESTDIR)$(libdevelopment_tools_la_etcdir)" \ + "$(DESTDIR)$(libdevelopment_tools_la_rootdir)" +DATA = $(libdevelopment_tools_la_data_DATA) \ + $(libdevelopment_tools_la_etc_DATA) \ + $(libdevelopment_tools_la_root_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +ALL_LINGUAS_DOC = @ALL_LINGUAS_DOC@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +ANT = @ANT@ +ANTLR = @ANTLR@ +AR = @AR@ +ARPACK_LIBS = @ARPACK_LIBS@ +ASM3 = @ASM3@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AVALON_FRAMEWORK = @AVALON_FRAMEWORK@ +AWK = @AWK@ +BATIK = @BATIK@ +BLAS_LIBS = @BLAS_LIBS@ +CC = @CC@ +CCACHE = @CCACHE@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECKSTYLE = @CHECKSTYLE@ +COBERTURA = @COBERTURA@ +COMMONS_BEANUTILS = @COMMONS_BEANUTILS@ +COMMONS_IO = @COMMONS_IO@ +COMMONS_LOGGING = @COMMONS_LOGGING@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CURL_VERSION = @CURL_VERSION@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOCBOOK_ROOT = @DOCBOOK_ROOT@ +DOXYGEN_BIN = @DOXYGEN_BIN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECJ = @ECJ@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFTW3_LIB = @FFTW3_LIB@ +FFTW_ENABLE = @FFTW_ENABLE@ +FGREP = @FGREP@ +FLEXDOCK = @FLEXDOCK@ +FLIBS = @FLIBS@ +FOP = @FOP@ +FREEHEP_GRAPHICS2D = @FREEHEP_GRAPHICS2D@ +FREEHEP_GRAPHICSIO = @FREEHEP_GRAPHICSIO@ +FREEHEP_GRAPHICSIO_EMF = @FREEHEP_GRAPHICSIO_EMF@ +FREEHEP_IO = @FREEHEP_IO@ +FREEHEP_UTIL = @FREEHEP_UTIL@ +GENHTML = @GENHTML@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GIWS_BIN = @GIWS_BIN@ +GLUEGEN2_RT = @GLUEGEN2_RT@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GRAPHICS_ENABLE = @GRAPHICS_ENABLE@ +GREP = @GREP@ +GUI_ENABLE = @GUI_ENABLE@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +HELP_ENABLE = @HELP_ENABLE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +JAR = @JAR@ +JAVA = @JAVA@ +JAVAC = @JAVAC@ +JAVAC_DEBUG = @JAVAC_DEBUG@ +JAVADOC = @JAVADOC@ +JAVAH = @JAVAH@ +JAVASCI_ENABLE = @JAVASCI_ENABLE@ +JAVA_ENABLE = @JAVA_ENABLE@ +JAVA_G = @JAVA_G@ +JAVA_HOME = @JAVA_HOME@ +JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@ +JAVA_JNI_LIBS = @JAVA_JNI_LIBS@ +JDB = @JDB@ +JEUCLID_CORE = @JEUCLID_CORE@ +JGRAPHX = @JGRAPHX@ +JHALL = @JHALL@ +JLATEXMATH = @JLATEXMATH@ +JLATEXMATH_FOP = @JLATEXMATH_FOP@ +JOGL2 = @JOGL2@ +JROSETTA_API = @JROSETTA_API@ +JROSETTA_ENGINE = @JROSETTA_ENGINE@ +JUNIT4 = @JUNIT4@ +LAPACK_LIBS = @LAPACK_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOGGING_LEVEL = @LOGGING_LEVEL@ +LOOKS = @LOOKS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MATIO_CFLAGS = @MATIO_CFLAGS@ +MATIO_ENABLE = @MATIO_ENABLE@ +MATIO_LIBS = @MATIO_LIBS@ +MKDIR_P = @MKDIR_P@ +MPI_ENABLE = @MPI_ENABLE@ +MSGCAT = @MSGCAT@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OCAMLC = @OCAMLC@ +OCAMLDEP = @OCAMLDEP@ +OCAMLLEX = @OCAMLLEX@ +OCAMLOPT = @OCAMLOPT@ +OCAMLYACC = @OCAMLYACC@ +OPENMPI_CC = @OPENMPI_CC@ +OPENMPI_CFLAGS = @OPENMPI_CFLAGS@ +OPENMPI_CXX = @OPENMPI_CXX@ +OPENMPI_CXXFLAGS = @OPENMPI_CXXFLAGS@ +OPENMPI_LIBS = @OPENMPI_LIBS@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ +OPENMP_ENABLE = @OPENMP_ENABLE@ +OPENMP_LIBS = @OPENMP_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_CONFIG = @PCRE_CONFIG@ +PCRE_LIBS = @PCRE_LIBS@ +PCRE_VERSION = @PCRE_VERSION@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +POW_LIB = @POW_LIB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELOCATABLE = @RELOCATABLE@ +RT_LIB = @RT_LIB@ +SAXON = @SAXON@ +SCILAB_BINARY_VERSION = @SCILAB_BINARY_VERSION@ +SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@ +SCILAB_VERSION_MAINTENANCE = @SCILAB_VERSION_MAINTENANCE@ +SCILAB_VERSION_MAJOR = @SCILAB_VERSION_MAJOR@ +SCILAB_VERSION_MINOR = @SCILAB_VERSION_MINOR@ +SCIRENDERER = @SCIRENDERER@ +SCIRENDERER_CP = @SCIRENDERER_CP@ +SCI_CFLAGS = @SCI_CFLAGS@ +SCI_CXXFLAGS = @SCI_CXXFLAGS@ +SCI_FFLAGS = @SCI_FFLAGS@ +SCI_LDFLAGS = @SCI_LDFLAGS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SET_RELOCATABLE = @SET_RELOCATABLE@ +SHELL = @SHELL@ +SKINLF = @SKINLF@ +SPLINT = @SPLINT@ +STRIP = @STRIP@ +SWIG_BIN = @SWIG_BIN@ +SWIG_JAVA = @SWIG_JAVA@ +SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@ +SWIG_SCILAB = @SWIG_SCILAB@ +TCLTK_LIBS = @TCLTK_LIBS@ +TCL_INC_PATH = @TCL_INC_PATH@ +TK_INC_PATH = @TK_INC_PATH@ +UMFPACK_CFLAGS = @UMFPACK_CFLAGS@ +UMFPACK_ENABLE = @UMFPACK_ENABLE@ +UMFPACK_LIB = @UMFPACK_LIB@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WITH_OCAML = @WITH_OCAML@ +WITH_TKSCI = @WITH_TKSCI@ +XCOS_ENABLE = @XCOS_ENABLE@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@ +XML_APIS_EXT = @XML_APIS_EXT@ +XML_CONFIG = @XML_CONFIG@ +XML_FLAGS = @XML_FLAGS@ +XML_LIBS = @XML_LIBS@ +XML_VERSION = @XML_VERSION@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cxx_present = @cxx_present@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +#### Target ###### +modulename = development_tools + +#### development_tools : Conf files #### +libdevelopment_tools_la_rootdir = $(mydatadir) +libdevelopment_tools_la_root_DATA = license.txt +#### development_tools : init scripts #### +libdevelopment_tools_la_etcdir = $(mydatadir)/etc +libdevelopment_tools_la_etc_DATA = etc/development_tools.quit etc/development_tools.start +#### development_tools : test level data file #### +libdevelopment_tools_la_datadir = $(mydatadir)/data +libdevelopment_tools_la_data_DATA = data/test_run_level.xml +MACROSDIRSEXT = macros/assert + +# Where all the Scilab stuff is installed (macros, help, ...) +mydatadir = $(pkgdatadir)/modules/$(modulename) + +# Set AM_* SCI detected settings +AM_CPPFLAGS = $(SCI_CPPFLAGS) +AM_CFLAGS = $(SCI_CFLAGS) +AM_CXXFLAGS = $(SCI_CXXFLAGS) +# append includes to AM_FFLAGS to manage fortran includes +AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/ + +# Tag shared libraries with the Scilab version +AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION) + +# splint options +SPLINT_OPTIONS = -weak -booltype BOOL + +########################### JAVA ###################################### +#### We are delegating java compilation to ant... Thanks to that +#### the procedure will be the same with Microsoft Windows (C) +#### and Linux/Unix +####################################################################### +TARGETS_ALL = $(am__append_1) + +################ MACROS ###################### +# Rule to build a macro +# NOT USED AT THE MOMENT +SUFFIXES = .sci + +########### INSTALL DOCUMENTATION ################### + +# Install documentation files into the right target +# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because +# automake needs the html files to be present which is not the case when +# we are building Scilab + +# Where it should be installed +pkgdocdir = $(mydatadir) + +# What is the mask of the help source +DOCMASKXML = *.xml + +# What is the mask of the MathML sources +DOCMASKMML = *.mml + +########### INSTALL DATA ################### +# Install macros, help & demos +# Where it should be installed +pkgmacrosdir = $(mydatadir) +# Which directory we process +MACRODIRS = macros/ +# Mask of the Scilab sources macros +MACROMASK = *.sci +# Mask of the Scilab executable sources macros +MACROBUILDMASK = *.sce +# Mask of the Scilab compiled macros +MACROBINMASK = *.bin +# List of the standard directory for tests +TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java +# Where the demos should be installed +pkgdemosdir = $(mydatadir) +# List of the standard directory for demos +DEMOS_DIR = demos +# List of the standard directory for examples +EXAMPLES_DIR = examples +# Where to export JAVA archives (.jar) +JARDIR = jar/ +# JAR files mask +JARMASK = *.jar +# Chapter file +HELP_CHAPTERDIR = help/ +HELP_CHAPTERFILE = addchapter.sce +HELP_CHAPTERLANG = en_US fr_FR pt_BR +all: all-am + +.SUFFIXES: +.SUFFIXES: .sci .bin +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/development_tools/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign modules/development_tools/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/Makefile.incl.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-libdevelopment_tools_la_dataDATA: $(libdevelopment_tools_la_data_DATA) + @$(NORMAL_INSTALL) + @list='$(libdevelopment_tools_la_data_DATA)'; test -n "$(libdevelopment_tools_la_datadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdevelopment_tools_la_datadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdevelopment_tools_la_datadir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libdevelopment_tools_la_datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libdevelopment_tools_la_datadir)" || exit $$?; \ + done + +uninstall-libdevelopment_tools_la_dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(libdevelopment_tools_la_data_DATA)'; test -n "$(libdevelopment_tools_la_datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdevelopment_tools_la_datadir)'; $(am__uninstall_files_from_dir) +install-libdevelopment_tools_la_etcDATA: $(libdevelopment_tools_la_etc_DATA) + @$(NORMAL_INSTALL) + @list='$(libdevelopment_tools_la_etc_DATA)'; test -n "$(libdevelopment_tools_la_etcdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdevelopment_tools_la_etcdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdevelopment_tools_la_etcdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libdevelopment_tools_la_etcdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libdevelopment_tools_la_etcdir)" || exit $$?; \ + done + +uninstall-libdevelopment_tools_la_etcDATA: + @$(NORMAL_UNINSTALL) + @list='$(libdevelopment_tools_la_etc_DATA)'; test -n "$(libdevelopment_tools_la_etcdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdevelopment_tools_la_etcdir)'; $(am__uninstall_files_from_dir) +install-libdevelopment_tools_la_rootDATA: $(libdevelopment_tools_la_root_DATA) + @$(NORMAL_INSTALL) + @list='$(libdevelopment_tools_la_root_DATA)'; test -n "$(libdevelopment_tools_la_rootdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdevelopment_tools_la_rootdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdevelopment_tools_la_rootdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libdevelopment_tools_la_rootdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libdevelopment_tools_la_rootdir)" || exit $$?; \ + done + +uninstall-libdevelopment_tools_la_rootDATA: + @$(NORMAL_UNINSTALL) + @list='$(libdevelopment_tools_la_root_DATA)'; test -n "$(libdevelopment_tools_la_rootdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdevelopment_tools_la_rootdir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(DATA) all-local +installdirs: + for dir in "$(DESTDIR)$(libdevelopment_tools_la_datadir)" "$(DESTDIR)$(libdevelopment_tools_la_etcdir)" "$(DESTDIR)$(libdevelopment_tools_la_rootdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local \ + install-libdevelopment_tools_la_dataDATA \ + install-libdevelopment_tools_la_etcDATA \ + install-libdevelopment_tools_la_rootDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: install-html-local + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libdevelopment_tools_la_dataDATA \ + uninstall-libdevelopment_tools_la_etcDATA \ + uninstall-libdevelopment_tools_la_rootDATA + +.MAKE: check-am install-am install-strip + +.PHONY: all all-am all-local check check-am check-local clean \ + clean-generic clean-libtool clean-local cscopelist-am ctags-am \ + distclean distclean-generic distclean-libtool distclean-local \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-data-local \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-html-local install-info \ + install-info-am install-libdevelopment_tools_la_dataDATA \ + install-libdevelopment_tools_la_etcDATA \ + install-libdevelopment_tools_la_rootDATA install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am \ + uninstall-libdevelopment_tools_la_dataDATA \ + uninstall-libdevelopment_tools_la_etcDATA \ + uninstall-libdevelopment_tools_la_rootDATA + + +# This target enables tests for Scilab +check-local: $(top_builddir)/scilab-bin test + if test -d $(mydatadir)/tests; then \ + @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \ + fi +check-code: + if test -f build.xml; then \ + $(ANT) checkstyle; \ + fi + if test -x "$(SPLINT)"; then \ + $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \ + fi +@NEED_JAVA_TRUE@java: +# Some configurations needs to export JAVA_HOME in the current env +@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \ +@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ +@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \ +@NEED_JAVA_TRUE@ $(ANT); \ +@NEED_JAVA_TRUE@ fi + +@NEED_JAVA_TRUE@clean-java: +# Some configurations needs to export JAVA_HOME in the current env +@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \ +@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ +@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \ +@NEED_JAVA_TRUE@ $(ANT) clean; \ +@NEED_JAVA_TRUE@ fi; + +# If the user request for the SWIG generation of the wrappers Java => C/C++ +# We call the target swig-build on the variable SWIG_WRAPPERS + +@SWIG_TRUE@swig: $(SWIG_WRAPPERS) +@SWIG_TRUE@ @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \ +@SWIG_TRUE@ SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \ +@SWIG_TRUE@ if test -n "$(SWIG_WRAPPERS)"; then \ +@SWIG_TRUE@ for file in $(SWIG_WRAPPERS) ; do \ +@SWIG_TRUE@ echo "Swig process of $$file (Java) ..."; \ +@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \ +@SWIG_TRUE@ done; \ +@SWIG_TRUE@ fi + +@SWIG_TRUE@swig-scilab: $(SWIG_SCILAB_WRAPPERS) +@SWIG_TRUE@ @SWIG_OUTDIR=src/swig/; \ +@SWIG_TRUE@ if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \ +@SWIG_TRUE@ for file in $(SWIG_SCILAB_WRAPPERS) ; do \ +@SWIG_TRUE@ echo "Swig process of $$file (Scilab) ..."; \ +@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \ +@SWIG_TRUE@ done; \ +@SWIG_TRUE@ fi + +# If the user request for the SWIG generation of the wrappers Java => C/C++ +# We call the target swig-build on the variable SWIG_WRAPPERS + +@GIWS_TRUE@giws: $(GIWS_WRAPPERS) +@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/; \ +@GIWS_TRUE@ MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \ +@GIWS_TRUE@ if test -n "$(GIWS_WRAPPERS)"; then \ +@GIWS_TRUE@ for file in $(GIWS_WRAPPERS) ; do \ +@GIWS_TRUE@ echo "GIWS process of $$file ..."; \ +@GIWS_TRUE@ if test -z "$(GIWS_OPTIONS)"; then \ +@GIWS_TRUE@ $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \ +@GIWS_TRUE@ else \ +@GIWS_TRUE@ echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \ +@GIWS_TRUE@ $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \ +@GIWS_TRUE@ fi \ +@GIWS_TRUE@ done; \ +@GIWS_TRUE@ fi + +@GIWS_TRUE@giws-exception: +@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/;\ +@GIWS_TRUE@ echo "GIWS: Generation of exception class ..."; \ +@GIWS_TRUE@ $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR + +macros: + -@( if test ! -x $(top_builddir)/scilab-bin; then \ + echo "Error : Cannot build $< : Scilab has not been built"; \ + else \ + $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\ + fi) + +# Removes the macros +clean-macros: +# Removes macros (*.bin generated from .sci) + @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \ + echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \ + rm -f $(builddir)/$$dir/$(MACROBINMASK); \ + done + +test: +# More tests could be added here + @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ + if test -f build.xml -a $$USEANT -eq 1; then \ + $(ANT) test; \ + fi + +all-local: $(TARGETS_ALL) + +.sci.bin: + -@( if test ! -x $(top_builddir)/scilab-bin; then \ + echo "Error : Cannot build $< : Scilab has not been build"; \ + else \ + echo "Creating $@"; \ + $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \ + fi ) + +install-html-local: + +install-data-local-local: +# Mainly for javasci + @if test -d $(srcdir)/javadoc; then \ + cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \ + fi +# If the user wants the help sources to be installed +@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of XML sources of help files --------"; \ +@INSTALL_HELP_XML_TRUE@ for lang in $(ALL_LINGUAS); do \ +@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/$$lang; then \ +@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \ +@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \ +@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \ +@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \ +@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \ +@INSTALL_HELP_XML_TRUE@ done ; \ +@INSTALL_HELP_XML_TRUE@ fi; \ +@INSTALL_HELP_XML_TRUE@ fi; \ +@INSTALL_HELP_XML_TRUE@ done; \ +@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of MathML sources --------"; \ +@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/mml/; then \ +@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \ +@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \ +@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \ +@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \ +@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \ +@INSTALL_HELP_XML_TRUE@ done ; \ +@INSTALL_HELP_XML_TRUE@ fi; \ +@INSTALL_HELP_XML_TRUE@ fi +install-data-local: +# Install the tests + @echo "-------- Install tests (if any) --------"; \ + for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \ + if test -d $(srcdir)/$$dir/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \ + for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \ + if test -d "$(srcdir)/$$dir/$$file"; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \ + $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \ + $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \ + fi \ + done; \ + fi; \ + done +# Install the help chapter + @echo "-------- Install the help chapter (if any) --------"; \ + for lang in $(HELP_CHAPTERLANG); do \ + HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \ + if test -f $$HELPFILE; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \ + echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \ + $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \ + fi; \ + done +# Install the demos & examples + @echo "-------- Install demos & examples (if any) --------"; \ + for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \ + if test -d $(srcdir)/$$dir/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \ + for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \ + if test -d "$(srcdir)/$$dir/$$file"; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \ + $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \ + $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \ + fi \ + done; \ + fi; \ + done +# Install the macros + @echo "-------- Install macros (if any) --------"; \ + for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \ + $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \ + if test -d $(srcdir)/$$dir/; then \ + FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\ + if test -n "$(MACROSSPECIALEXT)"; then \ + specialExtDir=""; \ + for specialExt in $(MACROSSPECIALEXT); do \ + specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \ + done; \ + FILELIST="$$FILELIST $$specialExtDir"; \ + fi; \ + for file in `ls -1 $$FILELIST 2>/dev/null`; do \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \ + done; \ + fi; \ + done +# Install java files (.jar) + @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \ + echo "-------- Install jar files --------"; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \ + for file in $(srcdir)/$(JARDIR)$(JARMASK); do\ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \ + done ; \ + fi + +########### CLEAN ################### +# Clean help (generated automatically by Scilab) +# It used to clean the macro (clean-macros) but this was causing +# make clean && make to fail Scilab startup +@NEED_JAVA_TRUE@clean-local: clean-java +@NEED_JAVA_FALSE@clean-local: + +distclean-local: + rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_* + +.PHONY: macros java swig giws + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/modules/development_tools/data/test_run_level.xml b/modules/development_tools/data/test_run_level.xml new file mode 100755 index 000000000..fbf9d632d --- /dev/null +++ b/modules/development_tools/data/test_run_level.xml @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> + +<tests> + <level severity="1"> + + <module name="string"> + <test>evstr</test> + <test>emptystr</test> + </module> + + <module name="core"> + <test>clear</test> + <test>colon</test> + <test>matelm</test> + <test>matops</test> + <test>inf_nan</test> + </module> + + <module name="development_tools"> + <test>test_run_nojvm</test> + </module> + + <module name="linear_algebra"> + <test>spec</test> + <test>norm</test> + </module> + + <module name="data_structures"> + <test>fieldnames</test> + <test>hypermat</test> + <test>isfield</test> + <test>listextraction</test> + <test>listinsertion</test> + <test>lstcat</test> + <test>lstops</test> + <test>struct</test> + </module> + + <module name="development_tools|assert"> + <test>checkalmostequal</test> + <test>checkequal</test> + <test>checkerror</test> + <test>checkfalse</test> + <test>checkfilesequal</test> + <test>checktrue</test> + <test>comparecomplex</test> + <test>computedigits</test> + <test>cond2reltol</test> + <test>cond2reqdigits</test> + <test>generror</test> + </module> + + <module name="elementary_functions"> + <test>IEEEcompatibility</test> + <test>prod</test> + <test>sum</test> + <test>cumprod</test> + <test>cumsum</test> + <test>linspace</test> + <test>logspace</test> + <test>gsort</test> + <test>round</test> + <test>floor</test> + <test>fix</test> + <test>complex</test> + <test>tand</test> + <test>abs</test> + <test>isempty</test> + </module> + + <module name="polynomials"> + <test>polops</test> + </module> + + <module name="overloading"> + <test>sparse</test> + <test>rational</test> + </module> + + <module name="hdf5"> + <test>loadhdf5data</test> + </module> + <!-- +Randomly fail ... + + <module name="output_stream"> + <test>disp</test> + <test>msprintf</test> + <test>mprintf</test> + <test>diary</test> + <test>printf</test> + <test>sprintf</test> + <test>ssprint</test> + </module> +--> + + </level> + + <level severity="2"> + <module name="core"> + <test>lasterror</test> + <test>who</test> + <test>stacksize</test> + </module> + + <module name="string"> + <test>tokens</test> + </module> + + <module name="polynomials"> + <test>roots</test> + </module> + + </level> + +</tests> diff --git a/modules/development_tools/development_tools.iss b/modules/development_tools/development_tools.iss new file mode 100755 index 000000000..dc5285dea --- /dev/null +++ b/modules/development_tools/development_tools.iss @@ -0,0 +1,51 @@ +; +; Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +; Copyright (C) INRIA - Allan CORNET +; Copyright (C) DIGITEO - 2010-2012 - Allan CORNET +; +; This file must be used under the terms of the CeCILL. +; This source file is licensed as described in the file COPYING, which +; you should have received as part of this distribution. The terms +; are also available at +; http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +; +;-------------------------------------------------------------------------------------------------------------- +; Inno Setup Script (5.3 and more) for Scilab (UNICODE version required) +; +;-------------------------------------------------------------------------------------------------------------- +; development_tools module +;-------------------------------------------------------------------------------------------------------------- +; +#define DEVTOOLS "development_tools" +; +Source: modules\{#DEVTOOLS}\license.txt; DestDir: {app}\modules\{#DEVTOOLS}; Components: {#COMPN_DEVTOOLS} +; +Source: modules\{#DEVTOOLS}\etc\{#DEVTOOLS}.quit; DestDir: {app}\modules\{#DEVTOOLS}\etc; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\etc\{#DEVTOOLS}.start; DestDir: {app}\modules\{#DEVTOOLS}\etc; Components: {#COMPN_DEVTOOLS} +; +;Source: modules\{#DEVTOOLS}\includes\*.h; DestDir: {app}\modules\{#DEVTOOLS}\includes; Flags: recursesubdirs; Components: {#COMPN_DEVTOOLS} +; +Source: modules\{#DEVTOOLS}\macros\lib; DestDir: {app}\modules\{#DEVTOOLS}\macros; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\names; DestDir: {app}\modules\{#DEVTOOLS}\macros; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\*.bin; DestDir: {app}\modules\{#DEVTOOLS}\macros; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\*.sci; DestDir: {app}\modules\{#DEVTOOLS}\macros; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\buildmacros.sce; DestDir: {app}\modules\{#DEVTOOLS}\macros; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\buildmacros.bat; DestDir: {app}\modules\{#DEVTOOLS}\macros; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\cleanmacros.bat; DestDir: {app}\modules\{#DEVTOOLS}\macros; Components: {#COMPN_DEVTOOLS} +; +Source: modules\{#DEVTOOLS}\macros\assert\lib; DestDir: {app}\modules\{#DEVTOOLS}\macros\assert; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\assert\names; DestDir: {app}\modules\{#DEVTOOLS}\macros\assert; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\assert\*.bin; DestDir: {app}\modules\{#DEVTOOLS}\macros\assert; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\assert\*.sci; DestDir: {app}\modules\{#DEVTOOLS}\macros\assert; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\assert\buildmacros.sce; DestDir: {app}\modules\{#DEVTOOLS}\macros\assert; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\assert\buildmacros.bat; DestDir: {app}\modules\{#DEVTOOLS}\macros\assert; Components: {#COMPN_DEVTOOLS} +Source: modules\{#DEVTOOLS}\macros\assert\cleanmacros.bat; DestDir: {app}\modules\{#DEVTOOLS}\macros\assert; Components: {#COMPN_DEVTOOLS} +; +;Source: modules\{#DEVTOOLS}\demos\*.*; DestDir: {app}\modules\{#DEVTOOLS}\demos; Flags: recursesubdirs; Components: {#COMPN_DEVTOOLS} +; +;Source: modules\{#DEVTOOLS}\examples\*.*; DestDir: {app}\modules\{#DEVTOOLS}\examples; Flags: recursesubdirs; Components: {#COMPN_DEVTOOLS} +; +Source: modules\{#DEVTOOLS}\tests\*.*; DestDir: {app}\modules\{#DEVTOOLS}\tests; Flags: recursesubdirs; Components: {#COMPN_DEVTOOLS} and {#COMPN_TESTS} +Source: modules\{#DEVTOOLS}\data\test_run_level.xml; DestDir: {app}\modules\{#DEVTOOLS}\data; Flags: recursesubdirs; Components: {#COMPN_DEVTOOLS} and {#COMPN_TESTS} +; +;-------------------------------------------------------------------------------------------------------------- diff --git a/modules/development_tools/etc/development_tools.quit b/modules/development_tools/etc/development_tools.quit new file mode 100755 index 000000000..ab83f0c89 --- /dev/null +++ b/modules/development_tools/etc/development_tools.quit @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + diff --git a/modules/development_tools/etc/development_tools.start b/modules/development_tools/etc/development_tools.start new file mode 100755 index 000000000..07d736b64 --- /dev/null +++ b/modules/development_tools/etc/development_tools.start @@ -0,0 +1,14 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2006-2008 - INRIA +// Copyright (C) 2011 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// Load functions libraries +// ============================================================================= + load('SCI/modules/development_tools/macros/lib'); + load('SCI/modules/development_tools/macros/assert/lib'); diff --git a/modules/development_tools/etc/doxyfile b/modules/development_tools/etc/doxyfile new file mode 100755 index 000000000..7ac9484e2 --- /dev/null +++ b/modules/development_tools/etc/doxyfile @@ -0,0 +1,1792 @@ +# Doxyfile 1.8.1.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "Compilation Chain [trunk]" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = desktop/images/icons/48x48/apps/scilab.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = . + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = "copy=\par Copyright:\n©" + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all +# comments according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you +# can mix doxygen, HTML, and XML commands with Markdown formatting. +# Disable only in case of backward compatibilities issues. + +MARKDOWN_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +SYMBOL_CACHE_SIZE = 0 + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = . + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.cpp *.hxx *.c *.h *.f + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C, C++ and Fortran comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = reports/html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# style sheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of +# entries shown in the various tree structured indices initially; the user +# can expand and collapse entries dynamically later on. Doxygen will expand +# the tree to such a level that at most the specified number of entries are +# visible (unless a fully collapsed tree already exceeds this amount). +# So setting the number of entries 1 will produce a full collapsed tree by +# default. 0 is a special value representing an infinite number of entries +# and will result in a full expanded tree by default. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> +# Qt Help Project / Custom Filters</a>. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> +# Qt Help Project / Filter Attributes</a>. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you may also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to +# the MathJax Content Delivery Network so you can quickly see the result without +# installing MathJax. +# However, it is strongly recommended to install a local +# copy of MathJax from http://www.mathjax.org before deployment. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. For each +# tag file the location of the external documentation should be added. The +# format of a tag file without this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths +# or URLs. Note that each tag file must have a unique name (where the name does +# NOT include the path). If a tag file is not located in the directory in which +# doxygen is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside +# the class node. If there are many fields or methods and many nodes the +# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS +# threshold limits the number of items for each type to make the size more +# managable. Set this to 0 for no limit. Note that the threshold may be +# exceeded by 50% before the limit is enforced. + +UML_LIMIT_NUM_FIELDS = 10 + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/modules/development_tools/help/en_US/addchapter.sce b/modules/development_tools/help/en_US/addchapter.sce new file mode 100755 index 000000000..64c03e3b8 --- /dev/null +++ b/modules/development_tools/help/en_US/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Development tools",SCI+"/modules/development_tools/help/en_US",%T); + diff --git a/modules/development_tools/help/en_US/assert/CHAPTER b/modules/development_tools/help/en_US/assert/CHAPTER new file mode 100755 index 000000000..f4b4d4cdd --- /dev/null +++ b/modules/development_tools/help/en_US/assert/CHAPTER @@ -0,0 +1 @@ +title = Assert
\ No newline at end of file diff --git a/modules/development_tools/help/en_US/assert/assert_0overview.xml b/modules/development_tools/help/en_US/assert/assert_0overview.xml new file mode 100755 index 000000000..422e10205 --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_0overview.xml @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + * Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" scilab:needs-examples="no" xml:id="assert_overview"> + <refnamediv> + <refname>Assert Overview</refname> + <refpurpose>An overview of the Assert module.</refpurpose> + </refnamediv> + <refsection> + <title>Purpose</title> + <para> + The goal of this module is to provide functions to check the + behavior of some other functions, for example in unit tests. + We emphasize the use of consistent tools for testing numerical issues, + with the goal of testing numerical algorithms more easily. + In particular, we provide a comparison function for two floating + point numbers, which allows to check that two numbers are "numerically almost equal", + i.e. that the relative error is small. + </para> + </refsection> + <refsection> + <title>Quick start</title> + <para> + The <literal>assert_checktrue</literal> function allows to + check that a matrix of booleans is true. + The following assertion fails and generate an error. + </para> + <programlisting role="example"><![CDATA[ +assert_checktrue ( [%t %F] ); + ]]></programlisting> + <para> + The <literal>assert_checkequal</literal> function allows to + check that two variables are equal. + The following assertion is a success and runs silently. + </para> + <programlisting role="example"><![CDATA[ +assert_checkequal ( %nan , %nan ); + ]]></programlisting> + <para> + The <literal>assert_checkalmostequal</literal> function allows to + check that a computed result is close to an expected result. + In the following script, we check that <literal>computed=1.23456</literal> + is close to <literal>expected=1.23457</literal>, but that + 11 digits have been lost with respect to the maximum + achievable accuracy. + </para> + <programlisting role="example"><![CDATA[ +assert_checkalmostequal ( 1.23456 , 1.23457 , 1.e11*%eps ); + ]]></programlisting> + <para> + A particular feature of the module is that all the assert functions + have the same output arguments. + This feature allows to get a uniform behavior and supports a + simple management of the errors in the case where an assertion is + not satisfied. + For example, consider the function <literal>assert_checktrue</literal>, + which calling sequence is: + </para> + <programlisting role="no-scilab-exec"><![CDATA[ +flag = assert_checktrue ( condition ) +flag = assert_checktrue ( condition ) +[flag,errmsg] = assert_checktrue ( condition ) + ]]></programlisting> + <para> + If any entry in condition is false, + <itemizedlist> + <listitem><para> + if the errmsg output variable is not used, an error is generated, + </para> + </listitem> + <listitem><para> + if the errmsg output variable is used, no error is generated. + </para> + </listitem> + </itemizedlist> + </para> + <para> + The reason of this behavior is to be able to use assertions + both in scripts (e.g. unit tests) and in functions. + For example, in a typical unit test, the statement: + </para> + <programlisting role="example"><![CDATA[ +assert_checktrue ( 1+1==12 ); + ]]></programlisting> + <para> + will generate an error, as expected. + On the other hand, consider the situation where we want to insert + assertions checkings in a function. + We might want to manage the case where the assertion fails. + In this case, the calling sequence <literal>assert_checktrue ( condition )</literal> + generates an error, which interrupts the execution. + We may want to avoid this, by catching the error generated by + <literal>assert_checktrue</literal>. + This requires to use the <literal>execstr</literal> function and + may lead to the following source code. + </para> + <programlisting role="example"><![CDATA[ +function y = myfunction ( x ) + ierr=execstr("assert_checktrue ( x==12 )","errcatch"); + if ( ierr <> 0 ) then + error("Oups!") + end + y=x +endfunction + ]]></programlisting> + <para> + In this case, we suggest to use instead the calling + sequence <literal>[flag,errmsg] = assert_checktrue ( condition )</literal>, + which simplifies the processing of the error. + </para> + <programlisting role="example"><![CDATA[ +function y = myfunction2 ( x ) + [flag,errmsg] = assert_checktrue ( x==12 ) + if ( ~flag ) then + error("Oups!") + end + y=x +endfunction + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_checkalmostequal.xml b/modules/development_tools/help/en_US/assert/assert_checkalmostequal.xml new file mode 100755 index 000000000..f5517b8f7 --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_checkalmostequal.xml @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkalmostequal" xml:lang="en"> + <refnamediv> + <refname>assert_checkalmostequal</refname> + <refpurpose>Check that computed and expected are numerically close.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + flag = assert_checkalmostequal ( computed , expected ) + flag = assert_checkalmostequal ( computed , expected , reltol ) + flag = assert_checkalmostequal ( computed , expected , reltol , abstol ) + flag = assert_checkalmostequal ( computed , expected , reltol , abstol , comptype ) + [flag,errmsg] = assert_checkalmostequal ( ... ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>computed:</term> + <listitem> + <para> a matrix of doubles, a sparse matrix of doubles, or an hypermatrix of doubles, the computed result</para> + </listitem> + </varlistentry> + <varlistentry> + <term>expected :</term> + <listitem> + <para> a matrix of doubles, a sparse matrix of doubles, or an hypermatrix of doubles, the expected result</para> + </listitem> + </varlistentry> + <varlistentry> + <term>reltol :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, the relative tolerance (default reltol=sqrt(%eps)).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>abstol :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, the absolute tolerance (default abstol=0).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>comptype :</term> + <listitem> + <para> a 1-by-1 matrix of strings, "matrix" or "element" (default comptype="element"). The comparison type.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> a 1-by-1 matrix of boolean, %t if computed is close to expected, %f if not</para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> a 1-by-1 matrix of strings, the error message. If flag==%t, then errormsg=="". If flag==%f, then errmsg contains the error message.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Performs silently if the two matrices of doubles or complex doubles + computed and expected are close. + The variables computed and expected can be exchanged without changing the result. + </para> + <para> + Any optional input argument equal to the empty matrix is replaced by its default value. + </para> + <para> + We use the following algorithm. + We compare first the real parts. In case of equality, we compare the imaginary parts. + </para> + <para> + The condition used is mixed relative and absolute: + <programlisting> + ( |e-c| <= reltol * max(|e|,|c|) + abstol ) + </programlisting> + If comptype="matrix", the norm is used. + If comptype="element", the absolute value are used and the two matrices are + almost equal if all the conditions are true. + </para> + <para> + The default value comptype="matrix" option performs the comparison for the matrices as a whole, + the norm of the difference of the matrices is used. + The comptype="element" option performs the comparison elementwise, i.e. + all the elements of the matrices must be almost equal. + Choosing between these two comparison types must be done with care. + For example, if we are checking the elementwise output of an elementary function, + we should choose the "element" comparison type, since we must compare the + matrix elements one after the other. + </para> + <para> + If the IEEE values %inf, -%inf or %nan values are in the matrices, + then they are almost equal only if the IEEE values are + at the same indices in the matrices. + </para> + <para> + The default comparison is based on a relative error, ensuring that 8 digits are common. + This allows to assert the number of significant digits in the computed result. + </para> + <para> + This procedure only works when the computed and expected variables + are matrices of doubles. + It will generate an error in any other case. + </para> + <para> + If the comparison shows that computed is not almost equal to expected, + <itemizedlist> + <listitem> + <para>if the errmsg output variable is not used, an error is generated,</para> + </listitem> + <listitem> + <para>if the errmsg output variable is used, no error is generated.</para> + </listitem> + </itemizedlist> + </para> + <para> + In the process of comparing the values, we separate %nan, +%inf, -%inf and remaining values. + Comparing nan values between them is not possible. This is why we compare the + indices where %nan value occurs. + If we form differences of infinity values, we produce %nan values. + This is why we compare the indices where +%inf values occurs. + We do the same for -%inf values. + Then, the non-nan, non-infinity values are actually compared. + </para> + <para> + The default comptype="element" option performs the comparison elementwise, i.e. + all the elements of the matrices must be almost equal. + The comptype="matrix" option performs the comparison for the matrices as a whole, + the norm of the difference of the matrices is used. + </para> + <para> + In general, the relative tolerance should be + set to a multiple of the machine precision %eps. + The relative tolerance should also be chosen with the lowest + possible magnitude, that is, we should configure + the tolerance as accurately as possible. + During the process of configuring the relative tolerance, we + suggest to use the following values, in that order : + 0 (all digits correct), %eps, 10*%eps, 100*%eps, 1.e3*%eps, 1.e4*%eps, ..., + 1.e17*%eps (no digit correct). + See below for examples of this. + </para> + <para> + This function takes into account for complex numbers. + We first compare the real parts of the input arguments. + If this fails, we immediately return. + If this succeeds, we compare the imaginary parts of the input arguments. + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +// Comparisons which are successful. +// Relative error : +assert_checkalmostequal ( 1 , 1 ); +assert_checkalmostequal ( 1 , 1 , %eps ); +assert_checkalmostequal ( ones(10,1) , ones(10,1) , %eps ); +// Absolute error : +assert_checkalmostequal ( 1.23456789123456789e-30 , 0 , 0 , 1.e-10 ); +assert_checkalmostequal ( [1 %nan], [1 %nan] , 0 , %eps ); + +// Comparisons which are failures. +// Error message produced : +assert_checkalmostequal ( 1 , 2 , %eps ); +// Error message produced : +flag = assert_checkalmostequal ( 1 , 2 , %eps ) +// No error message produced : +[flag,errmsg] = assert_checkalmostequal ( 1 , 2 , %eps ) +assert_checkalmostequal ( 1 , [2 3] , %eps ); +assert_checkalmostequal ( [%nan 1], [1 %nan] , %eps ); +assert_checkalmostequal ( 1 + 5 * %eps , 1 , %eps ); +assert_checkalmostequal ( 1.23456789123456789e-30 , 1.3e-30 , %eps ); + +// In the case where expected is nonzero, the +// tolerance for relative error should be a +// multiple of %eps. +// The following test is a success and shows +// that less than 11 digits are lost with respect +// to the maximum possible accuracy. +assert_checkalmostequal ( 1.23456 , 1.23457 , 1.e11*%eps ); + +// We cannot exchange the relative and absolute tolerances. +// The following test pass: we use an absolute tolerance +// because the expected value is zero. +assert_checkalmostequal ( 1.23456789e-30 , 0 , 0 , 1.e-10 ); +// The following test fail: we use a relative tolerance. +assert_checkalmostequal ( 0 , 1.23456789e-30 , 1.e-10 ); + +// We must configure the tolerance as tightly as possible. +// The following test fails, because the tolerance is too small +// with respect to the given numbers. +assert_checkalmostequal ( 1.23456 , 1.23457 , %eps ); +// In order to get the number of common digits: +assert_computedigits(1.23456 , 1.23457) +// which returns 5.09... +// We now make a judgment on the accuracy and conclude it is acceptable: +assert_checkalmostequal ( 1.23456 , 1.23457 , 1.e-5 ); + +// We give here a practical example of the use of assert_checkalmostequal. +// We solve an averagely ill-conditionned system of linear +// equations, based on the Hilbert matrix. +n = 6; +// The expected value is set by ourselves. +expected = ones(n,1); +A = testmatrix("hilb",n); +// We compute the condition number of the matrix : ~10^8 +ceil(log10(cond(A))) +// This means that the number of digits lost, +// predicted by theory, is 8. +// The right-hand side is computed given A and expected. +b = A * expected; +// In this case, a Gauss algorithm with partial +// pivoting is used. +computed = A\b; +// The following test fails: we have lost some digits. +assert_checkalmostequal(computed,expected,%eps) +// We compute the actual number of common digits: from 10 to 12 +assert_computedigits(computed, expected) +// We accept this computation. +// The following test pass. +assert_checkalmostequal(computed,expected,1.e5*%eps); + +// The following examples show the difference between comptype="element" and "matrix". +// The following test does not pass. +assert_checkalmostequal ( [1 1.e5] , [2 1.e5] , 1.e-3 ) +// The following test pass with the matrix-based comparison. +assert_checkalmostequal ( [1 1.e5] , [2 1.e5] , 1.e-3 , [] , "matrix" ) + +// The following test pass. +// It is non-trivial to take into account for IEEE values. +[flag,errmsg] = assert_checkalmostequal ( [1.2345 %inf -%inf %nan] , [1.2346 %inf -%inf %nan] , 1.e-4 ) + +// This function takes into account for complex numbers. +// The following test pass. +assert_checkalmostequal ( 1+%i , 1+(1+1.e-4)*%i , 1.e-3 , [], "element" ); +// The following test fails. +assert_checkalmostequal ( 1+%i , 1+(1+1.e-4)*%i , 1.e-5 , [], "element" ); + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_checkequal.xml b/modules/development_tools/help/en_US/assert/assert_checkequal.xml new file mode 100755 index 000000000..75f62651a --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_checkequal.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkequal" xml:lang="en"> + <refnamediv> + <refname>assert_checkequal</refname> + <refpurpose>Check that computed and expected are equal.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + assert_checkequal ( computed , expected ) + flag = assert_checkequal ( computed , expected ) + [flag,errmsg] = assert_checkequal ( computed , expected ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>computed:</term> + <listitem> + <para> the computed result</para> + </listitem> + </varlistentry> + <varlistentry> + <term>expected :</term> + <listitem> + <para> the expected result</para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> a 1-by-1 matrix of boolean, %t if computed is equal to expected, %f if not</para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> a 1-by-1 matrix of strings, the error message. If flag==%t, then errormsg=="". If flag==%f, then errmsg contains the error message.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Performs silently if computed and expected are equal. + </para> + <para> + If the type of both input arguments is 1 (i.e. a real matrix), + we check that non-nan values are equal. + </para> + <para> + We compare first the real parts. In case of equality, we compare the imaginary parts. + </para> + <para> + If the comparison shows that computed is equal to expected, + <itemizedlist> + <listitem> + <para>if the errmsg output variable is not used, an error is generated,</para> + </listitem> + <listitem> + <para>if the errmsg output variable is used, no error is generated.</para> + </listitem> + </itemizedlist> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +// Tests with success +assert_checkequal ( %T , %T ); +flag = assert_checkequal ( list() , list() ); +[flag , errmsg] = assert_checkequal ( [%T %F], [%T %F] ); +assert_checkequal ( %nan , %nan ); + +// Tests with failure +assert_checkequal ( %F , %T ); +flag = assert_checkequal ( %F , %T ); +// No error produced : +[flag , errmsg] = assert_checkequal ( %F , %T ) +assert_checkequal ( [1 2], [3 4] ) +assert_checkequal ( 1 , [2 3] ) +assert_checkequal ( 1 , "b" ) + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> + <refsection> + <title>Bibliography</title> + <para>"Automated Software Testing for Matlab", Steven Eddins, 2009</para> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_checkerror.xml b/modules/development_tools/help/en_US/assert/assert_checkerror.xml new file mode 100755 index 000000000..b94c2d58d --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_checkerror.xml @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkerror" xml:lang="en"> + <refnamediv> + <refname>assert_checkerror</refname> + <refpurpose>Check that an instruction produces the expected + error. + </refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + flag = assert_checkerror ( instr , expectedmsg ) + flag = assert_checkerror ( instr , expectedmsg , expectederrnb ) + flag = assert_checkerror ( instr , expectedmsg , expectederrnb , a1, ... ) + [flag,errmsg] = assert_checkerror ( ... ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>instr:</term> + <listitem> + <para>a 1-by-1 matrix of strings, an expression to evaluate</para> + </listitem> + </varlistentry> + <varlistentry> + <term>expectedmsg :</term> + <listitem> + <para>a string or a string vector, the error message to be + produced + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>expectederrnb :</term> + <listitem> + <para>a 1-by-1 matrix of doubles, integer values, the error number + (default expectederrnb=[]). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>a1 :</term> + <listitem> + <para>an extra localization argument, passed to the + <literal>msprintf</literal> function. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para>a 1-by-1 matrix of boolean, %t if the correct error message + was produced, %f if not + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para>a 1-by-1 matrix of strings, the error message. If flag==%t, + then errormsg=="". If flag==%f, then errmsg contains the error + message. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>If the expression does not generate an error, then + <literal>assert_checkerror</literal> generates an error. Performs silently + if the evaluated expression generates the expected error message. + </para> + <para> + If the error message <literal>expectedmsg</literal> is provided and + is not the empty matrix <literal>[]</literal>, we check that the generated + error number matches the expected one. If the error number + <literal>expectederrnb</literal> is provided and is not the empty matrix + <literal>[]</literal>, we check that the generated error number matches + the expected one. If the error message <literal>expectedmsg</literal> and + the error number <literal>expectederrnb</literal> cannot be equal to the + empty matrix <literal>[]</literal> at the same time: at least one of them + must be provided. + </para> + <para>The string matching is strict string equality: no pattern or regular + expression can be used. + </para> + <para>If the error message is not expected or the error number is not + expected, + <itemizedlist> + <listitem> + <para>if the errmsg output variable is not used, an error is + generated, + </para> + </listitem> + <listitem> + <para>if the errmsg output variable is used, no error is + generated. + </para> + </listitem> + </itemizedlist> + </para> + <para>The goal of this function is to enable the tester to check the error + cases in a simplified framework. Checking the error messages of a function + has the following advantages: + <itemizedlist> + <listitem> + <para>it checks that the correct error is generated when + needed, + </para> + </listitem> + <listitem> + <para>it checks that the error message is correctly + formatted, + </para> + </listitem> + <listitem> + <para>it checks that the error message is correctly + localized. + </para> + </listitem> + </itemizedlist> + </para> + <para>The expected message can be a localized message. In this case, the + message is compared with the output of the <literal>gettext</literal> + function, and depends on the local language. The extra argument + <literal>a1</literal> can be used for this purpose, for example to format + the localized message. All the extra arguments <literal>a1</literal>, + <literal>a2</literal>, ... are automatically passed to the + <literal>msprintf</literal> function before being compared to the computed + error message. + </para> + </refsection> + <refsection> + <title>Examples</title> + <para>We give several examples of using the + <literal>assert_checkerror</literal> function. We first have to define a + function to be tested. + </para> + <para> + The following function <literal>f</literal> generates an error when + the number of input arguments in wrong or the type of <literal>x</literal> + is wrong. + </para> + <programlisting role="example"><![CDATA[ +function y = f(x) + [lhs, rhs] = argn() + if ( rhs <> 1 ) then + lstr = gettext("%s: Wrong number of input argument: %d expected.\n") + errmsg = msprintf ( lstr , "f" , 1 ) + error(errmsg) + end + if ( typeof(x) <> "constant" ) then + lstr = gettext("%s: Wrong type for argument #%d: Matrix expected.\n") + errmsg = msprintf ( lstr , "f" , 1 ) + error(errmsg,123456789) + end + y = x +endfunction + ]]></programlisting> + <para>Our task is to check the error messages produced by this function. + The two following tests pass: the error message is the expected one. We + let <literal>assert_checkerror</literal> manage the localization, by + providing only the localized message and the extra parameter + <literal>"f"</literal> (the name of the function) and <literal>1</literal> + (the index of the input argument). These two extra parameters are used by + <literal>assert_checkerror</literal> to format the message and to convert + the "%s" and "%d" formats into their actual values. + </para> + <programlisting role="example"><![CDATA[ +lcl1 = "%s: Wrong number of input argument: %d expected.\n"; +assert_checkerror ( "y = f()" , lcl1 , [] , "f" , 1); + +lcl2 = "%s: Wrong type for argument #%d: Matrix expected.\n"; +assert_checkerror ( "y = f(""a"")" , lcl2 , [] , "f" , 1); + ]]></programlisting> + <para>On the other hand, if we make the assumption that the current locale + language is english, we could as well use the following statement. But + this is not a recommended practice, since the test will fail if the + current locale is French, for example. + </para> + <programlisting role="example"><![CDATA[ +assert_checkerror ( "y = f()" , "f: Wrong number of input argument: 1 expected." ); + ]]></programlisting> + <para>In the following test, we also check the error number.</para> + <programlisting role="example"><![CDATA[ +lcl1="%s: Wrong number of input argument: %d expected.\n"; +assert_checkerror ( "y=f()" , lcl1 , 10000 , "f" , 1); + +lcl2 = "%s: Wrong type for argument #%d: Matrix expected.\n"; +assert_checkerror ( "y=f(""a"")" , lcl2 , 123456789 , "f" , 1); + ]]></programlisting> + <para>The two following tests fail.</para> + <programlisting role="example"><![CDATA[ +assert_checkerror ( "y = f()" , "oups" ); + +msg1 = msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"), "f", 1); +assert_checkerror ( "y = f()" , msg1 , 12 ); + ]]></programlisting> + <para>When errmsg is given as output argument, no error is generated, as + in the following example. Notice the content of the + <literal>flag</literal> and <literal>errmsg</literal> variables. + </para> + <programlisting role="example"><![CDATA[ +// A test which pass: flag is %t, errmsg is empty +msg1 = msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"), "f", 1); +[flag, errmsg] = assert_checkerror ( "y = f()" , msg1 ) + +// A test which fail: flag is %f, errmsg is not empty +[flag, errmsg] = assert_checkerror ( "y = f()" , "oups" ) + ]]></programlisting> + <para>The messages in the two following tests are localized, so that they + can work whatever the current language is. Instead of using the extra + parameter <literal>a1</literal>, we directly localize the message, which + is less short, but is a perfectly valid code. + </para> + <programlisting role="example"><![CDATA[ +msg1 = msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"), "f", 1); +assert_checkerror ( "y = f()" , msg1 ); + +msg2 = msprintf(gettext("%s: Wrong type for argument #%d: Matrix expected.\n"), "f", 1); +assert_checkerror ( "y = f(""a"")" , msg2 ); + ]]></programlisting> + <para>It may happen that we want to just test the error number, but not + the error message. The following script just checks that the generated + error number is 123456789 when the first argument is not a matrix of + doubles: we do not check the error message. + </para> + <programlisting role="example"><![CDATA[ +assert_checkerror("f(""foo"")", [], 123456789); + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced</revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_checkfalse.xml b/modules/development_tools/help/en_US/assert/assert_checkfalse.xml new file mode 100755 index 000000000..663e8a28f --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_checkfalse.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkfalse" xml:lang="en"> + <refnamediv> + <refname>assert_checkfalse</refname> + <refpurpose>Check that condition is false.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + flag = assert_checkfalse ( condition ) + flag = assert_checkfalse ( condition ) + [flag,errmsg] = assert_checkfalse ( condition ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>condition:</term> + <listitem> + <para> a matrix of booleans</para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> a 1-by-1 matrix of boolean, %t if condition is false, %f if not</para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> a 1-by-1 matrix of strings, the error message. If flag==%t, then errormsg=="". If flag==%f, then errmsg contains the error message.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Performs silently if all entries in <literal>condition</literal> are false. + </para> + <para> + Generates an error if any entry in <literal>condition</literal> + is true. + Generates an error if <literal>condition</literal> is not a boolean. + </para> + <para> + If any entry in condition is true, + <itemizedlist> + <listitem> + <para>if the errmsg output variable is not used, an error is generated,</para> + </listitem> + <listitem> + <para>if the errmsg output variable is used, no error is generated.</para> + </listitem> + </itemizedlist> + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +// Tests which pass +assert_checkfalse ( %f ); +flag = assert_checkfalse ( %f ) +[flag,errmsg] = assert_checkfalse ( %f ) +[flag,errmsg] = assert_checkfalse ( [%f %f] ); + +// Tests which fail +assert_checkfalse ( [%t %f] ); +flag = assert_checkfalse ( [%t %f] ) +// No error generated +[flag,errmsg] = assert_checkfalse ( [%t %f] ) + +// Wrong calls +assert_checkfalse ( "a" ) + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_checkfilesequal.xml b/modules/development_tools/help/en_US/assert/assert_checkfilesequal.xml new file mode 100755 index 000000000..cded671a8 --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_checkfilesequal.xml @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkfilesequal" xml:lang="en"> + <refnamediv> + <refname>assert_checkfilesequal</refname> + <refpurpose>Check that two files are equal.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + flag = assert_checkfilesequal ( filecomp , fileref ) + flag = assert_checkfilesequal ( filecomp , fileref , compfun ) + [flag,errmsg] = assert_checkfilesequal ( ... ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>filecomp :</term> + <listitem> + <para> a 1-by-1 matrix of strings, the computed file.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>fileref :</term> + <listitem> + <para> a 1-by-1 matrix of strings, the reference file.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>compfun :</term> + <listitem> + <para> a function or a list, the comparison function (default compfun = []). If no comparison function is used, the equality operator "==" is used. See below for details.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> a 1-by-1 matrix of boolean, %t if computed is close to expected, %f if not</para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> a 1-by-1 matrix of strings, the error message. If flag==%t, then errormsg=="". If flag==%f, then errmsg contains the error message.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Performs silently if the files are equal. + Generates an error if filecomp or fileref do not exist. + Generates an error if the content of the files are not equal. + </para> + <para> + If the files are not equal, + <itemizedlist> + <listitem> + <para>if the errmsg output variable is not used, an error is generated,</para> + </listitem> + <listitem> + <para>if the errmsg output variable is used, no error is generated.</para> + </listitem> + </itemizedlist> + </para> + <para> + If the comparison function compfun is a function, it should have header areequal = compfun ( txtcomp , txtref ) + where txtcomp is the content of the computed file, txtref is the content of the reference file and areequal + is a boolean. The areequal boolean is true if the two contents are equal. + If compfun is a list, it should be list (cf,a1,a2,...), where cf is a comparison function, + and the arguments a1, a2, will be automatically be appended at the + end of the calling sequence of cf. + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +// +// Prepare data for the tests +// fileref1 : three lines of text. +// filecomp1 : == fileref1 +// filecomp2 : <> fileref1 +fileref1 = fullfile(TMPDIR,"fileref.txt"); +txt1 = [ +"Line #1" +"Line #2" +"Line #3" +]; +fd = mopen(fileref1,"w"); +mputl(txt1,fd); +mclose(fd); +filecomp1 = fullfile(TMPDIR,"filecomp1.txt"); +fd = mopen(filecomp1,"w"); +mputl(txt1,fd); +mclose(fd); +filecomp2 = fullfile(TMPDIR,"filecomp2.txt"); +txt2 = [ +"Line #1" +"Line #4" +"Line #3" +]; +fd = mopen(filecomp2,"w"); +mputl(txt2,fd); +mclose(fd); + +// A test which pass +flag = assert_checkfilesequal ( filecomp1 , fileref1 ) +[flag,errmsg] = assert_checkfilesequal ( filecomp1 , fileref1 ) + +// Failure: filecomp2 <> fileref1 +// Error generated +flag = assert_checkfilesequal ( filecomp2 , fileref1 ) +// No error generated +[flag,errmsg] = assert_checkfilesequal ( filecomp2 , fileref1 ) + +// Prepare data for the tests +// fileref2 == filecomp3, given that comment lines are ignored. +// fileref2 <> filecomp4, given that comment lines are ignored. +// Notice that the comments are inserted at different positions in the files: +// sometimes at the beginning, sometimes in the middle. +fileref2 = fullfile(TMPDIR,"fileref2.txt"); +txt = [ +"// bla 2" +"Line #1" +"// bla 2" +"Line #2" +"Line #3" +]; +fd = mopen(fileref2,"w"); +mputl(txt,fd); +mclose(fd); +filecomp3 = fullfile(TMPDIR,"filecomp3.txt"); +txt = [ +"Line #1" +"// bla 5168" +"Line #2" +"Line #3" +"// bla oups" +]; +fd = mopen(filecomp3,"w"); +mputl(txt,fd); +mclose(fd); +filecomp4 = fullfile(TMPDIR,"filecomp4.txt"); +txt = [ +"// bla 3" +"Line #1" +"Line #4" +"// bla 5168" +"Line #3" +"// bla oups" +]; +fd = mopen(filecomp4,"w"); +mputl(txt,fd); +mclose(fd); + +// A test with a comparison function which ignores comment lines. +function otxt = myfilter ( itxt ) +nr = size(itxt,"r") +// This is the pattern for a comment line of the form "// blabla" +pattern = "/\/\/.*/" +k = 1 +for i = 1 : nr +start = regexp(itxt(i),pattern) +if ( start == [] ) then +otxt(k) = itxt(i) +k = k + 1 +end +end +endfunction +function areequal = mycompfun ( ctxt , etxt ) +ctxt = myfilter ( ctxt ) +etxt = myfilter ( etxt ) +areequal = ( ctxt == etxt ) +endfunction +// +// A test which pass +[flag,errmsg] = assert_checkfilesequal ( filecomp3 , fileref2 , mycompfun ) +// A test which fails +[flag,errmsg] = assert_checkfilesequal ( filecomp4 , fileref2 , mycompfun ) + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_checktrue.xml b/modules/development_tools/help/en_US/assert/assert_checktrue.xml new file mode 100755 index 000000000..0d58ba9c2 --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_checktrue.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checktrue" xml:lang="en"> + <refnamediv> + <refname>assert_checktrue</refname> + <refpurpose>Check that condition is true.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + flag = assert_checktrue ( condition ) + flag = assert_checktrue ( condition ) + [flag,errmsg] = assert_checktrue ( condition ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>condition:</term> + <listitem> + <para> a matrix of booleans</para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> a 1-by-1 matrix of boolean, %t if condition is true, %f if not</para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> a 1-by-1 matrix of strings, the error message. If flag==%t, then errormsg=="". If flag==%f, then errmsg contains the error message.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Performs silently if all entries in <literal>condition</literal> are true. + </para> + <para> + Generates an error if any entry in the <literal>condition</literal> matrix + is false. + Generates an error if <literal>condition</literal> is not a boolean. + </para> + <para> + If any entry in condition is false, + <itemizedlist> + <listitem> + <para>if the errmsg output variable is not used, an error is generated,</para> + </listitem> + <listitem> + <para>if the errmsg output variable is used, no error is generated.</para> + </listitem> + </itemizedlist> + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +// Tests which pass +assert_checktrue ( %t ); +flag = assert_checktrue ( %t ) +[flag,errmsg] = assert_checktrue ( %t ) +[flag,errmsg] = assert_checktrue ( [%t %t] ); + +// Tests which fail +assert_checktrue ( [%t %f] ); +flag = assert_checktrue ( [%t %f] ) +// No error generated +[flag,errmsg] = assert_checktrue ( [%t %f] ) + +// Wrong calls +assert_checktrue ( "a" ) + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_comparecomplex.xml b/modules/development_tools/help/en_US/assert/assert_comparecomplex.xml new file mode 100755 index 000000000..8b57afeb7 --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_comparecomplex.xml @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_comparecomplex" xml:lang="en"> + <refnamediv> + <refname>assert_comparecomplex</refname> + <refpurpose>Compare complex numbers with a tolerance.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + order = assert_comparecomplex ( a , b ) + order = assert_comparecomplex ( a , b , reltol ) + order = assert_comparecomplex ( a , b , reltol , abstol ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>a :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, the first value to be compared</para> + </listitem> + </varlistentry> + <varlistentry> + <term>b :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, the second value to be compared</para> + </listitem> + </varlistentry> + <varlistentry> + <term>reltol :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, the relative tolerance (default reltol=sqrt(%eps)).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>abstol :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, the absolute tolerance (default abstol=0).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>order :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, integer values, the order. Returns order=0 is a is almost equal to b, order=-1 if a < b, order=+1 if a > b.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Compare first by real parts, then by imaginary parts. + Takes into account numerical accuracy issues, by using + a mixed relative and absolute tolerance criteria. + </para> + <para> + Any optional input argument equal to the empty matrix is replaced by its default value. + </para> + <para> + We use the following algorithm. + </para> + <para> + We compare first the real parts. In case of tie, we compare the imaginary parts. + </para> + <para> + We process the IEEE values and choose the order : -%inf < 0 < %inf < %nan. + If none of the values is special, we use the condition : + <programlisting> + cond = ( abs(a-b) <= reltol * max(abs(a),abs(b)) + abstol ) + </programlisting> + </para> + <para> + This algorithm is designed to be used into sorting + algorithms. + It allows to take into account for the portability issues + related to the outputs of functions producing + matrix of complex doubles. + If this algorithm is plugged into a sorting function, + it allows to consistently produce a sorted matrix, + where the order can be independent of the operating system, + the compiler or other forms of issues modifying the + order (but not the values). + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +// Compare real values +assert_comparecomplex ( 1 , -1 ) // 1 +assert_comparecomplex ( -1 , 1 ) // -1 +assert_comparecomplex ( 1 , 1 ) // 0 + +// Compare complex values #1 +assert_comparecomplex ( 1+2*%i , 1+3*%i ) // -1 +assert_comparecomplex ( 1+3*%i , 1+2*%i ) // 1 +assert_comparecomplex ( 1+2*%i , 1+2*%i ) // 0 + +// Compare complex values #2 +assert_comparecomplex ( 1+%i , -1+%i ) // 1 +assert_comparecomplex ( -1+%i , 1+%i ) // -1 +assert_comparecomplex ( 1+%i , 1+%i ) // 0 +[order,msg] = assert_comparecomplex ( 1+%i , 1+%i ) + +// Compare with tolerances : equality cases +assert_comparecomplex ( 1.2345+%i , 1.2346+%i , %eps , 1.e-3 ) // 0 +assert_comparecomplex ( 1.2345+%i , 1.2346+%i , 1.e12*%eps , 0 ) // 0 +assert_comparecomplex ( 1+1.2345*%i , 1+1.2347*%i , %eps , 1.e-3 ) // 0 +assert_comparecomplex ( 1+1.2345*%i , 1+1.2347*%i , 1.e12*%eps , 0 ) // 0 + +// Compare more realistic data +x = [ +-0.123452 - 0.123454 * %i +-0.123451 + 0.123453 * %i +0.123458 - 0.123459 * %i +0.123456 + 0.123457 * %i +]; +// Consider less than 4 significant digits +for i = 1 : size(x,"*")-1 +order = assert_comparecomplex ( x(i) , x(i+1) , 1.e-4 ); +mprintf("compare(x(%d),x(%d))=%d\n",i,i+1,order) +end + +// Compare data from bug #415 +x = [ +-1.9914145 +-1.895889 +-1.6923826 +-1.4815461 +-1.1302576 +-0.5652256 - 0.0655080 * %i +-0.5652256 + 0.0655080 * %i +0.3354023 - 0.1602902 * %i +0.3354023 + 0.1602902 * %i +1.3468911 +1.5040136 +1.846668 +1.9736772 +1.9798866 +]; +// Consider less than 4 significant digits +for i = 1 : size(x,"*")-1 +order = assert_comparecomplex ( x(i) , x(i+1) , 1.e-5 ); +mprintf("compare(x(%d),x(%d))=%d\n",i,i+1,order) +end + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> + <refsection> + <title>Bibliography</title> + <para>http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/polynomials/tests/nonreg_tests/bug_415.tst;h=0c716a3bed0dfb72c831972d19dbb0814dffde2b;hb=HEAD</para> + <para>http://gitweb.scilab.org/?p=scilab.git;a=blob_plain;f=scilab/modules/cacsd/tests/nonreg_tests/bug_68.tst;h=920d091d089b61bf961ea9e888b4d7d469942a14;hb=4ce3d4109dd752fce5f763be71ea639e09a12630</para> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_computedigits.xml b/modules/development_tools/help/en_US/assert/assert_computedigits.xml new file mode 100755 index 000000000..4b516a95e --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_computedigits.xml @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_computedigits" xml:lang="en"> + <refnamediv> + <refname>assert_computedigits</refname> + <refpurpose>Returns the number of significant digits in computed result.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + d = assert_computedigits ( computed , expected ) + d = assert_computedigits ( computed , expected , basis ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>computed :</term> + <listitem> + <para> a matrix of doubles, the computed value</para> + </listitem> + </varlistentry> + <varlistentry> + <term>expected :</term> + <listitem> + <para> a matrix of doubles, the expected value</para> + </listitem> + </varlistentry> + <varlistentry> + <term>basis :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, integer values, the basis (default basis=10)</para> + </listitem> + </varlistentry> + <varlistentry> + <term>d :</term> + <listitem> + <para> a matrix of doubles, the number of significant digits.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Computes the number of significant digits in a computed + result with respect to a nonzero expected result, using the formula: + </para> + <para> + <latex> + \begin{eqnarray} + d = - \frac{\log_{10} ( r )}{\log_{10}(basis)} + \end{eqnarray} + </latex> + </para> + <para> + where r is the relative error defined by + </para> + <para> + <latex> + \begin{eqnarray} + r = \frac{|computed - expected|}{|expected|} + \end{eqnarray} + </latex> + </para> + <para> + Any optional input argument equal to the empty matrix is replaced by its default value. + </para> + <para> + The number of significant digits is between dmin = 0 and dmax = -log10(2^(-53)) which + is approximately 15.95 ~ 16. + In base 2, the number of significant bits is 53. + </para> + <para> + If expected is equal to computed, then d is set to its maximum value, i.e. dmax. + If not, if expected is zero and computed is nonzero, then d is set to its minimum + value, i.e. dmin=0. + </para> + <para> + The values of computed and expected cannot be exchanged, since the relative + error is based on the expected value. + </para> + <para> + The computation separates the real part and the imaginary parts of the + values. + The returned number of digits is the minimum of the number of digits for the + real and imaginary parts. + </para> + <para> + TODO : use computedigits inside an assert_digits ( computed , expected , dmin ) function + </para> + <para> + TODO : add a comptype option to make the comparison "matrix" (current is "element") + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +d = assert_computedigits ( 1 , 1 ) // d ~ 16 +d = assert_computedigits ( 1 , 1 , 2 ) // d = 53 +d = assert_computedigits ( 0 , 0 ) // d ~ 16 +d = assert_computedigits ( 1 , 0 ) // d = 0 +d = assert_computedigits ( 0 , 1 ) // d = 0 +d = assert_computedigits ( 3.1415926 , %pi ) // d ~ 8 +d = assert_computedigits ( 3.1415926 , %pi , 2 ) // d ~ 26 +d = assert_computedigits ( [0 0 1 1] , [0 1 0 1] ) // d ~ [16 0 0 16] +d = assert_computedigits(ones(3,2),ones(3,2)) // d ~ 16 * ones(3,2) +d = assert_computedigits(1.224646799D-16,8.462643383D-18) // d = 0 + +// Check IEEE values +// d ~ [16 0 0 0] +d = assert_computedigits([%nan %nan %nan %nan],[%nan %inf -%inf 0]) +// d ~ [0 16 0 0] +d = assert_computedigits([%inf %inf %inf %inf],[%nan %inf -%inf 0]) +// d = [0 0 16 0] +d = assert_computedigits([-%inf -%inf -%inf -%inf],[%nan %inf -%inf 0]) +// d = [0 0 0 16] +d = assert_computedigits([0 0 0 0],[%nan %inf -%inf 0]) + +// Check complex values +d = assert_computedigits ( 1.2345 + %i*6.7891 , 1.23456789 + %i*6.789123456 ) // d ~ 4 + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_cond2reltol.xml b/modules/development_tools/help/en_US/assert/assert_cond2reltol.xml new file mode 100755 index 000000000..437305535 --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_cond2reltol.xml @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_cond2reltol" xml:lang="en"> + <refnamediv> + <refname>assert_cond2reltol</refname> + <refpurpose>Suggests a relative error, computed from the condition number.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + rtol = assert_cond2reltol ( condition ) + rtol = assert_cond2reltol ( condition , offset ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>condition :</term> + <listitem> + <para> a matrix of doubles, the condition number. The condition number must be strictly positive.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>offset :</term> + <listitem> + <para> a matrix of doubles, a shift for the number of required decimal digits (default offset=0). For example, offset=1 increases the accuracy requirement (decreases the relative tolerance by a factor 10^-1), offset=-1 decreases the accuracy requirement (increases the relative tolerance by a factor 10^1).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>rtol :</term> + <listitem> + <para> a matrix of doubles, the relative tolerance. The relative tolerance is strictly positive, lower than 1.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Depending on the condition number, returns the corresponding relative tolerance. + </para> + <para> + Any optional parameter equal to the empty matrix [] is set to its default value. + </para> + <para> + We emphasize that this relative tolerance is only a suggestion. + Indeed, there may be correct reasons of using a lower or a higher relative tolerance. + </para> + <para> + <itemizedlist> + <listitem> + <para> + Consider the case where an excellent algorithm is able to make accurate computations, + even for an ill-conditionned problem. + In this case, we may require more accuracy (positive offset). + </para> + </listitem> + <listitem> + <para> + Consider the case where there is a trade-off between performance and accuracy, where performance wins. + In this case, we may require less accuracy (negative offset). + </para> + </listitem> + </itemizedlist> + </para> + <para> + Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments. + </para> + <para> + We compute the number of required digits d, then the relative tolerance is 10^-d. + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +assert_cond2reltol ( 0 ) // 1.110D-16 +assert_cond2reltol ( 1 ) // 1.110D-16 +assert_cond2reltol ( 1.e1 ) // 1.110D-15 +assert_cond2reltol ( 1.e2 ) // 1.110D-14 +assert_cond2reltol ( 1.e3 ) // 1.110D-13 +assert_cond2reltol ( 1.e16 ) // 1 +assert_cond2reltol ( 1.e17 ) // 1 +assert_cond2reltol ( 1.e18 ) // 1 + +// Matrix input. +condition = [0,1,10,100,1000,1.D13,1.D14,1.D15,1.D16,1.D17,1.D18]; +expected = [1.110D-16 1.110D-16 1.110D-15 1.110D-14 1.110D-13 0.0011102 0.0111022 0.1110223 1. 1. 1.]; +assert_cond2reltol ( condition ) + +// Using offset +// Negative offset : require less accuracy +assert_cond2reltol ( 1.e2 , [0 -1] ) // [1.1D-14 1.1D-13] +// Positive offset : requires more accuracy +// See that the impact of offset is constrained. +assert_cond2reltol ( 1.e2 , [0 1 2 3] ) // [1.1D-14 1.1D-15 1.1D-16 1.1D-16] +// Negative offset +// See that the impact of offset is constrained. +assert_cond2reltol ( 1.e14 , [0 -1 -2 -3] ) // [1.1D-02 1.1D-01 1 1] + +// Plot the relative tolerance depending on the condition +condition = logspace(0,18,1000); +r = assert_cond2reltol ( condition ); +plot(condition,r) +h=gcf(); +h.children.log_flags="lln"; +h.children.children.children.thickness=4; +xt = h.children.x_ticks; +xt.locations = 10^(0:2:18)'; +xt.labels = ["10^0";"10^2";"10^4";"10^6";"10^8";"10^10";"10^12";"10^14";"10^16";"10^18"]; +h.children.x_ticks=xt; +yt = h.children.y_ticks; +yt.locations = 10^-(0:2:18)'; +yt.labels = ["10^0";"10^-2";"10^-4";"10^-6";"10^-8";"10^-10";"10^-12";"10^-14";"10^-16";"10^-18"]; +h.children.y_ticks=yt; +xtitle("Relative tolerance","Condition","Relative tolerance"); +r = assert_cond2reltol ( condition , +3 ); +plot(condition,r,"r") +r = assert_cond2reltol ( condition , -3 ); +plot(condition,r,"g") +legend(["Offset=0","Offset=+3","Offset=-3"]); + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_cond2reqdigits.xml b/modules/development_tools/help/en_US/assert/assert_cond2reqdigits.xml new file mode 100755 index 000000000..681b1a9f9 --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_cond2reqdigits.xml @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_cond2reqdigits" xml:lang="en"> + <refnamediv> + <refname>assert_cond2reqdigits</refname> + <refpurpose>Suggests the number of required digits, given the condition number.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + d = assert_cond2reqdigits ( condition ) + d = assert_cond2reqdigits ( condition , offset ) + d = assert_cond2reqdigits ( condition , offset , b ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>condition :</term> + <listitem> + <para> a matrix of doubles, the condition number. The condition number must be strictly positive.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>offset :</term> + <listitem> + <para> a matrix of doubles, a shift for the number of required base-b digits (default offset=0). For example, offset=-1 produces a smaller number of required digits (reduces the required accuracy), offset=1 produces a larger number of required digits (increases the required accuracy).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>b :</term> + <listitem> + <para> a matrix of doubles, integer values, the b (default b = 10).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>d :</term> + <listitem> + <para> a matrix of doubles, the number of required digits. This is a positive real, between 0 and 15.95, if b=10 or between 0 and 53, if b=2.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Depending on the condition number, returns the corresponding number of required decimal digits. + </para> + <para> + Any optional parameter equal to the empty matrix [] is set to its default value. + </para> + <para> + We emphasize that this number of required digits is only a suggestion. + Indeed, there may be correct reasons of using a lower or a higher relative tolerance. + </para> + <para> + <itemizedlist> + <listitem> + Consider the case where an excellent algorithm is able to make accurate computations, + even for an ill-conditionned problem. + In this case, we may require more accuracy (positive offset). + </listitem> + <listitem> + Consider the case where there is a trade-off between performance and accuracy, where performance wins. + In this case, we may require less accuracy (negative offset). + </listitem> + </itemizedlist> + </para> + <para> + Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments. + </para> + <para> + The algorithm is the following. + We compute the base-10 logarithm of condition, then subtract the offset. + This number represents the expected number of lost digits. + We project it into the interval [0,dmax], where dmax -log10(2^(-53)) is the maximum + achievable number of accurate digits for doubles. + We compute the number of required digits d, by difference between dmax and the number + of lost digits. + Then the relative tolerance is 10^-d. + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +assert_cond2reqdigits ( 0 ) // 15.95459 +assert_cond2reqdigits ( 1 ) // 15.95459 +assert_cond2reqdigits ( 1.e1 ) // 14.95459 +assert_cond2reqdigits ( 1.e2 ) // 13.95459 +assert_cond2reqdigits ( 1.e3 ) // 12.95459 +assert_cond2reqdigits ( 1.e16 ) // 0 +assert_cond2reqdigits ( 1.e17 ) // 0 +assert_cond2reqdigits ( 1.e18 ) // 0 + +// Matrix input. +condition = [0,1,10,100,1000,1.D13,1.D14,1.D15,1.D16,1.D17,1.D18]; +assert_cond2reqdigits ( condition ) + +// Using offset +// Netative offset : decrease number of required digits (requires less accuracy) +assert_cond2reqdigits ( 1.e2 , [0 -1] ) // [13.95459 12.95459] +// Positive offset : increase number of required digits (requires more accuracy) +// See that the impact of offset is constrained. +assert_cond2reqdigits ( 1.e2 , [0 1 2 3] ) // [13.95459 14.95459 15.95459 15.95459] +// Netative offset (requires less accuracy) +// See that the impact of offset is constrained. +assert_cond2reqdigits ( 1.e14 , [0 -1 -2 -3] ) // [1.9545898 0.9545898 0. 0.] + +// Using base-2 +assert_cond2reqdigits ( 0 , [] , 2 ) // 53 +assert_cond2reqdigits ( 1 , [] , 2 ) // 53 +assert_cond2reqdigits ( 1.e1 , [] , 2 ) // 49.678072 +assert_cond2reqdigits ( 1.e2 , [] , 2 ) // 46.356144 +assert_cond2reqdigits ( 1.e3 , [] , 2 ) // 43.034216 +assert_cond2reqdigits ( 1.e16 , [] , 2 ) // 0 +assert_cond2reqdigits ( 1.e17 , [] , 2 ) // 0 +assert_cond2reqdigits ( 1.e18 , [] , 2 ) // 0 + +// Plot the number of required decimal digits depending on the condition +condition = logspace(0,18,1000); +d = assert_cond2reqdigits ( condition ); +plot(condition,d) +h=gcf(); +h.children.log_flags="lnn"; +h.children.children.children.thickness=4; +xt = h.children.x_ticks; +xt.locations = 10^(0:2:18)'; +xt.labels = ["10^0";"10^2";"10^4";"10^6";"10^8";"10^10";"10^12";"10^14";"10^16";"10^18"]; +h.children.x_ticks=xt; +xtitle("Number of required digits","Condition","Required decimal digits"); + +// Plot the number of required binary digits depending on the condition +condition = logspace(0,18,1000); +d = assert_cond2reqdigits ( condition , [] , 2 ); +plot(condition,d) +h=gcf(); +h.children.log_flags="lnn"; +h.children.children.children.thickness=4; +xt = h.children.x_ticks; +xt.locations = 10^(0:2:18)'; +xt.labels = ["10^0";"10^2";"10^4";"10^6";"10^8";"10^10";"10^12";"10^14";"10^16";"10^18"]; +h.children.x_ticks=xt; +xtitle("Number of required digits","Condition","Required binary digits"); +d = assert_cond2reqdigits ( condition , +10 , 2 ); +plot(condition,d,"r") +d = assert_cond2reqdigits ( condition , -10 , 2 ); +plot(condition,d,"g") +legend(["Offset=0","Offset=+10","Offset=-10"]); + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/assert/assert_generror.xml b/modules/development_tools/help/en_US/assert/assert_generror.xml new file mode 100755 index 000000000..46ebb38b9 --- /dev/null +++ b/modules/development_tools/help/en_US/assert/assert_generror.xml @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_generror" xml:lang="en"> + <refnamediv> + <refname>assert_generror</refname> + <refpurpose>Generates an error.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + assert_generror ( errormsg ) + assert_generror ( errormsg , errornb ) + + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Parameters</title> + <variablelist> + <varlistentry> + <term>expectedmsg :</term> + <listitem> + <para> a 1-by-1 matrix of strings, the error message to be produced</para> + </listitem> + </varlistentry> + <varlistentry> + <term>expectederrnb :</term> + <listitem> + <para> a 1-by-1 matrix of doubles, integer values, the error number (default expectederrnb=[]).</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Calls the error function, with the given arguments. + </para> + <para> + This function is called by the assert_check* function each time an error + produced by the wrong match between expected and computed outputs is generated. + In the case where an assert_check* function receives a wrong number of input arguments, + a wrong number of output arguments, a wrong type of input argument or a wrong content + of input arguments, the regular error function is called. + This function can be customized to modify the behaviour of the assert_check* functions. + </para> + <para> + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +// Both these calls generate an error +assert_generror ( "oups" ); +assert_generror ( "oups" , 123456789 ); + +// The following call generates an error. +assert_checktrue ( [%t %f] ); +// +// Define our own error handler +function myerror ( varargin ) + [lhs,rhs]=argn() + errormsg = varargin(1) + if ( rhs == 1 ) then + mprintf( "myerror: %s\n", errormsg ) + else + errornb = varargin(2) + mprintf( "myerror: %s (%d)\n", errormsg , errornb ) + end +endfunction +// +// Configure the new error handler +back=funcprot(); +funcprot(0); +olderrorfunction = assert_generror; +assert_generror = myerror; +funcprot(back); +// +// Check that the new error handler is in place +assert_checktrue ( [%t %f] ); +// +// Put back the regular error handler in place +back=funcprot(); +funcprot(0); +assert_generror = olderrorfunction; +funcprot(back); + + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>Function introduced + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/bench_run.xml b/modules/development_tools/help/en_US/bench_run.xml new file mode 100755 index 000000000..98135c686 --- /dev/null +++ b/modules/development_tools/help/en_US/bench_run.xml @@ -0,0 +1,157 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) INRIA + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="bench_run" xml:lang="en"> + <refnamediv> + <refname>bench_run</refname> + <refpurpose>Launch benchmark tests</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + bench_run() + bench_run(module[,test_name[,options]]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>module</term> + <listitem> + <para>a vector of string. It can be the name of a module or the absolute path of a toolbox.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>test_name</term> + <listitem> + <para>a vector of string</para> + </listitem> + </varlistentry> + <varlistentry> + <term>options</term> + <listitem> + <para>a vector of string</para> + <itemizedlist> + <listitem> + <para>list : list of the benchmark tests available in a module</para> + </listitem> + <listitem> + <para>help : displays some examples of use in the Scilab console</para> + </listitem> + <listitem> + <para>nb_run=value : repeat the benchmark test value times</para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Search for .tst files in benchmark test library + execute them, and display a report about execution time. + The .tst files are searched in directories SCI+"/modules/*/tests/benchmark". + </para> + <para> + Special tags may be inserted in the .tst file, which help to + control the processing of the corresponding test. These tags + are expected to be found in Scilab comments. + </para> + <para>These are the available tags :</para> + <itemizedlist> + <listitem> + <para> + <-- BENCH NB RUN : 10 --> + This test will be repeated 10 times. + </para> + </listitem> + <listitem> + <para> + <-- BENCH START --> + <-- BENCH END --> + The interesting part of the benchmark must be enclosed by these + tags. + </para> + </listitem> + </itemizedlist> + </refsection> + <refsection> + <title>Examples</title> + <para>Some simple examples of invocation of bench_run</para> + <programlisting role="example"><![CDATA[ +// Launch all tests +bench_run(); +bench_run([]); +bench_run([],[]); + +// Test one or several module +bench_run('core'); +bench_run('core',[]); +bench_run(['core','string']); + +// Launch one or several test in a specified module +bench_run('core',['trycatch','opcode']); + +// With options +bench_run([],[],'list'); +bench_run([],[],'help'); +bench_run([],[],'nb_run=2000'); + ]]></programlisting> + <para>An example of a benchmark file. This file corresponds to the + file + SCI/modules/linear_algebra/tests/benchmarks/bench_chol.tst. + </para> + <programlisting role="example"><![CDATA[ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +//============================================================================== +// Benchmark for chol function +//============================================================================== + +// <-- BENCH NB RUN : 10 --> + +stacksize(30000000); + +a = 0; +b = 0; +a = rand(900, 900, 'n'); +a = a'*a; + +// <-- BENCH START --> +b = chol(a); +// <-- BENCH END --> + ]]></programlisting> + <para>The result of the test</para> + <programlisting role="example"><![CDATA[ +-->bench_run('linear_algebra','bench_chol') + + For Loop (as reference) ........................... 143.00 ms [ 1000000 x] + + 001/001 - [linear_algebra] bench_chol ...................... 130.60 ms [ 10 x] + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="test_run">test_run</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/example_run.xml b/modules/development_tools/help/en_US/example_run.xml new file mode 100755 index 000000000..f322218e4 --- /dev/null +++ b/modules/development_tools/help/en_US/example_run.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="example_run" xml:lang="en"> + <refnamediv> + <refname>example_run</refname> + <refpurpose>Launch the examples found in help pages.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + example_run() + example_run(moduleNames) + example_run(moduleNames, functionNames) + example_run(moduleNames, functionNames, language) + example_run(moduleNames, functionNames, language, testrunOptions, testrunExportToFile) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>moduleNames</term> + <listitem> + <para> + a string or a string vector: the name(s) of the modules to test. Default value is the value returned by <link linkend="getmodules">getmodules()</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>functionNames</term> + <listitem> + <para>a string or a string vector: the name(s) of the functions to test. If not given, all help pages of the module(s) will be tested.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>language</term> + <listitem> + <para>a string: the language of the help pages to test. Default value is "en_US".</para> + </listitem> + </varlistentry> + <varlistentry> + <term>testrunOptions</term> + <listitem> + <para> + Used as third input argument for <link linkend="test_run">test_run</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>testrunExportToFile</term> + <listitem> + <para> + Used as forth input argument for <link linkend="test_run">test_run</link>. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + This function extracts the examples given in help pages and run them using <link linkend="test_run">test_run</link>. + </para> + </refsection> + <refsection> + <title>Example</title> + <programlisting role="example"><![CDATA[ +if ~isempty(ls("SCI/modules/xml/help/en_US/*.xml")) then // Help XML sources must be available for this example + example_run("xml") + example_run("core", "insertion") + example_run("core", ["insertion"; "extraction"]) + example_run("core", "insertion", "en_US") +end + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="test_run">test_run</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>Function example_run introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/test_run.xml b/modules/development_tools/help/en_US/test_run.xml new file mode 100755 index 000000000..85520c62c --- /dev/null +++ b/modules/development_tools/help/en_US/test_run.xml @@ -0,0 +1,492 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) INRIA + * Copyright (C) 2009-2011 - DIGITEO - Michael Baudin + * Copyright (C) 2013 - Scilab Enterprises - Paul Bignier: added 32/64bits separation + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="test_run" xml:lang="en"> + <refnamediv> + <refname>test_run</refname> + <refpurpose>Launch tests</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + status = test_run() + status = test_run(module) + status = test_run(module, test_name) + status = test_run(module, test_name, options, exportToFile) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>module</term> + <listitem> + <para>A String array. This input argument must be</para> + <itemizedlist> + <listitem> + <para> + the name of an internal Scilab module ("core", "time", ...) or a sub-module (e.g. "optimization|neldermead"). + </para> + </listitem> + <listitem> + <para> + the name of an ATOMS module ("module_lycee", "nisp", ...). To be taken into account, the module must be loaded when test_run() is called. + </para> + </listitem> + <listitem> + <para> + the absolute directory path of a module. + </para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + <varlistentry> + <term>test_name</term> + <listitem> + <para>A string array</para> + </listitem> + </varlistentry> + <varlistentry> + <term>options</term> + <listitem> + <para>A string array</para> + <variablelist> + <varlistentry> + <term>no_check_ref</term> + <listitem> + <para>does not check if the .dia and .dia.ref are equal</para> + </listitem> + </varlistentry> + <varlistentry> + <term>no_check_error_output</term> + <listitem> + <para>The error output stream is not checked. This option can be used when Scilab complains about the localization being not available.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>create_ref</term> + <listitem> + <para>create the .dia.ref file and does not check if the .dia and .dia.ref are equal</para> + </listitem> + </varlistentry> + <varlistentry> + <term>show_error</term> + <listitem> + <para>If an error occurs, show the last 10 lines of the execution</para> + </listitem> + </varlistentry> + <varlistentry> + <term>show_diff</term> + <listitem> + <para> + If a difference is found, show the result of the command <literal>diff -u</literal> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>list</term> + <listitem> + <para>Does not perform the tests but displays a list of available tests</para> + </listitem> + </varlistentry> + <varlistentry> + <term>help</term> + <listitem> + <para>display some examples about how to use this command</para> + </listitem> + </varlistentry> + <varlistentry> + <term>mode_nw</term> + <listitem> + <para>Add the "-nw" option to the launch</para> + </listitem> + </varlistentry> + <varlistentry> + <term>mode_nwni</term> + <listitem> + <para>Add the "-nwni" option to the launch</para> + </listitem> + </varlistentry> + <varlistentry> + <term>nonreg_tests</term> + <listitem> + <para>runs only the non-regression tests, skipping unit tests</para> + </listitem> + </varlistentry> + <varlistentry> + <term>unit_tests</term> + <listitem> + <para>Runs only the unit tests, skipping non-regression tests</para> + </listitem> + </varlistentry> + <varlistentry> + <term>skip_tests</term> + <listitem> + <para>Skip the tests</para> + </listitem> + </varlistentry> + <varlistentry> + <term>enable_lt</term> + <listitem> + <para>Enable long-time execution tests</para> + </listitem> + </varlistentry> + <varlistentry> + <term>short_summary</term> + <listitem> + <para>Does not display statistics nor execution time after execution (only number of executed, passed, failed and skipped tests will be displayed on a single line).</para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>exportToFile</term> + <listitem> + <para> + Export to a XML file the result of the test. This file follows the specification of the XUnit format. + Note that the usage of this option enables <literal>show_diff</literal> and <literal>show_error</literal>. + </para> + <para> + If the file pointed by <varname>exportToFile</varname> already exists, the new result will be added to the existing file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>status</term> + <listitem> + <para> + Boolean value + Returns %t if no error has been detected + Returns %f if any error has been detected + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Search for .tst files in the unit test and non-regression test library + execute them, and display a report about success of failures. + The .tst files are searched in directories SCI+"/modules/*/tests/unit_tests" + and SCI+"/modules/*/tests/nonreg_tests". + Whenever a test is executed, a .dia file is generated which contains + the full list of commands executed along with message which appears in the + console. When the script is done, the .dia file is compared with + the .dia.ref file which is expected to be in the same directory + as the .tst file. If the two file are different, the test fails. + </para> + <para> + Special tags may be inserted in the .tst file, which help to + control the processing of the corresponding test. These tags + are expected to be found in Scilab comments. + </para> + <para>These are the available tags:</para> + <itemizedlist> + <listitem> + <para> + <-- INTERACTIVE TEST --> + This test will be skipped because it is interactive. + </para> + </listitem> + <listitem> + <para> + <-- LONG TIME EXECUTION --> + This test will be skipped because it needs long-time duration. To enable + the test, call test_run with the following option: "enable_lt" + </para> + </listitem> + <listitem> + <para> + <-- NOT FIXED --> + This test will be skipped because it is a known, but unfixed bug. + </para> + </listitem> + <listitem> + <para> + <-- TEST WITH GRAPHIC --> + This test will not be executed if the option "mode_nwni" is used. + </para> + </listitem> + <listitem> + <para> + <-- NO TRY CATCH --> + </para> + </listitem> + <listitem> + <para> + <-- NO CHECK ERROR OUTPUT --> + The error output file is not checked + </para> + </listitem> + <listitem> + <para> + <-- NO CHECK REF --> + The .dia and the .dia.ref files are not compared. + </para> + </listitem> + <listitem> + <para> + <-- ENGLISH IMPOSED --> + This test will be executed with the -l en_US option. + </para> + </listitem> + <listitem> + <para> + <-- FRENCH IMPOSED --> + This test will be executed with the -l fr_FR option. + </para> + </listitem> + <listitem> + <para> + <-- CLI SHELL MODE --> + (was: <-- JVM NOT MANDATORY -->) + This test will be executed with scilab-cli (nwni mode) by default. + </para> + </listitem> + <listitem> + <para> + <-- WINDOWS ONLY --> + If the operating system isn't Windows, the test is skipped. + </para> + </listitem> + <listitem> + <para> + <-- UNIX ONLY --> + If the operating system isn't an Unix OS, the test is skipped. + </para> + </listitem> + <listitem> + <para> + <-- LINUX ONLY --> + If the operating system isn't GNU/Linux, the test is skipped. + </para> + </listitem> + <listitem> + <para> + <-- MACOSX ONLY --> + If the operating system isn't Mac OS X, the test is skipped. + </para> + </listitem> + <listitem> + <para> + <-- XCOS TEST --> + This test will launch all the necessary Xcos libs. This test + will be launched in nw mode. + </para> + </listitem> + </itemizedlist> + <para> + Each test is executed in a separated process, created with the "host" command. + That enables the current command to continue, even if the test as + created an unstable environment. It also enables the tests to be + independent from one another. + </para> + </refsection> + <refsection> + <title>Platform-specific tests</title> + <para> + It may happen that the output of a test depends on the platform on which it is + executed. In this case, the <literal>.ref</literal> file cannot be correct for + all platforms and unit tests may fail for some platform. In this case, we can + create a default <literal>.ref</literal> and create additional <literal>.ref</literal> + file for each platform. + </para> + <para> + The various platform-specific <literal>.ref</literal> files must have one of the following extensions. + </para> + <itemizedlist> + <listitem> + <para> + <literal>.unix.dia.ref</literal> for Unix platform, + </para> + </listitem> + <listitem> + <para> + <literal>.linux.dia.ref</literal> for GNU/Linux platform, + </para> + </listitem> + <listitem> + <para> + <literal>.linux32.dia.ref</literal> for GNU/Linux platform with 32bits processors, + </para> + </listitem> + <listitem> + <para> + <literal>.win.dia.ref</literal> for Windows platform, + </para> + </listitem> + <listitem> + <para> + <literal>.win32.dia.ref</literal> for Windows platform with 32bits processors, + </para> + </listitem> + <listitem> + <para> + <literal>.macosx.dia.ref</literal> for Mac OS X platform. + </para> + </listitem> + </itemizedlist> + <para> + The algorithm is the following. + First, the <literal>.ref</literal> is considered. If this file does not exist, + the platform-specific <literal>.ref</literal> file is examined depending on the current platform. + </para> + <itemizedlist> + <listitem> + <para> + on Windows platforms: <literal>.win.dia.ref</literal>, <literal>.win32.dia.ref</literal> + </para> + </listitem> + <listitem> + <para> + on Max OS X platforms: <literal>.unix.dia.ref</literal>, <literal>.macosx.dia.ref</literal>, + </para> + </listitem> + <listitem> + <para> + on GNU/Linux platforms: <literal>.unix.dia.ref</literal>, <literal>.linux.dia.ref</literal>, <literal>.linux32.dia.ref</literal>. + </para> + </listitem> + </itemizedlist> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +// Launch all tests +// ============================================= + +test_run(); +test_run([]); +test_run([],[]); + +// Test one or several module +// ============================================= + +// Test one module +test_run('time'); + +// Test several modules +test_run(['time','string']); + +// Test a submodule +test_run('optimization|neldermead'); + +// Refer to a module by its path +test_run(SCI+'/modules/core'); + +// Launch a specific test +// ============================================= + +// One specific test +test_run('time','datenum'); + +// Several tests +test_run('time',['datenum';'calendar']); + +// Skip some tests +// ============================================= + +test_run('time',['datenum';'calendar'],'skip_tests'); + +// Options +// ============================================= + +// does not check if the .dia and .dia.ref are equal +test_run('time','datenum','no_check_ref'); + +// Create the .dia.ref file and does not check if the .dia and .dia.ref are equal +test_run([],[],'create_ref'); + +// Does not perform the tests but displays a list of available tests +test_run([],[],'list'); + +// Display some examples about how to use this command +test_run([],[],'help'); + +// Runs only the non-regression tests, skipping unit tests +test_run([],[],'nonreg_test'); + +// Runs only the unit tests, skipping non-regression tests +test_run([],[],'unit_test'); + +// Do not check the error output (std err) +test_run('boolean','bug_2799','no_check_error_output'); + +// Combine several options +test_run([],[],['no_check_ref','mode_nw']); + ]]></programlisting> + + <programlisting role="example"><![CDATA[ +// Run unitary tests of an external module (with his path) +test_run('SCI/contrib/toolbox_skeleton') + ]]></programlisting> + + <programlisting role="example"><![CDATA[ +// Export to a XML Xunit file +test_run('boolean',[],[],TMPDIR+"/boolean_test_run.xml"); +test_run('time','datenum',[],TMPDIR+"/time_datenum_test_run.xml"); + ]]></programlisting> + </refsection> + <refsection> + <title>Internal Design</title> + <para> + The tests are performed in the temporary directory, not in the directory + which originaly contain the tests files. + The .tst file is copied into the temporary directory, the test is performed + and the .dia.ref is copied back into the original location. + </para> + <para> + The .tst script is not run as is. Instead, a header and a footer are + inserted at the beginning and at the end of the .tst at the time + the script is copied into the temporary directory. + The role of this modification is to redirect the output messages + into the .dia file, so that the user can have a log file once the test + is performed. + </para> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>test_run returns a status: + <itemizedlist><listitem> + Returns %t if no error has been detected + </listitem> + <listitem> + Returns %f if any error has been detected + </listitem> + </itemizedlist> + <para> + <literal>show_diff</literal> and <literal>show_error</literal> added as new options + </para> + <para> + <literal>CLI SHELL MODE</literal> tag is added. Replaces <literal>JVM NOT MANDATORY</literal> (still supported) + </para> + <para> + <literal>test_run</literal> can work on an external module. + </para> + <para> + Fourth argument added to export to a XML file + </para> + </revdescription> + <revnumber>5.5.0</revnumber> + <revdescription>32/64bits separation available</revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/en_US/user.xml b/modules/development_tools/help/en_US/user.xml new file mode 100755 index 000000000..4be328556 --- /dev/null +++ b/modules/development_tools/help/en_US/user.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="user"> + <refnamediv> + <refname>user</refname> + <refpurpose>interfacing a Fortran or C routine</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis>[s_1,s_2,...,s_lhs]=user(e_1,e_2,...,e_rhs)</synopsis> + </refsynopsisdiv> + <refsection> + <title>Description</title> + <para> + With this command it is possible to use an external program + as a Scilab command + where <literal>(s_1,s_2,...,s_lhs)</literal> are the output variables and + <literal>(e_1,e_2,...,e_rhs)</literal> are the input variables. To insert this command + in Scilab one has to write a few lines in the <literal>user</literal> fortran subroutine + of Scilab. See <link linkend="intersci">intersci</link> or the Scilab documentation for more information. + </para> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="fort">fort</link> + </member> + <member> + <link linkend="link">link</link> + </member> + <member> + <link linkend="intersci">intersci</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/development_tools/help/fr_FR/addchapter.sce b/modules/development_tools/help/fr_FR/addchapter.sce new file mode 100755 index 000000000..46ca2b6a7 --- /dev/null +++ b/modules/development_tools/help/fr_FR/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Outils de développement",SCI+"/modules/development_tools/help/fr_FR",%T); + diff --git a/modules/development_tools/help/fr_FR/user.xml b/modules/development_tools/help/fr_FR/user.xml new file mode 100755 index 000000000..a3c0a7403 --- /dev/null +++ b/modules/development_tools/help/fr_FR/user.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" xml:id="user"> + <refnamediv> + <refname>user</refname> + <refpurpose>interfaçage d'une routine Fortran ou C </refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Séquence d'appel</title> + <synopsis>[s_1,s_2,...,s_lhs]=user(e_1,e_2,...,e_rhs)</synopsis> + </refsynopsisdiv> + <refsection> + <title>Description</title> + <para> + Avec cette commande il est possible d'utiliser un programme externe + comme une commande Scilab où + <literal>(s_1,s_2,...,s_lhs)</literal> sont les variables de sortie et + <literal>(e_1,e_2,...,e_rhs)</literal> sont les variables d'entrée. Pour utiliser cette commande dans Scilab il faut écrire quelques lignes dans la subroutine Fortran <literal>user</literal> de Scilab. Voir <link linkend="intersci">intersci</link> ou la documentation de Scilab pour plus d'informations. + </para> + </refsection> + <refsection role="see also"> + <title>Voir aussi</title> + <simplelist type="inline"> + <member> + <link linkend="fort">fort</link> + </member> + <member> + <link linkend="link">link</link> + </member> + <member> + <link linkend="intersci">intersci</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/addchapter.sce b/modules/development_tools/help/ja_JP/addchapter.sce new file mode 100755 index 000000000..6c89bcfe7 --- /dev/null +++ b/modules/development_tools/help/ja_JP/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Development tools",SCI+"/modules/development_tools/help/ja_JP",%T); + diff --git a/modules/development_tools/help/ja_JP/assert/CHAPTER b/modules/development_tools/help/ja_JP/assert/CHAPTER new file mode 100755 index 000000000..f4b4d4cdd --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/CHAPTER @@ -0,0 +1 @@ +title = Assert
\ No newline at end of file diff --git a/modules/development_tools/help/ja_JP/assert/assert_0overview.xml b/modules/development_tools/help/ja_JP/assert/assert_0overview.xml new file mode 100755 index 000000000..fa22e5716 --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_0overview.xml @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="assert_overview"> + <refnamediv> + <refname>assertã®æ¦‚è¦</refname> + <refpurpose>assertモジュールã®æ¦‚è¦.</refpurpose> + </refnamediv> + <refsection> + <title>目的</title> + <para> + ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ç›®çš„ã¯,ユニットテストã®ã‚ˆã†ã« + ä»–ã®é–¢æ•°ã®å‹•ä½œã‚’書ãã«ã™ã‚‹é–¢æ•°ã‚’æä¾›ã™ã‚‹ã“ã¨ã§ã™. + 数値計算アルゴリズムをより簡å˜ã«ãƒ†ã‚¹ãƒˆã§ãã‚‹ã“ã¨ã‚’目標ã«ã—㟠+ 数値的ãªå•é¡Œã‚’テストã™ã‚‹ä¸€è²«æ€§ãŒã‚るツールを使用ã™ã‚‹ã“ã¨ã« + é‡ç‚¹ã‚’ç½®ã„ã¦ã„ã¾ã™. + 具体的ã«ã¯,2ã¤ã®æµ®å‹•å°æ•°ç‚¹æ•°ã‚’比較ã™ã‚‹é–¢æ•°ã‚’æä¾›ã—, + ã“ã“ã§ã¯ãã®2ã¤ã®æ•°å€¤ãŒ"数値的ã«ã»ã¼ç‰ã—ã„"ã“ã¨, + ã™ãªã‚ã¡ç›¸å¯¾èª¤å·®ãŒå°ã•ã„,を確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™. + </para> + </refsection> + <refsection> + <title>入門</title> + <para> + <literal>assert_checktrue</literal>関数ã«ã‚ˆã‚Š, + è«–ç†å€¤ã®è¡Œåˆ—ãŒtrueã§ã‚ã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™. + 以下ã®ã‚¢ã‚µãƒ¼ã‚·ãƒ§ãƒ³ã¯å¤±æ•—ã—,エラーを発生ã—ã¾ã™. + </para> + <programlisting role="example"><![CDATA[ +assert_checktrue ( [%t %F] ); + ]]></programlisting> + <para> + <literal>assert_checkequal</literal> 関数ã«ã‚ˆã‚Š, + 2ã¤ã®å¤‰æ•°ãŒç‰ã—ã„ã“ã¨ã‚’確èªã§ãã¾ã™. + 以下ã®ã‚¢ã‚µãƒ¼ã‚·ãƒ§ãƒ³ã¯æˆåŠŸã—,ãã®ã¾ã¾å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + <programlisting role="example"><![CDATA[ +assert_checkequal ( %nan , %nan ); + ]]></programlisting> + <para> + <literal>assert_checkalmostequal</literal>関数ã«ã‚ˆã‚Š, + 計算çµæžœãŒäºˆæ¸¬ã—ãŸçµæžœã«è¿‘ã„ã“ã¨ã‚’確èªã§ãã¾ã™. + 以下ã®ã‚¹ã‚¯ãƒªãƒ—トã§ã¯,<literal>computed=1.23456</literal> + ㌠<literal>expected=1.23457</literal>ã«è¿‘ã„ãŒ, + 最大é™é”æˆå¯èƒ½ãªç²¾åº¦ã«å¯¾ã—ã¦11æ¡ãŒå¤±ã‚ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™. + </para> + <programlisting role="example"><![CDATA[ +assert_checkalmostequal ( 1.23456 , 1.23457 , 1.e11*%eps ); + ]]></programlisting> + <para> + ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ç‰¹å¾´çš„ãªæ©Ÿèƒ½ã¯, + å…¨ã¦ã®ã‚¢ã‚µãƒ¼ãƒˆé–¢æ•°ãŒåŒã˜å‡ºåŠ›å¼•æ•°ã‚’有ã™ã‚‹ã“ã¨ã§ã™. + ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Š,動作を統一ã§ã,アサーションãŒã†ã¾ãã„ã‹ãªã„å ´åˆã® + エラーã®ç®¡ç†ãŒã‚·ãƒ³ãƒ—ルã«ãªã‚Šã¾ã™. + 例ãˆã°,呼ã³å‡ºã—æ‰‹é †ãŒä»¥ä¸‹ã¨ãªã‚‹é–¢æ•°<literal>assert_checktrue</literal> + を見ã¦ã¿ã¾ã—ょã†: + </para> + <programlisting role="example"><![CDATA[ +flag = assert_checktrue ( condition ) +flag = assert_checktrue ( condition ) +[flag,errmsg] = assert_checktrue ( condition ) + ]]></programlisting> + <para> + conditionã®ã‚るエントリãŒfalseã®å ´åˆ, + <itemizedlist> + <listitem><para> + errmsg出力変数ãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆ,エラーãŒç”Ÿæˆã•ã‚Œã¾ã™, + </para> + </listitem> + <listitem><para> + errmsg出力変数ãŒä½¿ç”¨ã•ã‚ŒãŸå ´åˆ,エラーã¯ç”Ÿæˆã•ã‚Œã¾ã›ã‚“. + </para> + </listitem> + </itemizedlist> + </para> + <para> + ã“ã®å‹•ä½œã®ç†ç”±ã¯ã‚¹ã‚¯ãƒªãƒ—ト内(例:ユニットテスト)ãŠã‚ˆã³ + 関数内ã®ä¸¡æ–¹ã§ã‚¢ã‚µãƒ¼ã‚·ãƒ§ãƒ³ã‚’使用出æ¥ã‚‹ã“ã¨ã§ã™. + 例ãˆã°,典型的ãªãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã«ãŠã‘る以下ã®å‘½ä»¤: + </para> + <programlisting role="example"><![CDATA[ +assert_checktrue ( 1+1==12 ); + ]]></programlisting> + <para> + ã¯äºˆæƒ³é€šã‚Šã«ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™. + 次ã«,関数内ã«ã‚¢ã‚µãƒ¼ã‚·ãƒ§ãƒ³ã«ã‚ˆã‚‹ç¢ºèªã‚’挿入ã™ã‚‹å ´åˆã‚’考ãˆã¦ã¿ã¾ã—ょã†. + アサーションãŒå¤±æ•—ã—ãŸã‚±ãƒ¼ã‚¹ã‚’管ç†ã™ã‚‹ã“ã¨ã‚’考ãˆã¾ã™. + ã“ã®å ´åˆ,呼ã³å‡ºã—æ‰‹é †<literal>assert_checktrue ( condition )</literal> + ã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—,実行をä¸æ–ã—ã¾ã™. + <literal>assert_checktrue</literal>ã§ç”Ÿæˆã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ã‚’ã‚ャッãƒã™ã‚‹ã“ã¨ã§, + ã“れを回é¿ã—ãŸã„å ´åˆã‚‚ã‚ã‚Šãˆã¾ã™. + ã“ã‚Œã«ã¯<literal>execstr</literal>を使用ã™ã‚‹ã“ã¨ãŒå¿…è¦ã§, + 以下ã®ã‚ˆã†ãªã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¨ãªã‚Šã¾ã™. + </para> + <programlisting role="example"><![CDATA[ +function y = myfunction ( x ) + ierr=execstr("assert_checktrue ( x==12 )","errcatch"); + if ( ierr <> 0 ) then + error("Oups!") + end + y=x +endfunction + ]]></programlisting> + <para> + ã“ã®å ´åˆ,エラー処ç†ãŒç°¡å˜ã«ãªã‚‹å‘¼ã³å‡ºã—æ‰‹é † + <literal>[flag,errmsg] = assert_checktrue ( condition )</literal>ã‚’ + 代ã‚ã‚Šã«ä½¿ç”¨ã™ã‚‹ã¨è‰¯ã„ã§ã—ょã†. + </para> + <programlisting role="example"><![CDATA[ +function y = myfunction2 ( x ) + [flag,errmsg] = assert_checktrue ( x==12 ) + if ( ~flag ) then + error("Oups!") + end + y=x +endfunction + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_checkalmostequal.xml b/modules/development_tools/help/ja_JP/assert/assert_checkalmostequal.xml new file mode 100755 index 000000000..0f256a88d --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_checkalmostequal.xml @@ -0,0 +1,295 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkalmostequal" xml:lang="ja"> + <refnamediv> + <refname>assert_checkalmostequal</refname> + <refpurpose>計算値ã¨äºˆæ¸¬å€¤ãŒæ•°å€¤çš„ã«è¿‘ã„ã“ã¨ã‚’調ã¹ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + flag = assert_checkalmostequal ( computed , expected ) + flag = assert_checkalmostequal ( computed , expected , reltol ) + flag = assert_checkalmostequal ( computed , expected , reltol , abstol ) + flag = assert_checkalmostequal ( computed , expected , reltol , abstol , comptype ) + [flag,errmsg] = assert_checkalmostequal ( ... ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>computed:</term> + <listitem> + <para> + doubleã®è¡Œåˆ—, doubleã®ç–Žè¡Œåˆ—, ã¾ãŸã¯ + doubleã®ãƒã‚¤ãƒ‘ー行列, 計算çµæžœ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>expected :</term> + <listitem> + <para> + doubleã®è¡Œåˆ—, doubleã®ç–Žè¡Œåˆ—, ã¾ãŸã¯ + doubleã®ãƒã‚¤ãƒ‘ー行列, 予測ã™ã‚‹çµæžœ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>reltol :</term> + <listitem> + <para> doubleã®1è¡Œ1列行列, 相対許容誤差 + (デフォルト: reltol=sqrt(%eps)). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>abstol :</term> + <listitem> + <para> + doubleã®1è¡Œ1列行列, 絶対許容誤差 + (デフォルト: abstol=0). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>comptype :</term> + <listitem> + <para> + æ–‡å—列ã®1è¡Œ1列行列, "matrix" ã¾ãŸã¯ "element" + (デフォルト: comptype="element"). + 比較ã®åž‹. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> + è«–ç†å€¤ã®1è¡Œ1列行列, + computed ㌠expected ã«è¿‘ã„å ´åˆã« %t, + ãã†ã§ãªã„å ´åˆã« %f + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> + æ–‡å—列ã®1è¡Œ1列行列, エラーメッセージ. + flag==%t ã®å ´åˆã¯ errmsg="", + flag==%f ã®å ´åˆ errmsg ã«ã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒ + 代入ã•ã‚Œã¾ã™. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + doubleã¾ãŸã¯è¤‡ç´ æ•°doubleã®2ã¤ã®è¡Œåˆ—, computed 㨠expected ãŒè¿‘ã„ + å ´åˆã«ãã®ã¾ã¾å®Ÿè¡Œã•ã‚Œã¾ã™. + 変数computedã¨expectedを交æ›ã—ã¦ã‚‚çµæžœã«å½±éŸ¿ã—ã¾ã›ã‚“. + </para> + <para> + オプションã®å…¥åŠ›å¼•æ•°ã«ç©ºã®è¡Œåˆ—w指定ã™ã‚‹ã¨ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§ + ç½®æ›ã•ã‚Œã¾ã™. + </para> + <para> + 以下ã®ã‚ˆã†ãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ を使用ã—ã¾ã™. + ã¾ãšå®Ÿéƒ¨ã‚’比較ã—ã¾ã™.実部ãŒç‰ã—ã„å ´åˆ,虚部を比較ã—ã¾ã™. + </para> + <para> + 使用ã•ã‚Œã‚‹æ¡ä»¶ã¯ç›¸å¯¾ãŠã‚ˆã³çµ¶å¯¾è¨±å®¹èª¤å·®ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™: + <programlisting> + ( |e-c| <= reltol * max(|e|,|c|) + abstol ) + </programlisting> + comptype="matrix" ã®å ´åˆ, ノルムãŒä½¿ç”¨ã•ã‚Œã¾ã™. + comptype="element" ã®å ´åˆ, + 絶対値ãŒä½¿ç”¨ã•ã‚Œ, å…¨ã¦ã®æ¡ä»¶ãŒ true ã®å ´åˆã«2ã¤ã®è¡Œåˆ—㌠+ ã»ã¼ç‰ã—ã„ã¨ã¿ãªã•ã‚Œã¾ã™. + </para> + <para> + デフォルト㮠comptype="matrix" オプションã§ã¯ + 行列全体ã«ã¤ã„ã¦ã®æ¯”較ãŒè¡Œã‚ã‚Œ, + 行列ã®å·®ã®ãƒŽãƒ«ãƒ ãŒä½¿ç”¨ã•ã‚Œã¾ã™. + comptype="element"オプションã¯è¦ç´ 毎ã®æ¯”較, + ã™ãªã‚ã¡,行列ã®å…¨ã¦ã®è¦ç´ ãŒã»ã¼ç‰ã—ã„ã“ã¨,ã‚’è¡Œã„ã¾ã™. + ã“れら2ã¤ã®æ¯”較方法ã®é¸æŠžã¯æ³¨æ„ã—ã¦è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™. + 例ãˆã°,基本関数ã®å‡ºåŠ›ã‚’è¦ç´ 毎ã«ç¢ºèªã™ã‚‹éš›ã«ã¯, + 行列ã®è¦ç´ ã‚’é †ç•ªã«æ¯”較ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚, + "element" 比較型をé¸ã¶å¿…è¦ãŒã‚ã‚Šã¾ã™. + </para> + <para> + IEEE値 %inf, -%inf ã¾ãŸã¯ %nan ãŒè¡Œåˆ—ã®ä¸ã«å˜åœ¨ã™ã‚‹å ´åˆ, + ãã®IEEE値ãŒè¡Œåˆ—ã®åŒã˜æ·»å—ã«ã‚ã‚‹å ´åˆã«ã®ã¿ã»ã¼ç‰ã—ã„㨠+ ã¿ãªã•ã‚Œã¾ã™. + </para> + <para> + デフォルトã®æ¯”較ã¯ç›¸å¯¾èª¤å·®ã«ã‚‚ã¨ã¥ã„ã¦ãŠã‚Š, + 8æ¡ãŒå…±é€šã§ã‚ã‚‹ã“ã¨ã‚’ä¿éšœã—ã¾ã™. + ã“ã‚Œã«ã‚ˆã‚Š,計算çµæžœã®ä¸Šä½æ¡ã®æ•°å€¤ã‚’アサーションã™ã‚‹ã“ã¨ãŒã§ãã¾ã™. + </para> + <para> + ã“ã®å‡¦ç†ã¯,変数computedã¨expectedãŒdoubleã®è¡Œåˆ—ã§ã‚ã‚‹å ´åˆã«ã®ã¿ + 動作ã—ã¾ã™. + ãã®ä»–ã®å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™. + </para> + <para> + 比較ãŒcomputedãŒexpectedã«ã»ã¼ç‰ã—ããªã„ã“ã¨ã‚’示ã™å ´åˆ, + <itemizedlist> + <listitem> + <para> + errmsg出力変数ãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆ, + エラーãŒç”Ÿæˆã•ã‚Œ, + </para> + </listitem> + <listitem> + <para> + errmsg出力変数ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆ, + エラーã¯ç”Ÿæˆã•ã‚Œã¾ã›ã‚“. + </para> + </listitem> + </itemizedlist> + </para> + <para> + 値を比較ã™ã‚‹éŽç¨‹ã«ãŠã„ã¦, + %nan, +%inf, -%inf ã¨æ®‹ã‚Šã®å€¤ã‚’分割ã—ã¾ã™. + nan値ã®æ¯”較ã¯ã§ãã¾ã›ã‚“. + ã“れ㌠%nan 値ãŒã‚ã‚‹å ´æ‰€ã®æ·»å—を比較ã™ã‚‹ç†ç”±ã§ã™. + ç„¡é™å¤§ã®å€¤ã®å·®ã‚’ã¨ã£ãŸå ´åˆ, + %nan 値ãŒç”Ÿæˆã•ã‚Œã¾ã™. + ã“れ㌠+%inf 値ãŒã‚ã‚‹å ´æ‰€ã®æ·»å—を比較ã™ã‚‹ç†ç”±ã§ã™. + -%inf 値ã®å ´åˆã‚‚åŒæ§˜ã§ã™. + よã£ã¦, nanãŠã‚ˆã³ç„¡é™å¤§ã‚’除ã値ãŒå®Ÿéš›ã«æ¯”較ã•ã‚Œã¾ã™. + </para> + <para> + デフォルト㮠comptype="element" オプション㯠+ è¦ç´ 毎ã®æ¯”較,ã™ãªã‚ã¡, + 行列ã®å…¨ã¦ã®è¦ç´ ãŒã»ã¼ç‰ã—ã„ã“ã¨,ã‚’è¡Œã„ã¾ã™. + comptype="matrix" オプションã¯è¡Œåˆ—全体を比較ã—, + 行列ã®å·®ã®ãƒŽãƒ«ãƒ ãŒä½¿ç”¨ã•ã‚Œã¾ã™. + </para> + <para> + 一般ã«,相対許容誤差を機械イプシãƒãƒ³ %eps ã®å€æ•°ã«è¨å®šã™ã‚‹ + å¿…è¦ãŒã‚ã‚Šã¾ã™. + 相対許容誤差ã¯å¯èƒ½ãªç¯„囲ã§æœ€ã‚‚å°ã•ã„大ãã•ã¨ã™ã‚‹å¿…è¦ãŒ + ã‚ã‚Šã¾ã™. + ã¤ã¾ã‚Š, å¯èƒ½ãªé™ã‚Šè¨±å®¹èª¤å·®ã‚’精度良ãè¨å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + 相対許容誤差をè¨å®šã™ã‚‹æ‰‹é †ã§ã¯, + 以下ã®å€¤ã‚’é †ç•ªã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ : + 0 (å…¨ã¦ã®æ¡ãŒæ£ã—ã„), %eps, 10*%eps, 100*%eps, 1.e3*%eps, 1.e4*%eps, ..., + 1.e17*%eps (å…¨ã¦ã®æ¡ãŒæ£ã—ããªã„). + ã“ã®ä¾‹ã¨ã—ã¦ã¯ä»¥ä¸‹ã‚’å‚ç…§ãã ã•ã„. + </para> + <para> + ã“ã®é–¢æ•°ã¯è¤‡ç´ 数を処ç†ã—ã¾ã™. + ã¾ãšå…¥åŠ›å¼•æ•°ã®å®Ÿéƒ¨ã‚’比較ã—ã¾ã™. + ã“ã‚ŒãŒå¤±æ•—ã—ãŸå ´åˆ,ãŸã ã¡ã«ãƒªã‚¿ãƒ¼ãƒ³ã—ã¾ã™. + æˆåŠŸã—ãŸå ´åˆ,入力引数ã®è™šéƒ¨ãŒæ¯”較ã•ã‚Œã¾ã™. + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +// æˆåŠŸã™ã‚‹æ¯”較. +// 相対誤差 : +assert_checkalmostequal ( 1 , 1 ); +assert_checkalmostequal ( 1 , 1 , %eps ); +assert_checkalmostequal ( ones(10,1) , ones(10,1) , %eps ); +// 絶対誤差 : +assert_checkalmostequal ( 1.23456789123456789e-30 , 0 , 0 , 1.e-10 ); +assert_checkalmostequal ( [1 %nan], [1 %nan] , 0 , %eps ); +// 失敗ã™ã‚‹æ¯”較. +// エラーメッセージを出力 : +assert_checkalmostequal ( 1 , 2 , %eps ); +// エラーメッセージを出力 : +flag = assert_checkalmostequal ( 1 , 2 , %eps ) +// エラーメッセージã¯å‡ºåŠ›ã•ã‚Œãªã„ : +[flag,errmsg] = assert_checkalmostequal ( 1 , 2 , %eps ) +assert_checkalmostequal ( 1 , [2 3] , %eps ); +assert_checkalmostequal ( [%nan 1], [1 %nan] , %eps ); +assert_checkalmostequal ( 1 + 5 * %eps , 1 , %eps ); +assert_checkalmostequal ( 1.23456789123456789e-30 , 1.3e-30 , %eps ); +// expectedãŒã‚¼ãƒã§ãªã„å ´åˆ, +// 相対誤差ã®è¨±å®¹å€¤ã‚’ %eps ã®å€æ•°ã¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. +// 以下ã®ãƒ†ã‚¹ãƒˆã¯æˆåŠŸã—, 最大実ç¾å¯èƒ½ãªç²¾åº¦ã«å¯¾ã—㦠+// 11æ¡ä»¥ä¸‹ãŒå¤±ã‚ã‚ŒãŸã“ã¨ãŒç¤ºã•ã‚Œã¾ã™. +assert_checkalmostequal ( 1.23456 , 1.23457 , 1.e11*%eps ); +// 相対ãŠã‚ˆã³çµ¶å¯¾è¨±å®¹èª¤å·®ã‚’交æ›ã§ãã¾ã›ã‚“. +// 以下ã®ãƒ†ã‚¹ãƒˆã¯ãƒ‘スã—ã¾ã™: 予測値ãŒ0ã§ã‚ã‚‹ãŸã‚, +// 絶対許容誤差を使用ã—ã¾ã™. +assert_checkalmostequal ( 1.23456789e-30 , 0 , 0 , 1.e-10 ); +// 以下ã®ãƒ†ã‚¹ãƒˆã¯å¤±æ•—ã—ã¾ã™: 相対許容誤差を使用ã—ã¾ã™. +assert_checkalmostequal ( 0 , 1.23456789e-30 , 1.e-10 ); +// 許容誤差をå¯èƒ½ãªé™ã‚Šã‚¿ã‚¤ãƒˆã«è¨å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. +// 許容誤差ãŒæŒ‡å®šã—ãŸæ•°ã«å¯¾ã—ã¦å°ã•ã™ãŽã‚‹ãŸã‚,以下ã®ãƒ†ã‚¹ãƒˆã¯å¤±æ•—ã—ã¾ã™. +assert_checkalmostequal ( 1.23456 , 1.23457 , %eps ); +// 共通ã®æ¡æ•°ã‚’å–å¾—ã—ã¾ã™: +assert_computedigits(1.23456 , 1.23457) +// 5.09ã‚’è¿”ã—ã¾ã™... +// 精度ã®åˆ¤å®šã‚’è¡Œã„, å—ã‘入れå¯èƒ½ã§ã‚ã‚‹ã¨çµè«–付ã‘ã¾ã™: +assert_checkalmostequal ( 1.23456 , 1.23457 , 1.e-5 ); +// assert_checkalmostequalã®å®Ÿç”¨çš„ãªä½¿ç”¨ä¾‹ã‚’示ã—ã¾ã™. +// ヒルãƒãƒ¼ãƒˆè¡Œåˆ—ã«åŸºã¥ã,å¹³å‡çš„ã«æ‚ªæ¡ä»¶ã®ç·šå½¢æ–¹ç¨‹å¼ã® +// システムを解ãã¾ã™. +n = 6; +// 予測値をè¨å®šã—ã¾ã™. +expected = ones(n,1); +A = testmatrix("hilb",n); +// 行列ã®æ¡ä»¶æ•°ã‚’計算ã—ã¾ã™ : ~10^8 +ceil(log10(cond(A))) +// ã“ã‚Œã¯,ç†è«–çš„ã«å¤±ã‚れるæ¡æ•°ãŒ 8 ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™, +// 指定ã—㟠A 㨠expected ã‹ã‚‰å³è¾ºãŒè¨ˆç®—ã•ã‚Œã¾ã™. +b = A * expected; +// ã“ã®å ´åˆ, 部分ピボットé¸æŠžä»˜ãã®ã‚¬ã‚¦ã‚¹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ㌠+// 使用ã•ã‚Œã¾ã™. +computed = A\b; +// 以下ã®ãƒ†ã‚¹ãƒˆã¯å¤±æ•—ã—ã¾ã™: ã„ãã¤ã‹ã®æ¡ãŒå¤±ã‚ã‚Œã¾ã™. +assert_checkalmostequal(computed,expected,%eps) +// 共通ã™ã‚‹å®Ÿéš›ã®æ¡æ•°ã‚’計算ã—ã¾ã™: 10ã‹ã‚‰12æ¡ +assert_computedigits(computed, expected) +// ã“ã®è¨ˆç®—ã‚’å—ã‘入れã¾ã™. +// 以下ã®ãƒ†ã‚¹ãƒˆã¯ãƒ‘スã—ã¾ã™. +assert_checkalmostequal(computed,expected,1.e5*%eps); +// 以下ã®ä¾‹ã¯ comptype="element" 㨠"matrix" ã®å·®ç•°ã‚’示ã—ã¾ã™. +// 以下ã®ãƒ†ã‚¹ãƒˆã¯ãƒ‘スã—ã¾ã›ã‚“. +assert_checkalmostequal ( [1 1.e5] , [2 1.e5] , 1.e-3 ) +// 以下ã®ãƒ†ã‚¹ãƒˆã¯è¡Œåˆ—ã«åŸºã¥ã比較ã§ã¯ãƒ‘スã—ã¾ã™. +assert_checkalmostequal ( [1 1.e5] , [2 1.e5] , 1.e-3 , [] , "matrix" ) +// 以下ã®ãƒ†ã‚¹ãƒˆã¯ãƒ‘スã—ã¾ã™. +// IEEE値を考慮ã™ã‚‹ã“ã¨ã¯å®¹æ˜“ã§ã¯ã‚ã‚Šã¾ã›ã‚“. +[flag,errmsg] = assert_checkalmostequal ( [1.2345 %inf -%inf %nan] , [1.2346 %inf -%inf %nan] , 1.e-4 ) +// ã“ã®é–¢æ•°ã¯è¤‡ç´ 数を考慮ã—ã¾ã™. +// 以下ã®ãƒ†ã‚¹ãƒˆã¯ãƒ‘スã—ã¾ã™. +assert_checkalmostequal ( 1+%i , 1+(1+1.e-4)*%i , 1.e-3 , [], "element" ); +// 以下ã®ãƒ†ã‚¹ãƒˆã¯å¤±æ•—ã—ã¾ã™. +assert_checkalmostequal ( 1+%i , 1+(1+1.e-4)*%i , 1.e-5 , [], "element" ); + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_checkequal.xml b/modules/development_tools/help/ja_JP/assert/assert_checkequal.xml new file mode 100755 index 000000000..51d98b390 --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_checkequal.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkequal" xml:lang="ja"> + <refnamediv> + <refname>assert_checkequal</refname> + <refpurpose>計算値ã¨äºˆæ¸¬å€¤ãŒç‰ã—ã„ã“ã¨ã‚’確èªã™ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + assert_checkequal ( computed , expected ) + flag = assert_checkequal ( computed , expected ) + [flag,errmsg] = assert_checkequal ( computed , expected ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>computed:</term> + <listitem> + <para>計算çµæžœ</para> + </listitem> + </varlistentry> + <varlistentry> + <term>expected :</term> + <listitem> + <para>予測ã•ã‚ŒãŸçµæžœ</para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para>1è¡Œ1列ã®è«–ç†å€¤è¡Œåˆ—ã§, 計算値ãŒäºˆæ¸¬å€¤ã¨ç‰ã—ã„å ´åˆã«%t,ãã†ã§ãªã„å ´åˆã«%f + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para>1è¡Œ1列ã®æ–‡å—列行列ã§,エラーメッセージ. + flag==%t ã®å ´åˆ, errormsg==""ã¨ãªã‚Šã¾ã™. + flag==%f ã®å ´åˆ, errmsgã«ã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå‡ºåŠ›ã•ã‚Œã¾ã™. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + computedã¨expectedãŒç‰ã—ã„å ´åˆ,ãã®ã¾ã¾å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + <para> + 入力引数ã®åž‹ãŒå…±ã«1 (ã™ãªã‚ã¡å®Ÿæ•°è¡Œåˆ—)ã®å ´åˆ, + nan以外ã®å€¤ãŒç‰ã—ã„ã“ã¨ãŒç¢ºèªã•ã‚Œã¾ã™. + </para> + <para> + ã¾ãšå®Ÿéƒ¨ã‚’確èªã—,ãã‚ŒãŒç‰ã—ã„å ´åˆã«è™šéƒ¨ã‚’確èªã—ã¾ã™. + </para> + <para> + 比較ãŒcomputedãŒexpectedã«ç‰ã—ããªã„ã“ã¨ã‚’示ã™å ´åˆ, + <itemizedlist> + <listitem> + <para> + errmsg出力変数ãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆ,エラーãŒç”Ÿæˆã•ã‚Œ, + </para> + </listitem> + <listitem> + <para> + errmsg出力変数ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆ,エラーã¯ç”Ÿæˆã•ã‚Œã¾ã›ã‚“. + </para> + </listitem> + </itemizedlist> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +// æˆåŠŸã™ã‚‹ãƒ†ã‚¹ãƒˆ +assert_checkequal ( %T , %T ); +flag = assert_checkequal ( list() , list() ); +[flag , errmsg] = assert_checkequal ( [%T %F], [%T %F] ); +assert_checkequal ( %nan , %nan ); +// 失敗ã™ã‚‹ãƒ†ã‚¹ãƒˆ +assert_checkequal ( %F , %T ); +flag = assert_checkequal ( %F , %T ); +// エラーã¯ç™ºç”Ÿã—ã¾ã›ã‚“ : +[flag , errmsg] = assert_checkequal ( %F , %T ) +assert_checkequal ( [1 2], [3 4] ) +assert_checkequal ( 1 , [2 3] ) +assert_checkequal ( 1 , "b" ) + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> + <refsection> + <title>å‚考文献</title> + <para>"Automated Software Testing for Matlab", Steven Eddins, 2009</para> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_checkerror.xml b/modules/development_tools/help/ja_JP/assert/assert_checkerror.xml new file mode 100755 index 000000000..57d351750 --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_checkerror.xml @@ -0,0 +1,270 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkerror" xml:lang="ja"> + <refnamediv> + <refname>assert_checkerror</refname> + <refpurpose>命令ãŒäºˆæ¸¬ã—ãŸã‚¨ãƒ©ãƒ¼ã‚’発生ã™ã‚‹ã“ã¨ã‚’確èªã™ã‚‹. + </refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + flag = assert_checkerror ( instr , expectedmsg ) + flag = assert_checkerror ( instr , expectedmsg , expectederrnb ) + flag = assert_checkerror ( instr , expectedmsg , expectederrnb , a1, ... ) + [flag,errmsg] = assert_checkerror ( ... ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>instr:</term> + <listitem> + <para>1è¡Œ1列ã®æ–‡å—列行列, 評価ã™ã‚‹å¼</para> + </listitem> + </varlistentry> + <varlistentry> + <term>expectedmsg :</term> + <listitem> + <para> + æ–‡å—列ã¾ãŸã¯æ–‡å—列ベクトル,生æˆã™ã‚‹ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>expectederrnb :</term> + <listitem> + <para> + 1è¡Œ1列ã®double,整数値,エラー番å·ã®è¡Œåˆ— + (デフォルト: expectederrnb=[]). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>a1 :</term> + <listitem> + <para> + <literal>msprintf</literal> 関数ã«æŒ‡å®šã™ã‚‹, + オプションã®ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºç”¨å¼•æ•°. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para>1è¡Œ1列ã®è«–ç†å€¤è¡Œåˆ—,æ£ã—ã„エラーメッセージãŒç”Ÿæˆã•ã‚ŒãŸå ´åˆã« %t , + ãã†ã§ãªã„å ´åˆã« %f + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> + 1è¡Œ1列ã®æ–‡å—列行列ã§,エラーメッセージ. + flag==%t ã®å ´åˆ, errormsg==""ã¨ãªã‚Šã¾ã™. + flag==%f ã®å ´åˆ, errmsgã«ã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå‡ºåŠ›ã•ã‚Œã¾ã™. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + å¼ãŒã‚¨ãƒ©ãƒ¼ã‚’発生ã—ãªã„å ´åˆ, + <literal>assert_checkerror</literal> ã¯ã‚¨ãƒ©ãƒ¼ã‚’発生ã—ã¾ã™. + 評価ã•ã‚ŒãŸå¼ãŒäºˆæƒ³ã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’生æˆã™ã‚‹å ´åˆ,ãã®ã¾ã¾å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + <para> + エラーメッセージ<literal>expectedmsg</literal>ãŒæŒ‡å®šã•ã‚Œ, + 空ã®è¡Œåˆ— <literal>[]</literal>ã§ãªã„å ´åˆ, + 生æˆã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæŒ‡å®šã•ã‚ŒãŸã‚‚ã®ã«ä¸€è‡´ã™ã‚‹ã“ã¨ãŒç¢ºèªã•ã‚Œã¾ã™. + エラー番å·<literal>expectederrnb</literal>ãŒæŒ‡å®šã•ã‚Œ, + 空ã®è¡Œåˆ— <literal>[]</literal>ã§ãªã„å ´åˆ, + 生æˆã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ç•ªå·ãŒæŒ‡å®šã•ã‚ŒãŸã‚‚ã®ã«ä¸€è‡´ã™ã‚‹ã“ã¨ãŒç¢ºèªã•ã‚Œã¾ã™. + エラーメッセージ<literal>expectedmsg</literal>ãŠã‚ˆã³ + ã‚¨ãƒ©ãƒ¼ç•ªå· <literal>expectederrnb</literal>ã‚’ + åŒæ™‚ã«ç©ºã®è¡Œåˆ—<literal>[]</literal>ã¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“: + å°‘ãªãã¨ã‚‚一ã¤ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + </para> + <para> + æ–‡å—列ã®ä¸€è‡´ã§ã¯æ–‡å—列ãŒåŽ³å¯†ã«ç‰ã—ã„ã“ã¨ãŒç¢ºèªã•ã‚Œã¾ã™: + パターンã¾ãŸã¯æ£è¦è¡¨ç¾ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“. + </para> + <para> + エラーメッセージãŒäºˆæ¸¬å€¤ã¨ç•°ãªã‚‹ã‹,エラー番å·ãŒç•°ãªã‚‹å ´åˆ, + <itemizedlist> + <listitem> + <para> + errmsg出力変数ãŒæŒ‡å®šã•ã‚Œãªã„å ´åˆ,エラーãŒç”Ÿæˆã•ã‚Œ, + </para> + </listitem> + <listitem> + <para> + errmsg出力変数ãŒæŒ‡å®šã•ã‚Œã‚‹å ´åˆ,エラーã¯ç”Ÿæˆã•ã‚Œã¾ã›ã‚“. + </para> + </listitem> + </itemizedlist> + </para> + <para> + ã“ã®é–¢æ•°ã®ç›®çš„ã¯,ç°¡å˜ãªãƒ•ãƒ¬ãƒ¼ãƒ ワークã«ã‚ˆã‚Šã‚¨ãƒ©ãƒ¼ã®ã‚±ãƒ¼ã‚¹ã‚’ + 確èªã§ãるよã†ã«ã™ã‚‹ã“ã¨ã§ã™. + ã‚る関数ã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’確èªã™ã‚‹ã“ã¨ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªåˆ©ç‚¹ãŒã‚ã‚Šã¾ã™: + <itemizedlist> + <listitem> + <para> + å¿…è¦ãªæ™‚ã«æ£ã—ã„エラーãŒç”Ÿæˆã•ã‚Œã‚‹ã“ã¨ã‚’確èªã™ã‚‹, + </para> + </listitem> + <listitem> + <para> + エラーメッセージãŒæ£ã—ãæ•´å½¢ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹, + </para> + </listitem> + <listitem> + <para> + エラーメッセージãŒæ£ã—ããƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹. + </para> + </listitem> + </itemizedlist> + </para> + <para> + 予測ã•ã‚Œã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™. + ã“ã®å ´åˆ,メッセージã¯<literal>gettext</literal>関数ã®å‡ºåŠ›ã¨ + 比較ã•ã‚Œ,ãƒãƒ¼ã‚«ãƒ«ãªè¨€èªžã«ä¾å˜ã—ã¾ã™. + オプション引数<literal>a1</literal>ã‚’ã“ã®ç›®çš„, + 例ãˆã°ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’æ•´å½¢ã™ã‚‹ãŸã‚ã«,使用ã§ãã¾ã™. + å…¨ã¦ã®ã‚ªãƒ—ション引数 + <literal>a1</literal>, + <literal>a2</literal>, ... ã¯è¨ˆç®—ã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨æ¯”較ã™ã‚‹å‰ã«è‡ªå‹•çš„ã« + <literal>msprintf</literal>関数ã«æŒ‡å®šã•ã‚Œã¾ã™. + </para> + </refsection> + <refsection> + <title>例</title> + <para> + <literal>assert_checkerror</literal>関数を使用ã™ã‚‹è¤‡æ•°ã®ä¾‹ã‚’示ã—ã¾ã™. + ã¾ãšãƒ†ã‚¹ãƒˆã™ã‚‹é–¢æ•°ã‚’定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + </para> + <para> + 以下ã®é–¢æ•°<literal>f</literal>ã¯, + 入力引数ã®æ•°ãŒé–“é•ã£ã¦ã„ã‚‹ã‹<literal>x</literal>ã®åž‹ãŒé–“é•ã£ã¦ã„ã‚‹ + å ´åˆã«ã‚¨ãƒ©ãƒ¼ã‚’発生ã—ã¾ã™. + </para> + <programlisting role="example"><![CDATA[ +function y = f(x) + [lhs, rhs] = argn() + if ( rhs <> 1 ) then + lstr = gettext("%s: Wrong number of input argument: %d expected.\n") + errmsg = msprintf ( lstr , "f" , 1 ) + error(errmsg) + end + if ( typeof(x) <> "constant" ) then + lstr = gettext("%s: Wrong type for argument #%d: Matrix expected.\n") + errmsg = msprintf ( lstr , "f" , 1 ) + error(errmsg,123456789) + end + y = x +endfunction + ]]></programlisting> + <para> + 我々ã®ã‚¿ã‚¹ã‚¯ã¯,ã“ã®é–¢æ•°ã«ã‚ˆã‚Šç”Ÿæˆã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’確èªã™ã‚‹ã“ã¨ã§ã™. + 以下ã®2ã¤ã®ãƒ†ã‚¹ãƒˆã‚’パスã—ã¾ã™: + エラーメッセージãŒäºˆæ¸¬ã•ã‚ŒãŸã‚‚ã®ã§ã‚ã‚‹. + ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨ã‚ªãƒ—ション㮠+ パラメータ<literal>"f"</literal>(関数å)㨠+ <literal>1</literal>(入力引数ã®æ·»å—)ã®ã¿ã‚’指定ã—, + <literal>assert_checkerror</literal>ãŒãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºåŒ–を管ç†ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™. + ã“れらã®2ã¤ã®ã‚ªãƒ—ションパラメータã¯, + メッセージを整形ã—, + "%s" ãŠã‚ˆã³ "%d" フォーマットを実際ã®å€¤ã«å¤‰æ›ã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã¾ã™. + </para> + <programlisting role="example"><![CDATA[ +lcl1 = "%s: Wrong number of input argument: %d expected.\n"; +assert_checkerror ( "y = f()" , lcl1 , [] , "f" , 1); + +lcl2 = "%s: Wrong type for argument #%d: Matrix expected.\n"; +assert_checkerror ( "y = f(""a"")" , lcl2 , [] , "f" , 1); + ]]></programlisting> + <para> + ã“ã“ã§,カレントã®ãƒã‚±ãƒ¼ãƒ«è¨€èªžãŒè‹±èªžã§ã‚ã‚‹ã¨ä»®å®šã™ã‚‹ã¨, + 以下ã®ã‚³ãƒ¼ãƒ‰ã‚’æ£ã—ã使用ã§ãã¾ã™. + ã—ã‹ã—,例ãˆã°ã‚«ãƒ¬ãƒ³ãƒˆã®ãƒã‚±ãƒ¼ãƒ«ãŒãƒ•ãƒ©ãƒ³ã‚¹èªžã§ã‚ã‚‹å ´åˆã«å¤±æ•—ã™ã‚‹ãŸã‚, + ã“ã‚Œã¯æŽ¨å¥¨ã•ã‚Œã‚‹æ‰‹æ³•ã§ã¯ã‚ã‚Šã¾ã›ã‚“. + </para> + <programlisting role="example"><![CDATA[ +assert_checkerror ( "y = f()" , "f: Wrong number of input argument: 1 expected." ); + ]]></programlisting> + <para>以下ã®ãƒ†ã‚¹ãƒˆã§ã¯, エラー番å·ã‚‚確èªã—ã¾ã™.</para> + <programlisting role="example"><![CDATA[ +lcl1="%s: Wrong number of input argument: %d expected.\n"; +assert_checkerror ( "y=f()" , lcl1 , 10000 , "f" , 1); + +lcl2 = "%s: Wrong type for argument #%d: Matrix expected.\n"; +assert_checkerror ( "y=f(""a"")" , lcl2 , 123456789 , "f" , 1); + ]]></programlisting> + <para>以下ã®2ã¤ã®ãƒ†ã‚¹ãƒˆã¯å¤±æ•—ã—ã¾ã™.</para> + <programlisting role="example"><![CDATA[ +assert_checkerror ( "y = f()" , "oups" ); +msg1 = msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"), "f", 1); +assert_checkerror ( "y = f()" , msg1 , 12 ); + ]]></programlisting> + <para> + errmsgãŒå‡ºåŠ›å¼•æ•°ã«æŒ‡å®šã•ã‚ŒãŸå ´åˆ,以下ã®ä¾‹ã®ã‚ˆã†ã«,エラーãŒç”Ÿæˆã•ã‚Œã¾ã™. + 変数<literal>flag</literal> ãŠã‚ˆã³ <literal>errmsg</literal>ã®å†…容㫠+ 注æ„ã—ã¦ãã ã•ã„. + </para> + <programlisting role="example"><![CDATA[ +// パスã™ã‚‹ãƒ†ã‚¹ãƒˆ: flag 㯠%t, errmsg ã¯ç©º +msg1 = msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"), "f", 1); +[flag, errmsg] = assert_checkerror ( "y = f()" , msg1 ) +// 失敗ã™ã‚‹ãƒ†ã‚¹ãƒˆ: flag 㯠%f, errmsg ã¯ç©ºã§ãªã„ +[flag, errmsg] = assert_checkerror ( "y = f()" , "oups" ) + ]]></programlisting> + <para> + 以下ã®2ã¤ã®ãƒ†ã‚¹ãƒˆã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã•ã‚Œã¦ãŠã‚Š, + カレントã®è¨€èªžãŒä½•ã§ã‚ã£ã¦ã‚‚動作ã—ã¾ã™. + オプションã®ãƒ‘ラメータ<literal>a1</literal>を使用ã™ã‚‹ä»£ã‚ã‚Šã« + é•·ãã¯ãªã‚Šã¾ã™ãŒ,完全ã«æœ‰åŠ¹ãªã‚³ãƒ¼ãƒ‰ã§ã‚ã‚‹ + ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’直接使用ã—ã¾ã™. + </para> + <programlisting role="example"><![CDATA[ +msg1 = msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"), "f", 1); +assert_checkerror ( "y = f()" , msg1 ); +msg2 = msprintf(gettext("%s: Wrong type for argument #%d: Matrix expected.\n"), "f", 1); +assert_checkerror ( "y = f(""a"")" , msg2 ); + ]]></programlisting> + <para> + エラー番å·ã‚’確èªã—ãŸã„ãŒã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ç¢ºèªã—ãŸããªã„å ´åˆãŒã‚ã‚Šãˆã¾ã™. + 以下ã®ã‚¹ã‚¯ãƒªãƒ—トã¯, + 最åˆã®å¼•æ•°ãŒ doubleã®è¡Œåˆ—ã§ãªã„å ´åˆã« + 生æˆã•ã‚Œã‚‹ã‚¨ãƒ©ãƒ¼ç•ªå·ãŒ 123456789 ã§ã‚ã‚‹ã“ã¨ã®ã¿ã‚’ + 確èªã—ã¾ã™: エラーメッセージã¯ç¢ºèªã—ã¾ã›ã‚“. + </para> + <programlisting role="example"><![CDATA[ +assert_checkerror("f(""foo"")", [], 123456789); + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—ãŸ</revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_checkfalse.xml b/modules/development_tools/help/ja_JP/assert/assert_checkfalse.xml new file mode 100755 index 000000000..ca305a6e1 --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_checkfalse.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkfalse" xml:lang="ja"> + <refnamediv> + <refname>assert_checkfalse</refname> + <refpurpose>æ¡ä»¶ãŒ false ã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + flag = assert_checkfalse ( condition ) + flag = assert_checkfalse ( condition ) + [flag,errmsg] = assert_checkfalse ( condition ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>condition:</term> + <listitem> + <para> è«–ç†å€¤ã®è¡Œåˆ—</para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> + 1è¡Œ1列ã®è«–ç†å€¤è¡Œåˆ—, æ¡ä»¶ãŒ falseã®å ´åˆã« %t, + ãã†ã§ãªã„å ´åˆã« %f + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> + 1è¡Œ1列ã®æ–‡å—列行列,エラーメッセージ. + flag==%t ã®å ´åˆ, errmsg="". + flag==%f ã®å ´åˆ, errmsgã«ã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä»£å…¥ã•ã‚Œã¾ã™. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + <literal>condition</literal> ã®å…¨ã‚¨ãƒ³ãƒˆãƒªãŒfalseã®å ´åˆã« + ãã®ã¾ã¾å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + <para> + <literal>condition</literal>ã®ã‚¨ãƒ³ãƒˆãƒªã®ã©ã‚Œã‹ãŒtrueã®å ´åˆã« + エラーãŒç™ºç”Ÿã—ã¾ã™. + <literal>condition</literal>ãŒè«–ç†å€¤ã§ãªã„å ´åˆã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™. + </para> + <para> + conditionã®ã‚¨ãƒ³ãƒˆãƒªã®ã©ã‚Œã‹ãŒtrueã®å ´åˆ, + <itemizedlist> + <listitem> + <para> + 出力変数errmsgãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆ,エラーãŒå‡ºåŠ›ã•ã‚Œ, + </para> + </listitem> + <listitem> + <para> + 出力変数errmsgãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆ,エラーã¯å‡ºåŠ›ã•ã‚Œã¾ã›ã‚“. + </para> + </listitem> + </itemizedlist> + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +// テストã¯ãƒ‘スã™ã‚‹ +assert_checkfalse ( %f ); +flag = assert_checkfalse ( %f ) +[flag,errmsg] = assert_checkfalse ( %f ) +[flag,errmsg] = assert_checkfalse ( [%f %f] ); +// テストã¯å¤±æ•—ã™ã‚‹ +assert_checkfalse ( [%t %f] ); +flag = assert_checkfalse ( [%t %f] ) +// エラーã¯ç”Ÿæˆã•ã‚Œãªã„ +[flag,errmsg] = assert_checkfalse ( [%t %f] ) +// 誤ã£ãŸã‚³ãƒ¼ãƒ« +assert_checkfalse ( "a" ) + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_checkfilesequal.xml b/modules/development_tools/help/ja_JP/assert/assert_checkfilesequal.xml new file mode 100755 index 000000000..de3ea6f6c --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_checkfilesequal.xml @@ -0,0 +1,224 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checkfilesequal" xml:lang="ja"> + <refnamediv> + <refname>assert_checkfilesequal</refname> + <refpurpose>2ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒç‰ã—ã„ã“ã¨ã‚’確èªã™ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + flag = assert_checkfilesequal ( filecomp , fileref ) + flag = assert_checkfilesequal ( filecomp , fileref , compfun ) + [flag,errmsg] = assert_checkfilesequal ( ... ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>filecomp :</term> + <listitem> + <para> 1è¡Œ1列ã®æ–‡å—列行列, 計算ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>fileref :</term> + <listitem> + <para> 1è¡Œ1列ã®æ–‡å—列行列, 基準ファイル.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>compfun :</term> + <listitem> + <para> 関数ã¾ãŸã¯ãƒªã‚¹ãƒˆ, + 比較用関数 (デフォルト:compfun = []). + 比較用関数ãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆ, + ç‰ä¾¡æ¼”ç®—å "==" ãŒä½¿ç”¨ã•ã‚Œã¾ã™. + 詳細ã«ã¤ã„ã¦ã¯ä»¥ä¸‹ã‚’å‚ç…§ãã ã•ã„. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> + 1è¡Œ1列ã®è«–ç†å€¤è¡Œåˆ—, + computedãŒexpectedã«è¿‘ã„å ´åˆã« %t, + ãã†ã§ãªã„å ´åˆã« %f + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> + 1è¡Œ1列ã®æ–‡å—列行列, エラーメッセージ. + flag==%t ã®å ´åˆ, errmsg="". + flag==%f ã®å ´åˆ, errmsgã«ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä»£å…¥ã•ã‚Œã¾ã™. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + ファイルãŒç‰ã—ã„å ´åˆ,ãã®ã¾ã¾å®Ÿè¡Œã•ã‚Œã¾ã™. + filecompã¾ãŸã¯filerefãŒå˜åœ¨ã—ãªã„å ´åˆ,エラーãŒç™ºç”Ÿã—ã¾ã™. + ファイルã®å†…容ãŒç‰ã—ããªã„å ´åˆ,エラーãŒç™ºç”Ÿã—ã¾ã™. + </para> + <para> + ファイルãŒç‰ã—ããªã„å ´åˆ, + <itemizedlist> + <listitem> + <para> + 出力変数errmsgãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆ,エラーãŒç™ºç”Ÿã—, + </para> + </listitem> + <listitem> + <para> + 出力変数errmsgãŒä½¿ç”¨ã•ã‚ŒãŸå ´åˆ,エラーã¯ç™ºç”Ÿã—ã¾ã›ã‚“. + </para> + </listitem> + </itemizedlist> + </para> + <para> + 比較用関数compfunãŒé–¢æ•°ã®å ´åˆ, + ヘッダareequal = compfun ( txtcomp , txtref )を有ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + ãŸã ã—, txtcomp 㯠computed ファイルã®å†…容, + txtref ã¯åŸºæº–ファイルã®å†…容, + areequalã¯è«–ç†å€¤ã§ã™. + 2ã¤ã®å†…容ãŒç‰ã—ã„å ´åˆ,è«–ç†å€¤areequalã¯trueã¨ãªã‚Šã¾ã™. + compfunãŒãƒªã‚¹ãƒˆã®å ´åˆ,リスト(cf,a1,a2,...)ã¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + ãŸã ã—, cf ã¯æ¯”較関数ã§, 引数 a1, a2 ãŒcfã®å‘¼ã³å‡ºã—æ‰‹é †ã®æœ€å¾Œã« + 自動的ã«ä»˜åŠ ã•ã‚Œã¾ã™. + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +// +// テスト用ã®ãƒ‡ãƒ¼ã‚¿ã‚’準備 +// fileref1 : 3行分ã®ãƒ†ã‚スト +// filecomp1 : == fileref1 +// filecomp2 : <> fileref1 +fileref1 = fullfile(TMPDIR,"fileref.txt"); +txt1 = [ +"Line #1" +"Line #2" +"Line #3" +]; +fd = mopen(fileref1,"w"); +mputl(txt1,fd); +mclose(fd); +filecomp1 = fullfile(TMPDIR,"filecomp1.txt"); +fd = mopen(filecomp1,"w"); +mputl(txt1,fd); +mclose(fd); +filecomp2 = fullfile(TMPDIR,"filecomp2.txt"); +txt2 = [ +"Line #1" +"Line #4" +"Line #3" +]; +fd = mopen(filecomp2,"w"); +mputl(txt2,fd); +mclose(fd); +// パスã™ã‚‹ãƒ†ã‚¹ãƒˆ +flag = assert_checkfilesequal ( filecomp1 , fileref1 ) +[flag,errmsg] = assert_checkfilesequal ( filecomp1 , fileref1 ) +// 失敗: filecomp2 <> fileref1 +// エラーãŒç™ºç”Ÿ +flag = assert_checkfilesequal ( filecomp2 , fileref1 ) +// エラーã¯ç™ºç”Ÿã—ãªã„ +[flag,errmsg] = assert_checkfilesequal ( filecomp2 , fileref1 ) +// テスト用ã®ãƒ‡ãƒ¼ã‚¿ã‚’準備 +// fileref2 == filecomp3, コメント行を無視ã—ãŸå ´åˆ +// fileref2 <> filecomp4, コメント行を無視ã—ãŸå ´åˆ +// コメントã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®ç•°ãªã‚‹ä½ç½®ã«æŒ¿å…¥ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„: +// ã‚る時ã¯å…ˆé , ã‚る時ã¯ä¸å¤®. +fileref2 = fullfile(TMPDIR,"fileref2.txt"); +txt = [ +"// bla 2" +"Line #1" +"// bla 2" +"Line #2" +"Line #3" +]; +fd = mopen(fileref2,"w"); +mputl(txt,fd); +mclose(fd); +filecomp3 = fullfile(TMPDIR,"filecomp3.txt"); +txt = [ +"Line #1" +"// bla 5168" +"Line #2" +"Line #3" +"// bla oups" +]; +fd = mopen(filecomp3,"w"); +mputl(txt,fd); +mclose(fd); +filecomp4 = fullfile(TMPDIR,"filecomp4.txt"); +txt = [ +"// bla 3" +"Line #1" +"Line #4" +"// bla 5168" +"Line #3" +"// bla oups" +]; +fd = mopen(filecomp4,"w"); +mputl(txt,fd); +mclose(fd); +// コメント行を無視ã™ã‚‹æ¯”較用関数ã§ãƒ†ã‚¹ãƒˆ +function otxt = myfilter ( itxt ) +nr = size(itxt,"r") +// å½¢å¼ "// blabla" ã®ã‚³ãƒ¡ãƒ³ãƒˆè¡Œç”¨ã®ãƒ‘ターン +pattern = "/\/\/.*/" +k = 1 +for i = 1 : nr +start = regexp(itxt(i),pattern) +if ( start == [] ) then +otxt(k) = itxt(i) +k = k + 1 +end +end +endfunction +function areequal = mycompfun ( ctxt , etxt ) +ctxt = myfilter ( ctxt ) +etxt = myfilter ( etxt ) +areequal = ( ctxt == etxt ) +endfunction +// +// パスã™ã‚‹ãƒ†ã‚¹ãƒˆ +[flag,errmsg] = assert_checkfilesequal ( filecomp3 , fileref2 , mycompfun ) +// 失敗ã™ã‚‹ãƒ†ã‚¹ãƒˆ +[flag,errmsg] = assert_checkfilesequal ( filecomp4 , fileref2 , mycompfun ) + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_checktrue.xml b/modules/development_tools/help/ja_JP/assert/assert_checktrue.xml new file mode 100755 index 000000000..65857decf --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_checktrue.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_checktrue" xml:lang="ja"> + <refnamediv> + <refname>assert_checktrue</refname> + <refpurpose>æ¡ä»¶ãŒtrueã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + flag = assert_checktrue ( condition ) + flag = assert_checktrue ( condition ) + [flag,errmsg] = assert_checktrue ( condition ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>condition:</term> + <listitem> + <para> è«–ç†å€¤ã®è¡Œåˆ—</para> + </listitem> + </varlistentry> + <varlistentry> + <term>flag :</term> + <listitem> + <para> + 1è¡Œ1列ã®è«–ç†å€¤è¡Œåˆ—, æ¡ä»¶ãŒtrueã®å ´åˆã« %t, + ãã†ã§ãªã„å ´åˆã« %f + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>errmsg :</term> + <listitem> + <para> + 1è¡Œ1列ã®æ–‡å—列行列,エラーメッセージ. + flag==%t ã®å ´åˆ, errmsg="". + flag==%f ã®å ´åˆ, errmsgã«ã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä»£å…¥ã•ã‚Œã¾ã™. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + <literal>condition</literal> ã®å…¨ã‚¨ãƒ³ãƒˆãƒªãŒtrueã®å ´åˆã« + ãã®ã¾ã¾å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + <para> + <literal>condition</literal>ã®ã‚¨ãƒ³ãƒˆãƒªã®ã©ã‚Œã‹ãŒfalseã®å ´åˆã« + エラーãŒç™ºç”Ÿã—ã¾ã™. + <literal>condition</literal>ãŒè«–ç†å€¤ã§ãªã„å ´åˆã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™. + </para> + <para> + conditionã®ã‚¨ãƒ³ãƒˆãƒªã®ã©ã‚Œã‹ãŒfalseã®å ´åˆ, + <itemizedlist> + <listitem> + <para> + 出力変数errmsgãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆ,エラーãŒå‡ºåŠ›ã•ã‚Œ, + </para> + </listitem> + <listitem> + <para> + 出力変数errmsgãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆ,エラーã¯å‡ºåŠ›ã•ã‚Œã¾ã›ã‚“. + </para> + </listitem> + </itemizedlist> + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +// パスã™ã‚‹ãƒ†ã‚¹ãƒˆ +assert_checktrue ( %t ); +flag = assert_checktrue ( %t ) +[flag,errmsg] = assert_checktrue ( %t ) +[flag,errmsg] = assert_checktrue ( [%t %t] ); +// 失敗ã™ã‚‹ãƒ†ã‚¹ãƒˆ +assert_checktrue ( [%t %f] ); +flag = assert_checktrue ( [%t %f] ) +// エラーã¯å‡ºåŠ›ã•ã‚Œã¾ã›ã‚“ +[flag,errmsg] = assert_checktrue ( [%t %f] ) +// é–“é•ã£ãŸã‚³ãƒ¼ãƒ« +assert_checktrue ( "a" ) + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_comparecomplex.xml b/modules/development_tools/help/ja_JP/assert/assert_comparecomplex.xml new file mode 100755 index 000000000..861f738be --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_comparecomplex.xml @@ -0,0 +1,186 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_comparecomplex" xml:lang="ja"> + <refnamediv> + <refname>assert_comparecomplex</refname> + <refpurpose>許容誤差を指定ã—ã¦è¤‡ç´ 数を比較ã™ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + order = assert_comparecomplex ( a , b ) + order = assert_comparecomplex ( a , b , reltol ) + order = assert_comparecomplex ( a , b , reltol , abstol ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>a :</term> + <listitem> + <para> + 1è¡Œ1列ã®double行列,比較ã™ã‚‹æœ€åˆã®å€¤ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>b :</term> + <listitem> + <para> + 1è¡Œ1列ã®double行列,比較ã™ã‚‹2番目ã®å€¤ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>reltol :</term> + <listitem> + <para> + 1è¡Œ1列ã®double行列,相対許容誤差 (デフォルト: reltol=sqrt(%eps)). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>abstol :</term> + <listitem> + <para> + 1è¡Œ1列ã®double行列,絶対許容誤差 (デフォルト: abstol=0). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>order :</term> + <listitem> + <para> + 1è¡Œ1列ã®double行列,整数値,é †ç•ª. + aãŒbã«ã»ã¼ç‰ã—ã„å ´åˆã«order=0, + a < bã®å ´åˆã« order=-1, + a > bã®å ´åˆã« order=+1. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + ã¾ãšå®Ÿéƒ¨,次ã«è™šéƒ¨ã‚’比較ã—ã¾ã™. + 相対ãŠã‚ˆã³çµ¶å¯¾è¨±å®¹èª¤å·®ã«ã‚ˆã‚‹åˆ¤å®šã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ + 数値的ãªå•é¡Œã‚’考慮ã—ã¾ã™. + </para> + <para> + オプションã®å…¥åŠ›å¼•æ•°ãŒç©ºã®è¡Œåˆ—ã«ç‰ã—ã„å ´åˆ, + ãã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ç½®æ›ã•ã‚Œã¾ã™. + </para> + <para> + 以下ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ を使用ã—ã¾ã™. + </para> + <para> + ã¾ãšå®Ÿéƒ¨ã‚’比較ã—ã¾ã™.ãã‚ŒãŒç‰ã—ã„å ´åˆ, + 虚部を比較ã—ã¾ã™. + </para> + <para> + IEEE値を処ç†ã—,é †ç•ªã‚’é¸æŠžã—ã¾ã™: -%inf < 0 < %inf < %nan. + ã©ã®å€¤ã‚‚特殊ãªå€¤ã§ãªã„å ´åˆ, 以下ã®æ¡ä»¶ã‚’使用ã—ã¾ã™: + <programlisting> + cond = ( abs(a-b) <= reltol * max(abs(a),abs(b)) + abstol ) + </programlisting> + </para> + <para> + ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã‚½ãƒ¼ãƒˆç”¨ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ä¸ã§ä½¿ç”¨ã•ã‚Œã‚‹ + よã†è¨è¨ˆã•ã‚Œã¦ã„ã¾ã™. + ã“ã‚Œã«ã‚ˆã‚Š, + è¤‡ç´ æ•°ã®doubleã®è¡Œåˆ—を出力ã™ã‚‹é–¢æ•°ã®å‡ºåŠ›ã«é–¢é€£ã—㟠+ 移æ¤æ€§ã®å•é¡Œã‚’考慮ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™. + ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒã‚½ãƒ¼ãƒˆç”¨é–¢æ•°ã«çµ„ã¿è¾¼ã¾ã‚ŒãŸå ´åˆ, + é †ç•ªã‚’ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ãƒ»ã‚·ã‚¹ãƒ†ãƒ ,コンパイラã¾ãŸã¯ + (値ã§ã¯ãªã)é †ç•ªã‚’å¤‰æ›´ã™ã‚‹ä»–ã®å•é¡Œã«ä¾å˜ã•ã›ãšã«, + 一貫ã—ã¦ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸè¡Œåˆ—を出力ã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™. + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +// 実数値を比較 +assert_comparecomplex ( 1 , -1 ) // 1 +assert_comparecomplex ( -1 , 1 ) // -1 +assert_comparecomplex ( 1 , 1 ) // 0 +// è¤‡ç´ æ•°ã‚’æ¯”è¼ƒ #1 +assert_comparecomplex ( 1+2*%i , 1+3*%i ) // -1 +assert_comparecomplex ( 1+3*%i , 1+2*%i ) // 1 +assert_comparecomplex ( 1+2*%i , 1+2*%i ) // 0 +// è¤‡ç´ æ•°ã‚’æ¯”è¼ƒ #2 +assert_comparecomplex ( 1+%i , -1+%i ) // 1 +assert_comparecomplex ( -1+%i , 1+%i ) // -1 +assert_comparecomplex ( 1+%i , 1+%i ) // 0 +[order,msg] = assert_comparecomplex ( 1+%i , 1+%i ) +// 許容誤差を指定ã—ã¦æ¯”較: ç‰å·ã®å ´åˆ +assert_comparecomplex ( 1.2345+%i , 1.2346+%i , %eps , 1.e-3 ) // 0 +assert_comparecomplex ( 1.2345+%i , 1.2346+%i , 1.e12*%eps , 0 ) // 0 +assert_comparecomplex ( 1+1.2345*%i , 1+1.2347*%i , %eps , 1.e-3 ) // 0 +assert_comparecomplex ( 1+1.2345*%i , 1+1.2347*%i , 1.e12*%eps , 0 ) // 0 +// より実際的ãªãƒ‡ãƒ¼ã‚¿ã®æ¯”較 +x = [ +-0.123452 - 0.123454 * %i +-0.123451 + 0.123453 * %i +0.123458 - 0.123459 * %i +0.123456 + 0.123457 * %i +]; +// 上ä½4æ¡ä»¥ä¸‹ã‚’考慮 +for i = 1 : size(x,"*")-1 +order = assert_comparecomplex ( x(i) , x(i+1) , 1.e-4 ); +mprintf("compare(x(%d),x(%d))=%d\n",i,i+1,order) +end +// ãƒã‚°#415ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’比較 +x = [ +-1.9914145 +-1.895889 +-1.6923826 +-1.4815461 +-1.1302576 +-0.5652256 - 0.0655080 * %i +-0.5652256 + 0.0655080 * %i +0.3354023 - 0.1602902 * %i +0.3354023 + 0.1602902 * %i +1.3468911 +1.5040136 +1.846668 +1.9736772 +1.9798866 +]; +// 上ä½4æ¡ä»¥ä¸‹ã‚’考慮 +for i = 1 : size(x,"*")-1 +order = assert_comparecomplex ( x(i) , x(i+1) , 1.e-5 ); +mprintf("compare(x(%d),x(%d))=%d\n",i,i+1,order) +end + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> + <refsection> + <title>å‚考文献</title> + <para>http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/polynomials/tests/nonreg_tests/bug_415.tst;h=0c716a3bed0dfb72c831972d19dbb0814dffde2b;hb=HEAD</para> + <para>http://gitweb.scilab.org/?p=scilab.git;a=blob_plain;f=scilab/modules/cacsd/tests/nonreg_tests/bug_68.tst;h=920d091d089b61bf961ea9e888b4d7d469942a14;hb=4ce3d4109dd752fce5f763be71ea639e09a12630</para> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_computedigits.xml b/modules/development_tools/help/ja_JP/assert/assert_computedigits.xml new file mode 100755 index 000000000..57e2bea3b --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_computedigits.xml @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_computedigits" xml:lang="ja"> + <refnamediv> + <refname>assert_computedigits</refname> + <refpurpose>計算çµæžœã®ä¸Šä½æ¡æ•°ã‚’è¿”ã™.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + d = assert_computedigits ( computed , expected ) + d = assert_computedigits ( computed , expected , basis ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>computed :</term> + <listitem> + <para> doubleã®è¡Œåˆ—, 計算値</para> + </listitem> + </varlistentry> + <varlistentry> + <term>expected :</term> + <listitem> + <para> doubleã®è¡Œåˆ—, 予測値</para> + </listitem> + </varlistentry> + <varlistentry> + <term>basis :</term> + <listitem> + <para> 1è¡Œ1列ã®doubleã®è¡Œåˆ—, 整数値, 基底 (デフォルトã®åŸºåº•=10)</para> + </listitem> + </varlistentry> + <varlistentry> + <term>d :</term> + <listitem> + <para> doubleã®è¡Œåˆ—, 上ä½æ¡æ•°.</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + 以下ã®å¼ã«ã‚ˆã‚Šéžã‚¼ãƒã®çµæžœã®äºˆæ¸¬å€¤ã«å¯¾ã™ã‚‹ + 計算çµæžœã®ä¸Šä½æ¡æ•°ã‚’計算ã—ã¾ã™: + </para> + <para> + <latex> + \begin{eqnarray} + d = - \frac{\log_{10} ( r )}{\log_{10}(basis)} + \end{eqnarray} + </latex> + </para> + <para> + ãŸã ã—,相対誤差ã¯ä»¥ä¸‹ã«ã‚ˆã‚Šå®šç¾©ã•ã‚Œã¾ã™ + </para> + <para> + <latex> + \begin{eqnarray} + r = \frac{|computed - expected|}{|expected|} + \end{eqnarray} + </latex> + </para> + <para> + オプションã®ãƒ‘ラメータãŒç©ºã®è¡Œåˆ—[]ã«ç‰ã—ã„å ´åˆ, + ãã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ç½®æ›ã•ã‚Œã¾ã™. + </para> + <para> + 上ä½æ¡æ•°ã¯ dmin = 0 㨠+ dmax = -log10(2^(-53)) (ç´„ 15.95 ~ 16 ) ã®ç¯„囲ã¨ãªã‚Šã¾ã™. + 基底2ã®å ´åˆ,上ä½æ¡æ•°ã¯ 53ã§ã™. + </para> + <para> + expectedãŒcomputedã«ç‰ã—ã„å ´åˆ, d ã¯æœ€å¤§å€¤,ã™ãªã‚ã¡dmax,ã« + è¨å®šã•ã‚Œã¾ã™. + ãã†ã§ãªã„å ´åˆ,expectedãŒã‚¼ãƒã§computedãŒã‚¼ãƒã§ãªã„å ´åˆ, + d ã¯ãã®æœ€å°å€¤,ã™ãªã‚ã¡ dmin=0ã«è¨å®šã•ã‚Œã¾ã™. + </para> + <para> + 相対誤差ã¯äºˆæ¸¬å€¤ã«åŸºã¥ã„ã¦ã„ã‚‹ãŸã‚, + computedã¨expectedã®å€¤ã¯äº¤æ›ã§ãã¾ã›ã‚“. + </para> + <para> + 計算ã¯å€¤ã®å®Ÿéƒ¨ã¨è™šéƒ¨ã«åˆ†å‰²ã•ã‚Œã¾ã™. + æ¡æ•°ã®æˆ»ã‚Šå€¤ã¯,実部ã¨è™šéƒ¨ã®æ¡æ•°ã®æœ€å°å€¤ã§ã™. + </para> + <para> + TODO : assert_digits ( computed , expected , dmin ) 関数ã®ä¸ã§ computedigitsを使用 + </para> + <para> + TODO : + 比較 "matrix" (ç¾åœ¨ã¯ "element")ã®ãŸã‚ã®comptypeã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’è¿½åŠ + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +d = assert_computedigits ( 1 , 1 ) // d ~ 16 +d = assert_computedigits ( 1 , 1 , 2 ) // d = 53 +d = assert_computedigits ( 0 , 0 ) // d ~ 16 +d = assert_computedigits ( 1 , 0 ) // d = 0 +d = assert_computedigits ( 0 , 1 ) // d = 0 +d = assert_computedigits ( 3.1415926 , %pi ) // d ~ 8 +d = assert_computedigits ( 3.1415926 , %pi , 2 ) // d ~ 26 +d = assert_computedigits ( [0 0 1 1] , [0 1 0 1] ) // d ~ [16 0 0 16] +d = assert_computedigits(ones(3,2),ones(3,2)) // d ~ 16 * ones(3,2) +d = assert_computedigits(1.224646799D-16,8.462643383D-18) // d = 0 +// IEEEå€¤ã‚’ç¢ºèª +// d ~ [16 0 0 0] +d = assert_computedigits([%nan %nan %nan %nan],[%nan %inf -%inf 0]) +// d ~ [0 16 0 0] +d = assert_computedigits([%inf %inf %inf %inf],[%nan %inf -%inf 0]) +// d = [0 0 16 0] +d = assert_computedigits([-%inf -%inf -%inf -%inf],[%nan %inf -%inf 0]) +// d = [0 0 0 16] +d = assert_computedigits([0 0 0 0],[%nan %inf -%inf 0]) +// è¤‡ç´ æ•°ã‚’ç¢ºèª +d = assert_computedigits ( 1.2345 + %i*6.7891 , 1.23456789 + %i*6.789123456 ) // d ~ 4 + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_cond2reltol.xml b/modules/development_tools/help/ja_JP/assert/assert_cond2reltol.xml new file mode 100755 index 000000000..6dc894f9b --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_cond2reltol.xml @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_cond2reltol" xml:lang="ja"> + <refnamediv> + <refname>assert_cond2reltol</refname> + <refpurpose>æ¡ä»¶æ•°ã‹ã‚‰è¨ˆç®—ã—ãŸç›¸å¯¾èª¤å·®ã‚’æ案ã™ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + rtol = assert_cond2reltol ( condition ) + rtol = assert_cond2reltol ( condition , offset ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>condition :</term> + <listitem> + <para> + doubleã®è¡Œåˆ—,æ¡ä»¶æ•°. + æ¡ä»¶æ•°ã¯åŽ³å¯†ã«æ£ã¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>offset :</term> + <listitem> + <para> + doubleã®è¡Œåˆ—, å¿…è¦ãª10進æ¡æ•°ã®ãŸã‚ã®ã‚·ãƒ•ãƒˆ + (デフォルト: offset=0). + 例ãˆã°,offset=1ã¯å¿…è¦ãªç²¾åº¦ã‚’å¢—åŠ ã•ã› + (相対許容誤差を10^-1å€ã«æ¸›ã‚‰ã—ã¾ã™), + offset=-1ã¯å¿…è¦ãªç²¾åº¦ã‚’減らã—ã¾ã™ + (相対許容誤差を10^1å€ã«å¢—ã‚„ã—ã¾ã™). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>rtol :</term> + <listitem> + <para> + doubleã®è¡Œåˆ—, 相対許容誤差. + 相対許容誤差ã¯åŽ³å¯†ã«æ£ã§, 1よりå°ã•ã„æ•°ã§ã™ + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + æ¡ä»¶æ•°ã«åŸºã¥ã,対応ã™ã‚‹ç›¸å¯¾è¨±å®¹èª¤å·®ã‚’è¿”ã—ã¾ã™. + </para> + <para> + オプションã®ãƒ‘ラメータãŒç©ºã®è¡Œåˆ— [] ã«ç‰ã—ã„å ´åˆ, + ãã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¨å®šã—ã¾ã™. + </para> + <para> + ã“ã®ç›¸å¯¾è¨±å®¹èª¤å·®ã¯å˜ãªã‚‹æŽ¨å¥¨å€¤ã§ã‚ã‚‹ã“ã¨ã‚’強調ã—ã¦ãŠãã¾ã™. + 代ã‚ã‚Šã«,よりå°ã•ã„ã¾ãŸã¯å¤§ããªç›¸å¯¾è¨±å®¹èª¤å·®ã‚’使用ã™ã‚‹ + æ£å½“ãªç†ç”±ãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šãˆã¾ã™. + </para> + <para> + <itemizedlist> + <listitem> + <para> + 悪æ¡ä»¶ã®å•é¡Œã«ãŠã„ã¦ã‚‚, + æ£ç¢ºãªè¨ˆç®—ãŒå¯èƒ½ãªç´ 晴らã—ã„アルゴリズムãŒã‚ã‚‹å ´åˆã‚’ + 考ãˆã¦ã¿ã¾ã—ょã†. + ã“ã®å ´åˆ,より高ã„精度(æ£ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ)ãŒå¿…è¦ã¨ãªã‚Šã¾ã™. + </para> + </listitem> + <listitem> + <para> + 性能ã¨ç²¾åº¦ã®ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ãŒã‚ã‚Š,性能ãŒå‹ã‚‹å ´åˆã«ã¤ã„㦠+ 考ãˆã¦ã¿ã¾ã—ょã†. + ã“ã®å ´åˆ, より劣る精度(è² ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ)ãŒå¿…è¦ã¨ãªã‚Šã¾ã™. + </para> + </listitem> + </itemizedlist> + </para> + <para> + スカラー入力引数ã¯å…¨ã¦ä»–ã®å…¥åŠ›å¼•æ•°ã¨åŒã˜å¤§ãã•ã®doubleã® + 行列ã«å±•é–‹ã•ã‚Œã¾ã™. + </para> + <para> + å¿…è¦ãªæ¡æ•° d を計算ã—ãŸå¾Œ,相対許容誤差 10^-d を計算ã—ã¾ã™. + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +assert_cond2reltol ( 0 ) // 1.110D-16 +assert_cond2reltol ( 1 ) // 1.110D-16 +assert_cond2reltol ( 1.e1 ) // 1.110D-15 +assert_cond2reltol ( 1.e2 ) // 1.110D-14 +assert_cond2reltol ( 1.e3 ) // 1.110D-13 +assert_cond2reltol ( 1.e16 ) // 1 +assert_cond2reltol ( 1.e17 ) // 1 +assert_cond2reltol ( 1.e18 ) // 1 +// 行列入力. +condition = [0,1,10,100,1000,1.D13,1.D14,1.D15,1.D16,1.D17,1.D18]; +expected = [1.110D-16 1.110D-16 1.110D-15 1.110D-14 1.110D-13 0.0011102 0.0111022 0.1110223 1. 1. 1.]; +assert_cond2reltol ( condition ) +// オフセットを使用 +// Negative offset : require less accuracy +assert_cond2reltol ( 1.e2 , [0 -1] ) // [1.1D-14 1.1D-13] +// æ£ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ : より高ã„精度を必è¦ã¨ã—ã¾ã™ +// オフセットã®å½±éŸ¿ã‚’調ã¹ã¾ã™ +assert_cond2reltol ( 1.e2 , [0 1 2 3] ) // [1.1D-14 1.1D-15 1.1D-16 1.1D-16] +// è² ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ +// オフセットã®å½±éŸ¿ã‚’調ã¹ã¾ã™ +assert_cond2reltol ( 1.e14 , [0 -1 -2 -3] ) // [1.1D-02 1.1D-01 1 1] +// æ¡ä»¶æ•°ã«å¯¾ã—ã¦ç›¸å¯¾è¨±å®¹èª¤å·®ã‚’プãƒãƒƒãƒˆ +condition = logspace(0,18,1000); +r = assert_cond2reltol ( condition ); +plot(condition,r) +h=gcf(); +h.children.log_flags="lln"; +h.children.children.children.thickness=4; +xt = h.children.x_ticks; +xt.locations = 10^(0:2:18)'; +xt.labels = ["10^0";"10^2";"10^4";"10^6";"10^8";"10^10";"10^12";"10^14";"10^16";"10^18"]; +h.children.x_ticks=xt; +yt = h.children.y_ticks; +yt.locations = 10^-(0:2:18)'; +yt.labels = ["10^0";"10^-2";"10^-4";"10^-6";"10^-8";"10^-10";"10^-12";"10^-14";"10^-16";"10^-18"]; +h.children.y_ticks=yt; +xtitle("Relative tolerance","Condition","Relative tolerance"); +r = assert_cond2reltol ( condition , +3 ); +plot(condition,r,"r") +r = assert_cond2reltol ( condition , -3 ); +plot(condition,r,"g") +legend(["Offset=0","Offset=+3","Offset=-3"]); + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_cond2reqdigits.xml b/modules/development_tools/help/ja_JP/assert/assert_cond2reqdigits.xml new file mode 100755 index 000000000..08129b2b7 --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_cond2reqdigits.xml @@ -0,0 +1,189 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_cond2reqdigits" xml:lang="ja"> + <refnamediv> + <refname>assert_cond2reqdigits</refname> + <refpurpose>指定ã—ãŸæ¡ä»¶æ•°ã«å¿…è¦ãªæ¡æ•°ã‚’æ案ã™ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + d = assert_cond2reqdigits ( condition ) + d = assert_cond2reqdigits ( condition , offset ) + d = assert_cond2reqdigits ( condition , offset , b ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>condition :</term> + <listitem> + <para> + doubleã®è¡Œåˆ—, æ¡ä»¶æ•°. + æ¡ä»¶æ•°ã¯åŽ³å¯†ã«æ£ã¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>offset :</term> + <listitem> + <para> + doubleã®è¡Œåˆ—, + å¿…è¦ãªåŸºåº•bã®æ¡æ•°(デフォルト offset = 0). + 例ãˆã°, offset=-1 ã¯å¿…è¦ãªæ¡æ•°ã‚ˆã‚Šã‚‚å°ã•ã„æ•° + を出力ã—ã¾ã™(å¿…è¦ãªç²¾åº¦ã‚’減らã™). + offset=1ã¯å¿…è¦ãªæ¡æ•°ã‚ˆã‚Šã‚‚大ããªæ•°ã‚’出力ã—ã¾ã™ + (å¿…è¦ãªç²¾åº¦ã‚’増やã™). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>b :</term> + <listitem> + <para>doubleã®è¡Œåˆ—, 整数値, b (デフォルト: b = 10).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>d :</term> + <listitem> + <para>doubleã®è¡Œåˆ—, å¿…è¦ãªæ¡æ•°. + æ£ã®å®Ÿæ•°ã§, b=10ã®å ´åˆã¯0 ã‹ã‚‰ 15.95 ã®ç¯„囲, + b=2ã®å ´åˆã¯0ã‹ã‚‰53ã®ç¯„囲. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + æ¡ä»¶æ•°ã«åŸºã¥ã,対応ã™ã‚‹å¿…è¦ãªæ¡æ•°ã‚’è¿”ã—ã¾ã™. + </para> + <para> + オプションã®ãƒ‘ラメータãŒç©ºã®è¡Œåˆ—[]ã«ç‰ã—ã„å ´åˆ, + ãã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ç½®æ›ã•ã‚Œã¾ã™. + </para> + <para> + ã“ã®å¿…è¦ãªæ¡æ•°ã¯å˜ãªã‚‹æŽ¨å¥¨å€¤ã§ã‚ã‚‹ã“ã¨ã‚’強調ã—ã¦ãŠãã¾ã™. + 代ã‚ã‚Šã«,よりå°ã•ã„ã¾ãŸã¯å¤§ããªæ¡æ•°ã‚’使用ã™ã‚‹ + æ£å½“ãªç†ç”±ãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šãˆã¾ã™. + </para> + <para> + <itemizedlist> + <listitem> + 悪æ¡ä»¶ã®å•é¡Œã«ãŠã„ã¦ã‚‚, + æ£ç¢ºãªè¨ˆç®—ãŒå¯èƒ½ãªç´ 晴らã—ã„アルゴリズムãŒã‚ã‚‹å ´åˆã‚’ + 考ãˆã¦ã¿ã¾ã—ょã†. + ã“ã®å ´åˆ,より高ã„精度(æ£ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ)ãŒå¿…è¦ã¨ãªã‚Šã¾ã™. + </listitem> + <listitem> + 性能ã¨ç²¾åº¦ã®ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ãŒã‚ã‚Š,性能ãŒå‹ã‚‹å ´åˆã«ã¤ã„㦠+ 考ãˆã¦ã¿ã¾ã—ょã†. + ã“ã®å ´åˆ, より劣る精度(è² ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ)ãŒå¿…è¦ã¨ãªã‚Šã¾ã™. + </listitem> + </itemizedlist> + </para> + <para> + スカラー入力引数ã¯å…¨ã¦ä»–ã®å…¥åŠ›å¼•æ•°ã¨åŒã˜å¤§ãã•ã®doubleã® + 行列ã«å±•é–‹ã•ã‚Œã¾ã™. + </para> + <para> + アルゴリズムã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™. + æ¡ä»¶ã®åŸºåº•10ã®æŒ‡æ•°ã‚’計算ã—,オフセットを引ãã¾ã™. + ã“ã®æ•°ã¯å¤±ã‚れるæ¡æ•°ã®äºˆæ¸¬å€¤ã‚’表ã—ã¾ã™. + ã“れを範囲 [0,dmax] ã«æŠ•å½±ã—ã¾ã™. + ãŸã ã—, dmax -log10(2^(-53)) 㯠doubleã§æœ€å¤§å®Ÿç¾å¯èƒ½ãª + æ¡æ•°ã§ã™. + dmaxã¨å¤±ã‚れるæ¡æ•°ã®å·®ã‹ã‚‰ + å¿…è¦ãªæ¡æ•° d を計算ã—ã¾ã™. + ã“ã®çµæžœ,相対許容誤差㯠10^-d ã¨ãªã‚Šã¾ã™. + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +assert_cond2reqdigits ( 0 ) // 15.95459 +assert_cond2reqdigits ( 1 ) // 15.95459 +assert_cond2reqdigits ( 1.e1 ) // 14.95459 +assert_cond2reqdigits ( 1.e2 ) // 13.95459 +assert_cond2reqdigits ( 1.e3 ) // 12.95459 +assert_cond2reqdigits ( 1.e16 ) // 0 +assert_cond2reqdigits ( 1.e17 ) // 0 +assert_cond2reqdigits ( 1.e18 ) // 0 +// 行列入力. +condition = [0,1,10,100,1000,1.D13,1.D14,1.D15,1.D16,1.D17,1.D18]; +assert_cond2reqdigits ( condition ) +// オフセットを使用 +// è² ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ : å¿…è¦ãªæ¡æ•°ã‚’減ら㙠(より低ã„精度をè¦æ±‚) +assert_cond2reqdigits ( 1.e2 , [0 -1] ) // [13.95459 12.95459] +// æ£ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ : å¿…è¦ãªæ¡æ•°ã‚’増や㙠(より高ã„精度をè¦æ±‚) +// オフセットã®å½±éŸ¿ã‚’調ã¹ã¾ã™. +assert_cond2reqdigits ( 1.e2 , [0 1 2 3] ) // [13.95459 14.95459 15.95459 15.95459] +// è² ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ (より低ã„精度をè¦æ±‚) +// オフセットã®å½±éŸ¿ã‚’調ã¹ã¾ã™. +assert_cond2reqdigits ( 1.e14 , [0 -1 -2 -3] ) // [1.9545898 0.9545898 0. 0.] +// 基底2を使用 +assert_cond2reqdigits ( 0 , [] , 2 ) // 53 +assert_cond2reqdigits ( 1 , [] , 2 ) // 53 +assert_cond2reqdigits ( 1.e1 , [] , 2 ) // 49.678072 +assert_cond2reqdigits ( 1.e2 , [] , 2 ) // 46.356144 +assert_cond2reqdigits ( 1.e3 , [] , 2 ) // 43.034216 +assert_cond2reqdigits ( 1.e16 , [] , 2 ) // 0 +assert_cond2reqdigits ( 1.e17 , [] , 2 ) // 0 +assert_cond2reqdigits ( 1.e18 , [] , 2 ) // 0 +// æ¡ä»¶ã«åŸºã¥ãå¿…è¦ãª10進æ¡æ•°ã‚’プãƒãƒƒãƒˆ +condition = logspace(0,18,1000); +d = assert_cond2reqdigits ( condition ); +plot(condition,d) +h=gcf(); +h.children.log_flags="lnn"; +h.children.children.children.thickness=4; +xt = h.children.x_ticks; +xt.locations = 10^(0:2:18)'; +xt.labels = ["10^0";"10^2";"10^4";"10^6";"10^8";"10^10";"10^12";"10^14";"10^16";"10^18"]; +h.children.x_ticks=xt; +xtitle("Number of required digits","Condition","Required decimal digits"); +// æ¡ä»¶ã«åŸºã¥ãå¿…è¦ãª2進æ¡æ•°ã‚’プãƒãƒƒãƒˆ +condition = logspace(0,18,1000); +d = assert_cond2reqdigits ( condition , [] , 2 ); +plot(condition,d) +h=gcf(); +h.children.log_flags="lnn"; +h.children.children.children.thickness=4; +xt = h.children.x_ticks; +xt.locations = 10^(0:2:18)'; +xt.labels = ["10^0";"10^2";"10^4";"10^6";"10^8";"10^10";"10^12";"10^14";"10^16";"10^18"]; +h.children.x_ticks=xt; +xtitle("Number of required digits","Condition","Required binary digits"); +d = assert_cond2reqdigits ( condition , +10 , 2 ); +plot(condition,d,"r") +d = assert_cond2reqdigits ( condition , -10 , 2 ); +plot(condition,d,"g") +legend(["Offset=0","Offset=+10","Offset=-10"]); + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/assert/assert_generror.xml b/modules/development_tools/help/ja_JP/assert/assert_generror.xml new file mode 100755 index 000000000..2956f3ff7 --- /dev/null +++ b/modules/development_tools/help/ja_JP/assert/assert_generror.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="assert_generror" xml:lang="ja"> + <refnamediv> + <refname>assert_generror</refname> + <refpurpose>エラーを生æˆã™ã‚‹.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + assert_generror ( errormsg ) + assert_generror ( errormsg , errornb ) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>expectedmsg :</term> + <listitem> + <para> + 1è¡Œ1列ã®æ–‡å—列行列, 出力ã™ã‚‹ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>expectederrnb :</term> + <listitem> + <para> + 1è¡Œ1列ã®double行列,整数値,ã‚¨ãƒ©ãƒ¼ç•ªå· + (デフォルト: expectederrnb=[]). + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + 指定ã—ãŸå¼•æ•°ã§ã‚¨ãƒ©ãƒ¼é–¢æ•°ã‚’コールã—ã¾ã™. + </para> + <para> + ã“ã®é–¢æ•°ã¯,予測ã•ã‚ŒãŸå‡ºåŠ›ã¨è¨ˆç®—ã•ã‚ŒãŸå‡ºåŠ›ãŒä¸€è‡´ã—ãªã„ + エラーãŒç™ºç”Ÿã™ã‚‹åº¦ã«assert_check* 関数ã«ã‚ˆã‚Šã‚³ãƒ¼ãƒ«ã•ã‚Œã¾ã™. + assert_check* 関数ã«æŒ‡å®šã•ã‚ŒãŸ + 入力引数ã®æ•°,出力引数ã®æ•°,入力引数ã®åž‹, + ã¾ãŸã¯å…¥åŠ›å¼•æ•°ã®å†…容ãŒé–“é•ã£ã¦ã„ã‚‹å ´åˆ, + 通常ã®ã‚¨ãƒ©ãƒ¼é–¢æ•°ãŒã‚³ãƒ¼ãƒ«ã•ã‚Œã¾ã™. + ã“ã®é–¢æ•°ã¯assert_check* 関数ã®å‹•ä½œã‚’ä¿®æ£ã™ã‚‹ãŸã‚ã« + カスタマイズã§ãã¾ã™. + </para> + <para> + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +// 以下ã®ã‚³ãƒ¼ãƒ«ã¯å…±ã«ã‚¨ãƒ©ãƒ¼ã‚’発生ã—ã¾ã™ +assert_generror ( "oups" ); +assert_generror ( "oups" , 123456789 ); +// 以下ã®ã‚³ãƒ¼ãƒ«ã¯ã‚¨ãƒ©ãƒ¼ã‚’発生ã—ã¾ã™ +assert_checktrue ( [%t %f] ); +// +// エラーãƒãƒ³ãƒ‰ãƒ©ã‚’定義ã—ã¾ã™ +function myerror ( varargin ) + [lhs,rhs]=argn() + errormsg = varargin(1) + if ( rhs == 1 ) then + mprintf( "myerror: %s\n", errormsg ) + else + errornb = varargin(2) + mprintf( "myerror: %s (%d)\n", errormsg , errornb ) + end +endfunction +// +// æ–°ã—ã„エラーãƒãƒ³ãƒ‰ãƒ©ã‚’è¨å®š +back=funcprot(); +funcprot(0); +olderrorfunction = assert_generror; +assert_generror = myerror; +funcprot(back); +// +// æ–°ã—ã„エラーãƒãƒ³ãƒ‰ãƒ©ãŒè¨å®šã•ã‚ŒãŸã“ã¨ã‚’ç¢ºèª +assert_checktrue ( [%t %f] ); +// +// 通常ã®ã‚¨ãƒ©ãƒ¼ãƒãƒ³ãƒ‰ãƒ©ã«æˆ»ã—ã¾ã™ +back=funcprot(); +funcprot(0); +assert_generror = olderrorfunction; +funcprot(back); + ]]></programlisting> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>関数ãŒå°Žå…¥ã•ã‚Œã¾ã—㟠+ </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/bench_run.xml b/modules/development_tools/help/ja_JP/bench_run.xml new file mode 100755 index 000000000..c84e10b52 --- /dev/null +++ b/modules/development_tools/help/ja_JP/bench_run.xml @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) INRIA + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="bench_run" xml:lang="ja"> + <refnamediv> + <refname>bench_run</refname> + <refpurpose>ベンãƒãƒžãƒ¼ã‚¯ãƒ†ã‚¹ãƒˆã‚’実行</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + bench_run() + bench_run(module[,test_name[,options]]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>module</term> + <listitem> + <para>æ–‡å—列ベクトル. モジュールåã¾ãŸã¯ãƒ„ールボックスã®çµ¶å¯¾ãƒ‘スを指定ã—ã¾ã™.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>test_name</term> + <listitem> + <para>æ–‡å—列ベクトル</para> + </listitem> + </varlistentry> + <varlistentry> + <term>options</term> + <listitem> + <para>æ–‡å—列ベクトル</para> + <itemizedlist> + <listitem> + <para>list : モジュールã§åˆ©ç”¨å¯èƒ½ãªãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ãƒ†ã‚¹ãƒˆã®ãƒªã‚¹ãƒˆ</para> + </listitem> + <listitem> + <para>help : Scilabコンソールã«ã„ãã¤ã‹ã®ä½¿ç”¨ä¾‹ã‚’表示</para> + </listitem> + <listitem> + <para>nb_run=value : ベンãƒãƒžãƒ¼ã‚¯ãƒ†ã‚¹ãƒˆã‚’指定回数å復実行</para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + ベンãƒãƒžãƒ¼ã‚¯ãƒ†ã‚¹ãƒˆãƒ©ã‚¤ãƒ–ラリ㮠.tst ファイルを探ã—ã¦å®Ÿè¡Œã—,実行時間ã«é–¢ã™ã‚‹ + レãƒãƒ¼ãƒˆã‚’表示ã—ã¾ã™. + .tst ファイルã¯SCI+"/modules/*/tests/benchmark"ディレクトリã§æŽ¢ã•ã‚Œã¾ã™. + </para> + <para> + テスト処ç†ã‚’制御ã—ã‚„ã™ãã™ã‚‹ãŸã‚ã«,.tstファイルã«ç‰¹æ®Šãªã‚¿ã‚°ã‚’挿入ã§ãã¾ã™. + ã“れらã®ã‚¿ã‚°ã¯Scilabコメントã¨ã—ã¦è¨˜å…¥ã—ã¾ã™. + </para> + <para>利用å¯èƒ½ãªã‚¿ã‚°ã‚’以下ã«ç¤ºã—ã¾ã™ :</para> + <itemizedlist> + <listitem> + <para> + <-- BENCH NB RUN : 10 --> + ã“ã®ãƒ†ã‚¹ãƒˆã¯10回å復実行ã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- BENCH START --> + <-- BENCH END --> + ベンãƒãƒžãƒ¼ã‚¯ã®é–¢å¿ƒãŒã‚る部分をã“れらã®ã‚¿ã‚°ã§æ‹¬ã‚Šã¾ã™The + </para> + </listitem> + </itemizedlist> + </refsection> + <refsection> + <title>例</title> + <para>bench_runを実行例をã„ãã¤ã‹ç¤ºã—ã¾ã™</para> + <programlisting role="example"><![CDATA[ +// å…¨ã¦ã®ãƒ†ã‚¹ãƒˆã‚’実行 +bench_run(); +bench_run([]); +bench_run([],[]); +// 1ã¤ã¾ãŸã¯è¤‡æ•°ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’テスト +bench_run('core'); +bench_run('core',[]); +bench_run(['core','string']); +// 指定ã—ãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®1ã¤ã¾ãŸã¯è¤‡æ•°ã®ãƒ†ã‚¹ãƒˆã‚’実行 +bench_run('core',['trycatch','opcode']); +// オプションを指定 +bench_run([],[],'list'); +bench_run([],[],'help'); +bench_run([],[],'nb_run=2000'); + ]]></programlisting> + <para>ベンãƒãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã®ä¾‹. ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ•ã‚¡ã‚¤ãƒ« + SCI/modules/linear_algebra/tests/benchmarks/bench_chol.tstã«å¯¾å¿œã—ã¾ã™. + </para> + <programlisting role="example"><![CDATA[ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +//============================================================================== +// Benchmark for chol function +//============================================================================== +// <-- BENCH NB RUN : 10 --> +stacksize(30000000); +a = 0; +b = 0; +a = rand(900, 900, 'n'); +a = a'*a; +// <-- BENCH START --> +b = chol(a); +// <-- BENCH END --> + ]]></programlisting> + <para>テストã®çµæžœ</para> + <programlisting role="example"><![CDATA[ +-->bench_run('linear_algebra','bench_chol') + For Loop (as reference) ........................... 143.00 ms [ 1000000 x] + 001/001 - [linear_algebra] bench_chol ...................... 130.60 ms [ 10 x] + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>å‚ç…§</title> + <simplelist type="inline"> + <member> + <link linkend="test_run">test_run</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/example_run.xml b/modules/development_tools/help/ja_JP/example_run.xml new file mode 100755 index 000000000..63e4fbf87 --- /dev/null +++ b/modules/development_tools/help/ja_JP/example_run.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="example_run" xml:lang="ja"> + <refnamediv> + <refname>example_run</refname> + <refpurpose>ヘルプページã§è¦‹ã¤ã‹ã£ãŸä¾‹ã‚’実行.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + example_run() + example_run(moduleNames) + example_run(moduleNames, functionNames) + example_run(moduleNames, functionNames, language) + example_run(moduleNames, functionNames, language, testrunOptions, testrunExportToFile) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>moduleNames</term> + <listitem> + <para> + æ–‡å—列ã¾ãŸã¯æ–‡å—列ベクトル: テストを行ã†ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®åå‰. + デフォルト値㯠+ <link linkend="getmodules">getmodules()</link>ã§è¿”ã•ã‚ŒãŸå€¤ã§ã™. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>functionNames</term> + <listitem> + <para>æ–‡å—列ã¾ãŸã¯æ–‡å—列ベクトル: + テストã™ã‚‹é–¢æ•°ã®åå‰. 指定ã•ã‚Œãªã„ã‚¢ãƒã‚¤, + モジュールã®å…¨ã¦ã®ãƒ˜ãƒ«ãƒ—ページãŒãƒ†ã‚¹ãƒˆã•ã‚Œã¾ã™. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>language</term> + <listitem> + <para>æ–‡å—列: テストã™ã‚‹ãƒ˜ãƒ«ãƒ—ページã®è¨€èªž. デフォルト値㯠"en_US"ã§ã™.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>testrunOptions</term> + <listitem> + <para> + <link linkend="test_run">test_run</link>ã®ç¬¬3引数ã¨ã—ã¦ä½¿ç”¨. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>testrunExportToFile</term> + <listitem> + <para> + <link linkend="test_run">test_run</link>ã®ç¬¬4引数ã¨ã—ã¦ä½¿ç”¨. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + ã“ã®å·»æ•°ã¯,ヘルプページã§æŒ‡å®šã—ãŸä¾‹ã‚’展開ã—, + <link linkend="test_run">test_run</link>ã«ã‚ˆã‚Šå®Ÿè¡Œã—ã¾ã™. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +if ~isempty(ls("SCI/modules/xml/help/en_US/*.xml")) then // ã“ã®ä¾‹ã®XMLソースãŒå˜åœ¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ + example_run("xml") + example_run("core", "insertion") + example_run("core", ["insertion"; "extraction"]) + example_run("core", "insertion", "en_US") +end + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>å‚ç…§</title> + <simplelist type="inline"> + <member> + <link linkend="test_run">test_run</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>関数example_runãŒå°Žå…¥ã•ã‚Œã¾ã—ãŸ.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/test_run.xml b/modules/development_tools/help/ja_JP/test_run.xml new file mode 100755 index 000000000..28da4d479 --- /dev/null +++ b/modules/development_tools/help/ja_JP/test_run.xml @@ -0,0 +1,490 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) INRIA + * Copyright (C) 2009-2011 - DIGITEO - Michael Baudin + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="test_run" xml:lang="ja"> + <refnamediv> + <refname>test_run</refname> + <refpurpose>テストを実行</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼ã³å‡ºã—æ‰‹é †</title> + <synopsis> + status = test_run() + status = test_run(module) + status = test_run(module, test_name) + status = test_run(module, test_name, options, exportToFile) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>module</term> + <listitem> + <para>æ–‡å—列ã®é…列. ã“ã®å…¥åŠ›å¼•æ•°ã«ã¯ä»¥ä¸‹ã®ã©ã‚Œã‹ã‚’指定ã—ã¾ã™</para> + <itemizedlist> + <listitem> + <para> + Scilab内部モジュールå ("core", "time", ...)ã¾ãŸã¯ã‚µãƒ–モジュールå (例: "optimization|neldermead"). + </para> + </listitem> + <listitem> + <para> + ATOMSモジュールã®åå‰("module_lycee", "nisp", ...). + 処ç†ã‚’è¡Œã†ã«ã¯,ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯test_run()をコールã™ã‚‹å‰ã« + ãƒãƒ¼ãƒ‰ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™. + </para> + </listitem> + <listitem> + <para> + モジュールã®çµ¶å¯¾ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãƒ‘ス. + </para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + <varlistentry> + <term>test_name</term> + <listitem> + <para>æ–‡å—列é…列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>options</term> + <listitem> + <para>æ–‡å—列é…列</para> + <variablelist> + <varlistentry> + <term>no_check_ref</term> + <listitem> + <para>the .dia 㨠.dia.ref ãŒç‰ã—ã„å ´åˆ, ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã„ã¾ã›ã‚“</para> + </listitem> + </varlistentry> + <varlistentry> + <term>no_check_error_output</term> + <listitem> + <para>エラー出力ストリームã¯ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã›ã‚“. + ScilabãŒãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸã‚‚ã®ãŒåˆ©ç”¨ã§ããªã„ã¨ã‚¨ãƒ©ãƒ¼ã‚’発生ã™ã‚‹ + å ´åˆ,ã“ã®ã‚ªãƒ—ションを利用ã§ãã¾ã™. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>create_ref</term> + <listitem> + <para>.dia.refファイルを作æˆã—, + .dia 㨠.dia.refãŒç‰ã—ã„ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã›ã‚“. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>show_error</term> + <listitem> + <para>エラーãŒç™ºç”Ÿã—ãŸå ´åˆç›´è¿‘ã®10行分ã®å®Ÿè¡Œè¡Œã‚’表示ã—ã¾ã™ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>show_diff</term> + <listitem> + <para> + 差異ãŒã¿ã¤ã‹ã£ãŸå ´åˆ,<literal>diff -u</literal>コマンドã®çµæžœã‚’ + 表示ã—ã¾ã™. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>list</term> + <listitem> + <para> + テストを実行ã—ã¾ã›ã‚“ãŒ, + 利用å¯èƒ½ãªãƒ†ã‚¹ãƒˆã®ä¸€è¦§ã‚’表示ã—ã¾ã™ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>help</term> + <listitem> + <para> + ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã®ä½¿ç”¨æ–¹æ³•ã«é–¢ã™ã‚‹ã„ãã¤ã‹ã®ä¾‹ã‚’表示ã—ã¾ã™ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>mode_nw</term> + <listitem> + <para>実行時㫠"-nw" ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’è¿½åŠ ã—ã¾ã™</para> + </listitem> + </varlistentry> + <varlistentry> + <term>mode_nwni</term> + <listitem> + <para>実行時㫠"-nwni"ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’è¿½åŠ ã—ã¾ã™</para> + </listitem> + </varlistentry> + <varlistentry> + <term>nonreg_tests</term> + <listitem> + <para>回帰的ã§ãªã„テストã®ã¿ã‚’実行ã—, + ユニットテストをスã‚ップã—ã¾ã™ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>unit_tests</term> + <listitem> + <para> + ユニットテストã®ã¿ã‚’実行ã—,回帰的ã§ãªã„テストをスã‚ップã—ã¾ã™ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>skip_tests</term> + <listitem> + <para>テストをスã‚ップã—ã¾ã™</para> + </listitem> + </varlistentry> + <varlistentry> + <term>enable_lt</term> + <listitem> + <para>テストã®é•·æ™‚間実行を許å¯ã—ã¾ã™</para> + </listitem> + </varlistentry> + <varlistentry> + <term>short_summary</term> + <listitem> + <para> + 実行後ã«çµ±è¨ˆã¾ãŸã¯å®Ÿè¡Œæ™‚間を表示ã—ã¾ã›ã‚“ + (実行回数,æˆåŠŸ/失敗/スã‚ップã—ãŸãƒ†ã‚¹ãƒˆã®å›žæ•°ã®ã¿ã‚’1è¡Œã«è¡¨ç¤ºã—ã¾ã™). + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>exportToFile</term> + <listitem> + <para> + テストã®çµæžœã‚’XMLファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¾ã™. + ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯XUnitå½¢å¼ã¨ãªã‚Šã¾ã™. + ã“ã®ã‚ªãƒ—ションã®ä½¿ç”¨ã«ã‚ˆã‚Š, + <literal>show_diff</literal> ãŠã‚ˆã³ <literal>show_error</literal> + ãŒæœ‰åŠ¹ã¨ãªã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„. + </para> + <para> + <varname>exportToFile</varname>ã§æŒ‡å®šã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å˜åœ¨ã™ã‚‹å ´åˆ, + æ–°è¦çµæžœã¯æ—¢å˜ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«è¿½åŠ ã•ã‚Œã¾ã™. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>status</term> + <listitem> + <para> + è«–ç†å€¤ã§,エラーãŒæ¤œå‡ºã•ã‚Œãªã‹ã£ãŸå ´åˆã« %t, + エラーãŒæ¤œå‡ºã•ã‚ŒãŸå ´åˆã« %f ã‚’è¿”ã—ã¾ã™. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + ユニットテストãŠã‚ˆã³éžå›žå¸°ãƒ†ã‚¹ãƒˆãƒ©ã‚¤ãƒ–ラリ㧠+ .tstファイルを探ã—ã¦å®Ÿè¡Œã—,æˆåŠŸ/失敗ã«é–¢ã™ã‚‹ãƒ¬ãƒãƒ¼ãƒˆã‚’表示ã—ã¾ã™. + .tst ファイルã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª SCI+"/modules/*/tests/unit_tests" + ãŠã‚ˆã³SCI+"/modules/*/tests/nonreg_tests"ã§æŽ¢ã•ã‚Œã¾ã™. + テストãŒå®Ÿè¡Œã•ã‚Œã‚‹åº¦ã«, .diaファイルãŒç”Ÿæˆã•ã‚Œ, + 実行ã•ã‚ŒãŸå…¨ã‚³ãƒžãƒ³ãƒ‰ã¨ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«è¡¨ç¤ºã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ãƒªã‚¹ãƒˆãŒ + 出力ã•ã‚Œã¾ã™. + スクリプトãŒå®Ÿè¡Œã•ã‚ŒãŸå¾Œ, ã“ã®.dia ファイルã¯, + .tst ファイルã¨åŒã˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ç½®ã‹ã‚ŒãŸ.dia.refファイル㧠+ ã¨æ¯”較ã•ã‚Œã¾ã™. + 2ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒç•°ãªã‚‹å ´åˆ,ãã®ãƒ†ã‚¹ãƒˆã¯å¤±æ•—ã¨ãªã‚Šã¾ã™. + </para> + <para> + テストã®å‡¦ç†ã‚’制御ã§ãるよã†ã«.tstファイルã«ç‰¹æ®Šãªã‚¿ã‚°ã‚’挿入ã§ãã¾ã™. + ã“れらã®ã‚¿ã‚°ã¯Scilabコメントã¨ã—ã¦è¨˜è¿°ã—ã¾ã™. + </para> + <para>以下ã«åˆ©ç”¨å¯èƒ½ãªã‚¿ã‚°ã‚’示ã—ã¾ã™:</para> + <itemizedlist> + <listitem> + <para> + <-- INTERACTIVE TEST --> + ã“ã®ãƒ†ã‚¹ãƒˆã¯å¯¾è©±çš„ãªã‚‚ã®ã§ã‚ã‚‹ãŸã‚,スã‚ップã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- LONG TIME EXECUTION --> + ã“ã®ãƒ†ã‚¹ãƒˆã¯é•·ã„時間をè¦ã™ã‚‹ãŸã‚スã‚ップã•ã‚Œã¾ã™. + ã“ã®ãƒ†ã‚¹ãƒˆã‚’有効ã«ã™ã‚‹ã«ã¯,以下ã®ã‚ªãƒ—ションを指定ã—ã¦test_runã‚’ + コールã—ã¾ã™: "enable_lt" + </para> + </listitem> + <listitem> + <para> + <-- NOT FIXED --> + ã“ã®ãƒ†ã‚¹ãƒˆã¯,既知ã§ã¯ã‚ã‚‹ãŒ,未修æ£ã®ãƒã‚°ã§ã‚ã‚‹ãŸã‚,スã‚ップã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- TEST WITH GRAPHIC --> + ã“ã®ãƒ†ã‚¹ãƒˆã¯ã‚ªãƒ—ション "mode_nwni" ãŒä½¿ç”¨ã•ã‚ŒãŸå ´åˆã¯å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“. + </para> + </listitem> + <listitem> + <para> + <-- NO TRY CATCH --> + </para> + </listitem> + <listitem> + <para> + <-- NO CHECK ERROR OUTPUT --> + エラー出力ファイルã¯ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã›ã‚“ + </para> + </listitem> + <listitem> + <para> + <-- NO CHECK REF --> + .dia ãŠã‚ˆã³.dia.refファイルã®æ¯”較ãŒè¡Œã‚ã‚Œã¾ã›ã‚“. + </para> + </listitem> + <listitem> + <para> + <-- ENGLISH IMPOSED --> + ã“ã®ãƒ†ã‚¹ãƒˆã¯-l en_USオプションを指定ã—ãŸå ´åˆã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- FRENCH IMPOSED --> + ã“ã®ãƒ†ã‚¹ãƒˆã¯-l fr_FRオプションを指定ã—ãŸå ´åˆã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- CLI SHELL MODE --> + (was: <-- JVM NOT MANDATORY -->) + ã“ã®ãƒ†ã‚¹ãƒˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§scilab-cli (nwniモード)ã§ã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- WINDOWS ONLY --> + オペレーティング・システムãŒWindowsã§ãªã„å ´åˆ, ã“ã®ãƒ†ã‚¹ãƒˆã¯ã‚¹ã‚ップã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- UNIX ONLY --> + オペレーティング・システムãŒUnix OSã§ãªã„å ´åˆ, ã“ã®ãƒ†ã‚¹ãƒˆã¯ã‚¹ã‚ップã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- LINUX ONLY --> + オペレーティング・システムãŒGNU/Linuxã§ãªã„å ´åˆ, ã“ã®ãƒ†ã‚¹ãƒˆã¯ã‚¹ã‚ップã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- MACOSX ONLY --> + オペレーティング・システムãŒMac OS Xã§ãªã„å ´åˆ, ã“ã®ãƒ†ã‚¹ãƒˆã¯ã‚¹ã‚ップã•ã‚Œã¾ã™. + </para> + </listitem> + <listitem> + <para> + <-- XCOS TEST --> + ã“ã®ãƒ†ã‚¹ãƒˆã¯å…¨ã¦ã®å¿…è¦ãªXcosライブラリを実行ã—ã¾ã™. + ã“ã®ãƒ†ã‚¹ãƒˆã¯nwモードã§å®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + </listitem> + </itemizedlist> + <para> + å„テストã¯"host"コマンドã§ç”Ÿæˆã•ã‚ŒãŸåˆ¥ã®ãƒ—ãƒã‚»ã‚¹ã§å®Ÿè¡Œã•ã‚Œã¾ã™. + ã“ã‚Œã«ã‚ˆã‚Š,テストã«ã‚ˆã‚Šä¸å®‰å®šãªç’°å¢ƒã¨ãªã‚‹å ´åˆã§ã‚‚, + カレントã®ã‚³ãƒžãƒ³ãƒ‰ã®å®Ÿè¡Œã‚’継続ã§ãã¾ã™. + ã¾ãŸ,テストã¯ä»–ã®ãƒ†ã‚¹ãƒˆã¨ç‹¬ç«‹ã—ã¦å®Ÿè¡Œå¯èƒ½ã¨ãªã‚Šã¾ã™. + </para> + </refsection> + <refsection> + <title>プラットフォーム毎ã®ãƒ†ã‚¹ãƒˆ</title> + <para> + テストã®å‡ºåŠ›ãŒå®Ÿè¡Œã•ã‚Œã‚‹ãƒ—ラットフォームã«ä¾å˜ã—ã¦ã„ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™. + ã“ã®å ´åˆ,<literal>.ref</literal>ã‚’å…¨ã¦ã®ãƒ—ラットフォーム用ã§åŒã˜ã¨ãªã‚‰ãš, + ã„ãã¤ã‹ã®ãƒ—ラットフォームã§ã¯ãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆãŒå¤±æ•—ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™. + ã“ã®å ´åˆ, + デフォルトã®<literal>.ref</literal>ã¨å…±ã« + å„プラットフォーム用ã®<literal>.ref</literal>を作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™. + </para> + <para> + プラットフォーム毎㮠<literal>.ref</literal>ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªæ‹¡å¼µåã® + ã©ã‚Œã‹ã‚’付ã‘ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + </para> + <itemizedlist> + <listitem> + <para> + <literal>.unix.dia.ref</literal>ã¯Unixプラットフォーム用, + </para> + </listitem> + <listitem> + <para> + <literal>.linux.dia.ref</literal>ã¯GNU/Linuxプラットフォーム用, + </para> + </listitem> + <listitem> + <para> + <literal>.win.dia.ref</literal>ã¯Windowsプラットフォーム用, + </para> + </listitem> + <listitem> + <para> + <literal>.macosx.dia.ref</literal>ã¯Mac OS Xプラットフォーム用. + </para> + </listitem> + </itemizedlist> + <para> + アルゴリズムã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™. + ã¾ãš, <literal>.ref</literal> ãŒæŽ¢ã•ã‚Œã¾ã™. + ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå˜åœ¨ã—ãªã„å ´åˆ, + ç¾åœ¨ã®ãƒ—ラットフォームã«å¿œã˜ãŸä»¥ä¸‹ã® + プラットフォーム毎ã®<literal>.ref</literal>ファイルãŒå®Ÿè¡Œã•ã‚Œã¾ã™. + </para> + <itemizedlist> + <listitem> + <para> + Windowsプラットフォームã®å ´åˆ: <literal>.win.dia.ref</literal>, + </para> + </listitem> + <listitem> + <para> + Max OS X プラットフォームã®å ´åˆ: <literal>.unix.dia.ref</literal>, <literal>.macosx.dia.ref</literal>, + </para> + </listitem> + <listitem> + <para> + GNU/Linuxプラットフォームã®å ´åˆ: <literal>.unix.dia.ref</literal>, <literal>.linux.dia.ref</literal>. + </para> + </listitem> + </itemizedlist> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +// å…¨ã¦ã®ãƒ†ã‚¹ãƒˆã‚’実行 +// ============================================= +test_run(); +test_run([]); +test_run([],[]); +// 1ã¤ã¾ãŸã¯è¤‡æ•°ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’テスト +// ============================================= +// 1ã¤ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’テスト +test_run('time'); +// 複数ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’テスト +test_run(['time','string']); +// サブモジュールをテスト +test_run('optimization|neldermead'); +// パスã§æŒ‡å®šã—ãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’å‚ç…§ +test_run(SCI+'/modules/core'); +// 指定ã—ãŸãƒ†ã‚¹ãƒˆã‚’実行 +// ============================================= +// テストを1ã¤æŒ‡å®š +test_run('time','datenum'); +// 複数ã®ãƒ†ã‚¹ãƒˆã‚’指定 +test_run('time',['datenum';'calendar']); +// ã„ãã¤ã‹ã®ãƒ†ã‚¹ãƒˆã‚’スã‚ップ +// ============================================= +test_run('time',['datenum';'calendar'],'skip_tests'); +// オプション +// ============================================= +// .dia 㨠.dia.ref ãŒç‰ã—ã„ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã›ã‚“ +test_run('time','datenum','no_check_ref'); +// .dia.refファイルを作æˆã—ã¾ã™ãŒ,.diaã¨.dia.refãŒç‰ã—ã„ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã›ã‚“ +test_run([],[],'create_ref'); +// テストを実行ã—ãªã„ãŒ,利用å¯èƒ½ãªãƒ†ã‚¹ãƒˆã®ä¸€è¦§ã‚’表示ã—ã¾ã™ +test_run([],[],'list'); +// ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã®ä½¿ç”¨æ³•ã«é–¢ã™ã‚‹ã„ãã¤ã‹ã®ä¾‹ã‚’表示ã—ã¾ã™ +test_run([],[],'help'); +// éžå›žå¸°ãƒ†ã‚¹ãƒˆã®ã¿ã‚’実行ã—,ユニットテストをスã‚ップã—ã¾ã™ +test_run([],[],'nonreg_test'); +// ユニットテストã®ã¿ã‚’実行ã—,éžå›žå¸°ãƒ†ã‚¹ãƒˆã‚’スã‚ップã—ã¾ã™ +test_run([],[],'unit_test'); +// エラー出力 (std err)ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã›ã‚“ +test_run('boolean','bug_2799','no_check_error_output'); +// 複数ã®ã‚ªãƒ—ションをåŒæ™‚ã«æŒ‡å®š +test_run([],[],['no_check_ref','mode_nw']); + ]]></programlisting> + <programlisting role="example"><![CDATA[ +// (パスã§æŒ‡å®šã—ãŸ)外部モジュールã®ãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã‚’実行 +test_run('SCI/contrib/toolbox_skeleton') + ]]></programlisting> + <programlisting role="example"><![CDATA[ +// XML Xunitファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ +test_run('boolean',[],[],TMPDIR+"/boolean_test_run.xml"); +test_run('time','datenum',[],TMPDIR+"/time_datenum_test_run.xml"); + ]]></programlisting> + </refsection> + <refsection> + <title>内部è¨è¨ˆ</title> + <para> + テストã¯, + テストファイルãŒç½®ã‹ã‚ŒãŸãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã¯ãªã, + テンãƒãƒ©ãƒªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§å®Ÿè¡Œã•ã‚Œã¾ã™. + .tstファイルã¯ãƒ†ãƒ³ãƒãƒ©ãƒªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚³ãƒ”ーã•ã‚ŒãŸå¾Œ, + テストãŒå®Ÿè¡Œã•ã‚Œ,.dia.ref ãŒå…ƒã®ä½ç½®ã«ã‚³ãƒ”ーã•ã‚Œã¾ã™. + </para> + <para> + .tstスクリプトã¯ãã®ã¾ã¾å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“. + ã‹ã‚ã‚Šã«,テンãƒãƒ©ãƒªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚³ãƒ”ーã•ã‚Œã‚‹éš›ã« + ヘッダã¨ãƒ•ãƒƒã‚¿ãŒ.tstã®å…ˆé ã¨çµ‚端ã«æŒ¿å…¥ã•ã‚Œã¾ã™. + ã“ã®ä¿®æ£ã®ç†ç”±ã¯,出力メッセージを.diaファイルã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—, + テストãŒå®Ÿè¡Œã•ã‚ŒãŸå¾Œã«,ユーザãŒãƒã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å–å¾—ã§ãるよã†ã« + ã™ã‚‹ãŸã‚ã§ã™. + </para> + </refsection> + <refsection> + <title>å±¥æ´</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revdescription>test_runã¯ä»¥ä¸‹ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’è¿”ã—ã¾ã™: + <itemizedlist><listitem> + エラーãŒæ¤œå‡ºã•ã‚Œãªã‹ã£ãŸå ´åˆã« %t ã‚’è¿”ã—ã¾ã™ + </listitem> + <listitem> + エラーãŒæ¤œå‡ºã•ã‚ŒãŸå ´åˆã« %f ã‚’è¿”ã—ã¾ã™ + </listitem> + </itemizedlist> + <para> + <literal>show_diff</literal> ãŠã‚ˆã³ <literal>show_error</literal> ㌠+ æ–°ã—ã„オプションã¨ã—ã¦è¿½åŠ ã•ã‚Œã¾ã—㟠+ </para> + <para> + <literal>CLI SHELL MODE</literal> ã‚¿ã‚°ãŒè¿½åŠ ã•ã‚Œã¾ã—ãŸ. + <literal>JVM NOT MANDATORY</literal> (ã¾ã サãƒãƒ¼ãƒˆä¸)ã‚’ç½®ãæ›ãˆã¾ã™ + </para> + <para> + <literal>test_run</literal> ã¯å¤–部モジュールã§ã‚‚動作ã—ã¾ã™. + </para> + <para> + XMLファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹4番目ã®å¼•æ•°ãŒè¿½åŠ ã•ã‚Œã¾ã—㟠+ </para> + </revdescription> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ja_JP/user.xml b/modules/development_tools/help/ja_JP/user.xml new file mode 100755 index 000000000..c082ee6a5 --- /dev/null +++ b/modules/development_tools/help/ja_JP/user.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="user"> + <refnamediv> + <refname>user</refname> + <refpurpose>Fortran ã¾ãŸã¯ C ルーãƒãƒ³ã¨ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã‚’作æˆ</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼出ã—æ‰‹é †</title> + <synopsis>[s_1,s_2,...,s_lhs]=user(e_1,e_2,...,e_rhs)</synopsis> + </refsynopsisdiv> + <refsection> + <title>説明</title> + <para> + ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã‚Š,Scilabコマンドã¨ã—ã¦å¤–部プãƒã‚°ãƒ©ãƒ を使用ã§ãるよã†ã« + ãªã‚Šã¾ã™. + ãŸã ã—,<literal>(s_1,s_2,...,s_lhs)</literal>ã¯å‡ºåŠ›å¤‰æ•°ã§ã‚ã‚Š, + <literal>(e_1,e_2,...,e_rhs)</literal>ã¯å…¥åŠ›å¤‰æ•°ã§ã™. + ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’Scilabã«æŒ¿å…¥ã™ã‚‹ã«ã¯,Scilabã®Fortranサブルーãƒãƒ³ + <literal>user</literal>ã«æ•°è¡Œã‚’è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™. + 詳細ã«ã¤ã„ã¦ã¯,<link linkend="intersci">intersci</link>ã¾ãŸã¯Scilabã®ãƒ‰ã‚ュメントをå‚ç…§ãã ã•ã„. + </para> + </refsection> + <refsection role="see also"> + <title>å‚ç…§</title> + <simplelist type="inline"> + <member> + <link linkend="fort">fort</link> + </member> + <member> + <link linkend="link">link</link> + </member> + <member> + <link linkend="intersci">intersci</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/development_tools/help/pt_BR/addchapter.sce b/modules/development_tools/help/pt_BR/addchapter.sce new file mode 100755 index 000000000..3540b1b81 --- /dev/null +++ b/modules/development_tools/help/pt_BR/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Ferramentas de Desenvolvimento",SCI+"/modules/development_tools/help/pt_BR",%T); + diff --git a/modules/development_tools/help/pt_BR/user.xml b/modules/development_tools/help/pt_BR/user.xml new file mode 100755 index 000000000..528b0b986 --- /dev/null +++ b/modules/development_tools/help/pt_BR/user.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="user" xml:lang="pt"> + <refnamediv> + <refname>user</refname> + <refpurpose>interface para rotinas FORTRAN ou C</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Seqüência de Chamamento</title> + <synopsis>[s_1,s_2,...,s_lhs]=user(e_1,e_2,...,e_rhs)</synopsis> + </refsynopsisdiv> + <refsection> + <title>Descrição</title> + <para>Com este comando, é possível utilizar um programa externo como um + comando do Scilab onde <literal>(s_1,s_2,...,s_lhs)</literal> são as + variáveis de saída e<literal> (e_1,e_2,...,e_rhs)</literal> asão as + variáveis de entrada. Para inserir este comando no Scilab, é necessário + escrever algumas linhas na subrotina FORTRAN <literal>user</literal> do + Scilab. Ver <link linkend="intersci">intersci</link> ou a documentação do Scilab para + mais . + </para> + </refsection> + <refsection> + <title> Ver Também </title> + <simplelist type="inline"> + <member> + <link linkend="fort">fort</link> + </member> + <member> + <link linkend="link">link</link> + </member> + <member> + <link linkend="intersci">intersci</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/development_tools/help/ru_RU/addchapter.sce b/modules/development_tools/help/ru_RU/addchapter.sce new file mode 100755 index 000000000..6f8b4e5a1 --- /dev/null +++ b/modules/development_tools/help/ru_RU/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Development tools",SCI+"/modules/development_tools/help/ru_RU",%T); + diff --git a/modules/development_tools/help/ru_RU/user.xml b/modules/development_tools/help/ru_RU/user.xml new file mode 100755 index 000000000..8edc73037 --- /dev/null +++ b/modules/development_tools/help/ru_RU/user.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ru" xml:id="user"> + <refnamediv> + <refname>user</refname> + <refpurpose>уÑтановка ÑвÑзи Ñ Ð¿Ð¾Ð´Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ð°Ð¼Ð¸ Fortran или C</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>ПоÑледовательноÑÑ‚ÑŒ вызова</title> + <synopsis>[s_1,s_2,...,s_lhs]=user(e_1,e_2,...,e_rhs)</synopsis> + </refsynopsisdiv> + <refsection> + <title>ОпиÑание</title> + <para> + С Ñтой командой можно иÑпользовать внешнюю программу как команду Scilab'а, где + <literal>(s_1,s_2,...,s_lhs)</literal> -- выходные переменные, а + <literal>(e_1,e_2,...,e_rhs)</literal> -- входные переменные. Чтобы ввеÑти Ñту + команду в Scilab, нужно напиÑать неÑколько Ñтрок в fortran-подпрограмме + <literal>user</literal> Scilab'а. См. <link linkend="intersci">intersci</link> или документацию по Scilab'у Ð´Ð»Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð¹ информации. + </para> + </refsection> + <refsection role="see also"> + <title>Смотрите также</title> + <simplelist type="inline"> + <member> + <link linkend="fort">fort</link> + </member> + <member> + <link linkend="link">link</link> + </member> + <member> + <link linkend="intersci">intersci</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/development_tools/license.txt b/modules/development_tools/license.txt new file mode 100755 index 000000000..933635069 --- /dev/null +++ b/modules/development_tools/license.txt @@ -0,0 +1,10 @@ +Copyright: +Copyright (c) 2008 - DIGITEO +Copyright (c) 1989-2008 - INRIA + +License: +This module must be used under the terms of the CeCILL. +This module file is licensed as described in the file COPYING, which +you should have received as part of this distribution. The terms +are also available at +http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt diff --git a/modules/development_tools/locales/ca_ES.po b/modules/development_tools/locales/ca_ES.po new file mode 100755 index 000000000..38cfa444f --- /dev/null +++ b/modules/development_tools/locales/ca_ES.po @@ -0,0 +1,269 @@ +# Catalan translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2011-09-02 08:20+0000\n" +"Last-Translator: oriolsbd <oriolsbd@yahoo.es>\n" +"Language-Team: Catalan <ca@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: ca\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "" + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "" + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" + +#, c-format +msgid "%s is not an installed module" +msgstr "El mòdul %s no està instal·lat" + +msgid "error : Input argument sizes are not valid" +msgstr "error : Les mides de l'argument d'entrada no són và lides" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "El test %s no està disponible al mòdul %s" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" +"%s: El primer argument és incorrecte: El fitxer ha de tenir extensió .dia." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "Ha fallat el test. S'ha detectat un error en executar %s" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "Ha fallat el test. Executeu : fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "Ha fallat el test. Executeu : diff -wu %s" + +msgid "Test passed" +msgstr "El test ha anat bé" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: L'argument d'entrada té una mida incorrecta." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "" + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s no és un mòdul o una barra d'eines instal·lada" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "El fitxer de referència (%s) no existeix" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "El fitxer de referència no conté la variable %s_ref" diff --git a/modules/development_tools/locales/cs_CZ.po b/modules/development_tools/locales/cs_CZ.po new file mode 100755 index 000000000..098c8a85d --- /dev/null +++ b/modules/development_tools/locales/cs_CZ.po @@ -0,0 +1,300 @@ +# Czech translation for scilab +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2013-06-19 20:47+0000\n" +"Last-Translator: ZbynÄ›k Schwarz <Unknown>\n" +"Language-Team: Czech <cs@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "%s: Å patný poÄet vstupnÃch argumentů: OÄekávány %d až %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "%s: Å patný typ vstupnÃho argumentu #%d: OÄekávána matice.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "%s: Å patný typ vstupnÃho argumentu #%d: OÄekávána matice Å™etÄ›zců.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" +"%s: Å patná velikost vstupnÃho argumentu #%d: OÄekávána matice %d-krát-%d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s: Å patná hodnota vstupnÃho argumentu #%d: Musà být > %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "%s: Å patná hodnota vstupnÃho argumentu #%d: Musà být v sadÄ› {%s}.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" +"%s: Nekompatibilnà vstupnà argumenty #%d a #%d: OÄekávány stejné velikosti.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "%s: Selhánà výroku: oÄekáváno = %s ale spoÄÃtáno = %s" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s: Å patný poÄet vstupnÃho argumentu: OÄekáváno %d.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "%s: Å patný poÄet vstupnÃch argumentů: OÄekáváno %d.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" +"%s: Nekompatibilnà vstupnà argumenty #%d a #%d: OÄekávány stejné typy.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "%s: SpoÄÃtané je reálné, ale oÄekávané bylo komplexnÃ." + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "%s: SpoÄÃtané je komplexnÃ, ale oÄekávané bylo reálné." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" +"%s: Selhánà výrazu: oÄekáváno = %s ale spoÄÃtáno = %s (průmÄ›rný rozdÃl = %s)" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "%s: Å patný poÄet vstupnÃch argumentů: OÄekáváno alespoň %d.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" +"%s: Å patná velikost vstupnÃho argumentu #%d: OÄekáván Å™etÄ›zcový vektor.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" +"%s: Å patná hodnota vstupnÃho argumentu #%d: OÄekávány nezáporné Å™etÄ›zce.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" +"%s: Å patná velikost vstupnÃho argumentu #%d: OÄekávána neprázdná matice.\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s: PÅ™i vyhodnocovánà %s nebyla vytvoÅ™ena žádná chyba." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s: Chyba pÅ™i formátovánà chybové zprávy: %s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" +"%s: Selhánà výroku: oÄekáváná chybová zpráva = %s ale spoÄÃtáná chybová " +"zpráva = %s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" +"%s: Selhánà výroku: oÄekáváné chybové ÄÃslo = %d ale vypoÄÃtané chybové " +"ÄÃslo = %d" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" +"%s: Å patný typ vstupnÃho argumentu #%d: OÄekávána booleovská matice.\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "%s: Selhánà výroku: nalezen nepravdivý záznam v podmÃnce = %s" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" +"%s: OÄekávány typy %s nebo %s pro vstupnà argument %s #%d, ale mÃsto toho " +"pÅ™edáno %s." + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s: Soubor %s neexistuje.\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s: Nelze otevÅ™Ãt soubor %s.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" +"%s: Obsah vypoÄÃtaného souboru %s se liÅ¡Ã od obsahu referenÄnÃho souboru %s." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s: Nelze zavÅ™Ãt soubor %s.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "%s: Å patný poÄet vstupnÃch argumentů: OÄekávány %d až %d.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" +"%s: PoÄet výstupnÃch argumentů %d se neshoduje s poÄtem vstupnÃch argumentů " +"%d." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" +"%s: OÄekáváno %d Å™ad ve vstupnÃm argumentu #%d, ale mÃsto toho nalezeno %d " +"Å™ad." + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" +"%s: OÄekáváno %d sloupců ve vstupnÃm argumentu #%d, ale mÃsto toho nalezeno " +"%d sloupců." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s nenà nainstalovaný modul" + +msgid "error : Input argument sizes are not valid" +msgstr "Chyba : Velikosti vstupnÃch argumentů nejsou platné" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "Test %s nenà dostupný z modulu %s" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "%s: Å patný poÄet vstupnÃch argumentů: oÄekáváno %d až %d.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s: Å patný typ vstupnÃho argumentu #%d: OÄekáváno řádkové pole Å™etÄ›zců.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s: Å patná velikost vstupnÃho argumentu #%d: OÄekáváno řádkové pole " +"Å™etÄ›zců.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s: Å patný typ vstupnÃho argumentu #%d: OÄekáváno řádkové pole Å™etÄ›zců nebo " +"prázdná matice.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s: Å patná velikost vstupnÃho argumentu #%d: OÄekáváno řádkové pole Å™etÄ›zců " +"nebo prázdná matice.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "%s: Å patný typ vstupnÃho argumentu #%d: OÄekáván Å™etÄ›zec.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "%s: Å patná velikost vstupnÃho argumentu #%d: OÄekáván Å™etÄ›zec.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" +"%s: Å patná hodnota vstupnÃho argumentu #%d: OÄekáván název modulu Scilab.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "%s: Å patná hodnota vstupnÃho argumentu #%d: OÄekáván platný jazyk.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" +"%s: Å patná hodnota vstupnÃho argumentu #%d: OÄekáván název modulu funkce " +"'%s'.4\n" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "%s: Chybný prvnà vstupnà argument: OÄekáván .dia soubor." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "Test selhal DETEKOVÃNA CHYBA pÅ™i vykonávánà %s" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "Test selhal. ProhlédnÄ›te si pÅ™Ãkaz : fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "Test selhal. ProhlédnÄ›tÄ› si pÅ™Ãkaz : diff -wu %s" + +msgid "Test passed" +msgstr "Test probÄ›hl v pořádku" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: Chybná velikost vstupnÃho argumentu." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "%s: Å patný poÄet vstupnÃch argumentů." + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s nenà nainstalovaný modul nebo toolbox" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "Ref soubor (%s) neexistuje" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" +"Soubor '%s' se neÅ™Ãdà formátem Xunit XML. OÄekávána koÅ™enová znaÄka " +"'testsuites'.\n" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "NeexistujÃcà promÄ›nná %s_ref v referenÄnÃm souboru" diff --git a/modules/development_tools/locales/de_DE.po b/modules/development_tools/locales/de_DE.po new file mode 100755 index 000000000..d532fd18c --- /dev/null +++ b/modules/development_tools/locales/de_DE.po @@ -0,0 +1,270 @@ +# German translation for scilab +# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2012-02-28 12:10+0000\n" +"Last-Translator: Daniel Dietrich <Unknown>\n" +"Language-Team: German <de@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: de\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "%s: falscher Wert für Eingangsargument #%d: Matrix erwartet.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s: falscher Wert für Eingangsargument #%d: muß >%d sein.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "" + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "" + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" + +#, c-format +msgid "%s is not an installed module" +msgstr "Modul %s ist nicht installiert" + +msgid "error : Input argument sizes are not valid" +msgstr "Fehler: Die Größe der Eingabe-Argumente ist ungültig" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "Dieser Test %s ist aus dem Modul %s nicht verfügbar" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" +"%s: falsches erstes Eingangsargument: Datei mit .dia Suffix erwartet." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "Test fehlgeschlagen: Fehler während der Ausführung %s erkannt" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "Test fehlgeschlagen. Siehe: fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "Test fehlgeschlagen. Siehe: diff -wu %s" + +msgid "Test passed" +msgstr "Test bestanden" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: Falsche Größe des Eingabe-Arguments." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "" + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "" +"%s ist kein installiertes Modul und keine installierte Werkzeugleiste" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "Die Referenzdatei (%s) existiert nicht" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "Keine Variable %s_ref in der Referenzdatei" diff --git a/modules/development_tools/locales/development_tools.pot b/modules/development_tools/locales/development_tools.pot new file mode 100755 index 000000000..b1181a42d --- /dev/null +++ b/modules/development_tools/locales/development_tools.pot @@ -0,0 +1,446 @@ +# Localization of the module development_tools-macros +# Please see in SCI/tools/localization for localization management +# Copyright (C) 2007-2008 - INRIA +# Copyright (C) 2008-2011 - DIGITEO +# Copyright (C) 2012-2014 - Scilab-Enterprises +# This file is distributed under the same license as the Scilab package. +# +msgid "" +msgstr "" +"Project-Id-Version: Scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"Last-Translator: Vincent COUVERT <vincent.couvert@scilab-enterprises.com>\n" +"Language-Team: Scilab Localization <localization@lists.scilab.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"Revision-Date: 2015-03-27 13:54+0100\n" + +# File: macros/assert/assert_checkalmostequal.sci, line: 16 +# File: macros/assert/assert_checkfilesequal.sci, line: 15 +# File: macros/assert/assert_comparecomplex.sci, line: 15 +# File: macros/assert/assert_cond2reltol.sci, line: 115 +# File: macros/assert/assert_cond2reqdigits.sci, line: 120 +# File: macros/assert/assert_generror.sci, line: 14 +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "" + +# +# File: macros/assert/assert_checkalmostequal.sci, line: 29 +# File: macros/assert/assert_checkalmostequal.sci, line: 33 +# File: macros/assert/assert_checkalmostequal.sci, line: 37 +# File: macros/assert/assert_checkalmostequal.sci, line: 41 +# File: macros/assert/assert_checkerror.sci, line: 36 +# File: macros/assert/assert_comparecomplex.sci, line: 27 +# File: macros/assert/assert_comparecomplex.sci, line: 31 +# File: macros/assert/assert_comparecomplex.sci, line: 35 +# File: macros/assert/assert_comparecomplex.sci, line: 39 +# File: macros/assert/assert_computedigits.sci, line: 24 +# File: macros/assert/assert_computedigits.sci, line: 28 +# File: macros/assert/assert_cond2reltol.sci, line: 125 +# File: macros/assert/assert_cond2reltol.sci, line: 129 +# File: macros/assert/assert_cond2reqdigits.sci, line: 131 +# File: macros/assert/assert_cond2reqdigits.sci, line: 135 +# File: macros/assert/assert_cond2reqdigits.sci, line: 139 +# File: macros/assert/assert_generror.sci, line: 38 +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkalmostequal.sci, line: 45 +# File: macros/assert/assert_checkerror.sci, line: 26 +# File: macros/assert/assert_checkerror.sci, line: 31 +# File: macros/assert/assert_checkfilesequal.sci, line: 30 +# File: macros/assert/assert_checkfilesequal.sci, line: 34 +# File: macros/assert/assert_generror.sci, line: 21 +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkalmostequal.sci, line: 51 +# File: macros/assert/assert_checkalmostequal.sci, line: 55 +# File: macros/assert/assert_checkalmostequal.sci, line: 59 +# File: macros/assert/assert_checkerror.sci, line: 42 +# File: macros/assert/assert_checkerror.sci, line: 53 +# File: macros/assert/assert_checkfilesequal.sci, line: 46 +# File: macros/assert/assert_checkfilesequal.sci, line: 50 +# File: macros/assert/assert_comparecomplex.sci, line: 45 +# File: macros/assert/assert_comparecomplex.sci, line: 49 +# File: macros/assert/assert_comparecomplex.sci, line: 53 +# File: macros/assert/assert_comparecomplex.sci, line: 57 +# File: macros/assert/assert_computedigits.sci, line: 38 +# File: macros/assert/assert_cond2reltol.sci, line: 80 +# File: macros/assert/assert_generror.sci, line: 25 +# File: macros/assert/assert_generror.sci, line: 34 +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkalmostequal.sci, line: 65 +# File: macros/assert/assert_checkalmostequal.sci, line: 69 +# File: macros/assert/assert_comparecomplex.sci, line: 63 +# File: macros/assert/assert_comparecomplex.sci, line: 67 +# File: macros/assert/assert_cond2reltol.sci, line: 138 +# File: macros/assert/assert_cond2reqdigits.sci, line: 148 +# File: macros/assert/assert_cond2reqdigits.sci, line: 152 +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +# +# File: macros/assert/assert_checkalmostequal.sci, line: 73 +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" + +# +# File: macros/assert/assert_checkalmostequal.sci, line: 81 +# File: macros/assert/assert_checkequal.sci, line: 81 +# File: macros/assert/assert_computedigits.sci, line: 34 +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkalmostequal.sci, line: 110 +# File: macros/assert/assert_checkequal.sci, line: 155 +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "" + +# +# File: macros/assert/assert_checkequal.sci, line: 40 +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkequal.sci, line: 48 +# File: macros/assert/assert_checkfalse.sci, line: 15 +# File: macros/assert/assert_checktrue.sci, line: 15 +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkequal.sci, line: 54 +# File: macros/assert/assert_checkequal.sci, line: 62 +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkequal.sci, line: 90 +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "" + +# +# File: macros/assert/assert_checkequal.sci, line: 94 +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "" + +# +# File: macros/assert/assert_checkequal.sci, line: 153 +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +# +# File: macros/assert/assert_checkerror.sci, line: 15 +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkerror.sci, line: 47 +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkerror.sci, line: 62 +# File: macros/assert/assert_generror.sci, line: 42 +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkerror.sci, line: 70 +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkerror.sci, line: 80 +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "" + +# +# File: macros/assert/assert_checkerror.sci, line: 99 +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "" + +# +# File: macros/assert/assert_checkerror.sci, line: 117 +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" + +# +# File: macros/assert/assert_checkerror.sci, line: 132 +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" + +# +# File: macros/assert/assert_checkfalse.sci, line: 21 +# File: macros/assert/assert_checktrue.sci, line: 21 +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" + +# +# File: macros/assert/assert_checkfalse.sci, line: 35 +# File: macros/assert/assert_checktrue.sci, line: 35 +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" + +# +# File: macros/assert/assert_checkfilesequal.sci, line: 39 +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" + +# +# File: macros/assert/assert_checkfilesequal.sci, line: 57 +# File: macros/assert/assert_checkfilesequal.sci, line: 66 +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "" + +# +# File: macros/assert/assert_checkfilesequal.sci, line: 78 +# File: macros/assert/assert_checkfilesequal.sci, line: 88 +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "" + +# +# File: macros/assert/assert_checkfilesequal.sci, line: 117 +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" + +# +# File: macros/assert/assert_checkfilesequal.sci, line: 126 +# File: macros/assert/assert_checkfilesequal.sci, line: 133 +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "" + +# +# File: macros/assert/assert_computedigits.sci, line: 15 +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" + +# +# File: macros/assert/assert_cond2reltol.sci, line: 47 +# File: macros/assert/assert_cond2reqdigits.sci, line: 48 +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" + +# +# File: macros/assert/assert_cond2reqdigits.sci, line: 81 +#, c-format +msgid "%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" + +# +# File: macros/assert/assert_cond2reqdigits.sci, line: 85 +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" + +# +# File: macros/bench_run.sci, line: 74 +# File: macros/test_clean.sci, line: 97 +#, c-format +msgid "%s is not an installed module" +msgstr "" + +# +# File: macros/bench_run.sci, line: 93 +msgid "error : Input argument sizes are not valid" +msgstr "" + +# +# File: macros/bench_run.sci, line: 106 +# File: macros/test_clean.sci, line: 135 +# File: macros/test_run.sci, line: 379 +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "" + +# +# File: macros/bench_run.sci, line: 112 +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 26 +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 29 +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 33 +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 36 +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 40 +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 43 +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 55 +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 62 +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" + +# +# File: macros/example_run.sci, line: 84 +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" + +# +# File: macros/scitest.sci, line: 32 +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" + +# +# File: macros/scitest.sci, line: 124 +# File: macros/scitest.sci, line: 130 +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "" + +# +# File: macros/scitest.sci, line: 145 +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "" + +# +# File: macros/scitest.sci, line: 147 +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "" + +# +# File: macros/scitest.sci, line: 150 +msgid "Test passed" +msgstr "" + +# +# File: macros/test_clean.sci, line: 116 +# File: macros/test_run.sci, line: 233 +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "" + +# +# File: macros/test_clean.sci, line: 141 +# File: macros/test_run.sci, line: 255 +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "" + +# +# File: macros/test_run.sci, line: 333 +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "" + +# +# File: macros/test_run.sci, line: 1087 +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "" + +# +# File: macros/test_run.sci, line: 1233 +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" + +# +# File: macros/testexamples.sci, line: 17 +# File: macros/testexamples.sci, line: 32 +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "" diff --git a/modules/development_tools/locales/es_ES.po b/modules/development_tools/locales/es_ES.po new file mode 100755 index 000000000..45ea24407 --- /dev/null +++ b/modules/development_tools/locales/es_ES.po @@ -0,0 +1,307 @@ +# Spanish translation for scilab +# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2012-02-01 22:28+0000\n" +"Last-Translator: Adrian Pardini <Unknown>\n" +"Language-Team: Spanish <es@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: es\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban de %d a %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" +"%s: Tipo incorrecto del argumento de entrada #%d: Se esperaba una matriz.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" +"%s: Tipo incorrecto del argumento de entrada #%d: Se esperaba una matriz de " +"strings.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" +"%s: Tamaño incorrecto para el argumento de entrada #%d: Se esperaba una " +"matriz de %d por %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s: Valor incorrecto del argumento de entrada #%d: Debe ser > %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" +"%s: Valor incorrecto para el argumento de entrada #%d: Debe pertenecer al " +"conjunto {%s}.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" +"%s: Argumentos de entrada #%d y #%d incompatibles: Se los esperaba del mismo " +"tamaño.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "%s: Fallo de aserción: se esperaba = %s pero se calculó = %s" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s: Número incorrecto de argumentos de entrada: Se esperaban %d.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "%s Número incorrecto de argumentos de entrada: Se esperaban %d\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" +"%s: Argumentos de entrada #%d y #%d incompatibles: Se los esperaba del mismo " +"tipo.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "%s: El resultado es real pero esperaba un complejo." + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "%s: El resultado es un complejo, pero se esperaba un real." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban al menos %d.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" +"%s: Tamaño incorrecto del argumento de entrada #%d: Se esperaba un vector de " +"strings.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" +"%s: Valor incorrecto del argumento de entrada #%d: Se esperaban enteros no-" +"negativos.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" +"%s: Tamaño incorrecto del argumento de entrada #%d: Se esperaba una matriz " +"no-vacÃa.\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s: No se produjo ningún error al evaluar %s." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s: Error al darle formato al mensaje de error: %s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" +"%s: Fallo de aserción: se esperaba: se esperaba el siguiente mensaje de " +"error = %s pero se obtuvo = %s." + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" +"%s: Fallo de aserción: se esperaba un error con número = %d pero se obtuvo = " +"%d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" +"%s: Tipo incorrecto para el agumento de entrada #%d: Se esperaba una matriz " +"booleana.\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" +"%s: Fallo de aserción: se encontró una entrada falsa en la condición = %s" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" +"%s: Se esperaba el tipo %s o %s para el argumento de entrada %s #%d, pero en " +"su lugar se encontró %s." + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s: El archivo %s no existe.\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s: No se puede abrir el archivo %s.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" +"%s: El contenido del archivo calculado %s es diferente al contenido del " +"archivo de referencia %s." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s: No se puede cerrar el archivo %s.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban de %d a %d.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" +"%s: El número de argumentos de salida %d no coincide con el número de " +"argumentos de entrada %d." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" +"%s: Se esperaban %d filas en el argumento de entrada #%d, pero en su lugar " +"se encontraron %d." + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" +"%s: Se esperaban %d columnas en el argumento de entrada #%d, pero en su " +"lugar se encontraron %d." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s no es un módulo instalado" + +msgid "error : Input argument sizes are not valid" +msgstr "error : Tamaños inválidos del argumento de entrada" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "La prueba %s no está disponible desde el módulo %s" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" +"%s: Error en el primer argumento de entrada: Se esperaba un archivo con " +"extensión .dia." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "Falló la prueba se DETECTÓ UN ERROR mientras se ejecutaba %s" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "Falló la prueba. Vea: fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "Falló la prueba. Vea: diff -wu %s" + +msgid "Test passed" +msgstr "Pasó la prueba" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: Tamaño incorrecto de argumento de entrada." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "" + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s no es un módulo o herramienta instalada" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "El archivo de referencia (%s) no existe" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "No hay variable %s_ref en el archivo de referencia" diff --git a/modules/development_tools/locales/fr_FR.po b/modules/development_tools/locales/fr_FR.po new file mode 100755 index 000000000..4fa1e115e --- /dev/null +++ b/modules/development_tools/locales/fr_FR.po @@ -0,0 +1,324 @@ +# French translation for scilab +# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2013-06-17 19:40+0000\n" +"Last-Translator: jojolebestof <Unknown>\n" +"Language-Team: French <fr@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: fr\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "%s : Nombre erroné d'arguments d'entrée : entre %d et %d attendus." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Une matrice attendue.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Une matrice de chaîne de " +"caractères attendue.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée n°%d : Une matrice %d-by-%d " +"attendue.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s : Valeur erronée de l'argument d'entrée n°%d : Doit être > %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Doit appartenir à " +"l'ensemble {%s}.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" +"%s : Arguments d'entrée n°%d et n°%d incompatibles : Mêmes dimensions " +"attendues.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "%s : Échec de l'assertion : attendu = %s, cependant calculé = %s" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s : Nombre erroné d'argument d'entrée : %d attendu.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "%s : Nombre erroné d'arguments d'entrée : %d attendus.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" +"%s : Arguments d'entrée #%d et #%d incompatibles : Même types attendus.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "" +"%s : L'objet calculé est de type réel, cependant il aurait dû être complexe." + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "" +"%s : L'objet calculé est de type complexe, cependant il aurait dû être réel." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" +"%s : Échec de l'assertion : attendu = %s, cependant calculé = %s (différence " +"moyenne = %s)" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "%s : Nombre erroné d'arguments d'entrée : Au moins %d attendu.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée n°%d : Un vecteur de chaîne de " +"caractères attendu.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Des entiers positifs " +"attendus.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée n°%d : Une matrice non vide " +"attendue.\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s : Aucune erreur n'a été rencontrée pendant l'évaluation de %s." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s : Erreur à la génération du message d'erreur : %s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" +"%s : Échec de l'assertion : message d'erreur attendu = %s, cependant message " +"d'erreur calculé = %s." + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" +"%s : Échec de l'assertion : numéro attendu d'erreur = %d, cependant numéro " +"d'erreur calculé = %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Une matrice de booléens " +"attendue.\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" +"%s : Échec de l'assertion : l'entrée false trouvée dans la condition = %s" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" +"%s : Le type %s ou %s était attendu pour l'argument d'entrée %s #%d, et non " +"%s." + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s : Le fichier %s n'existe pas.\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s : Impossible d'ouvrir le fichier %s.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" +"%s : Le contenu du fichier calculé %s est différent du contenu du fichier " +"référence %s." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s : Impossible de fermer le fichier %s.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "%s : Nombre erroné d'arguments d'entrée : %d à %d attendus.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" +"%s : Le nombre d'arguments de sortie %d ne correspond pas au nombre " +"d'arguments d'entrée %d." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" +"%s : L'argument d'entrée #%d doit avoir exactement %d lignes, et non %d." + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" +"%s : L'argument d'entrée n°%d doit contenir exactement %d colonnes, et non " +"%d." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s n'est pas un module installé" + +msgid "error : Input argument sizes are not valid" +msgstr "Erreur : Les dimensions de l'argument d'entrée sont invalides." + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "Le test %s n'est pas disponible dans le module %s" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "%s : Mauvais nombre d'argument(s) d'entrée : %d à %d attendu.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Un vecteur ligne de chaînes " +"de caractères attendu.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée n°%d : Un vecteur ligne de " +"chaînes de caractères attendu.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Un vecteur ligne de chaînes " +"de caractères ou une matrice vide attendu.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée n°%d : Un vecteur ligne de " +"chaînes de caractères ou une matrice vide attendu.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Une chaîne de caractères " +"attendue.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée n°%d : Une chaîne de " +"caractères attendue.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Un nom de module Scilab " +"attendu.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Un langage valide " +"attendu.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Un nom de fonction du " +"module '%s' attendu.\n" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "%s : Premier argument erroné : Fichier avec un suffixe .dia attendu." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "Échec du test ERREUR DÉTECTÉE pendant l'exécution de %s" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "Échec du test. Voir : fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "Échec du test. Voir : diff -wu %s" + +msgid "Test passed" +msgstr "Succès du test" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s : Dimension erronée de l'argument d'entrée." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "%s : Nombre erroné d'arguments d'entrée." + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s n'est pas une boîte-à -outils ou un module installé" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "Le fichier ref (%s) n'existe pas" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" +"Le fichier '%s' ne respecte pas le format XML XUnit. La balise Root " +"attendait 'testsuites'.\n" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "Pas de variable %s_ref dans le fichier de référence" diff --git a/modules/development_tools/locales/it_IT.po b/modules/development_tools/locales/it_IT.po new file mode 100755 index 000000000..9c3e3e094 --- /dev/null +++ b/modules/development_tools/locales/it_IT.po @@ -0,0 +1,337 @@ +# Italian translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2015-02-14 21:59+0000\n" +"Last-Translator: Carml <mighty.carml@gmail.com>\n" +"Language-Team: Italian <it@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: it\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "" +"%s: Il numero degli argomenti in ingresso è sbagliato: era atteso da %d a %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era attesa una " +"matrice.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era attesa una matrice " +"di stringhe.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era attesa una " +"matrice %d-per-%d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: deve essere >%d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: deve essere " +"nell'insieme {%s}.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" +"%s: Gli argomenti in ingresso #%d e #%d sono incompatibili: erano attese le " +"stesse dimensioni.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "" +"%s: Affermazione fallita: era attesa = %s mentre quella calcolata = %s" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "" +"%s: Il numero degli argomenti in ingresso è sbagliato: ne erano attesi %d.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "" +"%s: Il numero degli argomenti in ingresso è sbagliato: ne erano attesi %d.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" +"%s: Gli argomenti in ingresso #%d e #%d sono incompatibili: erano attesi gli " +"stessi tipi.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "%s: Il valore calcolato è reale, ma ne era atteso uno complesso." + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "%s: Il valore calcolato è complesso, ma ne era atteso uno reale." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" +"%s: Il numero degli argomenti in ingresso è sbagliato: ne erano attesi " +"almeno %d.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era atteso un " +"vettore di stringhe.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: erano attesi degli " +"interi non negativi.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era attesa una " +"matrice non vuota.\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s: Non è stato prodotto alcun errore nel valutare %s." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s: Errore durante la formattazione del messaggio di errore: %s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" +"%s: Affermazione fallita: era atteso un messaggio di errore = %s mentre " +"quello calcolato = %s." + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" +"%s: Affermazione fallita: era atteso un numero di errore = %d mentre quello " +"calcolato = %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era attesa una matrice " +"di booleani.\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" +"%s: Affermazione fallita: è stata trovata una voce falsa nella condizione = " +"%s." + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" +"%s: Era atteso il tipo %s o %s per l'argomento in ingresso %s #%d, ma è " +"stato dato %s invece." + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s: Il file %s non esiste.\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s: Non è possibile aprire il file %s.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" +"%s: Il contenuto del file calcolato %s è differente dal contenuto del file " +"di riferimento %s." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s: Impossibile chiudere il file %s.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" +"%s: Il numero degli argomenti in ingresso è sbagliato: era atteso da %d a " +"%d.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" +"%s: Il numero degli argomenti in ingresso %d non coincide con il numero di " +"quelli in ingresso %d." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" +"%s: Erano attese %d righe nell'argomento in ingresso #%d, ma ve ne sono %d " +"invece." + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" +"%s: Erano attese %d colonne nell'argomento in ingresso #%d, ma ve ne sono %d " +"invece." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s non è un modulo installato" + +msgid "error : Input argument sizes are not valid" +msgstr "errore: le dimensioni dell'argomento in ingresso non sono valide" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "Il test %s non è disponibile dal modulo %s" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" +"%s: Il numero degli argomenti in ingresso è sbagliato: era atteso da %d a " +"%d.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era atteso un vettore " +"riga di stringhe.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era atteso un " +"vettore riga di stringhe.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era atteso un vettore " +"riga di stringhe o una matrice vuota.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era atteso un " +"vettore riga di stringhe o una matrice vuota.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era attesa una " +"stringa.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era attesa una " +"stringa.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: era atteso il nome " +"di un modulo di Scilab.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: era atteso un " +"linguaggio valido.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: era atteso un nome " +"di funzione di un modulo \"%s\".\n" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" +"%s: Il primo argomento in ingresso è sbagliato: era atteso un file con " +"estensione .dia." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "Il test è fallito, RISCONTRATO UN ERRORE mentre si eseguiva %s" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "Il test è fallito. Vedere: fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "Il test è fallito. Vedere: diff -wu %s" + +msgid "Test passed" +msgstr "Il test è stato superato" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: La dimensione dell'argomento in ingresso è sbagliata." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "%s: Il numero degli argomenti in ingresso è sbagliato." + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s non è un modulo o un toolbox installato" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "Il file di rif. (%s) non esiste" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" +"Il file '%s' non segue il formato XUnit di XML .Era atteso 'testsuites' come " +"tag root.\n" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "Nessuna variabile %s_ref è presente nel file di riferimento" diff --git a/modules/development_tools/locales/ja_JP.po b/modules/development_tools/locales/ja_JP.po new file mode 100755 index 000000000..ae3b34f76 --- /dev/null +++ b/modules/development_tools/locales/ja_JP.po @@ -0,0 +1,273 @@ +# Japanese translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2013-06-19 14:20+0000\n" +"Last-Translator: Rui Hirokawa <Unknown>\n" +"Language-Team: Japanese <z-saito@guitar.ocn.ne.jp>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"X-Poedit-Country: Japan\n" +"Language: ja\n" +"X-Poedit-Language: Japanese\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "%s: 入力引数ã®æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™: %d ã‹ã‚‰ %d ã®ç¯„囲ã§æŒ‡å®šã—ã¦ãã ã•ã„." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "%s: 入力引数 #%d ã®åž‹ãŒé–“é•ã£ã¦ã„ã¾ã™: 行列を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "%s: 入力引数 #%d ã®åž‹ãŒé–“é•ã£ã¦ã„ã¾ã™: æ–‡å—列ã®è¡Œåˆ—を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "%s: 入力引数 #%d ã®å¤§ãã•ãŒé–“é•ã£ã¦ã„ã¾ã™: %d è¡Œ %d 列ã®è¡Œåˆ—を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s: 入力引数 #%d ã®å€¤ãŒé–“é•ã£ã¦ã„ã¾ã™: %d より大ãã„値を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "%s: 入力引数 #%d ã®å€¤ãŒé–“é•ã£ã¦ã„ã¾ã™: {%s} ã®ç¯„囲ã§è¨å®šã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "%s: 入力引数 #%d 㨠#%d ã§äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“: 大ãã•ã‚’åŒã˜ã«ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "%s: アサーションãŒå¤±æ•—ã—ã¾ã—ãŸ: %s ã®äºˆå®šã§ã—ãŸãŒ,計算値㯠%s ã§ã—ãŸ" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s: 入力引数ã®æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™: %d 個ã®å¼•æ•°ã‚’指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "%s: 入力引数ã®æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™: %d 個ã®å¼•æ•°ã‚’指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "%s:入力引数 #%d 㨠#%d ã«äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“: åŒã˜åž‹ã‚’指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "%s: 計算çµæžœã¯å®Ÿæ•°ã§ã™ãŒ, 予定ã¯è¤‡ç´ æ•°ã§ã—ãŸ." + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "%s: 計算値ã¯è¤‡ç´ æ•°ã§ã™ãŒ, 実数ã¨ãªã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "%s: アサーションã«å¤±æ•—ã—ã¾ã—ãŸ: 予想値 = %s , 計算値 = %s (å·®ã®å¹³å‡ = %s)" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "%s: 入力引数ã®æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™: %d 個以上ã®å¼•æ•°ã‚’指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "%s: 入力引数 #%d ã®å¤§ãã•ãŒé–“é•ã£ã¦ã„ã¾ã™: æ–‡å—列ベクトルを指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "%s: 入力引数 #%d ã®å€¤ãŒé–“é•ã£ã¦ã„ã¾ã™: è² ã§ãªã„整数を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "%s: 入力引数 #%d ã®å¤§ãã•ãŒé–“é•ã£ã¦ã„ã¾ã™: 空ã§ãªã„行列を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s: %s を評価ã™ã‚‹éš›ã«ã‚¨ãƒ©ãƒ¼ã¯ç™ºç”Ÿã—ã¾ã›ã‚“ã§ã—ãŸ." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s: エラーメッセージ: %s ã‚’æ•´å½¢ä¸ã«ã‚¨ãƒ©ãƒ¼ã‚’発生ã—ã¾ã—ãŸ" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "%s: アサーションãŒå¤±æ•—ã—ã¾ã—ãŸ: 予定ã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ %s ã§ã—ãŸãŒ,計算ã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ %s ã§ã—ãŸ." + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "%s: アサーションãŒå¤±æ•—ã—ã¾ã—ãŸ: 予定ã®ã‚¨ãƒ©ãƒ¼ç•ªå·ã¯ %d ã§ã—ãŸãŒ,計算ã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ç•ªå·ã¯ %d ã§ã—ãŸ." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "%s: 入力引数 #%d ã®åž‹ãŒé–“é•ã£ã¦ã„ã¾ã™: è«–ç†å€¤ã®è¡Œåˆ—を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "%s: アサーションãŒå¤±æ•—ã—ã¾ã—ãŸ: æ¡ä»¶ = %s ã«ä¸æ£ãªã‚¨ãƒ³ãƒˆãƒªãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸ" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "%1$s: 入力引数 %4$s #%5$d 㯠%2$sã¾ãŸã¯ %3$s åž‹ã¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒ, %6$såž‹ã§ã—ãŸ." + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s: ファイル %s ã¯å˜åœ¨ã—ã¾ã›ã‚“。\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s: ファイル %s ã‚’é–‹ã‘ã¾ã›ã‚“.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "%s: 計算çµæžœã®ãƒ•ã‚¡ã‚¤ãƒ« %s ã®å†…容ãŒåŸºæº–ファイルã®å†…容 %s ã¨ç•°ãªã£ã¦ã„ã¾ã™." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s: ファイル %s ã‚’é–‰ã˜ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "%s: 入力引数ã®æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™: %d ã‹ã‚‰ %d 個ã®å¼•æ•°ã‚’指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "%s: 出力引数 %d ãŒå…¥åŠ›å¼•æ•° %d ã®æ•°ã¨ä¸€è‡´ã—ã¾ã›ã‚“." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "%1$s: #%3$d 番目ã®å¼•æ•°ã¯ %2$d è¡Œã¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒ, %4$d è¡Œã§ã—ãŸ." + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "%s: 予定ã§ã¯ %d 列ãŒå…¥åŠ›å¼•æ•° #%d ã«å«ã¾ã‚Œã‚‹ã¯ãšã§ã—ãŸãŒ, %d 列ã¨ãªã‚Šã¾ã—ãŸ." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s ã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ¸ˆã¿ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ã¯ã‚ã‚Šã¾ã›ã‚“." + +msgid "error : Input argument sizes are not valid" +msgstr "エラー: 入力引数ã®å¤§ãã•ãŒé–“é•ã£ã¦ã„ã¾ã™." + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "テスト %s 㯠%s モジュールã§åˆ©ç”¨ã§ãã¾ã›ã‚“." + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "%s: 入力引数ã®æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™: %d ã‹ã‚‰ %d 個ã®å¼•æ•°ã‚’指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "%s: 入力引数 #%d ã®åž‹ãŒé–“é•ã£ã¦ã„ã¾ã™: æ–‡å—列ã®è¡Œé…列を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "%s: 入力引数 #%d ã®å¤§ãã•ãŒé–“é•ã£ã¦ã„ã¾ã™: æ–‡å—列ã®è¡Œé…列を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "%s: 入力引数 #%d ã®åž‹ãŒé–“é•ã£ã¦ã„ã¾ã™: æ–‡å—列ã®è¡Œé…列ã¾ãŸã¯ç©ºã®é…列を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "%s: 入力引数 #%d ã®å¤§ãã•ãŒé–“é•ã£ã¦ã„ã¾ã™: æ–‡å—列ã®è¡Œé…列ã¾ãŸã¯ç©ºã®é…列を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "%s: 入力引数 #%d ã®åž‹ãŒé–“é•ã£ã¦ã„ã¾ã™: æ–‡å—列を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "%s: 入力引数 #%d ã®å¤§ãã•ãŒé–“é•ã£ã¦ã„ã¾ã™: æ–‡å—列を指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "%s: 入力引数 #%d ã®å€¤ãŒé–“é•ã£ã¦ã„ã¾ã™: Scilabモジュールåを指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "%s: 入力引数 #%d ã®å€¤ãŒé–“é•ã£ã¦ã„ã¾ã™: 有効ãªè¨€èªžã‚’指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "%s: 入力引数 #%d ã®å€¤ãŒé–“é•ã£ã¦ã„ã¾ã™: '%s'モジュール関数åを指定ã—ã¦ãã ã•ã„.\n" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "%s: 最åˆã®å…¥åŠ›å¼•æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™: 接尾辞 .dia を有ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’指定ã—ã¦ãã ã•ã„." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "テストãŒå¤±æ•—ã—ã¾ã—ãŸ. %s を実行ä¸ã«ã‚¨ãƒ©ãƒ¼ãŒæ¤œå‡ºã•ã‚Œã¾ã—ãŸ." + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "テストãŒå¤±æ•—ã—ã¾ã—ãŸ. å‚ç…§: fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "テストãŒå¤±æ•—ã—ã¾ã—ãŸ. å‚ç…§: diff -wu %s" + +msgid "Test passed" +msgstr "テストã«åˆæ ¼ã—ã¾ã—ãŸ" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: 入力引数ã®å¤§ãã•ãŒé–“é•ã£ã¦ã„ã¾ã™." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "%s: 入力引数ã®æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™." + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s ã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ¸ˆã¿ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¾ãŸã¯ãƒ„ールボックスã§ã¯ã‚ã‚Šã¾ã›ã‚“." + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "å‚照先ファイル (%s) ãŒå˜åœ¨ã—ã¾ã›ã‚“" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "ファイル'%s'ã¯,XUnit XMLフォーマットã«æº–æ‹ ã—ã¦ã„ã¾ã›ã‚“. ルートタグã«'testsuites'を指定ã—ã¦ãã ã•ã„.\n" + +# +# File: macros/testexamples.sci, line: 17 +# File: macros/testexamples.sci, line: 32 +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "å‚照ファイルã®å¤‰æ•°ã€€%s_ref ã¯ã‚ã‚Šã¾ã›ã‚“" diff --git a/modules/development_tools/locales/pl_PL.po b/modules/development_tools/locales/pl_PL.po new file mode 100755 index 000000000..b2f8ea267 --- /dev/null +++ b/modules/development_tools/locales/pl_PL.po @@ -0,0 +1,287 @@ +# Polish translation for scilab +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2012-03-09 22:54+0000\n" +"Last-Translator: I.Rokach <Unknown>\n" +"Language-Team: Polish <pl@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: pl\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "" +"%s: NieprawidÅ‚owa liczba parametrów wejÅ›ciowych: oczekiwano od %d do %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" +"%s: NieprawidÅ‚owy typ argumentu wejÅ›ciowego nr %d: oczekiwano macierzy.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" +"%s: NieprawidÅ‚owy typ argumentu wejÅ›ciowego nr %d: oczekiwana macierz ciÄ…gów " +"znaków.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" +"%s: NieprawidÅ‚owa wartość argumentu wejÅ›ciowego #%d: musi być > %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" +"%s: Niezgodne argumenty wejÅ›ciowe nr %d oraz nr %d: Oczekiwany taki sam " +"rozmiar.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s: NieprawidÅ‚owa liczba argumentów wejÅ›ciowych: oczekiwano %d.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "%s: NieprawidÅ‚owa liczba argumentów wejÅ›ciowych: oczekiwano %d.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" +"%s: Niezgodne argumenty wejÅ›ciowe nr %d oraz nr %d: Oczekiwany taki sam " +"typ.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "%s: Obliczona wartość jest liczbÄ… rzeczywistÄ…, oczekiwano zespolonej" + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "" +"%s: Obliczona wartość jest liczbÄ… zespolonÄ…, oczekiwano rzeczywistej." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" +"%s: NieprawidÅ‚owa liczba argumentów wejÅ›ciowych: Oczekiwano przynajmniej " +"%d.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s: Brak bÅ‚Ä™du przy obliczaniu %s." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s: BÅ‚Ä…d przy formatowaniu informacji o bÅ‚Ä™dzie: %s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s: Plik %s nie istnieje.\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s: Nie można otworzyć pliku %s.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" +"%s: Zawartość pliku z obliczeniami %s różni siÄ™ od zawartoÅ›ci wzorcowego " +"pliku %s." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s: Nie można zamknąć plik %s.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" +"%s: NieprawidÅ‚owa liczba argumentów wejÅ›ciowych: oczekiwano od %d do %d.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" +"%s: Liczba parametrów wyjÅ›ciowych %d nie jest zgodna z liczbÄ… parametrów " +"wejÅ›ciowych %d." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" +"%s: W argumencie wejÅ›ciowym nr %d oczekiwano na %d kolumn, ale jest %d." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s nie jest zainstalowanym moduÅ‚em" + +msgid "error : Input argument sizes are not valid" +msgstr "bÅ‚Ä…d : Rozmiary parametru wejÅ›ciowego nie sÄ… wÅ‚aÅ›ciwe" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "Testowy %s jest niedostÄ™pny z poziomu moduÅ‚u %s" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" +"%s: ZÅ‚y pierwszy argument wejÅ›ciowy: Oczekiwany plik z rozszerzeniem .dia." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "Test przerwany, ERROR DETECTED podczas wykonywania %s" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "Test zakoÅ„czony niepowodzeniem. Sprawdź : fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "Test zakoÅ„czony niepowodzeniem. Sprawdź : diff -wu %s" + +msgid "Test passed" +msgstr "Test ukoÅ„czony sukcesem" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: ZÅ‚y rozmiar parametru wejÅ›ciowego." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "" + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s nie jest zainstalowanym moduÅ‚em lub przybornikiem." + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "Plik referencyjny (%s) nie istnieje" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "Brak zmiennej %s_ref w pliku referencyjnym" diff --git a/modules/development_tools/locales/pt_BR.po b/modules/development_tools/locales/pt_BR.po new file mode 100755 index 000000000..04343d129 --- /dev/null +++ b/modules/development_tools/locales/pt_BR.po @@ -0,0 +1,306 @@ +# Brazilian Portuguese translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2012-05-06 00:13+0000\n" +"Last-Translator: Thiago de Melo <tmelo.mat@gmail.com>\n" +"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: pt_BR\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "%s: Número errado de argumentos de entrada: %d de %d é esperado." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" +"%s: Tipo incorreto para o argumento de entrada #%d: esperava-se uma matriz.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" +"%s: Tipo incorreto para o argumento de entrada #%d: esperava-se uma matriz " +"de textos.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" +"%s: Tamanho errado para argumento de entrada #%d: matriz %d-por-%d é " +"esperada.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" +"%s: Valor incorreto para o argumento de entrada #%d: deve ser > %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" +"%s: Valor incorreto para o argumento de entrada #%d: deve estar no conjunto " +"{%s}.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" +"%s: Os argumentos de entrada #%d e #%d estão incompatÃveis: esperava-se as " +"mesmas dimensões.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "%s: Declaração falhou: esperado = %s ao passo que calculado = %s" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s: Quantidade incorreta de argumentos de entrada: esperava-se %d.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "%s: Quantidade incorreta de argumentos de entrada: esperava-se %d.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" +"%s: argumentos de entrada #%d e #%d incompatÃveis: mesmos tipos são " +"esperados.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "%s: o calculado é real, mas o esperado é complexo." + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "%s: o calculado é complexo, mas o esperado é real." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de entrada: esperava-se pelo menos " +"%d.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" +"%s: tamanho errado para argumento de entrada #%d: um vetor string é " +"esperado.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" +"%s: Valor errado para argumento de entrada #%d: inteiros não-negativos são " +"esperados.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" +"%s: Tamanho incorreto para o argumento de entrada #%d: esperava-se uma " +"matriz não vazia.\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s: Nenhum erro foi produzido durante a avaliação de %s." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s: Erro durante a formatação da mensagem de erro: %s." + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" +"%s: Suposição falhou: mensagem de erro esperada = %s, enquanto mensagem de " +"erro calculada = %s." + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" +"%s: Suposição falhou: número de erro esperado = %d, enquanto número de erro " +"calculado = %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" +"%s: Tipo errado para argumento de entrada #%d: matriz Booleana é esperada.\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "%s: Suposição falhou: entrada falsa encontrada na condição = %s" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" +"%s: Tipo %s ou %s esperado para argumento %s de entrada #%d, mas o recebido " +"foi %s." + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s: O arquivo %s não existe.\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s: Não é possÃvel abrir o arquivo %s.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" +"%s: O conteúdo do arquivo %s calculado é diferente do conteúdo do arquivo %s " +"de referência." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s: ImpossÃvel fechar arquivo %s.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de entrada: esperava-se de %d a %d.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" +"%s: O número %d de argumentos de saÃda não coincide com o número %d de " +"argumentos de entrada." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" +"%s: Esperada %d linhas no argumento de entrada #%d, mas %d linhas foram " +"encontradas." + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" +"%s: Esperada %d colunas no argumento de entrada #%d, mas %d colunas foram " +"encontradas." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s não é um módulo instalado" + +msgid "error : Input argument sizes are not valid" +msgstr "erro: As dimensões do argumento de entrada não são válidas" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "O teste %s do módulo %s não está disponÃvel" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" +"%s: O primeiro argumento de entrada está incorreto: esperava-se um arquivo " +"com extensão .dia." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "O teste falhou: ERRO DETECTADO durante a execução de %s" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "O teste falhou. Veja: fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "O teste falhou. Veja: diff -wu %s" + +msgid "Test passed" +msgstr "Passou no teste" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: Tamanho incorreto para o argumento de entrada." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "" + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s não é um módulo ou uma caixa de ferramentas instalado" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "O arquivo ref (%s) não existe" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "Nenhuma variável %s_ref no arquivo de referência" diff --git a/modules/development_tools/locales/ru_RU.po b/modules/development_tools/locales/ru_RU.po new file mode 100755 index 000000000..0818575b2 --- /dev/null +++ b/modules/development_tools/locales/ru_RU.po @@ -0,0 +1,311 @@ +# Russian translation for scilab +# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2013-06-19 14:11+0000\n" +"Last-Translator: Stanislav V. Kroter <krotersv@gmail.com>\n" +"Language-Team: Russian <ru@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: ru\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "%s: Ðеверное количеÑтво входных параметров: ожидалоÑÑŒ от %d до %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "%s: Ðеверный тип входного аргумента â„–%d: ОжидалаÑÑŒ матрица.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" +"%s: Ðеверный тип входного аргумента â„–%d: ОжидалаÑÑŒ матрица Ñтроковых " +"значений.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" +"%s: Ðеверный размер входного параметра #%d: ожидалаÑÑŒ матрица %d-на-%d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s: Ðеверное значение входного параметра â„–%d: должно быть > %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" +"%s: Ðеверное значение входного параметра #%d: должно входить в множеÑтво " +"{%s}.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" +"%s: ÐеÑовмеÑтимые входные параметры â„–%d и â„–%d: ожидалиÑÑŒ одинаковые " +"размеры.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "%s: Формулировка не верна: ожидалоÑÑŒ = %s тогда как вычиÑлено = %s" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s: Ðеверное количеÑтво входных параметров: ожидалоÑÑŒ %d.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "%s: Ðеверное количеÑтво входных параметров: ожидалоÑÑŒ %d.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" +"%s: ÐеÑовмеÑтимые входные параметры #%d и #%d: ожидалÑÑ Ð¾Ð´Ð¸Ð½Ð°ÐºÐ¾Ð²Ñ‹Ð¹ тип.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "" +"%s: ВычиÑленное значение дейÑтвительное , Ñ…Ð¾Ñ‚Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð»Ð¾ÑÑŒ комплекÑное." + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "" +"%s: ВычиÑленное значение комплекÑное , Ñ…Ð¾Ñ‚Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð»Ð¾ÑÑŒ дейÑтвительное." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" +"%s: Утверждение не получилоÑÑŒ: ожидалоÑÑŒ = %s, а вычиÑлено = %s (ÑреднÑÑ " +"разница = %s)" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "%s: Ðеверное количеÑтво входных параметров: ожидалоÑÑŒ не менее %d.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "%s: Ðеверный размер входного аргумента â„–%d: ожидалÑÑ Ð²ÐµÐºÑ‚Ð¾Ñ€ Ñтрок.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" +"%s: Ðеверный тип входного параметра â„–%d: ожидалоÑÑŒ неотрицательно целое " +"чиÑло.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" +"%s: Ðеверный размер входного аргумента â„–%d: ожидалаÑÑŒ непуÑÑ‚Ð°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð°.\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s: Ðе произошло ошибок при оценке %s." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s: Ошибка при форматировании ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾Ð± ощибке: %s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" +"%s: Формулировка не верна: ожидаемое Ñообщение об ошибке = %s тогда как " +"вычиÑлено Ñообщение об ошибке = %s." + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" +"%s: Формулировка не верна: ожидаемый номер ошибки = %d тогда как вычиÑлен " +"номер ошибки = %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "%s: Ðеверный тип входного аргумента â„–%d: ожидалаÑÑŒ булева матрица.\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "%s: Формулировка не верна: найден ложный Ñлемент в уÑловии = %s" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" +"%s: ОжидалÑÑ Ñ‚Ð¸Ð¿ %s или %s Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ параметра %s #%d, но вмеÑто него " +"получен %s." + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s: Файл %s не ÑущеÑтвует.\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s: Ðе удалоÑÑŒ открыть файл %s.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" +"%s: Содержимое раÑÑчитанного файла %s отличаетÑÑ Ð¾Ñ‚ Ñодержимого Ñталонного " +"файла %s." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s: Ðе удалоÑÑŒ закрыть файл %s.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "%s: Ðеверное количеÑтво входных параметров: ожидалоÑÑŒ от %d до %d.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" +"%s: КоличеÑтво выходных параметров %d не Ñовпадает Ñ ÐºÐ¾Ð»Ð¸Ñ‡ÐµÑтвом входных " +"параметров %d." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" +"%s: ОжидалоÑÑŒ %d Ñтолбцов во входном параметре #%d, но получено %d Ñтолбцов." + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" +"%s: ОжидалоÑÑŒ %d Ñтолбцов во входном параметре #%d, но получено %d " +"Ñтолбцов." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s не ÑвлÑетÑÑ ÑƒÑтановленным модулем" + +msgid "error : Input argument sizes are not valid" +msgstr "Ошибка: неверные размеры входных параметров" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "ТеÑÑ‚ %s недоÑтупен из Ð¼Ð¾Ð´ÑƒÐ»Ñ %s" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "%s: Ðеверное количеÑтво входных аргументов: ОжидалоÑÑŒ от %d до %d.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s: Ðеверный тип входного аргумента â„–%d: ожидалÑÑ Ð¼Ð°ÑÑив-Ñтрока Ñтроковых " +"значений.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s: Ðеверный размер входного аргумента â„–%d: ожидалÑÑ Ð¼Ð°ÑÑив-Ñтрока Ñтроковых " +"значений.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s: Ðеверный тип входного аргумента â„–%d: ожидалÑÑ Ð¼Ð°ÑÑив-Ñтрока Ñтроковых " +"значений или пуÑÑ‚Ð°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð°.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s: Ðеверный размер входного аргумента â„–%d: ожидалÑÑ Ð¼Ð°ÑÑив-Ñтрока Ñтроковых " +"значений или пуÑÑ‚Ð°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð°.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "%s: Ðеверный тип входного аргумента â„–%d: ОжидалаÑÑŒ Ñтрока.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "%s: Ðеверный размер входного параметра â„–%d: ожидалаÑÑŒ Ñтрока.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" +"%s: Ðеверное значение входного аргумента â„–%d: ожидалоÑÑŒ Ð¸Ð¼Ñ Ð¼Ð¾Ð´ÑƒÐ»Ñ Scilab.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" +"%s: Ðеверное значение входного аргумента â„–%d: ожидалÑÑ Ð´Ð¾Ð¿ÑƒÑтимый Ñзык.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" +"%s: Ðеверное значение входного аргумента â„–%d: ожидалоÑÑŒ Ð¸Ð¼Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¸ Ð¼Ð¾Ð´ÑƒÐ»Ñ " +"'%s'.\n" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" +"%s: Ðеверный первый входной параметр: ожидалÑÑ Ñ„Ð°Ð¹Ð» Ñ Ñ€Ð°Ñширением .dia." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "ТеÑÑ‚ не пройден: обнаружена ошибка во Ð²Ñ€ÐµÐ¼Ñ Ð¸ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ %s" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "ТеÑÑ‚ не пройден. См.: fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "ТеÑÑ‚ не пройден. См.: diff -wu %s" + +msgid "Test passed" +msgstr "ТеÑÑ‚ пройден" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: Ðеверный размер входного параметра." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "%s: Ðеверное количеÑтво входных аргументов." + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s не ÑвлÑетÑÑ ÑƒÑтановленным модулем или набором инÑтрументов" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "Файл ÑÑылок (%s) не ÑущеÑтвует" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" +"Файл '%s' не ÑоответÑтвует формату XUnit XML. ОжидалоÑÑŒ, что корневой Ñ‚Ñг " +"будет 'testsuites'.\n" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "Ðет переменной %s_ref в файле ÑÑылок" diff --git a/modules/development_tools/locales/uk_UA.po b/modules/development_tools/locales/uk_UA.po new file mode 100755 index 000000000..4cf352144 --- /dev/null +++ b/modules/development_tools/locales/uk_UA.po @@ -0,0 +1,331 @@ +# Ukrainian translation for scilab +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the scilab package. +# +# FIRST AUTHOR <EMAIL@ADDRESS>, 2010. +# Yuri Chornoivan <yurchor@ukr.net>, 2010. +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2013-06-17 16:26+0000\n" +"Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n" +"Language-Team: Ukrainian <translation@linux.org.ua>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: uk\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "%s: помилкова кількіÑÑ‚ÑŒ вхідних параметрів: мало бути від %d до %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра â„–%d: Ñлід викориÑтовувати матрицю.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра â„–%d: Ñлід викориÑтовувати матрицю з " +"Ñ€Ñдків.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" +"%s: помилкова розмірніÑÑ‚ÑŒ вхідного параметра â„–%d: мала бути Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ñ %d на " +"%d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" +"%s: помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¾Ð³Ð¾ параметра â„–%d: Ñлід викориÑтовувати > %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" +"%s: помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¾Ð³Ð¾ параметра â„–%d. Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” належати набору " +"{%s}.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" +"%s: неÑуміÑні вхідні параметри â„–%d Ñ– â„–%d: Ñлід викориÑтовувати однакову " +"розмірніÑÑ‚ÑŒ.\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "%s: помилка порівнÑннÑ. Мало бути %s, обчиÑлене Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ â€” %s" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s: помилкова кількіÑÑ‚ÑŒ вхідних параметрів: мало бути %d.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "" +"%s: помилкова кількіÑÑ‚ÑŒ вхідних параметрів: Ñлід викориÑтовувати %d.\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" +"%s: неÑуміÑні вхідні параметри â„–%d Ñ– â„–%d. Типи параметрів мали збігатиÑÑ.\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "" +"%s: обчиÑлено дійÑне значеннÑ, а потрібне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” бути комплекÑним." + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "" +"%s: обчиÑлено комплекÑне значеннÑ, а потрібне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” бути дійÑним." + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" +"%s: помилка під Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸: мало бути = %s, результат обчиÑлень = %s " +"(ÑÐµÑ€ÐµÐ´Ð½Ñ Ñ€Ñ–Ð·Ð½Ð¸Ñ†Ñ = %s)" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" +"%s: помилкова кількіÑÑ‚ÑŒ вхідних параметрів: Ñлід викориÑтовувати не менше за " +"%d.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" +"%s: помилкова розмірніÑÑ‚ÑŒ вхідного параметра â„–%d: мало бути вказано вектор-" +"Ñ€Ñдок.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" +"%s: помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¾Ð³Ð¾ параметра â„–%d: Ñлід було вказувати " +"невід’ємні цілі чиÑла.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" +"%s: помилковий розмір вхідного параметра â„–%d: Ñлід викориÑтовувати непорожню " +"матрицю.\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%s: під Ñ‡Ð°Ñ Ð¾Ð±Ñ‡Ð¸ÑÐ»ÐµÐ½Ð½Ñ %s помилок не ÑталоÑÑ." + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%s: помилка під Ñ‡Ð°Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾ помилку: %s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" +"%s: помилка порівнÑннÑ. Мало бути Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾ помилку %s, обчиÑлене " +"Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ â€” %s." + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" +"%s: помилка порівнÑннÑ. Мав бути номер помилки %d, обчиÑлений номер помилки " +"— %d." + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра â„–%d: мало бути вказано матрицю з " +"булевих значень.\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" +"%s: помилка порівнÑннÑ. Знайдено Ð·Ð°Ð¿Ð¸Ñ Ð·Ñ– значеннÑм «false» в умові %s" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" +"%s: мав бути тип %s або %s for input argument %s #%d, but got %s instead." + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s: файла з назвою %s не Ñ–Ñнує.\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s: не вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ файл %s.\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" +"%s: вміÑÑ‚ файла обчиÑлених даних %s не збігаєтьÑÑ Ð· вміÑтом еталонного файла " +"%s." + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s: не вдалоÑÑ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ð¸ файл %s.\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" +"%s: помилкова кількіÑÑ‚ÑŒ вхідних параметрів: Ñлід викориÑтовувати від %d до " +"%d.\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" +"%s: кількіÑÑ‚ÑŒ вихідних параметрів %d не збігаєтьÑÑ Ð· кількіÑÑ‚ÑŽ вхідних " +"параметрів %d." + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" +"%s: мало бути %d Ñ€Ñдків у вхідному параметрі â„–%d, виÑвлено %d Ñ€Ñдків." + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" +"%s: мало бути %d Ñтовпчиків у вхідному параметрі â„–%d, виÑвлено %d Ñтовпчиків." + +#, c-format +msgid "%s is not an installed module" +msgstr "%s не належить до вÑтановлених модулів" + +msgid "error : Input argument sizes are not valid" +msgstr "помилка: некоректні розмірноÑÑ‚Ñ– вхідних параметрів" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "ТеÑÑ‚ %s недоÑтупний з Ð¼Ð¾Ð´ÑƒÐ»Ñ %s" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" +"%s: помилкова кількіÑÑ‚ÑŒ вхідних параметрів: Ñлід викориÑтовувати від %d до " +"%d параметрів.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра â„–%d: мало бути вказано Ñ€Ñдковий маÑив " +"з Ñ€Ñдків.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" +"%s: помилкова розмірніÑÑ‚ÑŒ вхідного параметра â„–%d: мало бути вказано Ñ€Ñдковий " +"маÑив з Ñ€Ñдків.\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра â„–%d: мало бути вказано Ñ€Ñдковий маÑив " +"з Ñ€Ñдків або порожню матрицю.\n" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" +"%s: помилкова розмірніÑÑ‚ÑŒ вхідного параметра â„–%d: мало бути вказано Ñ€Ñдковий " +"маÑив з Ñ€Ñдків або порожню матрицю.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра â„–%d: Ñлід викориÑтовувати тип " +"«string».\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" +"%s: помилковий розмір вхідного параметра â„–%d: Ñлід викориÑтовувати Ñ€Ñдок.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" +"%s: помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¾Ð³Ð¾ параметра â„–%d: мало бути назву Ð¼Ð¾Ð´ÑƒÐ»Ñ " +"Scilab.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" +"%s: помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¾Ð³Ð¾ параметра â„–%d: Ñлід було вказати коректну " +"мову.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" +"%s: помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¾Ð³Ð¾ параметра â„–%d: Ñлід було вказати назву " +"функції Ð¼Ð¾Ð´ÑƒÐ»Ñ Â«%s».\n" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "" +"%s: помилковий перший параметр: Ñлід вказувати файл з ÑуфікÑом назви .dia." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ð¹Ñ‚Ð¸ перевірку. Під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ %s виÑвлено помилку" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ð¹Ñ‚Ð¸ перевірку. Див. fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ð¹Ñ‚Ð¸ перевірку. Див.: diff -wu %s" + +msgid "Test passed" +msgstr "ТеÑÑ‚ пройдено" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: помилкова розмірніÑÑ‚ÑŒ вхідного параметра." + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "%s: помилкова кількіÑÑ‚ÑŒ вхідних параметрів." + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s не належить до вÑтановлених модулів або наборів інÑтрументів" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "Еталонного файла (%s) не Ñ–Ñнує" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" +"У файлі «%s» не виконуєтьÑÑ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ XML XUnit. Кореневим теґом мав бути " +"«testsuites».\n" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "У еталонному файлі немає змінної %s_ref" diff --git a/modules/development_tools/locales/zh_CN.po b/modules/development_tools/locales/zh_CN.po new file mode 100755 index 000000000..57dc58972 --- /dev/null +++ b/modules/development_tools/locales/zh_CN.po @@ -0,0 +1,268 @@ +# Simplified Chinese translation for scilab +# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2012-06-05 02:19+0000\n" +"Last-Translator: Wesh <Unknown>\n" +"Language-Team: Simplified Chinese <zh_CN@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: \n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "%s:输入å‚数个数有误:应为%d到%d个。" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "%s:第%d个输入å‚数的类型有误:应为矩阵。\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "%s:第%d个输入å‚数的类型有误,应为å—符串矩阵。\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "%s:第%d个输入å‚数的尺寸有误:应为%d×%d的矩阵。\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s:第%d个输入å‚数值有误,应大于%d。\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "%s:第%d个输入å‚数的值有误:必须在集åˆ{%s}ä¸ã€‚\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "%s:第%d和第%d个输入å‚æ•°ä¸å…¼å®¹ï¼šåº”具有相åŒå°ºå¯¸ã€‚\n" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "%s:æ–言失败:期待值为%s,计算值为%s" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "%s:输入å‚数个数有误:应为%d个。\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "%s:输入å‚数个数有误:应为%d个。\n" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "%s:第 %d 和第 %d 个输入å‚æ•°ä¸åŒ¹é…:应为相åŒç±»åž‹ã€‚\n" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "%s:计算值为实数,应为å¤æ•°ã€‚" + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "%s:计算值为å¤æ•°ï¼Œåº”为实数。" + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "%s:输入å‚数个数有误:至少为 %d 个。\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "%s:第%d个输入å‚数的大å°é”™è¯¯ï¼šåº”该为å—符串å‘é‡ã€‚\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "%s:第 %d 个输入å‚数值有误:应为éžè´Ÿæ•´æ•°ã€‚\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "%s:第%d个输入å‚数的大å°é”™è¯¯ï¼šåº”该为éžç©ºçŸ©é˜µã€‚\n" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "%sï¼šéªŒè¯ %s 的过程完全æ£ç¡®ã€‚" + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "%sï¼šæ ¼å¼åŒ–错误信æ¯æ—¶å‡ºé”™ï¼š%s" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "%1$s:æ–言错误:计算所得的错误信æ¯ä¸º %3$s,应为 %2$s。" + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "%1$s:æ–言错误:计算所得的错误å·ä¸º %3$d,应为 %2$d。" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "%s:第 %d 个输入å‚数的类型有误:应为布尔矩阵。\n" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "%s:文件%sä¸å˜åœ¨ã€‚\n" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "%s:ä¸èƒ½æ‰“开文件%s。\n" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "%s:ä¸èƒ½å…³é—文件%s。\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "%s:输入å‚数的数目错误:应该为%d到%d个。\n" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "%s:输出å‚æ•°%d的数目和输入å‚æ•°çš„%dçš„æ•°ç›®ä¸åŒ¹é…。" + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" + +#, c-format +msgid "%s is not an installed module" +msgstr "æ¨¡å— %s 没有安装" + +msgid "error : Input argument sizes are not valid" +msgstr "错误:输入å‚数的大å°ä¸æ£ç¡®" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "测试 %s æ— æ³•ä»Žæ¨¡å— %s 找到。" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "%s:第一个输入å‚数错误:应该是带有 .dia 扩展å的文件。" + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "当执行 %s 时测试失败(ERROR DETECTED)。" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "测试失败。请å‚看:fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "测试失败。请å‚看:diff -wu %s" + +msgid "Test passed" +msgstr "测试通过" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s:输入å‚数的大å°é”™è¯¯ã€‚" + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "" + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s是未安装的模å—或工具箱" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "ref文件 (%s) ä¸å˜åœ¨" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "在reference文件ä¸æ²¡æœ‰ %s_ref å˜é‡" diff --git a/modules/development_tools/locales/zh_TW.po b/modules/development_tools/locales/zh_TW.po new file mode 100755 index 000000000..f8bbd13ff --- /dev/null +++ b/modules/development_tools/locales/zh_TW.po @@ -0,0 +1,268 @@ +# Traditional Chinese translation for scilab +# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2011-09-02 08:23+0000\n" +"Last-Translator: Scilab.team <Unknown>\n" +"Language-Team: Traditional Chinese <zh_TW@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: \n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected." +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" +msgstr "" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" +msgstr "" + +#, c-format +msgid "%s: Assertion failed: expected = %s while computed = %s" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" +msgstr "" + +#, c-format +msgid "%s: Computed is real, but expected is complex." +msgstr "" + +#, c-format +msgid "%s: Computed is complex, but expected is real." +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument: At least %d expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string vector expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Non-negative integers expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: No error was produced while evaluating %s." +msgstr "" + +#, c-format +msgid "%s: Error while formatting the error message: %s" +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected error message = %s while computed error " +"message = %s." +msgstr "" + +#, c-format +msgid "" +"%s: Assertion failed: expected error number = %d while computed error number " +"= %d." +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Assertion failed: found false entry in condition = %s" +msgstr "" + +#, c-format +msgid "" +"%s: Expected type %s or %s for input argument %s #%d, but got %s instead." +msgstr "" + +#, c-format +msgid "%s: The file %s does not exist.\n" +msgstr "" + +#, c-format +msgid "%s: Cannot open file %s.\n" +msgstr "" + +#, c-format +msgid "" +"%s: The content of computed file %s is different from the content of " +"reference file %s." +msgstr "" + +#, c-format +msgid "%s: Cannot close file %s.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input arguments: %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: The number of output arguments %d do not match the number of input " +"arguments %d." +msgstr "" + +#, c-format +msgid "" +"%s: Expected %d rows in input argument #%d, but found %d rows instead." +msgstr "" + +#, c-format +msgid "" +"%s: Expected %d columns in input argument #%d, but found %d columns instead." +msgstr "" + +#, c-format +msgid "%s is not an installed module" +msgstr "%s 並éžå·²å®‰è£ä¹‹æ¨¡çµ„" + +msgid "error : Input argument sizes are not valid" +msgstr "%s: 輸入åƒæ•¸é•·åº¦éŒ¯èª¤" + +#, c-format +msgid "The test %s is not available from the %s module" +msgstr "測試 %s ä¸åœ¨æ¨¡çµ„ %s å…§" + +#, c-format +msgid "%s: Wrong number of input argument(s): %d to %d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong size for input argument #%d: A row array of strings or empty " +"matrix expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: A string expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A Scilab module name expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: A valid language expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: A '%s' module function name " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong first input argument: File with .dia suffix expected." +msgstr "%s: 第一輸入åƒæ•¸éŒ¯èª¤: 檔案應以 .dia 為延伸å." + +#, c-format +msgid "Test failed ERROR DETECTED while executing %s" +msgstr "測試錯誤, 執行 %s æ™‚å‡ºç¾ ERROR DETECTED 訊æ¯" + +#, c-format +msgid "Test Failed. See : fc /L /N %s" +msgstr "測試錯誤, åƒè€ƒ : fc /L /N %s" + +#, c-format +msgid "Test Failed. See : diff -wu %s" +msgstr "測試錯誤, åƒè€ƒ : diff -wu %s" + +msgid "Test passed" +msgstr "測試通éŽ" + +#, c-format +msgid "%s: Wrong size for input argument." +msgstr "%s: 輸入åƒæ•¸é•·åº¦éŒ¯èª¤" + +#, c-format +msgid "%s: Wrong number of input arguments." +msgstr "" + +#, c-format +msgid "%s is not an installed module or toolbox" +msgstr "%s ä¸æ˜¯ä¸€å€‹è¢«å®‰è£çš„模組或工具箱" + +#, c-format +msgid "The ref file (%s) doesn't exist" +msgstr "åƒè€ƒæª” (%s) ä¸å˜åœ¨" + +#, c-format +msgid "" +"The file '%s' is not following the XUnit XML format. Root tag expected " +"'testsuites'.\n" +msgstr "" + +#, c-format +msgid "No variable %s_ref in reference file" +msgstr "åƒè€ƒæª” (reference file) 未å«è®Šæ•¸ %s" diff --git a/modules/development_tools/macros/assert/assert_checkalmostequal.bin b/modules/development_tools/macros/assert/assert_checkalmostequal.bin Binary files differnew file mode 100755 index 000000000..163207296 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkalmostequal.bin diff --git a/modules/development_tools/macros/assert/assert_checkalmostequal.sci b/modules/development_tools/macros/assert/assert_checkalmostequal.sci new file mode 100755 index 000000000..fdab30309 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkalmostequal.sci @@ -0,0 +1,191 @@ +// Copyright (C) 2008 - 2009 - INRIA - Michael Baudin +// Copyright (C) 2009 - 2011 - DIGITEO - Michael Baudin +// Copyright (C) 2012 - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function [flag,errmsg] = assert_checkalmostequal ( varargin ) + // Check that computed and expected are numerically close. + + [lhs,rhs]=argn() + if ( and(rhs <> [2 3 4 5] ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d to %d expected.") , "assert_checkalmostequal" , 2 , 5 ) + error(errmsg) + end + // + // Get arguments + computed = varargin(1) + expected = varargin(2) + reltol = argindefault ( rhs , varargin , 3 , sqrt(%eps) ) + abstol = argindefault ( rhs , varargin , 4 , 0 ) + comptype = argindefault ( rhs , varargin , 5 , "element" ) + // + // Check types of variables + if ( and(typeof(computed) <> ["constant" "sparse" "hypermat"]) ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_checkalmostequal" , 1 ) + error(errmsg) + end + if ( and(typeof(expected) <> ["constant" "sparse" "hypermat"]) ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_checkalmostequal" , 2 ) + error(errmsg) + end + if ( typeof(reltol) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_checkalmostequal" , 3 ) + error(errmsg) + end + if ( typeof(abstol) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_checkalmostequal" , 4 ) + error(errmsg) + end + if ( typeof(comptype) <> "string" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkalmostequal" , 5 ) + error(errmsg) + end + // + // Check sizes of variables + if ( size(reltol,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkalmostequal" , 3 , 1 , 1 ) + error(errmsg) + end + if ( size(abstol,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkalmostequal" , 4 , 1 , 1 ) + error(errmsg) + end + if ( size(comptype,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkalmostequal" , 5 , 1 , 1 ) + error(errmsg) + end + // + // Check values of variables + if ( reltol < 0 ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Must be > %d.\n") , "assert_checkalmostequal" , 3 , 0 ) + error(errmsg) + end + if ( abstol < 0 ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Must be > %d.\n") , "assert_checkalmostequal" , 4 , 0 ) + error(errmsg) + end + if ( and ( comptype <> ["matrix" "element"] ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Must be in the set {%s}.\n") , "assert_checkalmostequal" , 5 , """matrix"",""element""" ) + error(errmsg) + end + // + // Proceed... + ncom = size(computed) + nexp = size(expected) + if ( or(ncom <> nexp) ) then + errmsg = sprintf ( gettext ( "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n" ) , "assert_checkalmostequal" , 1 , 2 ) + error(errmsg) + end + // + areequal_re = assert_arealmostequal ( real(computed) , real(expected) , reltol , abstol , comptype ) + if ( areequal_re ) then + areequal = assert_arealmostequal ( imag(computed) , imag(expected) , reltol , abstol , comptype ) + else + areequal = %f + end + // + if ( areequal ) then + flag = %t + errmsg = "" + else + flag = %f + // Change the message if the matrix contains more than one value + if ( size(expected,"*") == 1 ) then + estr = string(expected) + else + estr = "[" + string(expected(1)) + " ...]" + end + if ( size(computed,"*") == 1 ) then + cstr = string(computed) + else + cstr = "[" + string(computed(1)) + " ...]" + end + relstr = string(reltol) + absstr = string(abstol) + errmsg = msprintf(gettext("%s: Assertion failed: expected = %s while computed = %s"),"assert_checkalmostequal",estr,cstr) + if ( lhs < 2 ) then + // If no output variable is given, generate an error + assert_generror ( errmsg ) + end + end +endfunction + +// Returns the indices where +// * kpinf : x(kpinf) == +%inf, +// * kninf : x(kninf) == -%inf, +// * knan : x(knan) is a %nan +// * kreg : x(kreg) is not an infinity, not a nan +// * xreg = x(kreg) +// These 4 sets of indices have no intersection. +// +// Example : +// x = [1 2 3 -%inf %inf %nan %inf %nan -%inf 4 5 6] +// [kpinf , kninf , knan , kreg , xreg] = infnanindices ( x ) +// xreg = [1 2 3 4 5 6] +// kreg = [1 2 3 10 11 12] +// knan = [6 8] +// kninf = [4 9] +// kpinf = [5 7] +function [kpinf , kninf , knan , kreg , xreg] = infnanindices ( x ) + kpinf = find(x==%inf) + kninf = find(x==-%inf) + knan = find(isnan(x)) + kreg = find(abs(x)<>%inf & ~isnan(x)) + xreg = x(kreg) +endfunction + + +function areequal = assert_arealmostequal ( computed , expected , reltol , abstol , comptype ) + // + // Decompose the expected value into nan indices, inf indices and regular indices + // This allows to solve the following issue: + // if computed is %inf and expected is %inf, the difference is %nan, + // which makes the computations fail. + if ( computed == [] & expected == []) then + areequal = %t + return + end + [kcpinf , kcninf , kcnan , kcreg , creg] = infnanindices ( computed ) + [kepinf , keninf , kenan , kereg , ereg] = infnanindices ( expected ) + // + if ( comptype == "matrix" ) then + areclose = ( norm ( creg - ereg ) <= reltol * max(norm(ereg),norm(creg) ) + abstol ) + else + if (creg==[]&ereg==[]) then + areclose=%t + elseif (creg<>[]&ereg==[]) then + areclose=%f + elseif (creg==[]&ereg<>[]) then + areclose=%f + else + entries = ( abs(creg-ereg) <= reltol * max(abs(ereg),abs(creg)) + abstol ) + // Compute the global condition from the entries conditions + areclose = and(entries) + end + end + // The regular values must be almost equal and + // * the +%inf must be at the same place, + // * the -%inf must be at the same place, + // * the %nan must be at the same place. + areequal = ( areclose & and(kcpinf == kepinf) & and(kcninf == keninf) & and(kcnan == kenan) ) +endfunction +function argin = argindefault ( rhs , vararglist , ivar , default ) + // Returns the value of the input argument #ivar. + // If this argument was not provided, or was equal to the + // empty matrix, returns the default value. + if ( rhs < ivar ) then + argin = default + else + if ( vararglist(ivar) <> [] ) then + argin = vararglist(ivar) + else + argin = default + end + end +endfunction + diff --git a/modules/development_tools/macros/assert/assert_checkequal.bin b/modules/development_tools/macros/assert/assert_checkequal.bin Binary files differnew file mode 100755 index 000000000..d2c973849 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkequal.bin diff --git a/modules/development_tools/macros/assert/assert_checkequal.sci b/modules/development_tools/macros/assert/assert_checkequal.sci new file mode 100755 index 000000000..444980cbd --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkequal.sci @@ -0,0 +1,164 @@ +// Copyright (C) 2008-2009 - INRIA - Michael Baudin +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function [flag,errmsg] = assert_checkequal ( computed , expected ) + // Check that computed and expected are equal. + + function flag = comparedoubles ( computed , expected ) + [cnonan , cnumb] = mythrownan(computed) + [enonan , enumb] = mythrownan(expected) + if ( and(enonan == cnonan) & and(enumb == cnumb) ) then + flag = %t + else + flag = %f + end + endfunction + + function [nonan,numb] = mythrownan(x) + // + // + // Copyright (C) 2000 - INRIA - Carlos Klimann + // Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin + //This function returns in vector nonan the values + //(ignoring the NANs) of a vector or matrix x and in the + //corresponding places of vector numb the indexes of the + //value. + // + //For a vector or matrix x, [nonan,numb]=thrownan(x) + //considers x, whatever his dimensions are, like a linear + //vector (columns first). + // + // + [lhs,rhs]=argn(0) + if ( rhs<>1 ) then + error(msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"),"thrownan",1)) + end + numb=find(bool2s(~isnan(x))) + nonan=x(~isnan(x)) + endfunction + + [lhs,rhs]=argn() + if ( rhs <> 2 ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d expected.\n") , "assert_checkequal" , 2 ) + error(errmsg) + end + + // Check types of variables + if ( typeof(computed) <> typeof(expected) ) then + errmsg = sprintf ( gettext ( "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" ) , "assert_checkequal" , 1 , 2 ) + error(errmsg) + end + + // Check hypermat type + if (typeof(computed) == "hypermat") then + // Check on first element type + if (typeof(computed(1)) <> typeof(expected(1))) then + errmsg = sprintf ( gettext ( "%s: Incompatible input arguments #%d and #%d: Same types expected.\n" ) , "assert_checkequal" , 1 , 2 ) + error(errmsg) + end + end + + + // + // Check sizes of variables + if ( or(type(computed)==[16 17]) ) then + ncom = length(computed) + else + ncom = size(computed) + end + if ( or(type(expected)==[16 17]) ) then + nexp = length(expected) + else + nexp = size(expected) + end + if ( or(ncom <> nexp) ) then + errmsg = sprintf ( gettext ( "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n") , "assert_checkequal" , 1 , 2 ) + error(errmsg) + end + // + if ( type(computed) == 1 & type(expected) == 1 ) then + // These are two matrices of doubles + cisreal = isreal(computed) + eisreal = isreal(expected) + if ( cisreal & ~eisreal ) then + errmsg = sprintf ( gettext ( "%s: Computed is real, but expected is complex.") , "assert_checkequal" ) + error(errmsg) + end + if ( ~cisreal & eisreal ) then + errmsg = sprintf ( gettext ( "%s: Computed is complex, but expected is real.") , "assert_checkequal" ) + error(errmsg) + end + if ( cisreal & eisreal ) then + flag = comparedoubles ( computed , expected ) + else + flagreal = comparedoubles ( real(computed) , real(expected) ) + if ( flagreal ) then + flagimag = comparedoubles ( imag(computed) , imag(expected) ) + flag = flagimag + else + flag = %f + end + end + else + if ( and ( computed == expected ) ) then + flag = %t + else + flag = %f + end + end + + if ( flag == %t ) then + + errmsg = "" + else + // Change the message if the matrix contains more than one value + if ( size(expected,"*") == 1 ) then + if ( or(typeof(expected) == ["sparse", "boolean sparse"])) then + val = full(expected) + else + val = expected + end + estr = string(val) + else + if ( or(typeof(expected) == ["sparse", "boolean sparse"])) then + val = full(expected(1)) + else + val = expected(1) + end + estr = "[" + string(val) + " ...]" + end + if ( size(computed,"*") == 1 ) then + if ( or(typeof(computed) == ["sparse", "boolean sparse"])) then + val = full(computed) + else + val = computed + end + cstr = string(val) + else + if ( or(typeof(computed) == ["sparse", "boolean sparse"])) then + val = full(computed(1)) + else + val = computed(1) + end + cstr = "[" + string(val) + " ...]" + end + ierr = execstr("mdiff = string(mean(computed - expected))", "errcatch"); + if ( ierr == 0 ) then + errmsg = msprintf(gettext("%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)"),"assert_checkequal",estr,cstr,mdiff) + else + errmsg = msprintf(gettext("%s: Assertion failed: expected = %s while computed = %s"),"assert_checkequal",estr,cstr) + end + if ( lhs < 2 ) then + // If no output variable is given, generate an error + assert_generror ( errmsg ) + end + end +endfunction + + diff --git a/modules/development_tools/macros/assert/assert_checkerror.bin b/modules/development_tools/macros/assert/assert_checkerror.bin Binary files differnew file mode 100755 index 000000000..1812e3be4 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkerror.bin diff --git a/modules/development_tools/macros/assert/assert_checkerror.sci b/modules/development_tools/macros/assert/assert_checkerror.sci new file mode 100755 index 000000000..83ee7d29c --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkerror.sci @@ -0,0 +1,157 @@ +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// Copyright (C) 2012 - DIGITEO - Allan CORNET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function [flag,errmsg] = assert_checkerror ( varargin ) + // Check that an instruction produces the expected error. + + [lhs,rhs]=argn() + if ( rhs < 2 ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input argument: At least %d expected.\n") , "assert_checkerror" , 2 ) + error(errmsg) + end + // + // Get arguments + instr = varargin(1); + expectedmsg = varargin(2); + expectederrnb = argindefault ( rhs , varargin , 3 , [] ); + // + // Check types of variables + if ( typeof(instr) <> "string" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkerror" , 1 ) + error(errmsg) + end + if (expectedmsg<>[]) then + if ( typeof(expectedmsg) <> "string" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkerror" , 2 ) + error(errmsg) + end + end + if ( typeof(expectederrnb) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_checkerror" , 3 ) + error(errmsg) + end + // + // Check sizes of variables + if ( size(instr,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkerror" , 1 , 1 , 1 ) + error(errmsg) + end + if (expectedmsg<>[]) then + if ((size(expectedmsg, "r") > 1) & (size(expectedmsg, "c") > 1)) + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: A string vector expected.\n") , "assert_checkerror" , 2 ); + error(errmsg) + end + end + if ( expectederrnb <> [] ) then + if ( size(expectederrnb,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkerror" , 3 , 1 , 1 ) + error(errmsg) + end + end + // + // Check values of variables + if (expectedmsg<>[]) then + if ( expectederrnb <> [] ) then + if ( expectederrnb < 0 ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Non-negative integers expected.\n" ) , "assert_checkerror" , 3 ) + error(errmsg) + end + end + else + // If the message is empty (arg #2), check that the error + // number is not empty (arg #3). + if ( expectederrnb == [] ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: Non-empty matrix expected.\n" ) , "assert_checkerror" , 3 ) + error(errmsg) + end + end + // + // Proceed... + compierr = execstr(instr,"errcatch") + // + // Check that an error is produced + if ( compierr == 0 ) then + localstr = gettext ( "%s: No error was produced while evaluating ""%s"".") + errmsg = sprintf ( localstr , "assert_checkerror" , instr ) + error(errmsg) + end + // + // Get the error + compmsg = lasterror(); + // + // Initialize output arguments + flag = %t + errmsg = "" + // + // Localize the message, if necessary. + if ( rhs >= 4 ) then + localmsg = gettext(expectedmsg) + instr = "expectedmsg = msprintf(localmsg, varargin(4:$))" + ierr = execstr(instr,"errcatch") + if ( ierr <> 0 ) then + fmterrmsg = lasterror(); + localstr = gettext ( "%s: Error while formatting the error message: ""%s""") + errmsg = sprintf ( localstr , "assert_checkerror" , fmterrmsg ) + error(errmsg) + end + end + // + // Check the error message + if (expectedmsg <> []) then + isdifferentmsg = or(expectedmsg <> compmsg); + + if (isdifferentmsg) then + flag = %f + if size(compmsg, "*") <> 1 then + compmsg = sci2exp(compmsg); + end + if size(expectedmsg, "*") <> 1 then + expectedmsg = sci2exp(expectedmsg); + end + localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s"".") + errmsg = msprintf(localstr,"assert_checkerror", expectedmsg, compmsg) + if ( lhs < 2 ) then + // If no output variable is given, generate an error + error ( errmsg ) + else + return + end + end + end + if ( expectederrnb <> [] ) then + // + // Check the error number + if ( expectederrnb <> compierr ) then + flag = %f + localstr = gettext("%s: Assertion failed: expected error number = %d while computed error number = %d.") + errmsg = msprintf(localstr,"assert_checkerror",expectederrnb,compierr) + if ( lhs < 2 ) then + // If no output variable is given, generate an error + error ( errmsg ) + else + return + end + end + end +endfunction +function argin = argindefault ( rhs , vararglist , ivar , default ) + // Returns the value of the input argument #ivar. + // If this argument was not provided, or was equal to the + // empty matrix, returns the default value. + if ( rhs < ivar ) then + argin = default + else + if ( vararglist(ivar) <> [] ) then + argin = vararglist(ivar) + else + argin = default + end + end +endfunction + diff --git a/modules/development_tools/macros/assert/assert_checkfalse.bin b/modules/development_tools/macros/assert/assert_checkfalse.bin Binary files differnew file mode 100755 index 000000000..28224c995 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkfalse.bin diff --git a/modules/development_tools/macros/assert/assert_checkfalse.sci b/modules/development_tools/macros/assert/assert_checkfalse.sci new file mode 100755 index 000000000..c66097089 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkfalse.sci @@ -0,0 +1,43 @@ +// Copyright (C) 2008-2009 - INRIA - Michael Baudin +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function [flag,errmsg] = assert_checkfalse ( condition ) + // Check that condition is false. + + [lhs,rhs]=argn() + if ( rhs <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d expected.\n") , "assert_checkfalse" , 1 ) + error(errmsg) + end + // + // Check types of variables + if ( typeof(condition) <> "boolean" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Boolean matrix expected.\n") , "assert_checkfalse" , 1 ) + error(errmsg) + end + // + if ( and(~condition) ) then + flag = %t + errmsg = "" + else + flag = %f + if ( size(condition,"*") == 1 ) then + cstr = string(condition) + else + cstr = "[" + string(condition(1)) + " ...]" + end + errmsg = msprintf(gettext("%s: Assertion failed: found false entry in condition = %s"), .. + "assert_checkfalse",cstr) + if ( lhs < 2 ) then + // If no output variable is given, generate an error + assert_generror ( errmsg ) + end + end +endfunction + diff --git a/modules/development_tools/macros/assert/assert_checkfilesequal.bin b/modules/development_tools/macros/assert/assert_checkfilesequal.bin Binary files differnew file mode 100755 index 000000000..162d153e6 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkfilesequal.bin diff --git a/modules/development_tools/macros/assert/assert_checkfilesequal.sci b/modules/development_tools/macros/assert/assert_checkfilesequal.sci new file mode 100755 index 000000000..8f3435637 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checkfilesequal.sci @@ -0,0 +1,144 @@ +// Copyright (C) 2008-2009 - INRIA - Michael Baudin +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function [flag,errmsg] = assert_checkfilesequal ( varargin ) + // Check two files are equal. + + [lhs,rhs]=argn() + if ( and ( rhs <> [ 2 3 ] ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d to %d expected.") , "assert_checkfilesequal" , 2 , 3 ) + error(errmsg) + end + // + // Get input arguments + filecomp = varargin(1) + fileref = varargin(2) + if ( rhs <= 2 ) then + compfun = [] + else + compfun = varargin(3) + end + // + // Check types of variables + if ( typeof(filecomp) <> "string" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkfilesequal" , 1 ) + error(errmsg) + end + if ( typeof(fileref) <> "string" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkfilesequal" , 2 ) + error(errmsg) + end + if ( compfun <> [] ) then + if ( and ( typeof(compfun) <> [ "function" "list" ] ) ) then + errmsg = sprintf ( gettext ( "%s: Expected type ""%s"" or ""%s"" for input argument %s #%d, but got %s instead.") , "assert_checkfilesequal" , "function" , "list" , "compfun" , 3 , typeof(compfun) ) + error(errmsg) + end + end + // + // Check sizes of variables + if ( size(filecomp,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkfilesequal" , 1 , 1 , 1 ) + error(errmsg) + end + if ( size(fileref,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkfilesequal" , 2 , 1 , 1 ) + error(errmsg) + end + // + // Test if both files exist on disk + if ( fileinfo(filecomp) == [] ) then + flag = %f + errmsg = sprintf ( gettext ( "%s: The file %s does not exist.\n") , "assert_checkfilesequal" , filecomp ) + if ( lhs < 2 ) then + assert_generror ( errmsg ) + else + return + end + end + if ( fileinfo(fileref) == [] ) then + flag = %f + errmsg = sprintf ( gettext ( "%s: The file %s does not exist.\n") , "assert_checkfilesequal" , fileref ) + if ( lhs < 2 ) then + assert_generror ( errmsg ) + else + return + end + end + // + // Open files + [fdc,err] = mopen(filecomp,"r") + if ( err <> 0 ) then + flag = %f + errmsg = sprintf ( gettext ( "%s: Cannot open file %s.\n") , "assert_checkfilesequal" , filecomp ) + if ( lhs < 2 ) then + assert_generror ( errmsg ) + else + return + end + end + [fdr,err] = mopen(fileref,"r") + if ( err <> 0 ) then + flag = %f + errmsg = sprintf ( gettext ( "%s: Cannot open file %s.\n") , "assert_checkfilesequal" , fileref ) + if ( lhs < 2 ) then + assert_generror ( errmsg ) + else + return + end + end + // + // Get contents + txtcomp = mgetl(fdc) + txtref = mgetl(fdr) + // + // Compare contents + if ( compfun <> [] ) then + if ( typeof(compfun) == "function" ) then + areeq = compfun ( txtcomp , txtref ) + else + // compfun is a list + cf = compfun(1) + areeq = cf ( txtcomp , txtref , compfun(2:$) ) + end + else + areeq = ( txtcomp == txtref ) + end + if ( areeq ) then + flag = %t + errmsg = "" + else + flag = %f + errmsg = msprintf(gettext("%s: The content of computed file ""%s"" is different from the content of reference file ""%s""."), .. + "assert_checkfilesequal",filecomp,fileref) + // Do not generate the error now: let us close the files before! + end + // + // Close the files + err=mclose(fdc) + if ( err <> 0 ) then + flag = %f + errmsg = sprintf ( gettext ( "%s: Cannot close file %s.\n") , "assert_checkfilesequal" , filecomp ) + // It may happen that we overwrite the content of the errmsg varaiable. + // For example, we are there, while the file contents were different. + // We consider that that not being able to close the file is a bigger issue, + end + err=mclose(fdr) + if ( err <> 0 ) then + errmsg = sprintf ( gettext ( "%s: Cannot close file %s.\n") , "assert_checkfilesequal" , fileref ) + // It may happen that we overwrite the content of the errmsg varaiable. + // For example, we are there, while the file contents were different. + // We consider that that not being able to close the file is a bigger issue, + end + + if ( ~flag & lhs < 2 ) then + // If no output variable is given, generate an error + assert_generror ( errmsg ) + end +endfunction + diff --git a/modules/development_tools/macros/assert/assert_checktrue.bin b/modules/development_tools/macros/assert/assert_checktrue.bin Binary files differnew file mode 100755 index 000000000..ed25c49ce --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checktrue.bin diff --git a/modules/development_tools/macros/assert/assert_checktrue.sci b/modules/development_tools/macros/assert/assert_checktrue.sci new file mode 100755 index 000000000..2cb49c47d --- /dev/null +++ b/modules/development_tools/macros/assert/assert_checktrue.sci @@ -0,0 +1,43 @@ +// Copyright (C) 2008-2009 - INRIA - Michael Baudin +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function [flag,errmsg] = assert_checktrue ( condition ) + // Check that condition is true. + + [lhs,rhs]=argn() + if ( rhs <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d expected.\n") , "assert_checktrue" , 1 ) + error(errmsg) + end + // + // Check types of variables + if ( typeof(condition) <> "boolean" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Boolean matrix expected.\n" ) , "assert_checktrue" , 1 ) + error(errmsg) + end + // + if ( and(condition) ) then + flag = %t + errmsg = "" + else + flag = %f + if ( size(condition,"*") == 1 ) then + cstr = string(condition) + else + cstr = "[" + string(condition(1)) + " ...]" + end + errmsg = msprintf(gettext("%s: Assertion failed: found false entry in condition = %s"), .. + "assert_checktrue",cstr) + if ( lhs < 2 ) then + // If no output variable is given, generate an error + assert_generror ( errmsg ) + end + end +endfunction + diff --git a/modules/development_tools/macros/assert/assert_comparecomplex.bin b/modules/development_tools/macros/assert/assert_comparecomplex.bin Binary files differnew file mode 100755 index 000000000..7f4734981 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_comparecomplex.bin diff --git a/modules/development_tools/macros/assert/assert_comparecomplex.sci b/modules/development_tools/macros/assert/assert_comparecomplex.sci new file mode 100755 index 000000000..64b0f0871 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_comparecomplex.sci @@ -0,0 +1,146 @@ +// Copyright (C) 2008-2009 - INRIA - Michael Baudin +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function order = assert_comparecomplex ( varargin ) + // Compare complex numbers with a tolerance. + + [lhs,rhs]=argn() + if ( and(rhs <> [2 3 4] ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d to %d expected.") , "assert_comparecomplex" , 2 , 4 ) + error(errmsg) + end + // + // Get arguments + a = varargin(1) + b = varargin(2) + reltol = argindefault ( rhs , varargin , 3 , sqrt(%eps) ) + abstol = argindefault ( rhs , varargin , 4 , 0 ) + // + // Check types of variables + if ( typeof(a) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_comparecomplex" , 1 ) + error(errmsg) + end + if ( typeof(a) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_comparecomplex" , 2 ) + error(errmsg) + end + if ( typeof(reltol) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_comparecomplex" , 3 ) + error(errmsg) + end + if ( typeof(abstol) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_comparecomplex" , 4 ) + error(errmsg) + end + // + // Check sizes of variables + if ( size(a,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_comparecomplex" , 1 , 1 , 1 ) + error(errmsg) + end + if ( size(b,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_comparecomplex" , 2 , 1 , 1 ) + error(errmsg) + end + if ( size(reltol,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_comparecomplex" , 3 , 1 , 1 ) + error(errmsg) + end + if ( size(abstol,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_comparecomplex" , 4 , 1 , 1 ) + error(errmsg) + end + // + // Check values of variables + if ( reltol < 0 ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Must be > %d.\n") , "assert_comparecomplex" , 3 , 0 ) + error(errmsg) + end + if ( abstol < 0 ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Must be > %d.\n") , "assert_comparecomplex" , 4 , 0 ) + error(errmsg) + end + // + ord_re = assert_compdata ( real(a) , real(b) , reltol , abstol ) + if ( ord_re == 0 ) then + // Tie on the real part: compare imaginary parts + ord_im = assert_compdata ( imag(a) , imag(b) , reltol , abstol ) + if ( ord_im == 0 ) then + // Tie on imaginary parts too: two numbers are "equal" + order = 0 + elseif ( ord_im == -1 ) then + order = -1 + else + order = 1 + end + elseif ( ord_re == -1 ) then + order = -1 + else + order = 1 + end +endfunction + +function order = assert_compdata ( a , b , reltol , abstol ) + if ( a == %inf ) then + if ( isnan(b) ) then + order = -1 + elseif ( b == %inf ) then + order = 0 + else + order = 1 + end + elseif ( a == -%inf ) then + if ( b == -%inf ) then + order = 0 + else + order = -1 + end + elseif ( isnan(a) ) then + if ( isnan(b) ) then + order = 0 + else + order = 1 + end + else + if ( isnan(b) ) then + order = -1 + elseif ( b == -%inf ) then + order = 1 + elseif ( b == %inf ) then + order = -1 + else + areequal = abs ( a - b ) <= reltol * max ( abs(a) , abs(b) ) + abstol + if ( areequal ) then + order = 0 + elseif ( a < b ) then + order = -1 + else + order = 1 + end + end + end +endfunction + + +function argin = argindefault ( rhs , vararglist , ivar , default ) + // Returns the value of the input argument #ivar. + // If this argument was not provided, or was equal to the + // empty matrix, returns the default value. + if ( rhs < ivar ) then + argin = default + else + if ( vararglist(ivar) <> [] ) then + argin = vararglist(ivar) + else + argin = default + end + end +endfunction + diff --git a/modules/development_tools/macros/assert/assert_computedigits.bin b/modules/development_tools/macros/assert/assert_computedigits.bin Binary files differnew file mode 100755 index 000000000..36f7927b2 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_computedigits.bin diff --git a/modules/development_tools/macros/assert/assert_computedigits.sci b/modules/development_tools/macros/assert/assert_computedigits.sci new file mode 100755 index 000000000..36c5c6efe --- /dev/null +++ b/modules/development_tools/macros/assert/assert_computedigits.sci @@ -0,0 +1,108 @@ +// Copyright (C) 2008-2009 - INRIA - Michael Baudin +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function d = assert_computedigits ( varargin ) + // Returns the number of significant digits in computed result. + + [lhs,rhs]=argn() + if ( and ( rhs <> [2 3] ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d to %d expected.\n") , "assert_computedigits" , 2 , 3 ) + error(errmsg) + end + computed = varargin ( 1 ) + expected = varargin ( 2 ) + basis = argindefault ( rhs , varargin , 3 , 10 ) + // + // Check types of variables + if ( typeof(computed) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_computedigits" , 1 ) + error(errmsg) + end + if ( typeof(expected) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_computedigits" , 2 ) + error(errmsg) + end + // + // Check sizes of variables + if ( size(expected) <> size(computed) ) then + errmsg = sprintf ( gettext ( "%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n") , "assert_computedigits" , 1 , 2 ) + error(errmsg) + end + if ( size(basis,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_computedigits" , 3 , 1 , 1 ) + error(errmsg) + end + // + nre = size(expected,"r") + nce = size(expected,"c") + // Update shape + expected = expected (:) + computed = computed (:) + // + d = zeros(expected) + // + dre = computedigits_data ( real(expected) , real(computed) , basis ); + dim = computedigits_data ( imag(expected) , imag(computed) , basis ); + d = min(dre,dim) + // + // Reshape + d = matrix(d,nre,nce) +endfunction + +function argin = argindefault ( rhs , vararglist , ivar , default ) + // Returns the value of the input argument #ivar. + // If this argument was not provided, or was equal to the + // empty matrix, returns the default value. + if ( rhs < ivar ) then + argin = default + else + if ( vararglist(ivar) <> [] ) then + argin = vararglist(ivar) + else + argin = default + end + end +endfunction + +function d = computedigits_data ( expected , computed , basis ) + // + dmin = 0 + dmax = -log(2^(-53))/log(basis) + d = ones(expected)*%inf; + d( isnan(expected) & isnan(computed) ) = dmax; + d( isnan(expected) & ~isnan(computed) ) = dmin; + d( ~isnan(expected) & isnan(computed) ) = dmin; + // From now, both expected and computed are non-nan + k = ~isnan(expected) & ~isnan(computed); + d( k & expected == 0 & computed == 0 ) = dmax; + d( k & expected == 0 & computed <> 0 ) = dmin; + // From now, expected is non-zero + k = k & expected <> 0; + d( k & expected == computed ) = dmax; + // From now, expected and computed are different + k = k & expected <> computed; + d( k & expected == %inf & computed <> %inf ) = dmin; + d( k & expected == -%inf & computed <> -%inf ) = dmin; + // From now, neither of computed, nor expected is infinity + kdinf=find(d==%inf); + if ( kdinf <> [] ) then + relerr = ones(expected)*%nan; + relerr(kdinf) = abs(computed(kdinf)-expected(kdinf)) ./ abs(expected(kdinf)); + k = find( relerr >= 1 ); + if ( k<> [] ) then + d(k) = dmin; + end + k = find( d==%inf & relerr < 1 ); + if ( k<> [] ) then + sigdig(k) = -log ( 2*relerr(k) ) ./ log(basis); + d(k) = max ( sigdig(k) , dmin ); + end + end +endfunction + diff --git a/modules/development_tools/macros/assert/assert_cond2reltol.bin b/modules/development_tools/macros/assert/assert_cond2reltol.bin Binary files differnew file mode 100755 index 000000000..4bb772cff --- /dev/null +++ b/modules/development_tools/macros/assert/assert_cond2reltol.bin diff --git a/modules/development_tools/macros/assert/assert_cond2reltol.sci b/modules/development_tools/macros/assert/assert_cond2reltol.sci new file mode 100755 index 000000000..4316dff95 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_cond2reltol.sci @@ -0,0 +1,147 @@ +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function rtol = assert_cond2reltol ( varargin ) + // Suggests a relative error, computed from the condition number. + + function varargout = assert_expandvar ( varargin ) + // Expand variables so that they all have the same shape. + // + // Calling Sequence + // ovar1 = assert_expandvar ( ivar1 ) + // [ ovar1 , ovar2 ] = assert_expandvar ( ivar1 , ivar2 ) + // [ ovar1 , ovar2 , ovar3 ] = assert_expandvar ( ivar1 , ivar2 , ivar3 ) + // [ ovar1 , ovar2 , ovar3 , ovar4 ] = assert_expandvar ( ivar1 , ivar2 , ivar3 , ivar4 ) + // + // Parameters + // ivar1 : input variable #1 + // ovar1 : output variable #1 + // + // Description + // This function allows to expand input arguments of + // computationnal functions. + // If scalars are input, expand it to the size of other other variables. + // + // If matrices are input, all must have the same shape: if not, an error is generated. + // + // Examples + // // Expand ovar1 to [1 1 1] + // [ ovar1 , ovar2 ] = assert_expandvar ( 1 , [2 3 4] ) + // + // // Expand ovar2 to [4 4 4] + // [ ovar1 , ovar2 ] = assert_expandvar ( [1 2 3] , 4 ) + // + // // Expand ovar2 to [4 4 4]' + // [ ovar1 , ovar2 ] = assert_expandvar ( [1 2 3]' , 4 ) + // + // Authors + // Michael Baudin - 2009-2010 - DIGITEO + + [lhs,rhs]=argn() + if ( rhs <> lhs ) then + errmsg = sprintf ( gettext ( "%s: The number of output arguments %d do not match the number of input arguments %d.") , "assert_expandvar" , lhs , rhs ) + error(errmsg) + end + + // + // Check if there is one argument which is a matrix. + // imat is the index of the input argument which is a matrix. + istherematrix = %f + imat = 0 + for ivar = 1 : rhs + if ( size ( varargin(ivar) , "*" ) <> 1 ) then + istherematrix = %t + imat = ivar + break + end + end + // If there is no matrix, returns the output arguments as is. + if ( ~istherematrix ) then + for ovar = 1 : lhs + varargout ( ovar ) = varargin ( ovar ) + end + return + end + // If there is one matrix, get its size. + nbrows = size ( varargin ( imat ) , "r" ) + nbcols = size ( varargin ( imat ) , "c" ) + // Check that all matrices have the same shape. + for ivar = 1 : rhs + nbi = size ( varargin ( ivar ) , "*" ) + if ( nbi <> 1 ) then + nbrowsi = size ( varargin ( ivar ) , "r" ) + nbcolsi = size ( varargin ( ivar ) , "c" ) + if ( nbrowsi <> nbrows | nbcolsi <> nbcols ) then + errmsg = msprintf(gettext("%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n"), "assert_expandvar" , ivar , nbrows , nbcols ); + error(errmsg) + end + end + end + // Expand all input arguments which are scalar up to this shape. + for ivar = 1 : rhs + if ( size ( varargin(ivar) , "*" ) == 1 ) then + varargin ( ivar ) = varargin ( ivar ) * ones ( nbrows , nbcols ) + end + end + // Set all output variables + for ovar = 1 : lhs + varargout ( ovar ) = varargin ( ovar ) + end + endfunction + + function argin = argindefault ( rhs , vararglist , ivar , default ) + // Returns the value of the input argument #ivar. + // If this argument was not provided, or was equal to the + // empty matrix, returns the default value. + if ( rhs < ivar ) then + argin = default + else + if ( vararglist(ivar) <> [] ) then + argin = vararglist(ivar) + else + argin = default + end + end + endfunction + + + [lhs,rhs]=argn() + if ( and ( rhs <> [1 2] ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d to %d expected.") , "assert_cond2reltol" , 1 , 2 ) + error(errmsg) + end + // + // Get arguments + condition = varargin ( 1 ) + offset = argindefault ( rhs , varargin , 2 , 0 ) + // + // Check types of variables + if ( typeof(condition) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_cond2reltol" , 1 ) + error(errmsg) + end + if ( typeof(offset) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_cond2reltol" , 2 ) + error(errmsg) + end + // + // Check size of variables + // Let the user and assert_expandvar manage this. + // + // Check content of variables + if ( or ( condition < 0 ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Must be > %d.\n") , "assert_cond2reltol" , 1 , 0 ) + error(errmsg) + end + // + [condition,offset] = assert_expandvar (condition,offset) + // + d = assert_cond2reqdigits ( condition , offset , 10 ) + rtol = 10^-d +endfunction + diff --git a/modules/development_tools/macros/assert/assert_cond2reqdigits.bin b/modules/development_tools/macros/assert/assert_cond2reqdigits.bin Binary files differnew file mode 100755 index 000000000..ed8684999 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_cond2reqdigits.bin diff --git a/modules/development_tools/macros/assert/assert_cond2reqdigits.sci b/modules/development_tools/macros/assert/assert_cond2reqdigits.sci new file mode 100755 index 000000000..e21503203 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_cond2reqdigits.sci @@ -0,0 +1,167 @@ +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function d = assert_cond2reqdigits ( varargin ) + // Suggests the number of required digits, given the condition number. + + + function varargout = assert_expandvar ( varargin ) + // Expand variables so that they all have the same shape. + // + // Calling Sequence + // ovar1 = assert_expandvar ( ivar1 ) + // [ ovar1 , ovar2 ] = assert_expandvar ( ivar1 , ivar2 ) + // [ ovar1 , ovar2 , ovar3 ] = assert_expandvar ( ivar1 , ivar2 , ivar3 ) + // [ ovar1 , ovar2 , ovar3 , ovar4 ] = assert_expandvar ( ivar1 , ivar2 , ivar3 , ivar4 ) + // + // Parameters + // ivar1 : input variable #1 + // ovar1 : output variable #1 + // + // Description + // This function allows to expand input arguments of + // computationnal functions. + // If scalars are input, expand it to the size of other other variables. + // + // If matrices are input, all must have the same shape: if not, an error is generated. + // + // Examples + // // Expand ovar1 to [1 1 1] + // [ ovar1 , ovar2 ] = assert_expandvar ( 1 , [2 3 4] ) + // + // // Expand ovar2 to [4 4 4] + // [ ovar1 , ovar2 ] = assert_expandvar ( [1 2 3] , 4 ) + // + // // Expand ovar2 to [4 4 4]' + // [ ovar1 , ovar2 ] = assert_expandvar ( [1 2 3]' , 4 ) + // + // Authors + // Michael Baudin - 2009-2010 - DIGITEO + + [lhs,rhs]=argn() + if ( rhs <> lhs ) then + errmsg = sprintf ( gettext ( "%s: The number of output arguments %d do not match the number of input arguments %d.") , "assert_expandvar" , lhs , rhs ) + error(errmsg) + end + + // + // Check if there is one argument which is a matrix. + // imat is the index of the input argument which is a matrix. + istherematrix = %f + imat = 0 + for ivar = 1 : rhs + if ( size ( varargin(ivar) , "*" ) <> 1 ) then + istherematrix = %t + imat = ivar + break + end + end + // If there is no matrix, returns the output arguments as is. + if ( ~istherematrix ) then + for ovar = 1 : lhs + varargout ( ovar ) = varargin ( ovar ) + end + return + end + // If there is one matrix, get its size. + nbrows = size ( varargin ( imat ) , "r" ) + nbcols = size ( varargin ( imat ) , "c" ) + // Check that all matrices have the same shape. + for ivar = 1 : rhs + nbi = size ( varargin ( ivar ) , "*" ) + if ( nbi <> 1 ) then + nbrowsi = size ( varargin ( ivar ) , "r" ) + nbcolsi = size ( varargin ( ivar ) , "c" ) + if ( nbrowsi <> nbrows ) then + errmsg = msprintf(gettext("%s: Expected %d rows in input argument #%d, but found %d rows instead."), "assert_expandvar" , nbrows , ivar , nbrowsi ); + error(errmsg) + end + if ( nbcolsi <> nbcols ) then + errmsg = msprintf(gettext("%s: Expected %d columns in input argument #%d, but found %d columns instead."), "assert_expandvar" , nbcols , ivar , nbcolsi ); + error(errmsg) + end + end + end + // Expand all input arguments which are scalar up to this shape. + for ivar = 1 : rhs + if ( size ( varargin(ivar) , "*" ) == 1 ) then + varargin ( ivar ) = varargin ( ivar ) * ones ( nbrows , nbcols ) + end + end + // Set all output variables + for ovar = 1 : lhs + varargout ( ovar ) = varargin ( ovar ) + end + endfunction + + function argin = argindefault ( rhs , vararglist , ivar , default ) + // Returns the value of the input argument #ivar. + // If this argument was not provided, or was equal to the + // empty matrix, returns the default value. + if ( rhs < ivar ) then + argin = default + else + if ( vararglist(ivar) <> [] ) then + argin = vararglist(ivar) + else + argin = default + end + end + endfunction + + + [lhs,rhs]=argn() + if ( and ( rhs <> [1 2 3] ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d to %d expected.") , "assert_cond2reqdigits" , 1 , 3 ) + error(errmsg) + end + // + // Get arguments + condition = varargin ( 1 ) + offset = argindefault ( rhs , varargin , 2 , 0 ) + b = argindefault ( rhs , varargin , 3 , 10 ) + // + // Check types of variables + if ( typeof(condition) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_cond2reqdigits" , 1 ) + error(errmsg) + end + if ( typeof(offset) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_cond2reqdigits" , 2 ) + error(errmsg) + end + if ( typeof(b) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_cond2reqdigits" , 3 ) + error(errmsg) + end + // + // Check size of variables + // Let the user and assert_expandvar manage this. + // + // Check content of variables + if ( or ( condition < 0 ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Must be > %d.\n") , "assert_cond2reqdigits" , 1 , 0 ) + error(errmsg) + end + if ( or ( b < 2 ) ) then + errmsg = sprintf ( gettext ("%s: Wrong value for input argument #%d: Must be > %d.\n") , "assert_cond2reqdigits" , 3 , 2 ) + error(errmsg) + end + // + [condition,offset] = assert_expandvar (condition,offset) + // + backIEEE=ieee() + ieee(2) + // + dmax = -log(2^(-53))/log(b) + lost = min(max(log(condition)/log(b)-offset,0),dmax) + d = dmax - lost + // + ieee(backIEEE) +endfunction + diff --git a/modules/development_tools/macros/assert/assert_generror.bin b/modules/development_tools/macros/assert/assert_generror.bin Binary files differnew file mode 100755 index 000000000..b63846605 --- /dev/null +++ b/modules/development_tools/macros/assert/assert_generror.bin diff --git a/modules/development_tools/macros/assert/assert_generror.sci b/modules/development_tools/macros/assert/assert_generror.sci new file mode 100755 index 000000000..3bbe19d0c --- /dev/null +++ b/modules/development_tools/macros/assert/assert_generror.sci @@ -0,0 +1,48 @@ +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function assert_generror ( varargin ) + // Generates an error. + + [lhs,rhs]=argn() + if ( and(rhs <> [1 2] ) ) then + errmsg = sprintf ( gettext ( "%s: Wrong number of input arguments: %d to %d expected.") , "assert_generror" , 1 , 2 ) + error(errmsg) + end + errormsg = varargin(1) + // + // Check types of variables + if ( typeof(errormsg) <> "string" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_generror" , 1 ) + error(errmsg) + end + if ( size(errormsg,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_generror" , 1 , 1 , 1 ) + error(errmsg) + end + // + if ( rhs == 1 ) then + error ( errormsg ) + else + errornb = varargin(2) + if ( size(errornb,"*") <> 1 ) then + errmsg = sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_generror" , 2 , 1 , 1 ) + error(errmsg) + end + if ( typeof(errornb) <> "constant" ) then + errmsg = sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_generror" , 2 ) + error(errmsg) + end + if ( errornb < 0 ) then + errmsg = sprintf ( gettext ( "%s: Wrong value for input argument #%d: Non-negative integers expected.\n" ) , "assert_generror" , 2 ) + error(errmsg) + end + error ( errormsg , errornb ) + end +endfunction + diff --git a/modules/development_tools/macros/assert/buildmacros.bat b/modules/development_tools/macros/assert/buildmacros.bat new file mode 100755 index 000000000..be117fb7c --- /dev/null +++ b/modules/development_tools/macros/assert/buildmacros.bat @@ -0,0 +1,11 @@ + +rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +rem Copyright (C) 2008 - INRIA +rem +rem This file must be used under the terms of the CeCILL. +rem This source file is licensed as described in the file COPYING, which +rem you should have received as part of this distribution. The terms +rem are also available at +rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +@scilex -nwni -e exec('buildmacros.sce');quit; diff --git a/modules/development_tools/macros/assert/buildmacros.sce b/modules/development_tools/macros/assert/buildmacros.sce new file mode 100755 index 000000000..c4170b973 --- /dev/null +++ b/modules/development_tools/macros/assert/buildmacros.sce @@ -0,0 +1,11 @@ +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +tbx_build_macros("assert", get_absolute_file_path("buildmacros.sce")); + +clear tbx_build_macros; diff --git a/modules/development_tools/macros/assert/cleanmacros.bat b/modules/development_tools/macros/assert/cleanmacros.bat new file mode 100755 index 000000000..6d53f30d0 --- /dev/null +++ b/modules/development_tools/macros/assert/cleanmacros.bat @@ -0,0 +1,14 @@ + +rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +rem Copyright (C) 2008 - INRIA +rem +rem This file must be used under the terms of the CeCILL. +rem This source file is licensed as described in the file COPYING, which +rem you should have received as part of this distribution. The terms +rem are also available at +rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +@rm *.bin +@rm lib +@rm names + diff --git a/modules/development_tools/macros/assert/cleanmacros.sce b/modules/development_tools/macros/assert/cleanmacros.sce new file mode 100755 index 000000000..a6c629ca9 --- /dev/null +++ b/modules/development_tools/macros/assert/cleanmacros.sce @@ -0,0 +1,16 @@ +// ==================================================================== +// Allan CORNET +// DIGITEO 2009 +// This file is released into the public domain +// ==================================================================== +libpath = get_absolute_file_path("cleanmacros.sce"); + +binfiles = ls(libpath+"/*.bin"); +for i = 1:size(binfiles,"*") + mdelete(binfiles(i)); +end + +mdelete(libpath+"/names"); +mdelete(libpath+"/lib"); + +// ==================================================================== diff --git a/modules/development_tools/macros/assert/lib b/modules/development_tools/macros/assert/lib Binary files differnew file mode 100755 index 000000000..4fe2adf34 --- /dev/null +++ b/modules/development_tools/macros/assert/lib diff --git a/modules/development_tools/macros/assert/names b/modules/development_tools/macros/assert/names new file mode 100755 index 000000000..614b8ba0c --- /dev/null +++ b/modules/development_tools/macros/assert/names @@ -0,0 +1,11 @@ +assert_checkalmostequal +assert_checkequal +assert_checkerror +assert_checkfalse +assert_checkfilesequal +assert_checktrue +assert_comparecomplex +assert_computedigits +assert_cond2reltol +assert_cond2reqdigits +assert_generror diff --git a/modules/development_tools/macros/bench_run.bin b/modules/development_tools/macros/bench_run.bin Binary files differnew file mode 100755 index 000000000..724275b25 --- /dev/null +++ b/modules/development_tools/macros/bench_run.bin diff --git a/modules/development_tools/macros/bench_run.sci b/modules/development_tools/macros/bench_run.sci new file mode 100755 index 000000000..22787a532 --- /dev/null +++ b/modules/development_tools/macros/bench_run.sci @@ -0,0 +1,372 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +// Copyright (C) 2011-2011 - DIGITEO - Bruno JOFRET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +//----------------------------------------------------------------------------- +// Launch benchmarks +//----------------------------------------------------------------------------- + +function bench_run(varargin) + + lhs = argn(1); + rhs = argn(2); + + global test_list; + global test_count; + global boucle_for_time; + + test_list = []; + test_count = 0; + boucle_for_time = 0; + + just_list_tests = %F; + print_help = %F; + nb_run = "10000"; + + xml_str = ""; + + // ======================================================= + // Gestion des tests à lancer + // ======================================================= + + if (rhs == 0) .. + | ((rhs == 1) & (varargin(1)==[])) .. + | (((rhs == 2)|(rhs == 3)) & (varargin(1)==[]) & (varargin(2)==[])) then + + // No input argument + // bench_run() + // bench_run([]) + // => Launch each test of each module + + module_list = getmodules(); + module_list = gsort(module_list,"lr","i"); + for k=1:size(module_list,"*") + bench_add_module(module_list(k)); + end + + elseif (rhs == 1) .. + | ((rhs == 2) & (varargin(2)==[])) .. + | ((rhs == 3) & (varargin(2)==[])) then + + // One input argument + // bench_run(<module_name>) + // bench_run([<module_name_1>,<module_name_2>]) + + // varargin(1) = [<module_name_1>,<module_name_2>] + + module_mat = varargin(1); + + [nl,nc] = size(module_mat); + + // bench_run([<module_name_1>,<module_name_2>]) + + for i=1:nl + for j=1:nc + if( with_module(module_mat(i,j)) ) then + bench_add_module(module_mat(i,j)); + else + error(sprintf(gettext("%s is not an installed module"),module_mat(i,j))); + end + end + end + + elseif (rhs == 2) | (rhs == 3) then + + // Two input arguments + // bench_run(<module_name>,<test_name>) + // bench_run(<module_name>,[<test_name_1>,<test_name_2>] ) + + // varargin(1) = <module_name> ==> string 1x1 + // varargin(2) = <test_name_1> ==> mat nl x nc + + module = varargin(1); + test_mat = varargin(2); + + if ((or(size(module) <> [1,1])) & (test_mat <> [])) then + example = bench_examples(); + err = ["" ; gettext("error : Input argument sizes are not valid") ; "" ; example ]; + printf("%s\n",err); + return; + end + + [nl,nc] = size(test_mat); + + for i=1:nl + for j=1:nc + + if (fileinfo(SCI+"/modules/"+module+"/tests/benchmarks/"+test_mat(i,j)+".tst")<>[]) then + bench_add_onebench(module,test_mat(i,j)); + else + error(sprintf(gettext("The test ""%s"" is not available from the ""%s"" module"),test_mat(i,j),module)); + end + + end + end + else + error(msprintf(gettext("%s: Wrong number of input argument(s): %d to %d expected.\n"), "bench_run", 0, 3)); + end + + // ======================================================= + // Gestion des options + // ======================================================= + + if rhs == 3 then + + option_mat = varargin(3); + + if grep(option_mat,"list") <> [] then + just_list_tests = %T; + end + + if grep(option_mat,"help") <> [] then + print_help = %T; + end + + if grep(option_mat,"nb_run=") <> [] then + nb_run_line = grep(option_mat,"nb_run="); + nb_run = strsubst(option_mat(nb_run_line),"nb_run=",""); + end + + end + + if print_help then + + // ======================================================= + // Display help + // ======================================================= + + example = bench_examples(); + printf("%s\n",example); + return; + + elseif just_list_tests then + + // ======================================================= + // Just list tests + // ======================================================= + + printf("\n"); + + for i=1:test_count + printf(" %03d - ",i); + printf("[%s] %s\n",test_list(i,1),test_list(i,2)); + end + + else + + // ======================================================= + // Test launch + // ======================================================= + + printf("\n"); + + xml_str = [ xml_str ; "<benchmarks>" ]; + + // Calcul de la durée de la boucle for en µs + + tic(); + for i = 1:1000000 + end + timing = toc(); + boucle_for_time = timing * 1000; + + printf(" For Loop (as reference) ........................... %4.2f ms [ 1000000 x]\n\n",boucle_for_time); + + for i=1:test_count + + // Display + printf(" %03d/%03d - ",i,test_count); + printf("[%s] %s ",test_list(i,1),test_list(i,2)); + for j = length(test_list(i,2) + test_list(i,1)):45 + printf("."); + end + printf(" "); + + // Bench process + [returned_time,nb_run_done] = bench_run_onebench(test_list(i,1),test_list(i,2),nb_run); + + // Display + returned_time_str = sprintf("%4.2f ms",returned_time); + for j = length(returned_time_str):13 + printf(" "); + end + printf("%s [",returned_time_str); + for j = length(nb_run_done):7 + printf(" "); + end + printf("%s x]\n",nb_run_done); + + // XML print + xml_str = [ xml_str ; .. + " <bench>"; .. + " <module>"+test_list(i,1)+"</module>"; .. + " <id>"+test_list(i,2)+"</id>"; .. + " <duration>"+strsubst(returned_time_str," ms","")+"</duration>"; .. + " <nb_run>"+nb_run_done+"</nb_run>"; .. + " </bench>" ]; + + end + + end + + // XML management + xml_str = [ xml_str ; "</benchmarks>" ]; + xml_file_name = SCI+"/bench_"+getversion()+"_"+date()+".xml"; + ierr = execstr("fd_xml = mopen(xml_file_name,''wt'');","errcatch"); + if ierr == 999 then + xml_file_name = SCIHOME + "/bench_" + getversion() + "_" + date() +".xml"; + ierr = execstr("fd_xml = mopen(xml_file_name,''wt'');","errcatch"); + end + + if ierr == 0 then + mputl(xml_str, fd_xml); + mclose(fd_xml); + end + + clearglobal test_list; + clearglobal test_count; + clearglobal boucle_for_time; + +endfunction + +//----------------------------------------------------------------------------- +// Pierre MARECHAL +// Scilab team +// Date : 28 oct. 2007 +// +// => List all test files in the module <module_mat> +// => Add them to the test_mat matrix +//----------------------------------------------------------------------------- + +function bench_add_module(module_mat,test_type) + + module_test_dir = SCI+"/modules/"+module_mat+"/tests/benchmarks"; + test_mat = gsort(basename(listfiles(module_test_dir+"/*.tst")),"lr","i"); + + nl = size(test_mat,"*"); + for i=1:nl + bench_add_onebench(module_mat,test_mat(i)); + end + +endfunction + +//----------------------------------------------------------------------------- +// Pierre MARECHAL +// Scilab team +// Date : 28 oct. 2007 +// +// => Add the test <test> to the test_mat matrix +//----------------------------------------------------------------------------- + +function bench_add_onebench(module,test) + + global test_list; + global test_count; + + test_count = test_count + 1; + + test_list( test_count , 1 ) = module; + test_list( test_count , 2 ) = test; + +endfunction + +//----------------------------------------------------------------------------- +// Pierre MARECHAL +// Scilab team +// Date : 28 oct. 2007 +// +// => Run one test +//----------------------------------------------------------------------------- + +function [returned_time,nb_run_done] = bench_run_onebench(module,test,nb_run) + + returned_time = 0; + + fullPath = SCI+"/modules/"+module+"/tests/benchmarks/"+test; + + tstfile = pathconvert(fullPath+".tst",%f,%f); + scefile = pathconvert(TMPDIR+"/"+test+".sce",%f,%f); + + // Get the tst file + txt = mgetl(tstfile); + + // Check if the nb run is defined in the test + + check_nb_run_line = grep(txt,"<-- BENCH NB RUN :"); + + nb_run_done = nb_run; + + if check_nb_run_line <> [] then + nb_run_line = txt(check_nb_run_line); + nb_run_start = strindex(nb_run_line,"<-- BENCH NB RUN :") + length("<-- BENCH NB RUN :"); + nb_run_end = strindex(nb_run_line,"-->") - 1; + nb_run = stripblanks(part(nb_run_line,[nb_run_start:nb_run_end])); + nb_run_done = nb_run; + end + + // get the <-- BENCH START --> and <-- BENCH END --> tags + line_start = grep(txt,"<-- BENCH START -->"); + line_end = grep(txt,"<-- BENCH END -->"); + + // Get the context and the bench + context = txt([1:line_start-1]); + bench = txt([line_start+1:line_end-1]); + + // Remove blank lines + context(find(context == "" )) = []; + bench (find(bench == "" )) = []; + + tst_str = [ context ; + "nb_run = "+nb_run+";"; + "tic();"; + "for i = 1:nb_run"; + bench; + "end"; + "timing = toc();"; + "returned_time = timing * 1000;"] + + mputl(tst_str,scefile); + exec(scefile); + returned_time = returned_time - (boucle_for_time * nb_run / 1d6) + return; + +endfunction + +//----------------------------------------------------------------------------- +// Pierre MARECHAL +// Scilab team +// Date : 28 oct. 2007 +// +// => Check ref or generate ref +//----------------------------------------------------------------------------- + +function example = bench_examples() + + example = [ sprintf("Examples :\n\n") ]; + + example = [ example ; sprintf("// Launch all tests\n") ]; + example = [ example ; sprintf("bench_run();\n") ]; + example = [ example ; sprintf("bench_run([]);\n") ]; + example = [ example ; sprintf("bench_run([],[]);\n") ]; + example = [ example ; "" ]; + example = [ example ; sprintf("// Test one or several module\n") ]; + example = [ example ; sprintf("bench_run(''core'');\n") ]; + example = [ example ; sprintf("bench_run(''core'',[]);\n") ]; + example = [ example ; sprintf("bench_run([''core'',''string'']);\n") ]; + example = [ example ; "" ]; + example = [ example ; sprintf("// Launch one or several test in a specified module\n") ]; + example = [ example ; sprintf("bench_run(''core'',[''trycatch'',''opcode'']);\n") ]; + example = [ example ; "" ]; + example = [ example ; sprintf("// With options\n") ]; + example = [ example ; sprintf("bench_run([],[],''list'');\n") ]; + example = [ example ; sprintf("bench_run([],[],''help'');\n") ]; + example = [ example ; sprintf("bench_run([],[],''nb_run=2000'');\n") ]; + example = [ example ; "" ]; + +endfunction diff --git a/modules/development_tools/macros/buildmacros.bat b/modules/development_tools/macros/buildmacros.bat new file mode 100755 index 000000000..a73ca67f8 --- /dev/null +++ b/modules/development_tools/macros/buildmacros.bat @@ -0,0 +1,11 @@ + +rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +rem Copyright (C) 2008 - INRIA +rem +rem This file must be used under the terms of the CeCILL. +rem This source file is licensed as described in the file COPYING, which +rem you should have received as part of this distribution. The terms +rem are also available at +rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit; diff --git a/modules/development_tools/macros/buildmacros.sce b/modules/development_tools/macros/buildmacros.sce new file mode 100755 index 000000000..79a0ca847 --- /dev/null +++ b/modules/development_tools/macros/buildmacros.sce @@ -0,0 +1,18 @@ + +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2006-2008 - INRIA - Allan CORNET <allan.cornet@inria.fr> +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +if (isdef("genlib") == %f) then + exec(SCI+"/modules/functions/scripts/buildmacros/loadgenlib.sce"); +end + +genlib("development_toolslib","SCI/modules/development_tools/macros",%f,%t); +genlib("assertlib","SCI/modules/development_tools/macros/assert",%f,%t); + diff --git a/modules/development_tools/macros/cleanmacros.bat b/modules/development_tools/macros/cleanmacros.bat new file mode 100755 index 000000000..4ad1bbae2 --- /dev/null +++ b/modules/development_tools/macros/cleanmacros.bat @@ -0,0 +1,13 @@ + +rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +rem Copyright (C) 2008 - INRIA +rem +rem This file must be used under the terms of the CeCILL. +rem This source file is licensed as described in the file COPYING, which +rem you should have received as part of this distribution. The terms +rem are also available at +rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +@del *.bin 2>NUL +@del lib 2>NUL +@del names 2>NUL diff --git a/modules/development_tools/macros/devtools_run_builder.bin b/modules/development_tools/macros/devtools_run_builder.bin Binary files differnew file mode 100755 index 000000000..e6bd6c07d --- /dev/null +++ b/modules/development_tools/macros/devtools_run_builder.bin diff --git a/modules/development_tools/macros/devtools_run_builder.sci b/modules/development_tools/macros/devtools_run_builder.sci new file mode 100755 index 000000000..7c9223015 --- /dev/null +++ b/modules/development_tools/macros/devtools_run_builder.sci @@ -0,0 +1,23 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Simon LIPP <simon.lipp@scilab.org> +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// Run the path/subdir/builder script, changing its working directory +// to path/subdir +function devtools_run_builder(path, subdir, builder) + oldpath = pwd(); + + chdir(path); + + if(isdir(subdir)) then + chdir(subdir); + exec(builder, -1); + end + + chdir(oldpath); +endfunction diff --git a/modules/development_tools/macros/example_run.bin b/modules/development_tools/macros/example_run.bin Binary files differnew file mode 100755 index 000000000..197d13008 --- /dev/null +++ b/modules/development_tools/macros/example_run.bin diff --git a/modules/development_tools/macros/example_run.sci b/modules/development_tools/macros/example_run.sci new file mode 100755 index 000000000..910a5b455 --- /dev/null +++ b/modules/development_tools/macros/example_run.sci @@ -0,0 +1,169 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - Michael Baudin +// Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function boolStatus = example_run(modulesName, functionsName, helpLanguage, varargin) + + rhs = argn(2); + + if rhs < 1 then + modulesName = getmodules(); + end + if rhs < 2 then + functionsName = []; + end + if rhs < 3 then + helpLanguage = "en_US"; + end + + if typeof(modulesName)<>"string" then + error(msprintf(gettext("%s: Wrong type for input argument #%d: A row array of strings expected.\n"), "example_run", 1)); + end + if size(modulesName, 2)<>1 then + error(msprintf(gettext("%s: Wrong size for input argument #%d: A row array of strings expected.\n"), "example_run", 1)); + end + + if (typeof(functionsName)=="constant" & ~isempty(functionsName)) & typeof(functionsName)<>"string" then + error(msprintf(gettext("%s: Wrong type for input argument #%d: A row array of strings or empty matrix expected.\n"), "example_run", 2)); + end + if ~isempty(functionsName) & size(functionsName, 2)<>1 then + error(msprintf(gettext("%s: Wrong size for input argument #%d: A row array of strings or empty matrix expected.\n"), "example_run", 2)); + end + + if typeof(helpLanguage)<>"string" then + error(msprintf(gettext("%s: Wrong type for input argument #%d: A string expected.\n"), "example_run", 3)); + end + if size(helpLanguage, "*")<>1 then + error(msprintf(gettext("%s: Wrong size for input argument #%d: A string expected.\n"), "example_run", 3)); + end + + for kMod = 1:size(modulesName, "*") + + moduleName = modulesName(kMod); + + if (isdir(moduleName)) then + moduleDir = fullfile(moduleName,"help"); + else + moduleDir = fullfile(SCI,"modules",moduleName,"help"); + if ~isdir(moduleDir) then + error(msprintf(gettext("%s: Wrong value for input argument #%d: A Scilab module name expected.\n"), "example_run", 1)); + return + end + end + + moduleDir = fullfile(moduleDir,helpLanguage); + if ~isdir(moduleDir) then + error(msprintf(gettext("%s: Wrong value for input argument #%d: A valid language expected.\n"), "example_run", 3)); + return + end + + tempModuleName = basename(moduleName) + "_help"; + + workDir = fullfile(TMPDIR,tempModuleName,"tests","unit_tests"); + if isdir(workDir) then + rmdir(workDir, "s"); + end + + if isempty(functionsName) then + xmlFiles = findHelpFiles(moduleDir, []); + + for kFile = 1:size(xmlFiles, "*") + xmlFile = xmlFiles(kFile); + createTestsFromHelp(moduleDir, workDir, xmlFile) + end + else + for kFunction = 1:size(functionsName, "*") + xmlFiles = findHelpFiles(moduleDir, functionsName(kFunction)); + if isempty(xmlFiles) then // The user wants to test a specific file + error(msprintf(gettext("%s: Wrong value for input argument #%d: A ''%s'' module function name expected.\n"), "example_run", 2, moduleName)); + return + end + + for kFile = 1:size(xmlFiles, "*") + xmlFile = xmlFiles(kFile); + createTestsFromHelp(moduleDir, workDir, xmlFile) + end + end + end + + testDir=fullfile(TMPDIR,tempModuleName) + if rhs > 3 then + boolStatus = test_run(testDir, [], varargin(:)) + else + boolStatus = test_run(testDir, []) + end + end + +endfunction + +function createTestsFromHelp(baseDirectory, outputDirectory, helpFile) + + mkdir(outputDirectory); + + helpFileDoc = xmlRead(helpFile); + + // Find all programlisting tag in the file + exampleTags = xmlXPath(helpFileDoc, "//scilabhelpfile:programlisting", ["scilabhelpfile" "http://docbook.org/ns/docbook"]); + + for kExample = 1:size(exampleTags, "*") + + programListing = []; + + if exampleTags(kExample).attributes.role == "interactive-example" then + programListing = ["// <-- INTERACTIVE TEST -->" ; programListing]; + end + + ignoredRoles = ["no-scilab-exec"]; + ignoreExample = or(exampleTags(kExample).attributes.role==ignoredRoles) | isempty(exampleTags(kExample).attributes.role); + + programListing = ["// <-- NO CHECK REF -->" ; programListing; exampleTags(kExample).content]; + + if ~ignoreExample then + functionName = fileparts(helpFile, "fname"); + relPath = dirname(getrelativefilename(baseDirectory, helpFile)); + + mkdir(fullfile(outputDirectory,relPath)) + + if size(exampleTags, "*")>1 then + filebase=functionName + "_" + string(kExample) + ".tst" + destfile=fullfile(outputDirectory,relPath,filebase); + mputl(programListing,destfile); + else + filebase=functionName + ".tst" + destfile=fullfile(outputDirectory,relPath,filebase) + mputl(programListing,destfile); + end + end + end + +endfunction + +function xmlFilenames = findHelpFiles(directory, functionName) + + xmlFilenames = []; + + allFiles = ls(directory); + + for kFile = 1:size(allFiles, "*") + if isfile(allFiles(kFile)) then + if fileparts(allFiles(kFile), "extension")==".xml" then + if isempty(functionName) then + xmlFilenames($+1) = allFiles(kFile); + elseif fileparts(allFiles(kFile), "fname")==functionName then + xmlFilenames($+1) = allFiles(kFile); + end + end + else // Directory + subDir=fullfile(directory,allFiles(kFile)) + subxmlfiles=findHelpFiles(subDir, functionName) + xmlFilenames = [xmlFilenames;subxmlfiles] + end + end + +endfunction diff --git a/modules/development_tools/macros/launchtest.bin b/modules/development_tools/macros/launchtest.bin Binary files differnew file mode 100755 index 000000000..42e16d2c2 --- /dev/null +++ b/modules/development_tools/macros/launchtest.bin diff --git a/modules/development_tools/macros/launchtest.sci b/modules/development_tools/macros/launchtest.sci new file mode 100755 index 000000000..2d9763099 --- /dev/null +++ b/modules/development_tools/macros/launchtest.sci @@ -0,0 +1,42 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr> +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// Purpose : this file provides functions to test scilab for each modules +// Under Linux/Unix it is called by the command "make check" +// Which will call the target check-local in the file Makefile.incl.am + +function launchtest(myPath,myTests) + chdir(myPath) + maketests(myTests,"clean") + maketests(myTests,"test") +endfunction + +function maketests(myTests,job) + lines(0) // to disable line control + if argn(2)<1 then job="tests",end + if job=="clean" then //remove .dia files + cleantests(myTests) + else + for k1=1:size(myTests,"*") // loop on .tst files + scitest(myTests(k1)) + end + end +endfunction + +function cleantests(myTests) + if getos() == "Windows" then + path=SCI+"\tests\basic_tests" + file_to_clean=path+strsubst(myTests,".tst",".dia") + unix_s("del "+""""+strcat(file_to_clean,""" """)+"""") + else + path="./" + file_to_clean=path+strsubst(myTests,".tst",".dia") + unix_s("rm -f "+strcat(file_to_clean," ")) + end +endfunction diff --git a/modules/development_tools/macros/lib b/modules/development_tools/macros/lib Binary files differnew file mode 100755 index 000000000..1e7a22c7c --- /dev/null +++ b/modules/development_tools/macros/lib diff --git a/modules/development_tools/macros/names b/modules/development_tools/macros/names new file mode 100755 index 000000000..dac806a04 --- /dev/null +++ b/modules/development_tools/macros/names @@ -0,0 +1,11 @@ +bench_run +devtools_run_builder +example_run +launchtest +nonreg_test_run +scitest +test_clean +test_run +test_run_level +testexamples +unit_test_run diff --git a/modules/development_tools/macros/nonreg_test_run.bin b/modules/development_tools/macros/nonreg_test_run.bin Binary files differnew file mode 100755 index 000000000..9a8fdf1ba --- /dev/null +++ b/modules/development_tools/macros/nonreg_test_run.bin diff --git a/modules/development_tools/macros/nonreg_test_run.sci b/modules/development_tools/macros/nonreg_test_run.sci new file mode 100755 index 000000000..42b4618e7 --- /dev/null +++ b/modules/development_tools/macros/nonreg_test_run.sci @@ -0,0 +1,39 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// ============================================================================= +// Launch Non-Regression tests +// ============================================================================= + +function nonreg_test_run(varargin) + + lhs = argn(1); + rhs = argn(2); + + if (rhs == 0) then + test_run([],[],["nonreg_tests"]); + + elseif rhs == 1 then + argument_1 = varargin(1); + test_run(argument_1,[],["nonreg_tests"]); + + elseif rhs == 2 then + argument_1 = varargin(1); + argument_2 = varargin(2); + test_run(argument_1,argument_2,["nonreg_tests"]); + + elseif rhs == 3 then + argument_1 = varargin(1); + argument_2 = varargin(2); + argument_3 = varargin(3); + test_run(argument_1,argument_2,[argument_3,"nonreg_tests"]); + + end + +endfunction diff --git a/modules/development_tools/macros/scitest.bin b/modules/development_tools/macros/scitest.bin Binary files differnew file mode 100755 index 000000000..511971d63 --- /dev/null +++ b/modules/development_tools/macros/scitest.bin diff --git a/modules/development_tools/macros/scitest.sci b/modules/development_tools/macros/scitest.sci new file mode 100755 index 000000000..d175ff6f0 --- /dev/null +++ b/modules/development_tools/macros/scitest.sci @@ -0,0 +1,173 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function scitest(tstfile,force,error_check,keep_prompt,postscript_graphics) + + // if error_check is %t then execution errors are reported + // if error_check is %f then only test checked error are detected + // (see examples in tests directory) + // if keep_prompt is %t the prompt is kept in the dia file + // this can be useful for producing demos + + [lhs,rhs]=argn(0); + + if exists("force","local") ==0 then force = %f ; end + if exists("error_check","local") ==0 then error_check = %f ; end + if exists("keep_prompt","local") ==0 then keep_prompt = %f ; end + if exists("postscript_graphics","local")==0 then postscript_graphics = %f ; end + + ind = strindex(tstfile,"."); + + if ind==[] then + diafile = tstfile+".tst"; + else + suf = part(tstfile,ind($):length(tstfile)); + if suf == ".dia" then + error(msprintf(gettext("%s: Wrong first input argument: File with .dia suffix expected."),"scitest")); + return + end + diafile=strsubst(tstfile,suf,".dia"); + end + + if newest(tstfile,diafile)==2 & force == %f then return,end + + mydisp("------------------- File "+tstfile+" --------------------"); + + //Reset standard globals + rand("seed",0);rand("uniform"); + + if getos() == "Windows" then + tmpfiles=strsubst(TMPDIR,"/","\")+"\tmp."; + else + tmpfiles=TMPDIR+"/tmp."; + end + + // Do some modification in tst file + // --------------------------------- + txt = mgetl(tstfile); + txt = strsubst(txt,"pause,end","bugmes();quit;end"); + txt = strsubst(txt,"-->","@#>"); + //to avoid suppression of input --> with prompts + txt=strsubst(txt,"halt()",""); + + if postscript_graphics then + pg1="driver(''Pos'');xinit(''"+tmpfiles+"gr"+"'');"; + pg2="xend();"; + else + pg1=""; + pg2=""; + end + + head="mode(3);clear;lines(28,72);lines(0);".. + +"deff(''[]=bugmes()'',''write(%io(2),''''error on test'''')'');".. + +"predef(''all'');".. + +"tmpdirToPrint = msprintf(''TMPDIR1=''''%s''''\n'',TMPDIR);".. + +"diary(''"+tmpfiles+"dia"+"'');".. + +"write(%io(2),tmpdirToPrint);".. + +pg1; + + tail = "diary(0);"+pg2+"exit;"; + + txt = [head; + txt; + tail]; + + // and save it in a temporary file + mputl(txt,tmpfiles+"tst"); + + myexec() + + // Do some modification in dia file + // ---------------------------------- + dia=mgetl(tmpfiles+"dia") + dia(grep(dia,"exec("))=[]; + TMP=dia(1); + dia(1)=[]; + dia(grep(dia,"diary(0)"))=[]; + + execstr(TMP) + + dia = strsubst(dia,TMPDIR,"TMPDIR"); + dia = strsubst(dia,TMPDIR1,"TMPDIR"); + dia = strsubst(dia,TMPDIR1,"TMPDIR"); + dia = strsubst(dia,SCI,"SCI"); + + //suppress the prompts + if keep_prompt == %f then + dia=strsubst(dia,"-->",""); + end + + dia = strsubst(dia,"@#>","-->"); + dia = strsubst(dia,"-1->",""); + + //standardise number display + dia=strsubst(strsubst(strsubst(strsubst(dia," .","0."),.. + "E+","D+"),"E-","D-"),"-.","-0."); + + //not to change the ref files + dia=strsubst(dia,"bugmes();return","bugmes();quit"); + + // write down the resulting dia file + mputl(dia,diafile) + + //Check for execution errors + // ------------------------- + + if error_check == %t then + if grep(dia,"!--error")<>[] then + mydisp(msprintf(gettext("Test failed ERROR DETECTED while executing %s"),tstfile)); + return; + end + end + + if grep(dia,"error on test")<>[] then + mydisp(msprintf(gettext("Test failed ERROR DETECTED while executing %s"),tstfile)); + return; + end + + //Check for diff with the .ref file + // -------------------------------- + [u,ierr]=mopen(diafile+".ref","r") + if ierr== 0 then //ref file exists + ref=mgetl(u);mclose(u) + // suppress blank (diff -nw) + dia=strsubst(dia," ","") + ref=strsubst(ref," ","") + + if or(ref<>dia) then + if getos() == "Windows" then + mydisp(msprintf(gettext("Test Failed. See : fc /L /N %s"),diafile+" "+diafile+".ref ")); + else + mydisp(msprintf(gettext("Test Failed. See : diff -wu %s"),diafile+" "+diafile+".ref ")); + end + else + mydisp(gettext("Test passed")); + end + end + mydisp("----------------------------------------------------------"); + +endfunction + +function mydisp(str) + write(%io(2),str,"(a)") +endfunction + +function myexec() + if getos() == "Windows" then + if fileinfo(tmpfiles+"dia")<>[] then + deletefile(tmpfiles+"dia") + end + dos(""""+SCI+"\bin\scilex.exe"+""""+" -nwni -args -nouserstartup -f "+tmpfiles+"tst 1>NUL"); + else + if fileinfo(tmpfiles+"dia")<>[] then + deletefile(tmpfiles+"dia") + end + unix_s("( "+SCI+"/bin/scilab -nw -args -nouserstartup -f "+tmpfiles+"tst > "+tmpfiles+"res ) 2> "+tmpfiles+"err") + end +endfunction diff --git a/modules/development_tools/macros/test_clean.bin b/modules/development_tools/macros/test_clean.bin Binary files differnew file mode 100755 index 000000000..b805d5a7c --- /dev/null +++ b/modules/development_tools/macros/test_clean.bin diff --git a/modules/development_tools/macros/test_clean.sci b/modules/development_tools/macros/test_clean.sci new file mode 100755 index 000000000..f57fe4344 --- /dev/null +++ b/modules/development_tools/macros/test_clean.sci @@ -0,0 +1,223 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// ============================================================================= +// Clean tests +// ============================================================================= + +function test_clean(varargin) + + lhs = argn(1); + rhs = argn(2); + + global test_list; + global test_count; + global displayed_txt; + + // test type + test_types = ["unit_tests","nonreg_tests"]; + test_types_keeped = ""; + + test_count = 0; + + displayed_txt = ""; + + // ======================================================= + // Gestion des types de tests à lancer + // ======================================================= + + if rhs < 3 then + test_types_keeped = "all_tests"; + else + option_mat = varargin(3); + + if ((grep(option_mat,"unit_tests")<>[]) & (grep(option_mat,"nonreg_tests")<>[])) .. + | (grep(option_mat,"all_tests")<>[]) then + test_types_keeped = "all_tests"; + + elseif grep(option_mat,"unit_tests") <> [] then + test_types_keeped = "unit_tests"; + + elseif grep(option_mat,"nonreg_tests") <> [] then + test_types_keeped = "nonreg_tests"; + + else + test_types_keeped = "all_tests"; + + end + + end + + // ======================================================= + // Gestion des tests à lancer + // ======================================================= + + if (rhs == 0) .. + | ((rhs == 1) & (varargin(1)==[])) .. + | (((rhs == 2)|(rhs == 3)) & (varargin(1)==[]) & (varargin(2)==[])) then + + // No input argument + // test_clean() + // test_clean([]) + // => Launch each test of each module + + module_list = getmodules(); + module_list = gsort(module_list,"lr","i"); + for k=1:size(module_list,"*") + test_clean_module(module_list(k),test_types_keeped); + end + + elseif (rhs == 1) .. + | ((rhs == 2) & (varargin(2)==[])) .. + | ((rhs == 3) & (varargin(2)==[])) then + + // One input argument + // test_clean(<module_name>) + // test_clean([<module_name_1>,<module_name_2>]) + + // varargin(1) = [<module_name_1>,<module_name_2>] + + module_mat = varargin(1); + + [nl,nc] = size(module_mat); + + // test_clean([<module_name_1>,<module_name_2>]) + + for i=1:nl + for j=1:nc + if( with_module(module_mat(i,j)) ) then + test_clean_module(module_mat(i,j),test_types_keeped); + else + error(sprintf(gettext("%s is not an installed module"),module_mat(i,j))); + end + end + end + + elseif (rhs == 2) | (rhs == 3) then + + // Two input arguments + // test_clean(<module_name>,<test_name>) + // test_clean(<module_name>,[<test_name_1>,<test_name_2>] ) + + // varargin(1) = <module_name> ==> string 1x1 + // varargin(2) = <test_name_1> ==> mat nl x nc + + module = varargin(1); + test_mat = varargin(2); + + if ((or(size(module) <> [1,1])) & (test_mat <> [])) then + example = test_examples(); + err = ["" ; msprintf(gettext("%s: Wrong size for input argument."),"test_clean") ; "" ; example ]; + printf("%s\n",err); + return; + end + + [nl,nc] = size(test_mat); + + for i=1:nl + for j=1:nc + + if (fileinfo(SCI+"/modules/"+module+"/tests/unit_tests/"+test_mat(i,j)+".dia")<>[]) .. + & ( (test_types_keeped=="all_tests") | (test_types_keeped=="unit_tests") ) then + test_clean_onetest(module,test_mat(i,j),"unit_tests"); + + elseif (fileinfo(SCI+"/modules/"+module+"/tests/nonreg_tests/"+test_mat(i,j)+".dia")<>[]) .. + & ( (test_types_keeped=="all_tests") | (test_types_keeped=="nonreg_tests") ) then + test_clean_onetest(module,test_mat(i,j),"nonreg_tests"); + + else + error(sprintf(gettext("The test ""%s"" is not available from the ""%s"" module"),test_mat(i,j),module)); + + end + end + end + else + error(msprintf(gettext("%s: Wrong number of input arguments."),"test_clean")); + end + + // ======================================================= + // Test clean + // ======================================================= + + for i=1:test_count + printf(" %03d/%03d - ",i,test_count); + printf("[%s] %s.dia\n",test_list(i,1),test_list(i,2)); + test_clean_dia(test_list(i,1),test_list(i,2),test_list(i,3)); + end + +endfunction + +//----------------------------------------------------------------------------- +// Pierre MARECHAL +// Scilab team +// Date : 28 oct. 2007 +// +// => List all test files in the module <module_mat> +// => Add them to the test_mat matrix +//----------------------------------------------------------------------------- + +function test_clean_module(module_mat,test_type) + + if (test_type == "all_tests") | (test_type == "unit_tests") then + + module_test_dir = SCI+"/modules/"+module_mat+"/tests/unit_tests"; + test_mat = gsort(basename(listfiles(module_test_dir+"/*.dia")),"lr","i"); + + nl = size(test_mat,"*"); + for i=1:nl + test_clean_onetest(module_mat,test_mat(i),"unit_tests"); + end + + end + + if (test_type == "all_tests") | (test_type == "nonreg_tests") then + + module_test_dir = SCI+"/modules/"+module_mat+"/tests/nonreg_tests"; + test_mat = gsort(basename(listfiles(module_test_dir+"/*.dia")),"lr","i"); + + nl = size(test_mat,"*"); + for i=1:nl + test_clean_onetest(module_mat,test_mat(i),"nonreg_tests"); + end + + end + +endfunction + +//----------------------------------------------------------------------------- +// Pierre MARECHAL +// Scilab team +// Date : 28 oct. 2007 +// +// => Add the test <test> to the test_mat matrix +//----------------------------------------------------------------------------- + +function test_clean_onetest(module,test,test_type) + + global test_list; + global test_count; + + test_count = test_count + 1; + test_list( test_count , 1 ) = module; + test_list( test_count , 2 ) = test; + test_list( test_count , 3 ) = test_type; + +endfunction + +//----------------------------------------------------------------------------- +// Pierre MARECHAL +// Scilab team +// Date : 15 jan. 2008 +// +// => remove dia file +//----------------------------------------------------------------------------- + +function test_clean_dia(module,test,test_type) + mdelete(SCI+"/modules/"+module+"/tests/"+test_type+"/"+test+".dia"); +endfunction diff --git a/modules/development_tools/macros/test_run.bin b/modules/development_tools/macros/test_run.bin Binary files differnew file mode 100755 index 000000000..88f19ffd5 --- /dev/null +++ b/modules/development_tools/macros/test_run.bin diff --git a/modules/development_tools/macros/test_run.sci b/modules/development_tools/macros/test_run.sci new file mode 100755 index 000000000..ff9f68e26 --- /dev/null +++ b/modules/development_tools/macros/test_run.sci @@ -0,0 +1,1301 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA - Pierre MARECHAL +// Copyright (C) 2009-2011 - DIGITEO - Michael Baudin +// Copyright (C) 2010-2012 - DIGITEO - Antoine ELIAS +// Copyright (C) 2011 - DIGITEO - Allan CORNET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// test_run -- +// Launch unit tests. + +function test_run_result = test_run(varargin) + lhs = argn(1); + rhs = argn(2); + test_run_result = %f; + // ========================================================================= + // Print test_run help + // ========================================================================= + if (rhs >= 3) & (~ isempty(grep(varargin(3),"help"))) then + example = test_examples(); + printf("%s\n",example); + return; + end + + status.detailled_failures = ""; + status.testsuites = []; + status.test_count = 0; + status.test_passed_count = 0; + status.test_failed_count = 0; + status.test_skipped_count = 0; + status.totalTime = 0; + status.list = []; + + params.longtime = %f; + params.wanted_mode = ""; + params.error_output = "check"; + params.reference = "check"; + params.testTypes = "all_tests"; + params.skip_mat = []; + params.tests_mat = []; + params.test_passed_percent = 0; + params.test_failed_percent = 0; + params.test_skipped_percent = 0; + params.full_summary = %t; + params.show_diff = %f; + params.show_error = %f; + + // ======================================================= + // Management of the kind of tests to run and the options + // ======================================================= + if rhs >= 3 then + + option_mat = varargin(3); + if (check_option(option_mat, "unit_tests") & check_option(option_mat, "nonreg_tests")) | check_option(option_mat, "all_tests") then + params.testTypes = "all_tests"; + elseif check_option(option_mat, "unit_tests") then + params.testTypes = "unit_tests"; + elseif check_option(option_mat, "nonreg_tests") then + params.testTypes = "nonreg_tests"; + end + + option_mat = clean_option(option_mat, "unit_tests"); + option_mat = clean_option(option_mat, "nonreg_tests"); + option_mat = clean_option(option_mat, "all_tests"); + + // Skip tests + params.skip_mat = assign_option(option_mat, "skip_tests", varargin(2), params.skip_mat); + option_mat = clean_option(option_mat, "skip_tests"); + + // Mode + params.wanted_mode = assign_option(option_mat, "mode_nw", "NW", params.wanted_mode); + option_mat = clean_option(option_mat, "mode_nw"); + + params.wanted_mode = assign_option(option_mat, "mode_nwni", "NWNI", params.wanted_mode); + option_mat = clean_option(option_mat, "mode_nwni"); + + // Reference + params.reference = assign_option(option_mat, "no_check_ref", "skip", params.reference); + option_mat = clean_option(option_mat, "no_check_ref"); + + params.reference = assign_option(option_mat, "create_ref", "create", params.reference); + option_mat = clean_option(option_mat, "create_ref"); + + params.reference = assign_option(option_mat, "list", "list", params.reference); + option_mat = clean_option(option_mat, "list"); + + // Error Output + params.error_output = assign_option(option_mat, "no_check_error_output", "skip", params.error_output); + option_mat = clean_option(option_mat, "no_check_error_output"); + + // Enable long-time tests + params.longtime = assign_option(option_mat, "disable_lt", %f, params.longtime); + option_mat = clean_option(option_mat, "disable_lt"); + + params.longtime = assign_option(option_mat, "enable_lt", %t, params.longtime); + option_mat = clean_option(option_mat, "enable_lt"); + + // Summary display management + params.full_summary = assign_option(option_mat, "short_summary", %f, params.full_summary); + option_mat = clean_option(option_mat, "short_summary"); + + params.show_diff = assign_option(option_mat, "show_diff", %t, params.show_diff); + option_mat = clean_option(option_mat, "show_diff"); + + params.show_error = assign_option(option_mat, "show_error", %t, params.show_error); + option_mat = clean_option(option_mat, "show_error"); + + if option_mat <> [] then + printf("\nUnrecognized option(s): \n\n"); + for i=1:size(option_mat, "*") + printf(" - ""%s""\n", option_mat(i)); + end + + return; + end + + if rhs == 4 then + params.exportFile = varargin(4); + // Doing the XML export, force the display of the error and diff + params.show_diff = %t; + params.show_error = %t; + end + end + + + if params.reference <> "list" & params.full_summary then + printf(" TMPDIR = %s\n",TMPDIR); + printf("\n"); + end + // ======================================================= + // Management of the tests to run + // ======================================================= + if (rhs == 0) .. + | ((rhs == 1) & (varargin(1)==[])) .. + | (((rhs == 2)|(rhs == 3)|(rhs == 4)) & (varargin(1)==[]) & (varargin(2)==[])) then + + + // No input argument + // test_run() + // test_run([]) + // => Launch each test of each module + + module_list = getmodules(); + module_list = gsort(module_list,"lr","i"); + + test_count = size(module_list,"*"); + for i=1:test_count + if params.reference <> "list" then + printf(" %03d/%03d - [%s] : \n\n", i, test_count, module_list(i)); + end + + params.tests_mat = []; + params.moduleName = module_list(i); + + result = test_module(params); + + if params.reference <> "list" then + status.detailled_failures = [status.detailled_failures; result.detailled_failures]; + status.testsuites(size(status.testsuites,"*")+1) = result.testsuite + status.test_skipped_count = status.test_skipped_count + result.test_skipped_count; + + // Do not take in account skipped tests + status.test_count = status.test_count + result.test_count - status.test_skipped_count; + status.test_passed_count = status.test_passed_count + result.test_passed_count; + status.test_failed_count = status.test_failed_count + result.test_failed_count; + status.totalTime = status.totalTime + result.totalTime; + printf("\n"); + else + status.test_count = status.test_count + result.test_count; + status.list = [status.list; result.list]; + end + end + + elseif (rhs == 1) .. + | ((rhs == 2) & (varargin(2)==[])) .. + | ((rhs == 3) & (varargin(2)==[])) .. + | ((rhs == 4) & (varargin(2)==[])) .. + | ( ~ isempty(params.skip_mat)) then + + // One input argument + // test_run(<module_name>) + // test_run([<module_name_1>,<module_name_2>]) + // varargin(1) = [<module_name_1>,<module_name_2>] + + module_mat = varargin(1); + + test_count = size(module_mat,"*"); + for i = 1:test_count + if params.reference <> "list" then + printf(" %03d/%03d - [%s] : \n\n", i, test_count, module_mat(i)); + end + + params.tests_mat = []; + params.moduleName = module_mat(i); + + result = test_module(params); + + status.test_count = status.test_count + result.test_count; + if params.reference <> "list" then + status.detailled_failures = [status.detailled_failures; result.detailled_failures]; + status.testsuites(size(status.testsuites,"*")+1) = result.testsuite + + status.test_skipped_count = status.test_skipped_count + result.test_skipped_count; + status.test_passed_count = status.test_passed_count + result.test_passed_count; + status.test_failed_count = status.test_failed_count + result.test_failed_count; + status.totalTime = status.totalTime + result.totalTime; + + printf("\n"); + else + status.test_count = status.test_count + result.test_count; + status.list = [status.list; result.list]; + end + end + // Do not take in account skipped tests + status.test_count = status.test_count - status.test_skipped_count; + elseif or(rhs==[2 3 4]) then + // Two input arguments + // test_run(<module_name>,<test_name>) + // test_run(<module_name>,[<test_name_1>,<test_name_2>] ) + + // varargin(1) = <module_name> ==> string 1x1 + // varargin(2) = <test_name_1> ==> mat nl x nc + + params.tests_mat = varargin(2); + params.moduleName = varargin(1); + + if ((or(size(params.moduleName) <> [1,1])) & (params.tests_mat <> [])) then + example = test_examples(); + err = ["" ; msprintf(gettext("%s: Wrong size for input argument."),"test_run") ; "" ; example ]; + printf("%s\n",err); + return; + end + + result = test_module(params); + + if params.reference <> "list" then + status.totalTime = result.totalTime; + status.detailled_failures = [status.detailled_failures; result.detailled_failures]; + status.testsuites(size(status.testsuites,"*")+1) = result.testsuite + status.test_skipped_count = status.test_skipped_count + result.test_skipped_count; + + // Do not take in account skipped tests + status.test_count = status.test_count + result.test_count - status.test_skipped_count; + status.test_passed_count = status.test_passed_count + result.test_passed_count; + status.test_failed_count = status.test_failed_count + result.test_failed_count; + else + status.test_count = status.test_count + result.test_count; + status.list = [status.list; result.list]; + end + else + error(msprintf(gettext("%s: Wrong number of input arguments."),"test_run")); + end + + if params.reference == "list" then + test_count = size(status.list, "r"); + for i=1:test_count + printf(" %4.d - [%s] %s\n", i, status.list(i, 1), status.list(i,2)); + end + return; + end + + // percent computation + if status.test_count <> 0 then + test_passed_percent = status.test_passed_count / status.test_count * 100; + test_failed_percent = status.test_failed_count / status.test_count * 100; + else + test_passed_percent = 0; + test_failed_percent = 0; + end + + if isfield(params, "exportFile") then + exportToXUnitFormat(params.exportFile, status.testsuites); + end + + if params.full_summary then + printf("\n"); + printf(" --------------------------------------------------------------------------\n"); + printf(" Summary\n\n"); + printf(" tests %4d - 100 %%\n", status.test_count); + printf(" passed %4d - %3d %%\n", status.test_passed_count, test_passed_percent); + printf(" failed %4d - %3d %%\n", status.test_failed_count, test_failed_percent); + printf(" skipped %4d\n", status.test_skipped_count); + printf(" length %4.2f sec\n", status.totalTime); + printf(" --------------------------------------------------------------------------\n"); + + if isfield(params, "exportFile") then + printf(" Export to %s\n", params.exportFile); + printf(" --------------------------------------------------------------------------\n"); + end + + if status.test_failed_count > 0 then + printf(" Details\n\n"); + printf("%s\n",status.detailled_failures); + printf("\n"); + printf(" --------------------------------------------------------------------------\n"); + end + else + printf("\n"); + printf(" --------------------------------------------------------------------------\n"); + printf(" Tests: %4d, ", status.test_count); + printf(" Passed: %4d, ", status.test_passed_count); + printf(" Failed: %4d, ", status.test_failed_count); + printf(" Skipped: %4d\n", status.test_skipped_count); + printf(" --------------------------------------------------------------------------\n"); + end + + // Returns %t if no error has been detected + // Returns %f if any error has been detected + test_run_result = (status.test_failed_count == 0); + +endfunction + + + +function status = test_module(_params) + name = splitModule(_params.moduleName); + + if with_module(name(1)) then + // It's a scilab internal module + module.path = pathconvert(SCI + "/modules/" + name(1), %F); + elseif or(librarieslist() == "atomslib") & atomsIsLoaded(name(1)) then + // It's an ATOMS module + module.path = pathconvert(atomsGetLoadedPath(name(1)) , %F, %T); + elseif isdir(name(1)) then + // It's an external module + module.path = pathconvert(name(1), %F); + else + // It's an error + error(sprintf(gettext("%s is not an installed module or toolbox"), name(1))); + end + + //get tests from path + my_types = ["unit_tests","nonreg_tests"]; + + directories = []; + for i=1:size(my_types,"*") + if (_params.testTypes == "all_tests") | (_params.testTypes == my_types(i)) then + directory_path = module.path + "/tests/" + my_types(i); + for j=2:size(name,"*") + directory_path = directory_path + filesep() + name(j); + end + + if isdir(directory_path) then + directories = [directories;getDirectories(directory_path + filesep())]; + end + end + end + + tests = []; + if( _params.tests_mat == []) + for i=1:size(directories, "*") + currentDir = directories(i); + tests_mat = gsort(basename(listfiles(currentDir + filesep() + "*.tst")),"lr","i"); + + for j = 1:size(tests_mat, "*") + if or(tests_mat(j) == _params.skip_mat) == %f then + tests($+1, [1,2]) = [currentDir, tests_mat(j)]; + end + end + end + else + //not empty tests_mat + for i = 1:size(_params.tests_mat, "*") + bFind = %f; + for j = 1:size(directories, "*") + currentDir = directories(j); + testFile = currentDir + filesep() + _params.tests_mat(i) + ".tst"; + if isfile(testFile) then + tests($+1, [1,2]) = [currentDir, _params.tests_mat(i)]; + bFind = %t; + end + end + + if bFind == %f then + error(sprintf(gettext("The test ""%s"" is not available from the ""%s"" module"), _params.tests_mat(i), name(1))); + end + end + end + + //initialize counter + detailled_failures = ""; + test_count = size(tests, "r"); + test_passed_count = 0; + test_failed_count = 0; + test_skipped_count = 0; + + moduleName = _params.moduleName; + // Improve the display of the module + if isdir(moduleName) then + if part(moduleName,1:length(SCI)) == SCI then + moduleName = "SCI" + part(moduleName,length(SCI)+1:length(moduleName)); + elseif part(moduleName,1:length(SCIHOME)) == SCIHOME then + moduleName = "SCIHOME" + part(moduleName,length(SCIHOME)+1:length(moduleName)); + end + end + + // For the XML export + testsuite.name=moduleName + testsuite.time=0 + testsuite.tests=0 + testsuite.errors=0 + + //don't test only return list of tests. + if _params.reference == "list" then + for i = 1:test_count + if size(name, "*") > 1 then + displayModuleName = sprintf("%s", name(1)); + for j=2:size(name, "*") + displayModuleName = displayModuleName + sprintf("|%s", name(j)); + end + else + displayModuleName = sprintf("%s", name(1)); + end + tests(i,1) = displayModuleName; + end + status.list = tests; + status.test_count = test_count; + return; + end + + tic(); + for i = 1:test_count + printf(" %03d/%03d - ",i, test_count); + + if size(name, "*") > 1 then + displayModuleName = sprintf("[%s", name(1)); + for j=2:size(name, "*") + displayModuleName = displayModuleName + sprintf("|%s", name(j)); + end + displayModuleName = displayModuleName + sprintf("] %s", tests(i,2)); + else + displayModuleName = sprintf("[%s] %s", name(1), tests(i,2)); + end + + printf("%s", displayModuleName); + if length(displayModuleName) >= 50 then + printf(" "); + end + for j = length(displayModuleName):50 + printf("."); + end + + elapsedTimeBefore=toc(); + result = test_single(_params, tests(i,1), tests(i,2)); + elapsedTimeAfter=toc(); + + testsuite.tests = testsuite.tests + 1 + + testsuite.testcase(i).name=tests(i,2); + testsuite.testcase(i).time=elapsedTimeAfter-elapsedTimeBefore; + testsuite.testcase(i).skipped=(result.id >= 10) & (result.id < 20); + + if result.id == 0 then + printf("passed\n"); + test_passed_count = test_passed_count + 1; + else + msg = sprintf(result.message); + printf("%s \n", msg(1)); + for kline = 2:size(msg, "*") + printf(part(" ", 1:62) + "%s \n", msg(2)); + end + + if result.id < 10 then + //failed + test_failed_count = test_failed_count + 1; + detailled_failures = [ detailled_failures ; sprintf(" TEST : [%s] %s", _params.moduleName, tests(i,2))]; + detailled_failures = [ detailled_failures ; sprintf(" %s", result.message) ]; + detailled_failures = [ detailled_failures ; result.details ]; + detailled_failures = [ detailled_failures ; "" ]; + + testsuite.errors = testsuite.errors + 1 + testsuite.testcase(i).failure.type=result.message + testsuite.testcase(i).failure.content=result.details + + elseif (result.id >= 10) & (result.id < 20) then + // skipped + test_skipped_count = test_skipped_count + 1; + end + end + end + + status.totalTime = toc(); + + testsuite.time=status.totalTime; + + clearglobal TICTOC; + status.test_passed_count = test_passed_count; + status.test_failed_count = test_failed_count; + status.test_skipped_count = test_skipped_count; + + // Summary + status.test_count = test_count; + status.detailled_failures = detailled_failures; + status.testsuite = testsuite; +endfunction + +function status = test_single(_module, _testPath, _testName) + //option flag + + skip = %F; + interactive = %F; + notyetfixed = %F; + longtime = %F; + reopened = %F; + jvm = %T; + graphic = %F; + mpi = %F; + execMode = ""; + platform = "all"; + language = "any"; + try_catch = %T; + error_output = "check"; + reference = "check"; + xcosNeeded = %F; + + //some paths + tmp_tst = pathconvert( TMPDIR + "/" + _testName + ".tst", %F); + tmp_dia = pathconvert( TMPDIR + "/" + _testName + ".dia.tmp", %F); + tmp_res = pathconvert( TMPDIR + "/" + _testName + ".res", %F); + tmp_err = pathconvert( TMPDIR + "/" + _testName + ".err", %F); + path_dia = pathconvert( TMPDIR + "/" + _testName + ".dia", %F); + + path_dia_ref = _testPath + _testName + ".dia.ref"; + // Reference file management OS by OS + if getos() == "Windows" then + [branch info] = getversion(); + if info(2) == "x86" then // Look for a 32bits-specific reference file + altreffile = [ _testPath + _testName + ".win.dia.ref" ; _testPath + _testName + ".win32.dia.ref" ]; + else + altreffile = [ _testPath + _testName + ".win.dia.ref" ]; + end + elseif getos() == "Darwin" then + altreffile = [ _testPath + _testName + ".unix.dia.ref" ; _testPath + _testName + ".macosx.dia.ref" ]; + elseif getos() == "Linux" then + [branch info] = getversion(); + if info(2) == "x86" then // Look for a 32bits-specific reference file + altreffile = [ _testPath + _testName + ".unix.dia.ref" ; _testPath + _testName + ".linux.dia.ref" ; _testPath + _testName + ".linux32.dia.ref" ]; + else + altreffile = [ _testPath + _testName + ".unix.dia.ref" ; _testPath + _testName + ".linux.dia.ref" ]; + end + else + altreffile = [ _testPath + _testName + ".unix.dia.ref" ]; + end + + for i=1:size(altreffile,"*") + if isfile(altreffile(i)) then + path_dia_ref = altreffile(i); + end + end + + //output structure + status.id = 0; + status.message = ""; + status.details = ""; + + //Reset standard globals + rand("seed",0); + rand("uniform"); + + //load file + testFile = _testPath + _testName + ".tst"; + sciFile = mgetl(testFile); + + //read options + if ~isempty(grep(sciFile, "<-- NOT FIXED -->")) then + status.id = 10; + status.message = "skipped: not yet fixed"; + return; + end + + if ~isempty(grep(sciFile, "<-- REOPENED -->")) then + status.id = 10; + status.message = "skipped: Bug reopened"; + return; + end + + // platform + if ~isempty(grep(sciFile, "<-- WINDOWS ONLY -->")) & getos() <> "Windows" then + status.id = 10; + status.message = "skipped: Windows only"; + return; + end + + if ~isempty(grep(sciFile, "<-- UNIX ONLY -->")) & getos() == "Windows" then + status.id = 10; + status.message = "skipped: Unix only"; + return; + end + + if ~isempty(grep(sciFile, "<-- LINUX ONLY -->")) & getos() <> "Linux" then + status.id = 10; + status.message = "skipped: Linux only"; + return; + end + + if ~isempty(grep(sciFile, "<-- MACOSX ONLY -->")) & getos() <> "Darwin" then + status.id = 10; + status.message = "skipped: MacOSX only"; + return; + end + + // Test execution + if ~isempty(grep(sciFile, "<-- INTERACTIVE TEST -->")) then + status.id = 10; + status.message = "skipped: interactive test"; + return; + end + + if ~isempty(grep(sciFile, "<-- LONG TIME EXECUTION -->")) & ~_module.longtime then + status.id = 10; + status.message = "skipped: Long time duration"; + return; + end + + if ~isempty(grep(sciFile, "<-- TEST WITH GRAPHIC -->")) then + if _module.wanted_mode == "NWNI" then + status.id = 10; + status.message = "skipped: Test with graphic"; + return; + end + + graphic = %T; + jvm = %T; + execMode = "NW"; + end + + if (~isempty(grep(sciFile, "<-- JVM NOT MANDATORY -->")) | ~isempty(grep(sciFile, "<-- CLI SHELL MODE -->"))) then + jvm = %F; + execMode = "NWNI"; + end + + MPITestPos=grep(sciFile, "<-- MPI TEST") + if ~isempty(MPITestPos) then + mpi_node=msscanf(sciFile(MPITestPos), "// <-- MPI TEST %d -->") + if mpi_node == [] then + // No node found ? No worries, default to 2 + mpi_node = 2 + end + mpi = %t; + execMode = "NWNI"; + reference = "skip"; + end + clear MPITestPos + + if ~isempty(grep(sciFile, "<-- XCOS TEST -->")) then + if _module.wanted_mode == "NWNI" then + status.id = 10; + status.message = "skipped: Test with xcos"; + return; + end + xcosNeeded = %T; + jvm = %T; + end + + // Language + if ~isempty(grep(sciFile, "<-- FRENCH IMPOSED -->")) then + language = "fr_FR"; + end + + + if ~isempty(grep(sciFile, "<-- ENGLISH IMPOSED -->")) then + language = "en_US"; + end + + // Test building + if ~isempty(grep(sciFile, "<-- NO TRY CATCH -->")) then + try_catch = %F; + end + + // Test result + if ~isempty(grep(sciFile, "<-- NO CHECK ERROR OUTPUT -->")) then + error_output = "skip"; + end + + if ~isempty(grep(sciFile, "<-- NO CHECK REF -->")) then + reference = "skip"; + end + + //build real test file + + // Do some modification in tst file + //replace "pause,end" by "bugmes();quit;end" + sciFile = strsubst(sciFile, "pause,end", "bugmes();quit;end"); + sciFile = strsubst(sciFile, "pause, end", "bugmes();quit;end"); + sciFile = strsubst(sciFile, "pause;end", "bugmes();quit;end"); + sciFile = strsubst(sciFile, "pause; end", "bugmes();quit;end"); + + //to avoid suppression of input --> with prompts + sciFile = strsubst(sciFile, "-->", "@#>"); + //remove halt calls + sciFile = strsubst(sciFile, "halt();", ""); + + // Build test header + head = [ + "// <-- HEADER START -->"; + "mode(3);" ; + "lines(28,72);"; + "lines(0);" ; + "function %onprompt" ; + " quit;" ; + "endfunction" ; + "function []=bugmes(), printf(''error on test'');endfunction" + "predef(''all'');"; + "tmpdirToPrint = msprintf(''TMPDIR1=''''%s'''';//\n'',TMPDIR);" + ]; + + if xcosNeeded then + head = [ + head; + "prot=funcprot(); funcprot(0);"; + "loadXcosLibs(); loadScicos();"; + "funcprot(prot);"; + ]; + end + + if try_catch then + head = [ head ; "try" ]; + end + + head = [ + head; + "diary(''" + tmp_dia + "'');"; + "printf(''%s\n'',tmpdirToPrint);"; + "// <-- HEADER END -->" + ]; + + // Build test footer + tail = [ "// <-- FOOTER START -->" ]; + + if try_catch then + tail = [ + tail; + "catch"; + " errmsg = ""<--""+""Error on the test script file""+""-->"";"; + " printf(""%s\n"",errmsg);"; + " lasterror()"; + "end"; + ]; + end + + tail = [ tail; "diary(0);" ]; + + if graphic then + tail = [ tail; "xdel(winsid());sleep(1000);" ]; + end + + tail = [ tail; "exit(0);" ; "// <-- FOOTER END -->" ]; + + //Build final test + sciFile = [head ; sciFile ; tail]; + + + //Build command to execute + + //scilab path + if (getos() <> "Windows") & ~isfile(SCI+"/bin/scilab") then + SCI_BIN = strsubst(SCI,"share/scilab",""); + else + SCI_BIN = SCI; + end + + //mode + if _module.wanted_mode == "NW" then + mode_arg = "-nw"; + elseif _module.wanted_mode == "NWNI" then + mode_arg = "-nwni"; + else + if execMode == "NWNI" then + mode_arg = "-nwni"; + elseif execMode == "NW" then + mode_arg = "-nw"; + else + mode_arg = "-nw"; + end + end + + if mpi == %t then + prefix_bin="mpirun -c " + string(mpi_node) + " -bynode" + else + prefix_bin="" + end + + + //language + if language == "any" then + language_arg = ""; + elseif getos() == "Windows" then + language_arg = "-l "+ language; + else + language_arg = "LANG=" + language + " "; + end + + loader_path = pathconvert(fullfile(_module.moduleName, "loader.sce"), %f); + + // Build final command + if getos() == "Windows" then + if (isdir(_module.moduleName) & isfile(loader_path)) // external module not in Scilab + test_cmd = "( """ + SCI_BIN + "\bin\scilex.exe" + """" + " " + mode_arg + " " + language_arg + " -nb -e ""exec(""""" + loader_path + """"");exec(""""" + tmp_tst + """"");"" > """ + tmp_res + """ ) 2> """ + tmp_err + """"; + else // standard module + test_cmd = "( """ + SCI_BIN + "\bin\scilex.exe" + """" + " " + mode_arg + " " + language_arg + " -nb -f """ + tmp_tst + """ > """ + tmp_res + """ ) 2> """ + tmp_err + """"; + end + else + if (isdir(_module.moduleName) & isfile(loader_path)) + test_cmd = "( " + language_arg + " " + SCI_BIN + "/bin/scilab " + mode_arg + " -nb -e ""exec(''" + loader_path + "'');exec(''" + tmp_tst +"'');""" + " > " + tmp_res + " ) 2> " + tmp_err; + else + test_cmd = "( " + language_arg + " " + prefix_bin + " " + SCI_BIN + "/bin/scilab " + mode_arg + " -nb -f " + tmp_tst + " > " + tmp_res + " ) 2> " + tmp_err; + end + end + + //clean previous tmp files + if isfile(tmp_tst) then + deletefile(tmp_tst); + end + + if isfile(tmp_dia) then + deletefile(tmp_dia); + end + + if isfile(tmp_res) then + deletefile(tmp_res); + end + + if isfile(tmp_err) then + deletefile(tmp_err); + end + + //create tmp test file + mputl(sciFile, tmp_tst); + + //execute test + returnStatus = host(test_cmd); + //Check return status + if (returnStatus <> 0) + status.id = 5; + status.message = "failed: Slave Scilab exited with error code " + string(returnStatus); + return; + end + + //Check errors + if (error_output == "check") & (_module.error_output == "check") then + if getos() == "Darwin" then + tmp_errfile_info = fileinfo(tmp_err); + msg = "JavaVM: requested Java version (1.5) not available. Using Java at ""/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"" instead." + + if ~isempty(tmp_errfile_info) then + txt = mgetl(tmp_err); + txt(txt==msg) = []; + if isempty(txt) then + deletefile(tmp_err); + else // Remove messages due to JOGL2 RC8 + toRemove = grep(txt, "__NSAutoreleaseNoPool()"); + txt(toRemove) = []; + if isempty(txt) then + deletefile(tmp_err); + end + end + end + end + + if getos() == "Linux" then // Ignore JOGL2 debug message + tmp_errfile_info = fileinfo(tmp_err); + msg = "Error: unable to open display (null)" + + if ~isempty(tmp_errfile_info) then + txt = mgetl(tmp_err); + txt(txt==msg) = []; + if isempty(txt) then + deletefile(tmp_err); + else // Remove messages due to warning message from library + toRemove = grep(txt, "libEGL warning: failed to find any driver"); + txt(toRemove) = []; + + if ~isempty(txt) then + toRemove = grep(txt, "extension ""RANDR"" missing on display"); + txt(toRemove) = []; + end + + if isempty(txt) then + deletefile(tmp_err); + end + end + end + end + + if getos() == "Windows" then // Ignore JOGL 2.2.4 debug message + tmp_errfile_info = fileinfo(tmp_err); + msg = "Info: GLReadBufferUtil.readPixels: pre-exisiting GL error 0x500"; + + if ~isempty(tmp_errfile_info) then + txt = mgetl(tmp_err); + txt(txt==msg) = []; + if isempty(txt) then + deletefile(tmp_err); + else // Ignore JOGL 2.1.4 debug message + msg = "Info: GLDrawableHelper.reshape: pre-exisiting GL error 0x500"; + txt(txt==msg) = []; + if isempty(txt) then + deletefile(tmp_err); + end + end + end + end + + tmp_errfile_info = fileinfo(tmp_err); + + if isfile(tmp_err) & tmp_errfile_info(1) <> 0 then + status.id = 5; + status.message = "failed: error_output not empty\n Use ''no_check_error_output'' option to disable this check."; + status.details = checkthefile(tmp_err); + return; + end + end + + //Process output files + + //Get the dia file + if isfile(tmp_dia) then + dia = mgetl(tmp_dia); + else + status.id = 6; + status.message = "failed: Cannot find the dia file: " + tmp_dia + "\nCheck if the Scilab used correctly starts"; + status.details = checkthefile(tmp_dia); + return; + end + + // To get TMPDIR value + tmpdir1_line = grep(dia, "TMPDIR1"); + execstr(dia(tmpdir1_line)); + + //Check for execution errors + if try_catch & grep(dia,"<--Error on the test script file-->") <> [] then + details = [ checkthefile(tmp_dia); .. + launchthecommand(testFile)]; + status.id = 3; + status.message = "failed: premature end of the test script"; + status.details = details; + if params.show_error == %t then + status.details = [ status.details; dia($-10:$) ] + end + + return; + end + + // Remove Header and Footer + dia = remove_headers(dia); + + //Check for execution errors + dia_tmp = dia; + + // remove commented lines + dia_tmp(grep(dia_tmp, "//")) = []; + + if try_catch & grep(dia_tmp, "!--error") <> [] then + details = [ checkthefile(tmp_dia); .. + launchthecommand(testFile) ]; + status.id = 1; + status.message = "failed: the string (!--error) has been detected"; + status.details = details; + return; + end + + + if grep(dia_tmp,"error on test")<>[] then + details = [ checkthefile(tmp_dia); .. + launchthecommand(testFile) ]; + status.id = 2; + status.message = "failed: one or several tests failed"; + status.details = details; + if params.show_error == %t then + status.details = [ status.details; dia($-min(10, size(dia, "*")-1):$) ] + end + return; + end + + + if tmpdir1_line == [] then + status.id = 6; + status.message = "failed: the dia file is not correct"; + status.details = checkthefile(tmp_dia); + return; + end + + + // Check the reference file only if check_ref (i.e. for the whole + // test sequence) is true and this_check_ref (i.e. for the specific current .tst) + // is true. + + if (reference=="check") & (_module.reference=="check") then + if isfile(path_dia_ref) == %f then + status.id = 5; + status.message = "failed: the ref file doesn''t exist\n Use ''no_check_ref'' option to disable this check."; + status.details = createthefile(path_dia_ref); + return; + end + end + + // Comparaison ref <--> dia + + if ( (reference=="check") & (_module.reference=="check") ) | (_module.reference=="create") then + // Do some modification in dia file + + dia(grep(dia, "write(%io(2), tmpdirToPrint")) = []; + dia(grep(dia, "TMPDIR1")) = []; + dia(grep(dia, "diary(0)")) = []; + + if getos() == "Darwin" then // TMPDIR is a symblic link + dia = strsubst(dia,"/private" + TMPDIR1, "TMPDIR"); + dia = strsubst(dia,"/private" + TMPDIR, "TMPDIR"); + end + dia = strsubst(dia,TMPDIR ,"TMPDIR"); + dia = strsubst(dia,TMPDIR1, "TMPDIR"); + + if getos() == "Windows" then + dia = strsubst(dia, strsubst(TMPDIR, "\","/"), "TMPDIR"); + dia = strsubst(dia, strsubst(TMPDIR1, "\","/"), "TMPDIR"); + dia = strsubst(dia, strsubst(TMPDIR, "/","\"), "TMPDIR"); + dia = strsubst(dia, strsubst(TMPDIR1, "/","\"), "TMPDIR"); + dia = strsubst(dia, strsubst(getshortpathname(TMPDIR), "\","/"), "TMPDIR"); + dia = strsubst(dia, strsubst(getshortpathname(TMPDIR1), "\","/"), "TMPDIR"); + dia = strsubst(dia, getshortpathname(TMPDIR), "TMPDIR"); + dia = strsubst(dia, getshortpathname(TMPDIR1), "TMPDIR"); + end + + dia = strsubst(dia, SCI, "SCI"); + + if getos() == "Windows" then + dia = strsubst(dia, strsubst(SCI, "\","/"), "SCI"); + dia = strsubst(dia, strsubst(SCI, "/","\"), "SCI"); + dia = strsubst(dia, strsubst(getshortpathname(SCI), "\","/"), "SCI"); + dia = strsubst(dia, getshortpathname(SCI), "SCI"); + end + + //suppress the prompts + dia = strsubst(dia, "-->", ""); + dia = strsubst(dia, "@#>", "-->"); + dia = strsubst(dia, "-1->", ""); + + //standardise number display + + // strsubst(dia, " .", "0."); + // strsubst(dia, "-.", "-0.") + // strsubst(dia, "E+", "D+"); + // strsubst(dia, "E-", "D-"); + + //not to change the ref files + dia = strsubst(dia ,"bugmes();return", "bugmes();quit"); + + if _module.reference=="create" then + // Delete previous .dia.ref file + if isfile(path_dia_ref) then + deletefile(path_dia_ref) + end + + mputl(dia, path_dia_ref); + status.id = 20; + status.message = "passed: ref created"; + return; + else + // write down the resulting dia file + mputl(dia, path_dia); + + //Check for diff with the .ref file + [u,ierr] = mopen(path_dia_ref, "r"); + if ierr== 0 then //ref file exists + ref=mgetl(u); + mclose(u) + + // suppress blank (diff -nw) + dia = strsubst(dia, " ", "") + ref = strsubst(ref, " ", "") + + dia(find(dia == "")) = []; + ref(find(ref == "")) = []; + + dia(find(dia == "")) = []; + ref(find(ref == "")) = []; + + dia(find(part(dia, (1:2)) == "//")) = []; + ref(find(part(ref, (1:2)) == "//")) = []; + + if or(ref <> dia) then + status.id = 4; + status.message = "failed: dia and ref are not equal"; + status.details = comparethefiles(path_dia, path_dia_ref); + return; + end + + else + error(sprintf(gettext("The ref file (%s) doesn''t exist"), path_dia_ref)); + end + end + end +endfunction + +// checkthefile +function msg = checkthefile( filename ) + // Returns a 2-by-1 matrix of strings, containing a message such as: + // Check the following file : + // - C:\path\scilab\modules\optimization\tests\unit_testseldermeadeldermead_configure.tst + // Workaround for bug #4827 + msg(1) = " Check the following file :" + msg(2) = " - "+filename + if params.show_error == %t then + msg=[msg; mgetl(filename)] + end +endfunction + +// launchthecommand +function msg = launchthecommand( filename ) + // Returns a 2-by-1 matrix of strings, containing a message such as: + // Or launch the following command : + // - exec("C:\path\scilab\modules\optimization\tests\unit_testseldermeadeldermead_configure.tst") + // Workaround for bug #4827 + msg(1) = " Or launch the following command :" + msg(2) = " - exec(""" + fullpath(filename) + """);" +endfunction + +// => remove header from the diary txt +function dia_out = remove_headers(dia_in) + dia_out = dia_in; + body_start = grep(dia_out,"// <-- HEADER END -->"); + if body_start <> [] then + dia_out(1:body_start(1)) = []; + end + + body_end = grep(dia_out,"// <-- FOOTER START -->"); + if body_end <> [] then + [dia_nl,dia_nc] = size(dia); + dia_out(body_end(1):dia_nl) = []; + end +endfunction + +//createthefile +function msg = createthefile ( filename ) + // Returns a 2-by-1 matrix of strings, containing a message such as: + // Add or create the following file : + // - C:\path\scilab\modules\optimization\tests\unit_testseldermeadeldermead_configure.dia.ref + // Workaround for bug #4827 + msg(1) = " Add or create the following file: " + msg(2) = " - "+filename +endfunction + +// comparethefiles +function msg = comparethefiles ( filename1 , filename2 ) + // Returns a 3-by-1 matrix of strings, containing a message such as: + // Compare the following files : + // - C:\path\scilab\modules\optimization\tests\unit_testseldermeadeldermead_configure.dia + // - C:\path\scilab\modules\optimization\tests\unit_testseldermeadeldermead_configure.dia.ref + // Workaround for bug #4827 + msg(1) = " Compare the following files:" + msg(2) = " - "+filename1 + msg(3) = " - "+filename2 + if params.show_diff == %t then + if getos() == "Windows" then + diffTool = SCI + "\tools\diff\diff.exe"; + else + diffTool = "diff"; + end + targetFile=TMPDIR + filesep() + "tempdiff.diff"; + unix(diffTool + " -u " + filename1 + " " + filename2 + " > " + targetFile); + // unix_g is failing to return the output into a variable + msg=[msg; mgetl(targetFile)] + deletefile(targetFile); + end +endfunction + +function directories = getDirectories(directory) + directories = directory; + items = gsort(listfiles(directory),"lr","i"); + + for i=1:size(items,"*") + if isdir(directory + items(i)) then + directories = [directories; getDirectories(directory + items(i) + filesep())]; + end + end +endfunction + +function name = splitModule(name) + if ~isempty( regexp(stripblanks(name),"/\|/") ) then + name = stripblanks( strsubst( strsplit(name,regexp(stripblanks(name),"/\|/")) , "/\|$/","","r" ) ); + end +endfunction + +function example = test_examples() + example = [ sprintf("Examples :\n\n") ]; + example = [ example ; sprintf("// Launch all tests\n") ]; + example = [ example ; sprintf("test_run();\n") ]; + example = [ example ; sprintf("test_run([]);\n") ]; + example = [ example ; sprintf("test_run([],[]);\n") ]; + example = [ example ; "" ]; + example = [ example ; sprintf("// Test one or several module\n") ]; + example = [ example ; sprintf("test_run(''core'');\n") ]; + example = [ example ; sprintf("test_run(''core'',[]);\n") ]; + example = [ example ; sprintf("test_run([''core'',''string'']);\n") ]; + example = [ example ; "" ]; + example = [ example ; sprintf("// Launch one or several test in a specified module\n") ]; + example = [ example ; sprintf("test_run(''core'',[''trycatch'',''opcode'']);\n") ]; + example = [ example ; "" ]; + example = [ example ; sprintf("// With options\n") ]; + example = [ example ; sprintf("test_run([],[],''no_check_ref'');\n") ]; + example = [ example ; sprintf("test_run([],[],''no_check_error_output'');\n") ]; + example = [ example ; sprintf("test_run([],[],''create_ref'');\n") ]; + example = [ example ; sprintf("test_run([],[],''list'');\n") ]; + example = [ example ; sprintf("test_run([],[],''help'');\n") ]; + example = [ example ; sprintf("test_run([],[],[''no_check_ref'',''mode_nw'']);\n") ]; + example = [ example ; "" ]; +endfunction + +function newOption = clean_option(var, option) + newOption = var; + newOption(newOption == option) = []; +endfunction + +function result = check_option(var, option) + result = or(var == option); +endfunction + +function value = assign_option(var, option, truevalue, falsevalue) + if check_option(var, option) then + value = truevalue; + else + value = falsevalue; + end +endfunction + + +function exportToXUnitFormat(exportToFile, testsuites) + + if isfile(exportToFile) then + // File already existing. Append the results + doc = xmlRead(exportToFile); + appendIntoFile = %t; + node = xmlXPath(doc, "//testsuites"); + if node.size == 0 then + error(msprintf(gettext("The file ''%s'' is not following the XUnit XML format. Root tag expected ''testsuites''.\n"),exportToFile)) + end + else + doc = xmlDocument(exportToFile); + + appendIntoFile = %f; + end + root = xmlElement(doc, "testsuites"); + + for i=1:size(testsuites, "*") // Export module by module + module = testsuites(i); + testsuite = xmlElement(doc,"testsuite"); + testsuite.attributes.name = module.name; + + testsuite.attributes.time = string(module.time); + + testsuite.attributes.tests = string(module.tests); + testsuite.attributes.errors = string(module.errors); + + for j=1:size(module.testcase,"*") // Export test by test + testsuite.children(j) = xmlElement(doc,"testcase"); + unitTest = module.testcase(j); + testsuite.children(j).attributes.name = unitTest.name; + testsuite.children(j).attributes.time = string(unitTest.time); + testsuite.children(j).attributes.classname = getversion()+"."+module.name; + if isfield(unitTest,"failure") & size(unitTest.failure,"*") >= 1 then + testsuite.children(j).children(1) = xmlElement(doc,"failure"); + testsuite.children(j).children(1).attributes.type = unitTest.failure.type; + content = unitTest.failure.content; + for kL=1:size(content, "*") + ampIdx = strindex(content(kL), "&"); + while ~isempty(ampIdx) + cur = ampIdx(1); + ampIdx(1) = []; + if or(part(content(kL), (cur+1):(cur+3))==["gt;" "lt"]) then + // Ignored + else + content(kL) = part(content(kL), 1:cur) + "amp;" + part(content(kL), (cur+1):$); + ampIdx = strindex(part(content(kL), (cur+1):$), "&"); + end + end + end + testsuite.children(j).children(1).content = content; + elseif unitTest.skipped then + testsuite.children(j).children(1) = xmlElement(doc,"skipped"); + end + end + + if appendIntoFile then + // We will add the new elements into 'testsuites' + c=node(1).children; + nb=size(c,"*"); + c(nb + 1)=testsuite; // Add the new results into the list of results + root.children=c; + else + root.children(i)=testsuite + end + end // list of modules + + doc.root=root + + xmlWrite(doc); +endfunction diff --git a/modules/development_tools/macros/test_run_level.bin b/modules/development_tools/macros/test_run_level.bin Binary files differnew file mode 100755 index 000000000..b9fcec6b9 --- /dev/null +++ b/modules/development_tools/macros/test_run_level.bin diff --git a/modules/development_tools/macros/test_run_level.sci b/modules/development_tools/macros/test_run_level.sci new file mode 100755 index 000000000..a235a0ae0 --- /dev/null +++ b/modules/development_tools/macros/test_run_level.sci @@ -0,0 +1,37 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - Scilab Enterprises +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// test_run -- +// Launch unit tests. + +function test_run_level(severity) + disp("Run all test level " + string(severity)); + doc = xmlRead(SCI+"/modules/development_tools/data/test_run_level.xml"); + + // Retrieve the list of modules + modules=xmlXPath(doc, "/tests/level[@severity=" + string(severity) + "]/module"); + + for (i=1:modules.size) + + // Retrieve the list of tests + tests = xmlAsText(xmlXPath(modules(i),"test")); + + // Run the test + status = test_run(modules(i).attributes.name, tests, ["no_check_error_output","short_summary","show_diff","show_error"],TMPDIR+"/../test_runelevel_report.xml"); + + if (status == %f) then + error("At least one error has been detected. Failing all tests."); + // Since make check is launched by the build system + // It checks if any error occurred and fails if it happens + end + end + + xmlDelete(doc); + +endfunction diff --git a/modules/development_tools/macros/testexamples.bin b/modules/development_tools/macros/testexamples.bin Binary files differnew file mode 100755 index 000000000..4d90eba00 --- /dev/null +++ b/modules/development_tools/macros/testexamples.bin diff --git a/modules/development_tools/macros/testexamples.sci b/modules/development_tools/macros/testexamples.sci new file mode 100755 index 000000000..2d6ff7f70 --- /dev/null +++ b/modules/development_tools/macros/testexamples.sci @@ -0,0 +1,268 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2005-2008 - INRIA - Serge STEER <serge.steer@inria.fr> +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function r=load_ref(name) + if exists(name)==0 then r=%f;return,end + v=evstr(name) + if type(v) == 9 then v = ghdl2tree(v);end, + if type(v) == 128 then v=128,end //lu handle + load(%U,name+"_ref"); + if exists(name+"_ref")==0 then + disp(msprintf(gettext("No variable %s_ref in reference file"),name)) + r=%t + return + end + execstr("r=%CMP(v,"+name+"_ref);") +endfunction + +function r=load_ref_nocheck(name) + + if exists(name)==0 then r=%f;return,end + v=evstr(name) + if type(v) == 9 then v = ghdl2tree(v);end, + if type(v) == 128 then v=128,end //lu handle + load(%U,name+"_ref"); + if exists(name+"_ref")==0 then + disp(msprintf(gettext("No variable %s_ref in reference file"),name)) + r=%t + return + end + r=%f + +endfunction + + + +function reinit_for_test() + + //reinitialize some Scilab state to be able to reproduce the same tests + sdf();sda() + xdel(winsid()) + grand("setgen","clcg4");grand("setall",11111111,22222222,33333333,44444444); + grand("setgen","kiss");grand("setsd",362436069,521288629,123456789,380116160); + grand("setgen","clcg2");grand("setsd",1234567890,123456789); + grand("setgen","urand");grand("setsd",0); + grand("setgen","fsultra");grand("setsd",1234567,7654321); + grand("setgen","mt");grand("setsd",5489); + rand("seed",0); + format("v",10); + clearglobal() + +endfunction + + + +function r=xdel_run(w,opt) + + //Author : Serge Steer, april 2005, Copyright INRIA + // + //Compare the graphic windows to be cleared with the reference given in a Scilab binary file. + // This function must mirror the xdel_build one. + + r=%f + if winsid()==[] then return,end + cur=xget("window") + // + if argn(2)==1 then + ids_=[] + for k=1:size(w,"*") + xset("window",w(k)) + if get("figure_style")=="new" then ids_=[ids_,w(k)],end + end + load(%U,"ids_ref") + if or(ids_ref<>ids_) then r=%t,return,end + for k=ids_ref + %wins_=ghdl2tree(scf(k)); + load(%U,"%wins_ref"); + if %CMP(%wins_, %wins_ref) then r=%t,return,end + end + xdel(w) + else + if get("figure_style")=="old" then return,end + ids_=xget("window") + load(%U,"ids_ref") + if or(ids_ref<>ids_) then r=%t,return,end + %wins_=ghdl2tree(gcf()); + load(%U,"%wins_ref"); + if %CMP(%wins_,%wins_ref) then r=%t,return,end + xdel() + end + if or(winsid()==cur) then xset("window",cur),end + +endfunction + + + +function r=clf_run(w,opt) + + //Author : Serge Steer, april 2005, Copyright INRIA + // + //Compare the graphic windows to be cleared with the reference given in a Scilab binary file. + // This function must mirror the clf_build one. + + r=%f + if winsid()==[] then return,end + cur=xget("window") + rhs=argn(2) + if rhs==1&type(w)==10 then opt=w;rhs=0,end + if winsid()==[] then return,end + // + if rhs==1 then + ids_=[] + if type(w)==9 then + H=w;w=[] + for h=H,w=[w,h.figure_id],end + end + for k=1:size(w,"*") + xset("window",w(k)) + if get("figure_style")=="new" then ids_=[ids_,w(k)],end + end + load(%U,"ids_ref") + if or(ids_ref<>ids_) then r=%t,return,end + for k=ids_ref + %wins_=ghdl2tree(scf(k)); + load(%U,"%wins_ref"); + if %CMP(%wins_, %wins_ref) then r=%t,return,end + end + if rhs==1 then clf(w),else clf(w,opt),end + else + if get("figure_style")=="old" then return,end + ids_=xget("window") + load(%U,"ids_ref") + if or(ids_ref<>ids_) then r=%t,return,end + %wins_=ghdl2tree(gcf()); + load(%U,"%wins_ref"); + if %CMP(%wins_,%wins_ref) then r=%t,return,end + clf() + end + if or(winsid()==cur) then xset("window",cur),end + +endfunction + + + +function r=xbasc_run(w) + + //Author : Serge Steer, april 2005, Copyright INRIA + // + //Compare the graphic windows to be cleared with the reference given in a Scilab binary file. + // This function must mirror the xbasc_build one. + r=%f + if winsid()==[] then return,end + cur=xget("window") + // + if argn(2)==1 then + ids_=[] + for k=1:size(w,"*") + xset("window",w(k)) + if get("figure_style")=="new" then ids_=[ids_,w(k)],end + end + load(%U,"ids_ref") + if or(ids_ref<>ids_) then r=%t,return,end + for k=ids_ref + %wins_=ghdl2tree(scf(k)); + load(%U,"%wins_ref"); + %wins_ref.figure_position=%wins_.figure_position + if %CMP(%wins_, %wins_ref) then r=%t,return,end + end + + clf(w) + else + if get("figure_style")=="old" then return,end + ids_=xget("window"); + load(%U,"ids_ref") + if or(ids_ref<>ids_) then r=%t,return,end + %wins_=ghdl2tree(gcf()); + load(%U,"%wins_ref"); + %wins_ref.figure_position=%wins_.figure_position + if %CMP(%wins_, %wins_ref) then r=%t,return,end + clf() + end + if or(winsid()==cur) then xset("window",cur),end + +endfunction + + + +function r=%CMP(%A,%B) + + //Author : Serge Steer, april 2005, Copyright INRIA + // + // this function compares two variables, floating points data are + // compared using a relative tolerance + + r=%f + tol=0.00001 + if type(%A)<>type(%B) then r=%t,return,end + select type(%A) + case 1 then //float + if or(size(%A)<>size(%B)) then r=%t,return,end + %ka=~isnan(%A);%kb=~isnan(%B); + if or(%ka<>%kb) then r=%t,return,end + if isreal(%A)<>isreal(%A) then r=%t,return,end + if or(clean(%A(%ka)-%B(%kb))<>0) then r=%t,return,end + case 2 then //polynomial + if or(size(%A)<>size(%B)) then r=%t,return,end + if or(degree(%A)<>degree(%B)) then r=%t,return,end + if or(clean(%A-%B)<>0) then r=%t,return,end + case 4 then //boolean + if or(size(%A)<>size(%B)) then r=%t,return,end + if or(%A<>%B) then r=%t,return,end + case 5 then //sparse + if or(size(%A)<>size(%B)) then r=%t,return,end + [ija,%A]=spget(%A);[ijb,%B]=spget(%B); + if or(ija<>ijb) then r=%t,return,end + %ka=~isnan(%A);%kb=~isnan(%B); + if or(%ka<>%kb) then r=%t,return,end + if or(clean(%A(%ka)-%B(%kb))<>0) then r=%t,return,end + case 6 then //boolean sparse + if or(size(%A)<>size(%B)) then r=%t,return,end + if or(%A<>%B) then r=%t,return,end + case 8 then //int + if or(inttype(%A)<>inttype(%B)) then r=%t,return,end + if or(size(%A)<>size(%B)) then r=%t,return,end + if or(%A<>%B) then r=%t,return,end + case 9 then //handle + if or(size(%A)<>size(%B)) then r=%t,return,end + // if or(%A<>%B) then r=%t,return,end + case 10 then //string + if or(size(%A)<>size(%B)) then r=%t,return,end + if or(%A<>%B) then r=%t,return,end + case 13 then //compiled function + if %A<>%B then r=%t,return,end + case 14 then //library + if or(gsort(string(%A))<>gsort(string(%B))) then r=%t,return,end + case 15 then //list + if or(lstsize(%A)<>lstsize(%B)) then r=%t,return,end + if or(definedfields(%A)<>definedfields(%B)) then r=%t,return,end + for k = definedfields(%A) + if %CMP(%A(k),%B(k)) then r=%t,return,end + end + case 16 then //tlist + if or(lstsize(%A)<>lstsize(%B)) then r=%t,return,end + if or(definedfields(%A)<>definedfields(%B)) then r=%t,return,end + if typeof(%A)=="rational" then + if or(clean(%A-%B)<>0) then r=%t,end + return + end + for k = definedfields(%A) + if %CMP(%A(k),%B(k)) then r=%t,return,end + end + case 17 then //mlist + if or(lstsize(%A)<>lstsize(%B)) then r=%t,return,end + if or(definedfields(%A)<>definedfields(%B)) then r=%t,return,end + for k = definedfields(%A) + if %CMP(getfield(k,%A),getfield(k,%B)) then r=%t,return,end + end + case 130 then + if %A<>%B then r=%t,return,end + else + r=%f + end +endfunction diff --git a/modules/development_tools/macros/unit_test_run.bin b/modules/development_tools/macros/unit_test_run.bin Binary files differnew file mode 100755 index 000000000..f9d60aa84 --- /dev/null +++ b/modules/development_tools/macros/unit_test_run.bin diff --git a/modules/development_tools/macros/unit_test_run.sci b/modules/development_tools/macros/unit_test_run.sci new file mode 100755 index 000000000..578b116db --- /dev/null +++ b/modules/development_tools/macros/unit_test_run.sci @@ -0,0 +1,39 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// ============================================================================= +// Launch unitary tests +// ============================================================================= + +function unit_test_run(varargin) + + lhs = argn(1); + rhs = argn(2); + + if (rhs == 0) then + test_run([],[],["unit_tests"]); + + elseif rhs == 1 then + argument_1 = varargin(1); + test_run(argument_1,[],["unit_tests"]); + + elseif rhs == 2 then + argument_1 = varargin(1); + argument_2 = varargin(2); + test_run(argument_1,argument_2,["unit_tests"]); + + elseif rhs == 3 then + argument_1 = varargin(1); + argument_2 = varargin(2); + argument_3 = varargin(3); + test_run(argument_1,argument_2,[argument_3,"unit_tests"]); + + end + +endfunction diff --git a/modules/development_tools/src/fake/Makefile.am b/modules/development_tools/src/fake/Makefile.am new file mode 100755 index 000000000..ac9d3bf65 --- /dev/null +++ b/modules/development_tools/src/fake/Makefile.am @@ -0,0 +1,2 @@ +### This is an empty file declared to avoid a warning with autoconf +# for YASP
\ No newline at end of file diff --git a/modules/development_tools/src/fake/Makefile.in b/modules/development_tools/src/fake/Makefile.in new file mode 100755 index 000000000..530bb35ef --- /dev/null +++ b/modules/development_tools/src/fake/Makefile.in @@ -0,0 +1,599 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = modules/development_tools/src/fake +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/config/mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \ + $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \ + $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \ + $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \ + $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \ + $(top_srcdir)/m4/intel_compiler.m4 \ + $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \ + $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \ + $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \ + $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \ + $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +ALL_LINGUAS_DOC = @ALL_LINGUAS_DOC@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +ANT = @ANT@ +ANTLR = @ANTLR@ +AR = @AR@ +ARPACK_LIBS = @ARPACK_LIBS@ +ASM3 = @ASM3@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AVALON_FRAMEWORK = @AVALON_FRAMEWORK@ +AWK = @AWK@ +BATIK = @BATIK@ +BLAS_LIBS = @BLAS_LIBS@ +CC = @CC@ +CCACHE = @CCACHE@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECKSTYLE = @CHECKSTYLE@ +COBERTURA = @COBERTURA@ +COMMONS_BEANUTILS = @COMMONS_BEANUTILS@ +COMMONS_IO = @COMMONS_IO@ +COMMONS_LOGGING = @COMMONS_LOGGING@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CURL_VERSION = @CURL_VERSION@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOCBOOK_ROOT = @DOCBOOK_ROOT@ +DOXYGEN_BIN = @DOXYGEN_BIN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECJ = @ECJ@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFTW3_LIB = @FFTW3_LIB@ +FFTW_ENABLE = @FFTW_ENABLE@ +FGREP = @FGREP@ +FLEXDOCK = @FLEXDOCK@ +FLIBS = @FLIBS@ +FOP = @FOP@ +FREEHEP_GRAPHICS2D = @FREEHEP_GRAPHICS2D@ +FREEHEP_GRAPHICSIO = @FREEHEP_GRAPHICSIO@ +FREEHEP_GRAPHICSIO_EMF = @FREEHEP_GRAPHICSIO_EMF@ +FREEHEP_IO = @FREEHEP_IO@ +FREEHEP_UTIL = @FREEHEP_UTIL@ +GENHTML = @GENHTML@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GIWS_BIN = @GIWS_BIN@ +GLUEGEN2_RT = @GLUEGEN2_RT@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GRAPHICS_ENABLE = @GRAPHICS_ENABLE@ +GREP = @GREP@ +GUI_ENABLE = @GUI_ENABLE@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +HELP_ENABLE = @HELP_ENABLE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +JAR = @JAR@ +JAVA = @JAVA@ +JAVAC = @JAVAC@ +JAVAC_DEBUG = @JAVAC_DEBUG@ +JAVADOC = @JAVADOC@ +JAVAH = @JAVAH@ +JAVASCI_ENABLE = @JAVASCI_ENABLE@ +JAVA_ENABLE = @JAVA_ENABLE@ +JAVA_G = @JAVA_G@ +JAVA_HOME = @JAVA_HOME@ +JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@ +JAVA_JNI_LIBS = @JAVA_JNI_LIBS@ +JDB = @JDB@ +JEUCLID_CORE = @JEUCLID_CORE@ +JGRAPHX = @JGRAPHX@ +JHALL = @JHALL@ +JLATEXMATH = @JLATEXMATH@ +JLATEXMATH_FOP = @JLATEXMATH_FOP@ +JOGL2 = @JOGL2@ +JROSETTA_API = @JROSETTA_API@ +JROSETTA_ENGINE = @JROSETTA_ENGINE@ +JUNIT4 = @JUNIT4@ +LAPACK_LIBS = @LAPACK_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOGGING_LEVEL = @LOGGING_LEVEL@ +LOOKS = @LOOKS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MATIO_CFLAGS = @MATIO_CFLAGS@ +MATIO_ENABLE = @MATIO_ENABLE@ +MATIO_LIBS = @MATIO_LIBS@ +MKDIR_P = @MKDIR_P@ +MPI_ENABLE = @MPI_ENABLE@ +MSGCAT = @MSGCAT@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OCAMLC = @OCAMLC@ +OCAMLDEP = @OCAMLDEP@ +OCAMLLEX = @OCAMLLEX@ +OCAMLOPT = @OCAMLOPT@ +OCAMLYACC = @OCAMLYACC@ +OPENMPI_CC = @OPENMPI_CC@ +OPENMPI_CFLAGS = @OPENMPI_CFLAGS@ +OPENMPI_CXX = @OPENMPI_CXX@ +OPENMPI_CXXFLAGS = @OPENMPI_CXXFLAGS@ +OPENMPI_LIBS = @OPENMPI_LIBS@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ +OPENMP_ENABLE = @OPENMP_ENABLE@ +OPENMP_LIBS = @OPENMP_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_CONFIG = @PCRE_CONFIG@ +PCRE_LIBS = @PCRE_LIBS@ +PCRE_VERSION = @PCRE_VERSION@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +POW_LIB = @POW_LIB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELOCATABLE = @RELOCATABLE@ +RT_LIB = @RT_LIB@ +SAXON = @SAXON@ +SCILAB_BINARY_VERSION = @SCILAB_BINARY_VERSION@ +SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@ +SCILAB_VERSION_MAINTENANCE = @SCILAB_VERSION_MAINTENANCE@ +SCILAB_VERSION_MAJOR = @SCILAB_VERSION_MAJOR@ +SCILAB_VERSION_MINOR = @SCILAB_VERSION_MINOR@ +SCIRENDERER = @SCIRENDERER@ +SCIRENDERER_CP = @SCIRENDERER_CP@ +SCI_CFLAGS = @SCI_CFLAGS@ +SCI_CXXFLAGS = @SCI_CXXFLAGS@ +SCI_FFLAGS = @SCI_FFLAGS@ +SCI_LDFLAGS = @SCI_LDFLAGS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SET_RELOCATABLE = @SET_RELOCATABLE@ +SHELL = @SHELL@ +SKINLF = @SKINLF@ +SPLINT = @SPLINT@ +STRIP = @STRIP@ +SWIG_BIN = @SWIG_BIN@ +SWIG_JAVA = @SWIG_JAVA@ +SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@ +SWIG_SCILAB = @SWIG_SCILAB@ +TCLTK_LIBS = @TCLTK_LIBS@ +TCL_INC_PATH = @TCL_INC_PATH@ +TK_INC_PATH = @TK_INC_PATH@ +UMFPACK_CFLAGS = @UMFPACK_CFLAGS@ +UMFPACK_ENABLE = @UMFPACK_ENABLE@ +UMFPACK_LIB = @UMFPACK_LIB@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WITH_OCAML = @WITH_OCAML@ +WITH_TKSCI = @WITH_TKSCI@ +XCOS_ENABLE = @XCOS_ENABLE@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@ +XML_APIS_EXT = @XML_APIS_EXT@ +XML_CONFIG = @XML_CONFIG@ +XML_FLAGS = @XML_FLAGS@ +XML_LIBS = @XML_LIBS@ +XML_VERSION = @XML_VERSION@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cxx_present = @cxx_present@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/development_tools/src/fake/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign modules/development_tools/src/fake/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + + +### This is an empty file declared to avoid a warning with autoconf +# for YASP +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/modules/development_tools/src/perl/check_makefileam.pl b/modules/development_tools/src/perl/check_makefileam.pl new file mode 100755 index 000000000..ffe045d84 --- /dev/null +++ b/modules/development_tools/src/perl/check_makefileam.pl @@ -0,0 +1,276 @@ +#!/usr/bin/perl + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +# +# This file must be used under the terms of the CeCILL. +# This source file is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at +# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +use strict; +use Cwd; +use File::Basename; + +# Current directory +my $directory = getcwd(); + +if( dirname($0) ne '.' ) +{ + $directory .= '/'.dirname($0); +} + +if( dirname($0) =~ m/^\// ) +{ + $directory = dirname($0); +} + +# modules dir path +my $sci_modules_dir = $directory; +$sci_modules_dir =~ s/\/development_tools\/src\/perl//g; + +# Module list +my %modules = get_module_list(); + +foreach my $module (sort keys %modules) +{ + print $module; + + my $nb_pb = 0; + + my %list_makefile_headers = get_makefileam_list($module,'HEADERS'); + my %list_real_headers = get_real_list($module,'HEADERS'); + + my $nb_makefile_headers = 0; + my $nb_real_headers = 0; + + my $error_list = ''; + + + foreach my $file (sort keys %list_makefile_headers) + { + $nb_makefile_headers++; + + if( ! -e $sci_modules_dir.'/'.$module.'/'.$file ) + { + $nb_pb++; + $error_list .= sprintf("\t".'% 3d - %s doesn\'t exist'."\n",$nb_pb,$file); + } + } + + foreach my $file (sort keys %list_real_headers) + { + $nb_real_headers++; + + if( ! exists( $list_makefile_headers{$file} ) ) + { + $nb_pb++; + $error_list .= sprintf("\t".'% 3d - %s is not listed in the Makefile.am file'."\n",$nb_pb,$file); + } + } + + if( $nb_pb == 0 ) + { + for( my $i = length($module) ; $i <= 30 ; $i++ ) + { + print ' '; + } + print 'OK'; + printf(' [ % 4d include file(s) ]'."\n",$nb_makefile_headers); + } + else + { + print "\n".$error_list; + } +} + +# ============================================================================== +# get_makefileam_list +# ============================================================================== + +sub get_makefileam_list() +{ + my $module = $_[0]; + + my $list_start = 0; + my @file_list_string; + my %list; + + my $nb_blocs = 0; + + unless( chdir($sci_modules_dir.'/'.$module) ) + { + print $module.' : The directory '.$sci_modules_dir.'/'.$module.' doesn\'t exist or read access denied'."\n"; + exit; + } + + # Ouverture du fichier Makefile.am pour en extraire le bloc d'include + # ========================================================================== + + unless( open(MAKEFILEAM,'Makefile.am') ) + { + print $module.' : Makefile.am file doesn\'t exist or read access denied'."\n"; + exit; + } + + while(<MAKEFILEAM>) + { + # suppression du \n + chomp($_); + + # Suppression des espaces en début et fin de chaîne + $_ =~ s/^\s+//; + $_ =~ s/\s+$//; + + # Début de la list + + if($_ =~ m/lib(.*)include_HEADERS/ ) + { + $nb_blocs++; + $file_list_string[$nb_blocs] = ''; + $list_start = 1; + } + + # Traitement de la liste + if( $list_start == 1 ) + { + $file_list_string[$nb_blocs] .= $_; + + if( index($_,' \\') == -1 ) + { + $list_start = 0; + } + } + } + + close(MAKEFILEAM); + + # parcours des blocs + # ========================================================================== + + for( my $i=1 ; $i <= $nb_blocs ; $i++ ) + { + # traitement du bloc d'include + # ====================================================================== + + # suppression des parties inutiles + # ================================ + + $file_list_string[$i] =~ s/\\/ /g; + + # Suppression des espaces en début et fin de chaîne + my $rep = index( $file_list_string[$i] , '=' ); + substr($file_list_string[$i],0,$rep+1) = ''; + + # Suppression des espaces en début et fin de chaîne + $file_list_string[$i] =~ s/^\s+//; + $file_list_string[$i] =~ s/\s+$//; + + # Séparation des fichiers + my @files = split(/[[:blank:]]+/,$file_list_string[$i]); + + foreach my $file (@files) + { + $list{$file} = 1; + } + } + + return %list; +} + +# ============================================================================== +# get_real_list +# ============================================================================== + +sub get_real_list() +{ + my $module = $_[0]; + + my $list_start = 0; + my $file_list_string = ''; + + my %list; + + unless( chdir($sci_modules_dir.'/'.$module) ) + { + print $module.' : The directory '.$sci_modules_dir.'/'.$module.' doesn\'t exist or read access denied'."\n"; + exit; + } + + my @files = <includes/*>; + + foreach my $file (@files) + { + $list{$file} = 1; + } + + return %list; +} + +# ============================================================================== +# get_module_list +# ============================================================================== + +sub get_module_list +{ + my %list; + + unless( chdir($sci_modules_dir) ) + { + print 'The directory '.$sci_modules_dir.' doesn\'t exist or read access denied'."\n"; + exit; + } + + my @candidates = <*>; + + foreach my $candidate (@candidates) + { + if( -e $sci_modules_dir.'/'.$candidate.'/Makefile.am' ) + { + $list{$candidate} = 1; + } + } + + return %list; +} + +# ============================================================================== +# search +# ============================================================================== + +sub search +{ + my $dir = $_[0]; + my $module = $_[1]; + + my $dirToPrint; + my @list_dir; + + my $current_directory; + my $previous_directory = getcwd(); + + chdir($dir); + + @list_dir = <*>; + + foreach my $list_dir (@list_dir) + { + $current_directory = getcwd(); + + if( (-d $list_dir) && ($list_dir ne '.svn') ) + { + search($current_directory.'/'.$list_dir,$module); + } + + if( -f $list_dir ) + { + my $file = $current_directory.'/'.$list_dir; + substr($file,0,length($sci_modules_dir.'/'.$module.'/')) = ''; + + print LIST $file.' '; + } + } + + chdir($previous_directory); +} diff --git a/modules/development_tools/src/perl/xml2test/gateway_code_license.txt b/modules/development_tools/src/perl/xml2test/gateway_code_license.txt new file mode 100755 index 000000000..2ea0ad338 --- /dev/null +++ b/modules/development_tools/src/perl/xml2test/gateway_code_license.txt @@ -0,0 +1,11 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2009-2010 - DIGITEO - Scilab Consortium Operational Team + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ diff --git a/modules/development_tools/src/perl/xml2test/includes.txt b/modules/development_tools/src/perl/xml2test/includes.txt new file mode 100755 index 000000000..982531974 --- /dev/null +++ b/modules/development_tools/src/perl/xml2test/includes.txt @@ -0,0 +1,7 @@ + +#include "stack-c.h" +#include "Scierror.h" +#include "localization.h" +#include "sciprint.h" +#include "api_scilab.h" +#include "MALLOC.h" diff --git a/modules/development_tools/src/perl/xml2test/scilab_code_license.txt b/modules/development_tools/src/perl/xml2test/scilab_code_license.txt new file mode 100755 index 000000000..4aee5394f --- /dev/null +++ b/modules/development_tools/src/perl/xml2test/scilab_code_license.txt @@ -0,0 +1,8 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2010 - DIGITEO - Scilab Consortium Operational Team +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> diff --git a/modules/development_tools/src/perl/xml2test/xml2test.pl b/modules/development_tools/src/perl/xml2test/xml2test.pl new file mode 100755 index 000000000..3b481986a --- /dev/null +++ b/modules/development_tools/src/perl/xml2test/xml2test.pl @@ -0,0 +1,526 @@ +#!/usr/bin/perl + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2009-2010 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org> +# +# This file must be used under the terms of the CeCILL. +# This source file is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at +# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +use strict; +use Cwd; +use File::Basename; +use XML::Simple; + +# perl script directory +# ------------------------------------------------ + +my $directory = getcwd(); + +if( dirname($0) ne '.' ) +{ + $directory .= '/'.dirname($0); + $directory =~ s/\/\.\//\//g; +} + +if( dirname($0) =~ m/^\// ) +{ + $directory = dirname($0); +} + +# SCI & modules paths +# ------------------------------------------------ + +my $SCI = $directory; +$SCI =~ s/\/modules\/development_tools\/src\/perl\/xml2test//g; + +my $sci_modules_dir = $SCI.'/modules'; + + +# Managed languages +# ------------------------------------------------ +my %languages; +$languages{'en_US'} = 1; + + +# Module list +# ------------------------------------------------ +my %modules; +if( $ARGV[0] ne '' ) +{ + $modules{$ARGV[0]} = 1; +} +else +{ + %modules = get_module_list(); +} + +# modules dir path +# ------------------------------------------------ + +my %valid_tags; +$valid_tags{'File_gateway'} = 1; +$valid_tags{'File_scilab'} = 1; +$valid_tags{'Lib_name'} = 1; +$valid_tags{'Func_list'} = 1; + +# # XML list +# ------------------------------------------------ +my %xmllist; + + + +# ============================================================================== +# First step : get the XML list +# ============================================================================== + +foreach my $module (sort keys %modules) +{ + foreach my $language (sort keys %languages) + { + my $this_directory = $sci_modules_dir.'/'.$module.'/help/'.$language; + + if( -d $this_directory ) + { + get_xml_list($this_directory,$module); + } + } +} + +# ============================================================================== +# Second step : parse each XML file +# ============================================================================== + +my $xmllist_size = 0; + +foreach my $xmlfile (sort keys %xmllist) +{ + $xmllist_size++; +} + +my $count = 0; + +foreach my $xmlfile (sort keys %xmllist) +{ + $count++; + my $module = $xmllist{$xmlfile}; + + my $xmlfile_print = 'SCI/modules'.substr($xmlfile,length($sci_modules_dir)); + printf('%04d/%04d - %s'."\n",$count,$xmllist_size,$xmlfile_print); + my %tags = get_tag_values($xmlfile); + + # Check found tags + # ========================================================================== + + foreach my $tag (sort keys %valid_tags) + { + if( (! exists($tags{$tag}) ) || ($tags{$tag} eq '') ) + { + print "\t".'ERROR : Tag "'.$tag.'" has not been found in the file "'.$xmlfile.'"'."\n"; + exit(0); + } + + if( $tag eq 'File_gateway' ) + { + unless( $tags{$tag} =~ m/^SCI(.)*\.(c|cpp)$/ ) + { + print "\t".'ERROR : Value of the tag "'.$tag.'" found in the file "'.$xmlfile.'" is not valid'."\n"; + exit(0); + } + } + + if( $tag eq 'File_scilab' ) + { + unless( $tags{$tag} =~ m/^SCI(.)*\.(tst)$/ ) + { + print "\t".'ERROR : Value of the tag "'.$tag.'" found in the file "'.$xmlfile.'" is not valid'."\n"; + exit(0); + } + } + } + + # Get the test content + # ========================================================================== + + $tags{'scilab_code'} = get_scilab_code($xmlfile); + + if( $tags{'scilab_code'} eq '' ) + { + print "\t".'ERROR : The scilab code has not been found in the file "'.$xmlfile.'"'."\n"; + exit(0); + } + + # Get the gateway content + # ========================================================================== + + $tags{'gateway_code'} = get_gateway_code($xmlfile); + + if( $tags{'gateway_code'} eq '' ) + { + print "\t".'ERROR : The gateway code has not been found in the file "'.$xmlfile.'"'."\n"; + exit(0); + } + + # write the gateway code + # ========================================================================== + + my $gateway_file = $tags{'File_gateway'}; + $gateway_file = $SCI . substr($gateway_file,3); + write_gateway_code($gateway_file,\%tags); + print "\t".'The file "'.$gateway_file.'" code has been created'."\n"; + + + # write the scilab code + # ========================================================================== + + my $scilab_file = $tags{'File_scilab'}; + $scilab_file = $SCI . substr($scilab_file,3); + write_scilab_code($scilab_file,\%tags); + print "\t".'The file "'.$scilab_file.'" code has been created'."\n"; + +} + + + +# ============================================================================== +# get_module_list +# ============================================================================== + +sub get_module_list +{ + my %list; + + unless( chdir($sci_modules_dir) ) + { + print 'The directory '.$sci_modules_dir.' doesn\'t exist or read access denied'."\n"; + del_tmp_file(); + exit(0); + } + + my @candidates = <*>; + + foreach my $candidate (@candidates) + { + if( -e $sci_modules_dir.'/'.$candidate.'/help' ) + { + $list{$candidate} = 1; + } + } + + return %list; +} + +# ============================================================================== +# get_xml_list +# ============================================================================== + +sub get_xml_list +{ + my $dir = $_[0]; + my $module = $_[1]; + + my @list_dir; + + my $current_directory; + + # On enregistre le répertoire dans lequel on se situe à l'entrée de la fonction + my $previous_directory = getcwd(); + + chdir($dir); + + @list_dir = <*>; + + foreach my $list_dir (@list_dir) + { + $current_directory = getcwd(); + + if( (-d $list_dir) && ( ! ($list_dir =~ m/^scilab_[a-z][a-z]_[A-Z][A-Z]_help$/ )) ) + { + get_xml_list($current_directory.'/'.$list_dir,$module); + } + + if( (-f $list_dir) + && ($list_dir =~ m/\.xml$/) + && ($list_dir ne 'master.xml') + && ($list_dir ne 'master_help.xml') ) + { + unless( open(XMLFILE,$list_dir) ) + { + die 'get_xml_list: The file "'.$current_directory.'/'.$list_dir.'" cannot be opened'."\n"; + } + + while(<XMLFILE>) + { + $_ =~ s/^\s+//; + $_ =~ s/\s+$//; + + if( $_ =~ /^<!--File_gateway:\s(.)+-->$/ ) + { + $xmllist{$current_directory.'/'.$list_dir} = $module; + last; + } + } + + close(XMLFILE); + } + } + + chdir($previous_directory); +} + +# ============================================================================== +# get_tag_values +# ============================================================================== + +sub get_tag_values +{ + my $xmlfile = $_[0]; + my %tags; + + unless( open(XMLFILE,$xmlfile) ) + { + die 'get_tag_values: The file "'.$xmlfile.'" cannot be opened'."\n"; + } + + while(<XMLFILE>) + { + $_ =~ s/^\s+//; + $_ =~ s/\s+$//; + + if( $_ =~ /^<!--[A-Z][a-z_]*:\s(.)+-->$/ ) + { + $_ =~ s/<!--//; + $_ =~ s/-->//; + $_ =~ s/^\s+//; + $_ =~ s/\s+$//; + + my $start = index($_,':'); + my $tag = substr($_,0,$start); + + if( ! exists($valid_tags{$tag}) ) + { + next; + } + + my $value = substr($_,$start+1); + $value =~ s/^\s+//; + $value =~ s/\s+$//; + + $tags{$tag} = $value; + } + } + + close(XMLFILE); + + return %tags; +} + +# ============================================================================== +# get_gateway_code +# ============================================================================== + +sub get_gateway_code +{ + my $xmltree = XMLin($_[0]); # $_[0] : path absolu du fichier XML + + my $refsections = $xmltree->{'refsection'}; + my @fields = @$refsections; + + foreach my $field (@fields) + { + if( (exists($field->{'programlisting'}->{'role'}) ) && + ($field->{'programlisting'}->{'role'} eq 'code_gateway') ) + { + $field->{'programlisting'}->{'content'} =~ s/\s+\n/\n/g; + return $field->{'programlisting'}->{'content'}."\n"; + } + } + + return ''; +} + +# ============================================================================== +# get_scilab_code +# ============================================================================== + +sub get_scilab_code +{ + my $xmltree = XMLin($_[0]); # $_[0] : path absolu du fichier XML + + my $refsections = $xmltree->{'refsection'}; + my @fields = @$refsections; + + foreach my $field (@fields) + { + if((exists($field->{'programlisting'}->{'role'}) ) + && ($field->{'programlisting'}->{'role'} eq 'code_scilab')) + { + my $scilab_code = $field->{'programlisting'}->{'content'}."\n"; + $scilab_code =~ s/\s+\n/\n/g; + $scilab_code =~ s/then(\s)+error\((\s)*\"failed\"(\s)*\)(\s)*[;,](\s)*end/then pause;end/g; + return $scilab_code; + } + } + + return ''; +} + +# ============================================================================== +# write_gateway_code +# ============================================================================== + +sub write_gateway_code +{ + my $fileout = $_[0]; + my $tagsref = $_[1]; + my %tags = %$tagsref; + + unless( open(FILEOUT,'> '.$fileout) ) + { + print "\t".'Le fichier "'.$fileout.'" n\'a pu être ouvert en écriture'."\n"; + exit(0); + } + + # Ecriture de l'entête + # ========================================================================== + + unless( open(LICENSE,$directory.'/gateway_code_license.txt') ) + { + print "\t".'Le fichier "'.$directory.'/gateway_code_license.txt" n\'a pu être ouvert en lecture'."\n"; + exit(0); + } + + while(<LICENSE>) + { + print FILEOUT $_; + } + + close(LICENSE); + + # Ecriture des includes + # ========================================================================== + + unless( open(INCLUDES,$directory.'/includes.txt') ) + { + print "\t".'Le fichier "'.$directory.'/includes.txt" n\'a pu être ouvert en lecture'."\n"; + exit(0); + } + + while(<INCLUDES>) + { + print FILEOUT $_; + } + + close(INCLUDES); + + # Ecriture du code + # ========================================================================== + $tags{'gateway_code'} =~ s/\s+\n/\n/g; + print FILEOUT $tags{'gateway_code'}; + + # Fermeture du fichier de sortie + # ========================================================================== + close(FILEOUT); +} + +# ============================================================================== +# write_scilab_code +# ============================================================================== + +sub write_scilab_code +{ + my $fileout = $_[0]; + my $tagsref = $_[1]; + my %tags = %$tagsref; + + # TMPDIR management + # ========================================================================== + + my $TMPDIR = basename($fileout); + $TMPDIR =~ s/\.tst$//g; + $TMPDIR = 'pathconvert(TMPDIR+"/'.$TMPDIR.'")'; + + # table management (ilib_build 2nd input argument) + # ========================================================================== + + my @functions = split(/,/,$tags{'Func_list'}); + + my $table_str = '['; + + for( my $i=0 ; $i<length(@functions) ; $i++ ) + { + if( $i > 0) + { + $table_str .= ';'; + } + + $table_str .= '"'.$functions[$i].'","'.$functions[$i].'"'; + } + + $table_str .= ']'; + + + # C file management + # ========================================================================== + + my $cfile = 'SCI+"'.substr($tags{'File_gateway'},3).'"'; + + my $cfiletmpdir = basename($fileout); + $cfiletmpdir =~ s/\.tst$//g; + $cfiletmpdir = 'pathconvert(TMPDIR+"/'.$cfiletmpdir.'/'.basename(substr($tags{'File_gateway'},3)).'",%F)'; + + # Open the fileout file + # ========================================================================== + + unless( open(FILEOUT,'> '.$fileout) ) + { + print "\t".'Le fichier "'.$fileout.'" n\'a pu être ouvert en écriture'."\n"; + exit(0); + } + + # Ecriture de l'entête + # ========================================================================== + + unless( open(LICENSE,$directory.'/scilab_code_license.txt') ) + { + print "\t".'Le fichier "'.$directory.'/scilab_code_license.txt" n\'a pu être ouvert en lecture'."\n"; + exit(0); + } + + while(<LICENSE>) + { + print FILEOUT $_; + } + + close(LICENSE); + + # Ecriture de la ligne ilib_build + # ========================================================================== + + print FILEOUT 'ilib_verbose(0);'."\n"; + print FILEOUT 'mkdir('.$TMPDIR.');'."\n"; + print FILEOUT 'cd('.$TMPDIR.');'."\n"; + print FILEOUT 'copyfile('.$cfile.','.$cfiletmpdir.');'."\n"; + print FILEOUT 'cflags = "-I"+SCI+"/modules/localization/includes";'."\n"; + + print FILEOUT 'ilib_build('; + print FILEOUT '"'.$tags{'Lib_name'}.'",'; # lib_name + print FILEOUT $table_str.','; # table + print FILEOUT '"'.basename(substr($tags{'File_gateway'},3)).'",'; # files + print FILEOUT '[],'; # libs + print FILEOUT '"",'; # makename + print FILEOUT '"",'; # ldflags + print FILEOUT 'cflags);'."\n"; # cflags + + print FILEOUT 'exec("loader.sce");'."\n"; + + # Ecriture du code + # ========================================================================== + print FILEOUT $tags{'scilab_code'}; + + # Fermeture du fichier de sortie + # ========================================================================== + close(FILEOUT); +} diff --git a/modules/development_tools/tests/nonreg_tests/bug_10119.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_10119.dia.ref new file mode 100755 index 000000000..740c577f7 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_10119.dia.ref @@ -0,0 +1,25 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 10119 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=10119 +// +// <-- Short Description --> +// assert_checkequal does not support sparse complex doubles +value = sprand(100, 100, 0.01) + sprand(100, 100, 0.01) * %i; +value2 = sprand(100, 100, 0.01) + sprand(100, 100, 0.01) * %i; +instr = "assert_checkequal(value, value2)"; +ierr = execstr(instr,"errcatch"); +if ierr <> 10000 then bugmes();quit;end; +// +value = sprand(1, 1, 0.01) + sprand(1, 1, 0.01) * %i; +value2 = sprand(1, 1, 0.01) + sprand(1, 1, 0.01) * %i; +instr = "assert_checkequal(value, value2)"; +ierr = execstr(instr,"errcatch"); +if ierr <> 10000 then bugmes();quit;end; diff --git a/modules/development_tools/tests/nonreg_tests/bug_10119.tst b/modules/development_tools/tests/nonreg_tests/bug_10119.tst new file mode 100755 index 000000000..9cd905aed --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_10119.tst @@ -0,0 +1,29 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 10119 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=10119 +// +// <-- Short Description --> +// assert_checkequal does not support sparse complex doubles + + +value = sprand(100, 100, 0.01) + sprand(100, 100, 0.01) * %i; +value2 = sprand(100, 100, 0.01) + sprand(100, 100, 0.01) * %i; +instr = "assert_checkequal(value, value2)"; +ierr = execstr(instr,"errcatch"); +if ierr <> 10000 then pause,end; +// +value = sprand(1, 1, 0.01) + sprand(1, 1, 0.01) * %i; +value2 = sprand(1, 1, 0.01) + sprand(1, 1, 0.01) * %i; +instr = "assert_checkequal(value, value2)"; +ierr = execstr(instr,"errcatch"); +if ierr <> 10000 then pause,end; diff --git a/modules/development_tools/tests/nonreg_tests/bug_12033.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_12033.dia.ref new file mode 100755 index 000000000..659057533 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_12033.dia.ref @@ -0,0 +1,19 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - SE - Sylvestre Ledru +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 12033 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=12033 +// +// <-- Short Description --> +// assert_checkalmostequal was failing with two %inf values. +ret=assert_checkalmostequal ( %inf , %inf, 1.e-10) + ret = + + T +assert_checkequal(ret, %t); diff --git a/modules/development_tools/tests/nonreg_tests/bug_12033.tst b/modules/development_tools/tests/nonreg_tests/bug_12033.tst new file mode 100755 index 000000000..11c58ff4a --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_12033.tst @@ -0,0 +1,20 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - SE - Sylvestre Ledru +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 12033 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=12033 +// +// <-- Short Description --> +// assert_checkalmostequal was failing with two %inf values. + + +ret=assert_checkalmostequal ( %inf , %inf, 1.e-10) +assert_checkequal(ret, %t); diff --git a/modules/development_tools/tests/nonreg_tests/bug_5149.tst b/modules/development_tools/tests/nonreg_tests/bug_5149.tst new file mode 100755 index 000000000..a1215c728 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_5149.tst @@ -0,0 +1,22 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010 - DIGITEO - Pierre MARECHAL +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> +// <-- INTERACTIVE TEST --> + +// <-- Non-regression test for bug 5149 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=5149 +// +// <-- Short Description --> +// Calls to exec functions are no more logged by diary + +test_run("m2sci","bug_683","create_ref"); + +// Just check if the exec calls are logged in +// SCI/modules/m2sci/tests/nonreg_tests/bug_683.dia.ref diff --git a/modules/development_tools/tests/nonreg_tests/bug_9461.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_9461.dia.ref new file mode 100755 index 000000000..dfce926b4 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9461.dia.ref @@ -0,0 +1,20 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 9461 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9461 +// +// <-- Short Description --> +// The assert_checkalmostequal function does not manage sparse matrices. +A=spzeros(2,2); +B=spzeros(2,2); +assert_checkalmostequal(A,B); +A = zeros(2,3,4); +B = zeros(2,3,4); +assert_checkalmostequal(A,B); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9461.tst b/modules/development_tools/tests/nonreg_tests/bug_9461.tst new file mode 100755 index 000000000..d012c7164 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9461.tst @@ -0,0 +1,25 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 9461 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9461 +// +// <-- Short Description --> +// The assert_checkalmostequal function does not manage sparse matrices. + +A=spzeros(2,2); +B=spzeros(2,2); +assert_checkalmostequal(A,B); + +A = zeros(2,3,4); +B = zeros(2,3,4); +assert_checkalmostequal(A,B); + diff --git a/modules/development_tools/tests/nonreg_tests/bug_9529.tst b/modules/development_tools/tests/nonreg_tests/bug_9529.tst new file mode 100755 index 000000000..7274dd41c --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9529.tst @@ -0,0 +1,25 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> +// <-- NOT FIXED --> + +// <-- Non-regression test for bug 9529 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9529 +// +// <-- Short Description --> +// assert_checkequal fails with void element in a list + + +voidelement_ref=list(1,,3); +voidelement=list(2,,3); +t = (voidelement_ref(2)==voidelement(2)); +t = (voidelement_ref==voidelement); +assert_checkequal(voidelement, voidelement_ref); + diff --git a/modules/development_tools/tests/nonreg_tests/bug_9531.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_9531.dia.ref new file mode 100755 index 000000000..2c15a13d4 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9531.dia.ref @@ -0,0 +1,21 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 9531 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9531 +// +// <-- Short Description --> +// assert_checkequal fails with mlist +M_ref=mlist(['V','name','value'],['a','b';'c' 'd'],[1 2; 3 4]); +M_ref2=M_ref; +assert_checkequal(M_ref, M_ref2); +// +M_ref=tlist(['V','name','value'],['a','b';'c' 'd'],[1 2; 3 4]); +M_ref2=M_ref; +assert_checkequal(M_ref, M_ref2); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9531.tst b/modules/development_tools/tests/nonreg_tests/bug_9531.tst new file mode 100755 index 000000000..076025fc0 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9531.tst @@ -0,0 +1,26 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 9531 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9531 +// +// <-- Short Description --> +// assert_checkequal fails with mlist + + +M_ref=mlist(['V','name','value'],['a','b';'c' 'd'],[1 2; 3 4]); +M_ref2=M_ref; +assert_checkequal(M_ref, M_ref2); +// +M_ref=tlist(['V','name','value'],['a','b';'c' 'd'],[1 2; 3 4]); +M_ref2=M_ref; +assert_checkequal(M_ref, M_ref2); + diff --git a/modules/development_tools/tests/nonreg_tests/bug_9572.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_9572.dia.ref new file mode 100755 index 000000000..de12f949c --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9572.dia.ref @@ -0,0 +1,24 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - DIGITEO - Allan CORNET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 9572 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9572 +// +// <-- Short Description --> +// assert_checkerror did not check multi lines errors +cmd = "error(999,''line1'' + ascii(10) + ''line2'')"; +ref_msgerr = ['line1';'line2']; +ref_ierr = 999; +// first, we check without assert_checkerror +ierr = execstr(cmd, 'errcatch'); +msgerr = lasterror(); +assert_checkequal(ierr, ref_ierr); +assert_checkequal(msgerr, ref_msgerr); +// real test case +assert_checkerror(cmd, ref_msgerr); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9572.tst b/modules/development_tools/tests/nonreg_tests/bug_9572.tst new file mode 100755 index 000000000..d198feffd --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9572.tst @@ -0,0 +1,32 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - DIGITEO - Allan CORNET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 9572 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9572 +// +// <-- Short Description --> +// assert_checkerror did not check multi lines errors + + +cmd = "error(999,''line1'' + ascii(10) + ''line2'')"; +ref_msgerr = ['line1';'line2']; +ref_ierr = 999; + +// first, we check without assert_checkerror +ierr = execstr(cmd, 'errcatch'); +msgerr = lasterror(); +assert_checkequal(ierr, ref_ierr); +assert_checkequal(msgerr, ref_msgerr); + + +// real test case +assert_checkerror(cmd, ref_msgerr); + diff --git a/modules/development_tools/tests/nonreg_tests/bug_9635.tst b/modules/development_tools/tests/nonreg_tests/bug_9635.tst new file mode 100755 index 000000000..bbacd7499 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9635.tst @@ -0,0 +1,35 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Allan CORNET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> +// <-- INTERACTIVE TEST --> + +// <-- Non-regression test for bug 9635 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9635 +// +// <-- Short Description --> +// some temp. variables were not removed when we used test_run + + +// Interactive test since we can test test_run with test_run + +// exec this line: +test_run("elementary_functions","repmat"); + +assert_checkequal(isdef('test_examples'), %F); +assert_checkequal(isdef('splitModule'), %F); +assert_checkequal(isdef('getDirectories'), %F); +assert_checkequal(isdef('comparethefiles'), %F); +assert_checkequal(isdef('createthefile'), %F); +assert_checkequal(isdef('remove_headers'), %F); +assert_checkequal(isdef('launchthecommand'), %F); +assert_checkequal(isdef('checkthefile'), %F); +assert_checkequal(isdef('test_single'), %F); +assert_checkequal(isdef('test_module'), %F); + diff --git a/modules/development_tools/tests/nonreg_tests/bug_9825.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_9825.dia.ref new file mode 100755 index 000000000..99d776c74 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9825.dia.ref @@ -0,0 +1,30 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 9825 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9825 +// +// <-- Short Description --> +// The assert_computedigits function generously gives too large correct digits. +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +e = 1; +c = nearfloat("pred",e); +d = assert_computedigits(e,c,2); +MY_assert_equal ( d , 52 ); +// +e = 1; +d = assert_computedigits(e,e,2); +MY_assert_equal ( d , 53 ); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9825.tst b/modules/development_tools/tests/nonreg_tests/bug_9825.tst new file mode 100755 index 000000000..0e45a540a --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9825.tst @@ -0,0 +1,34 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 9825 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9825 +// +// <-- Short Description --> +// The assert_computedigits function generously gives too large correct digits. + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +e = 1; +c = nearfloat("pred",e); +d = assert_computedigits(e,c,2); +MY_assert_equal ( d , 52 ); +// +e = 1; +d = assert_computedigits(e,e,2); +MY_assert_equal ( d , 53 ); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9834.tst b/modules/development_tools/tests/nonreg_tests/bug_9834.tst new file mode 100755 index 000000000..d64a18295 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9834.tst @@ -0,0 +1,25 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Allan CORNET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- INTERACTIVE TEST --> +// + +// <-- Non-regression test for bug 9834 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9834 +// +// <-- Short Description --> +// external modules was not managed by test_run + + +// build toolbox_skeleton +exec('SCI/contrib/toolbox_skeleton/builder.sce'); + +// check that tests are 'passed' +test_run('SCI/contrib/toolbox_skeleton') + diff --git a/modules/development_tools/tests/nonreg_tests/bug_9960.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_9960.dia.ref new file mode 100755 index 000000000..0cf8f45b0 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9960.dia.ref @@ -0,0 +1,45 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 9960 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9960 +// +// <-- Short Description --> +// There was no simplified assert_checkerror calling sequence. +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +function y=f(varargin) + [lhs,rhs]=argn() + if ( rhs <> 1 ) then + lclmsg = gettext("%s: Wrong number of input argument: %d expected.\n") + errmsg = sprintf ( lclmsg , "f" , 1 ) + error(errmsg,1234) + end + x = varargin(1) + y = x +endfunction +// Just check the error number: +// do not check the error message. +assert_checkerror("f(1,2)",[],1234); +// This is an impossible calling sequence of assert_checkerror. +// Either the message or the error number must be set to +// a non empty value. +instr = "f(1,2)"; +statement = "assert_checkerror(instr,[],[])"; +ierr=execstr(statement,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +ferrmsg = msprintf(gettext("%s: Wrong size for input argument #%d: Non-empty matrix expected.\n"),"assert_checkerror",3); +MY_assert_equal ( lerr , ferrmsg ); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9960.tst b/modules/development_tools/tests/nonreg_tests/bug_9960.tst new file mode 100755 index 000000000..0332fbdb8 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9960.tst @@ -0,0 +1,52 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 9960 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9960 +// +// <-- Short Description --> +// There was no simplified assert_checkerror calling sequence. + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +function y=f(varargin) + [lhs,rhs]=argn() + if ( rhs <> 1 ) then + lclmsg = gettext("%s: Wrong number of input argument: %d expected.\n") + errmsg = sprintf ( lclmsg , "f" , 1 ) + error(errmsg,1234) + end + x = varargin(1) + y = x +endfunction + +// Just check the error number: +// do not check the error message. +assert_checkerror("f(1,2)",[],1234); + +// This is an impossible calling sequence of assert_checkerror. +// Either the message or the error number must be set to +// a non empty value. +instr = "f(1,2)"; +statement = "assert_checkerror(instr,[],[])"; +ierr=execstr(statement,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +ferrmsg = msprintf(gettext("%s: Wrong size for input argument #%d: Non-empty matrix expected.\n"),"assert_checkerror",3); +MY_assert_equal ( lerr , ferrmsg ); + diff --git a/modules/development_tools/tests/nonreg_tests/bug_9963.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_9963.dia.ref new file mode 100755 index 000000000..77dbaaabb --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9963.dia.ref @@ -0,0 +1,28 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 9963 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9963 +// +// <-- Short Description --> +// The assert_computedigits function is not vectorized. +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +// Test performance of computedigits: check that vectorization is used. +// This test must pass within a second. +A = rand(100,100); +B = rand(100,100); +D = assert_computedigits(A,B); +MY_assert_equal ( size(D) , [100 100] ); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9963.tst b/modules/development_tools/tests/nonreg_tests/bug_9963.tst new file mode 100755 index 000000000..0cc3968af --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9963.tst @@ -0,0 +1,32 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 9963 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9963 +// +// <-- Short Description --> +// The assert_computedigits function is not vectorized. + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +// Test performance of computedigits: check that vectorization is used. +// This test must pass within a second. +A = rand(100,100); +B = rand(100,100); +D = assert_computedigits(A,B); +MY_assert_equal ( size(D) , [100 100] ); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9966.dia.ref b/modules/development_tools/tests/nonreg_tests/bug_9966.dia.ref new file mode 100755 index 000000000..9101807cc --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9966.dia.ref @@ -0,0 +1,21 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 9635 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9635 +// +// <-- Short Description --> +// The default value of comptype in assert_checkalmostequal is wrongly chosen. +A = [1e10 1e-2]; +B = [1e10 2e-2]; +instr = "assert_checkalmostequal(A,B)"; +lclmsg = "%s: Assertion failed: expected = %s while computed = %s"; +strA = "[" + string(A(1)) + " ...]"; +strB = "[" + string(B(1)) + " ...]"; +assert_checkerror(instr,lclmsg,[],"assert_checkalmostequal",strA,strB); diff --git a/modules/development_tools/tests/nonreg_tests/bug_9966.tst b/modules/development_tools/tests/nonreg_tests/bug_9966.tst new file mode 100755 index 000000000..7e9205356 --- /dev/null +++ b/modules/development_tools/tests/nonreg_tests/bug_9966.tst @@ -0,0 +1,24 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 9635 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9635 +// +// <-- Short Description --> +// The default value of comptype in assert_checkalmostequal is wrongly chosen. + +A = [1e10 1e-2]; +B = [1e10 2e-2]; +instr = "assert_checkalmostequal(A,B)"; +lclmsg = "%s: Assertion failed: expected = %s while computed = %s"; +strA = "[" + string(A(1)) + " ...]"; +strB = "[" + string(B(1)) + " ...]"; +assert_checkerror(instr,lclmsg,[],"assert_checkalmostequal",strA,strB); diff --git a/modules/development_tools/tests/unit_tests/assert/checkalmostequal.dia.ref b/modules/development_tools/tests/unit_tests/assert/checkalmostequal.dia.ref new file mode 100755 index 000000000..2f8544336 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkalmostequal.dia.ref @@ -0,0 +1,248 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction +format("v",10); +// Check error message when number of arguments is false +instr = "assert_checkalmostequal ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checkalmostequal ( 1 , 1 , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +// +////////////////////////////////////////// +// Check error message when type of arguments is false +instr = "assert_checkalmostequal ( ""a"" , 2 , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , ""b"" , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , ""c"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , %eps , ""c"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , %eps , 0 , %t )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +////////////////////////////////////////// +// Check error message when size of arguments is false +instr = "assert_checkalmostequal ( 1 , 2 , [1 1] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , %eps , [1 1] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , %eps , 0 , [""a"" ""b""] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , [2 3] , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +////////////////////////////////////////// +// +// Check that the error message is correctly handled. +instr = "assert_checkalmostequal ( 1 , 2 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf(_("%s: Assertion failed: expected = %s while computed = %s"), "assert_checkalmostequal", "2", "1"); +MY_assert_equal ( errmsg , refmsg ); +// +// Check that the error message is correctly handled. +instr = "assert_checkalmostequal ( 1 , 2 , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf(_("%s: Assertion failed: expected = %s while computed = %s"), "assert_checkalmostequal", "2", "1"); +MY_assert_equal ( errmsg , refmsg ); +// +// Check that the error message is correctly handled. +instr = "assert_checkalmostequal ( 1 , 1 , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 0 ); +errmsg = lasterror(); +MY_assert_equal ( errmsg , [] ); +// +// Obvious failure : Check the error message +instr = "assert_checkalmostequal ( zeros(10,1)+1.e-4 , zeros(10,1) , 1.e-5 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf(_("%s: Assertion failed: expected = %s while computed = %s"), "assert_checkalmostequal", "[0 ...]", "[0.0001 ...]"); +MY_assert_equal ( errmsg , refmsg ); +////////////////////////////////////////// +// +// Test empty matrix +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( [] , [] ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( [] , [] , [], [], "matrix"); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( [] , [] , [], [], "element"); +checkassert ( flag , errmsg , "success" ); +////////////////////////////////////////// +// +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( 1 , 1 ); +checkassert ( flag , errmsg , "success" ); +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( 1 , 1 , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( ones(10,1) , ones(10,1) , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( ones(10,1)+%eps , ones(10,1) , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( zeros(10,1) , zeros(10,1) , 1.e-5 ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious failure +[flag,errmsg] = assert_checkalmostequal ( 1 , 2 , %eps ); +checkassert ( flag , errmsg , "failure" ); +// +// Obvious failure +[flag,errmsg] = assert_checkalmostequal ( zeros(10,1)+1.e-4 , zeros(10,1) , 1.e-5 ); +checkassert ( flag , errmsg , "failure" ); +// +// Success: not obvious! +// The two values are equal, very small, but nonzero. +// The relative tolerance must be used here. +// If, instead, a bug in the assert function is so that the +// absolute tolerance is used as 10^-16, then the output +// of this comparison is wrong. +[flag,errmsg] = assert_checkalmostequal ( 1.23456789123456789e-30 , 1.23456789123456789e-30 , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Failure : not obvious! +// There is only one significant digit here and we require the +// maximum precision. +// The test must fail because the relative tolerance must be used here. +// If, instead, there is a bug in the comparison and +// the absolute tolerance is used and set to +// 10^-16, the output of this test is wrong. +[flag,errmsg] = assert_checkalmostequal ( 1.23456789123456789e-30 , 1.3e-30 , %eps ); +checkassert ( flag , errmsg , "failure" ); +// +// Success : not obvious! +// The expected result is zero, so that the absolute tolerance is used. +[flag,errmsg] = assert_checkalmostequal ( 1.23456789123456789e-30 , 0 , 0 , 1.e-10 ); +checkassert ( flag , errmsg , "success" ); +// +// Check that nans are correctly handled +[flag,errmsg] = assert_checkalmostequal ( [1 %nan], [1 %nan] , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Check that nans are correctly handled +[flag,errmsg] = assert_checkalmostequal ( [1 %nan 1 %nan] , [1 %nan 1 %nan] , %eps ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkalmostequal ( [%nan 1], [1 %nan] , %eps ); +checkassert ( flag , errmsg , "failure" ); +// +// Check that slightly different values cannot pass basic test +// Simple sequence with default settings +[flag,errmsg] = assert_checkalmostequal ( 1 + 5 * %eps , 1 , %eps ); +checkassert ( flag , errmsg , "failure" ); +// +// Customize the relative precision so that a test can pass +// Simple sequence with default settings +[flag,errmsg] = assert_checkalmostequal ( 1 + 5 * %eps , 1 , 10*%eps ); +checkassert ( flag , errmsg , "success" ); +// +// Customize the absolute precision so that a test can pass +// Simple sequence with default settings +[flag,errmsg] = assert_checkalmostequal ( 0 + 5 * %eps , 0 , 0 , 10*%eps ); +checkassert ( flag , errmsg , "success" ); +// +// An example where the relative error is used, +// with a customized tolerance. +[flag,errmsg] = assert_checkalmostequal ( 1.23456 , 1.23457 , 1.e11*%eps ); +checkassert ( flag , errmsg , "success" ); +// +// Put all IEEE values +[flag,errmsg] = assert_checkalmostequal ( [1.2345 %inf -%inf %nan] , [1.2346 %inf -%inf %nan] , 1.e-4 ); +checkassert ( flag , errmsg , "success" ); +/////////////////////////////////////////////////////////////////////////////// +// Test elementwise algo +// If "matrix" type is used, this test pass. +[flag,errmsg] = assert_checkalmostequal ( [1 1.e5] , [2 1.e5] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +// +// Force the test to pass +[flag,errmsg] = assert_checkalmostequal ( [1 1.e5] , [1 1.e5] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %nan] , [2 %nan] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %inf] , [2 %inf] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %inf] , [1 %inf] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %inf -%inf %nan] , [1 %inf -%inf %nan] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %inf -%inf %nan] , [1 -%inf %inf %nan] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +/////////////////////////////////////////////////////////////////////////////// +// Test complex elementwise algo +// +[flag,errmsg] = assert_checkalmostequal ( 1+%i , 1+(1+1.e-4)*%i , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "success" ); +[flag,errmsg] = assert_checkalmostequal ( 1+%i , 1+(1+1.e-4)*%i , 1.e-5 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +// +// Use absolute tolerance +[flag,errmsg] = assert_checkalmostequal ( 1+%i , 0 , [], 1.e-3 , "element" ); +checkassert ( flag , errmsg , "failure" ); +// diff --git a/modules/development_tools/tests/unit_tests/assert/checkalmostequal.tst b/modules/development_tools/tests/unit_tests/assert/checkalmostequal.tst new file mode 100755 index 000000000..c3cd86cfa --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkalmostequal.tst @@ -0,0 +1,261 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction + + +format("v",10); + +// Check error message when number of arguments is false +instr = "assert_checkalmostequal ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checkalmostequal ( 1 , 1 , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +// +////////////////////////////////////////// +// Check error message when type of arguments is false +instr = "assert_checkalmostequal ( ""a"" , 2 , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , ""b"" , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , ""c"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , %eps , ""c"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , %eps , 0 , %t )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +////////////////////////////////////////// +// Check error message when size of arguments is false +instr = "assert_checkalmostequal ( 1 , 2 , [1 1] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , %eps , [1 1] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , 2 , %eps , 0 , [""a"" ""b""] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkalmostequal ( 1 , [2 3] , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); + +////////////////////////////////////////// +// +// Check that the error message is correctly handled. +instr = "assert_checkalmostequal ( 1 , 2 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf(_("%s: Assertion failed: expected = %s while computed = %s"), "assert_checkalmostequal", "2", "1"); +MY_assert_equal ( errmsg , refmsg ); +// +// Check that the error message is correctly handled. +instr = "assert_checkalmostequal ( 1 , 2 , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf(_("%s: Assertion failed: expected = %s while computed = %s"), "assert_checkalmostequal", "2", "1"); +MY_assert_equal ( errmsg , refmsg ); +// +// Check that the error message is correctly handled. +instr = "assert_checkalmostequal ( 1 , 1 , %eps )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 0 ); +errmsg = lasterror(); +MY_assert_equal ( errmsg , [] ); +// +// Obvious failure : Check the error message +instr = "assert_checkalmostequal ( zeros(10,1)+1.e-4 , zeros(10,1) , 1.e-5 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf(_("%s: Assertion failed: expected = %s while computed = %s"), "assert_checkalmostequal", "[0 ...]", "[0.0001 ...]"); +MY_assert_equal ( errmsg , refmsg ); + +////////////////////////////////////////// +// +// Test empty matrix +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( [] , [] ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( [] , [] , [], [], "matrix"); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( [] , [] , [], [], "element"); +checkassert ( flag , errmsg , "success" ); + +////////////////////////////////////////// +// +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( 1 , 1 ); +checkassert ( flag , errmsg , "success" ); +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( 1 , 1 , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( ones(10,1) , ones(10,1) , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( ones(10,1)+%eps , ones(10,1) , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious success +[flag,errmsg] = assert_checkalmostequal ( zeros(10,1) , zeros(10,1) , 1.e-5 ); +checkassert ( flag , errmsg , "success" ); +// +// Obvious failure +[flag,errmsg] = assert_checkalmostequal ( 1 , 2 , %eps ); +checkassert ( flag , errmsg , "failure" ); +// +// Obvious failure +[flag,errmsg] = assert_checkalmostequal ( zeros(10,1)+1.e-4 , zeros(10,1) , 1.e-5 ); +checkassert ( flag , errmsg , "failure" ); +// +// Success: not obvious! +// The two values are equal, very small, but nonzero. +// The relative tolerance must be used here. +// If, instead, a bug in the assert function is so that the +// absolute tolerance is used as 10^-16, then the output +// of this comparison is wrong. +[flag,errmsg] = assert_checkalmostequal ( 1.23456789123456789e-30 , 1.23456789123456789e-30 , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Failure : not obvious! +// There is only one significant digit here and we require the +// maximum precision. +// The test must fail because the relative tolerance must be used here. +// If, instead, there is a bug in the comparison and +// the absolute tolerance is used and set to +// 10^-16, the output of this test is wrong. +[flag,errmsg] = assert_checkalmostequal ( 1.23456789123456789e-30 , 1.3e-30 , %eps ); +checkassert ( flag , errmsg , "failure" ); +// +// Success : not obvious! +// The expected result is zero, so that the absolute tolerance is used. +[flag,errmsg] = assert_checkalmostequal ( 1.23456789123456789e-30 , 0 , 0 , 1.e-10 ); +checkassert ( flag , errmsg , "success" ); +// +// Check that nans are correctly handled +[flag,errmsg] = assert_checkalmostequal ( [1 %nan], [1 %nan] , %eps ); +checkassert ( flag , errmsg , "success" ); +// +// Check that nans are correctly handled +[flag,errmsg] = assert_checkalmostequal ( [1 %nan 1 %nan] , [1 %nan 1 %nan] , %eps ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkalmostequal ( [%nan 1], [1 %nan] , %eps ); +checkassert ( flag , errmsg , "failure" ); +// +// Check that slightly different values cannot pass basic test +// Simple sequence with default settings +[flag,errmsg] = assert_checkalmostequal ( 1 + 5 * %eps , 1 , %eps ); +checkassert ( flag , errmsg , "failure" ); +// +// Customize the relative precision so that a test can pass +// Simple sequence with default settings +[flag,errmsg] = assert_checkalmostequal ( 1 + 5 * %eps , 1 , 10*%eps ); +checkassert ( flag , errmsg , "success" ); +// +// Customize the absolute precision so that a test can pass +// Simple sequence with default settings +[flag,errmsg] = assert_checkalmostequal ( 0 + 5 * %eps , 0 , 0 , 10*%eps ); +checkassert ( flag , errmsg , "success" ); +// +// An example where the relative error is used, +// with a customized tolerance. +[flag,errmsg] = assert_checkalmostequal ( 1.23456 , 1.23457 , 1.e11*%eps ); +checkassert ( flag , errmsg , "success" ); +// +// Put all IEEE values +[flag,errmsg] = assert_checkalmostequal ( [1.2345 %inf -%inf %nan] , [1.2346 %inf -%inf %nan] , 1.e-4 ); +checkassert ( flag , errmsg , "success" ); + +/////////////////////////////////////////////////////////////////////////////// +// Test elementwise algo + +// If "matrix" type is used, this test pass. +[flag,errmsg] = assert_checkalmostequal ( [1 1.e5] , [2 1.e5] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +// +// Force the test to pass +[flag,errmsg] = assert_checkalmostequal ( [1 1.e5] , [1 1.e5] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %nan] , [2 %nan] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %inf] , [2 %inf] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %inf] , [1 %inf] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %inf -%inf %nan] , [1 %inf -%inf %nan] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkalmostequal ( [1 %inf -%inf %nan] , [1 -%inf %inf %nan] , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); + +/////////////////////////////////////////////////////////////////////////////// +// Test complex elementwise algo +// +[flag,errmsg] = assert_checkalmostequal ( 1+%i , 1+(1+1.e-4)*%i , 1.e-3 , [], "element" ); +checkassert ( flag , errmsg , "success" ); +[flag,errmsg] = assert_checkalmostequal ( 1+%i , 1+(1+1.e-4)*%i , 1.e-5 , [], "element" ); +checkassert ( flag , errmsg , "failure" ); +// +// Use absolute tolerance +[flag,errmsg] = assert_checkalmostequal ( 1+%i , 0 , [], 1.e-3 , "element" ); +checkassert ( flag , errmsg , "failure" ); +// + diff --git a/modules/development_tools/tests/unit_tests/assert/checkequal.dia.ref b/modules/development_tools/tests/unit_tests/assert/checkequal.dia.ref new file mode 100755 index 000000000..f8d171404 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkequal.dia.ref @@ -0,0 +1,176 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if ( and ( computed==expected ) ) then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction +format("v",10); +// Check error message when number of arguments is false +instr = "assert_checkequal ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkequal ( 1 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checkequal ( 1 , 1 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +////////////////////////////////////////// +// Check error message when type of arguments is false +instr = "assert_checkequal ( ""a"" , 2 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkequal ( 1 , ""b"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +////////////////////////////////////////// +// Check error message when size of arguments are not equal +instr = "assert_checkequal ( 1 , [2 3] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +// Check that the error message is correctly handled. +instr = "assert_checkequal ( [1 2], [3 4] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf( gettext( "%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" ) , "assert_checkequal" , "[3 ...]" , "[1 ...]", "-2"); +MY_assert_equal ( errmsg , refmsg ); +// +[flag , errmsg] = assert_checkequal ( %T , %T ); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal ( %F , %T ); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal ( %nan , %nan ); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal ( list() , list() ); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal ( [%T %F], [%T %F] ); +checkassert ( flag , errmsg , "success" ); +// +// Test all IEEE values +[flag , errmsg] = assert_checkequal ( [1 %inf -%inf %nan] , [1 %inf -%inf %nan] ); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal ( [] , [] ); +checkassert ( flag , errmsg , "success" ); +//////////////////////////////////////////////////////// +// Check complex entries. +[flag , errmsg] = assert_checkequal(complex(%nan,%nan),complex(%nan,0)); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal(complex(%nan,%inf),complex(%nan,0)); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal(complex(%nan,%nan),complex(0,%nan)); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal(complex(%nan,%inf),complex(0,%inf)); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal(complex(0,%inf),complex(0,%inf)); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal(complex(%nan,%nan),complex(%nan,%nan)); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal(complex(%inf,%nan),complex(%inf,%nan)); +checkassert ( flag , errmsg , "success" ); +// +//////////////////////////////////////////////////////// +// Check various types +// +// Mlist +s=mlist(["V","name","value"],["a","b";"c" "d"],[1 2; 3 4]); +t=s; +assert_checkequal(s, t); +// +// Tlist +s=tlist(["V","name","value"],["a","b";"c" "d"],[1 2; 3 4]); +t=s; +assert_checkequal(s, t); +// +// Polynomial +s=poly(0,"s"); +t=s; +assert_checkequal(s, t); +// +// Sparse +s=spzeros(3,5); +t=s; +assert_checkequal(s, t); +s(1)=12; +instr="assert_checkequal(s, t)"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal(ierr, 10000); +// +// Boolean +s=(ones(3,5)==ones(3,5)); +t=s; +assert_checkequal(s, t); +// +// Sparse Boolean +s=(spzeros(3,5)==spzeros(3,5)); +t=s; +assert_checkequal(s, t); +s(1)=%f; +instr="assert_checkequal(s, t)"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal(ierr, 10000); +// +// Integer 8 +s=int8(3); +t=s; +assert_checkequal(s, t); +// +// String +s="foo"; +t=s; +assert_checkequal(s, t); +// +// List +s=list("foo",2); +t=s; +assert_checkequal(s, t); +// +// Hypermatrix +// - Double +s = rand(2,2,2); +t = s; +assert_checkequal(s,t); +// - int8 +s = int8(rand(2,2,2)); +t = s; +assert_checkequal(s,t); +// - wrong type +s = rand(2,2,2); +t = int8(s); +instr="assert_checkequal(s, t)"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal(ierr, 10000); diff --git a/modules/development_tools/tests/unit_tests/assert/checkequal.tst b/modules/development_tools/tests/unit_tests/assert/checkequal.tst new file mode 100755 index 000000000..3ffaae834 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkequal.tst @@ -0,0 +1,202 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if ( and ( computed==expected ) ) then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction + +format("v",10); + +// Check error message when number of arguments is false +instr = "assert_checkequal ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkequal ( 1 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checkequal ( 1 , 1 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); + +////////////////////////////////////////// +// Check error message when type of arguments is false +instr = "assert_checkequal ( ""a"" , 2 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkequal ( 1 , ""b"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +////////////////////////////////////////// +// Check error message when size of arguments are not equal +instr = "assert_checkequal ( 1 , [2 3] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +// Check that the error message is correctly handled. +instr = "assert_checkequal ( [1 2], [3 4] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf( gettext( "%s: Assertion failed: expected = %s while computed = %s (mean diff = %s)" ) , "assert_checkequal" , "[3 ...]" , "[1 ...]", "-2"); +MY_assert_equal ( errmsg , refmsg ); +// +[flag , errmsg] = assert_checkequal ( %T , %T ); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal ( %F , %T ); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal ( %nan , %nan ); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal ( list() , list() ); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal ( [%T %F], [%T %F] ); +checkassert ( flag , errmsg , "success" ); +// +// Test all IEEE values +[flag , errmsg] = assert_checkequal ( [1 %inf -%inf %nan] , [1 %inf -%inf %nan] ); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal ( [] , [] ); +checkassert ( flag , errmsg , "success" ); +//////////////////////////////////////////////////////// +// Check complex entries. +[flag , errmsg] = assert_checkequal(complex(%nan,%nan),complex(%nan,0)); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal(complex(%nan,%inf),complex(%nan,0)); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal(complex(%nan,%nan),complex(0,%nan)); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal(complex(%nan,%inf),complex(0,%inf)); +checkassert ( flag , errmsg , "failure" ); +// +[flag , errmsg] = assert_checkequal(complex(0,%inf),complex(0,%inf)); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal(complex(%nan,%nan),complex(%nan,%nan)); +checkassert ( flag , errmsg , "success" ); +// +[flag , errmsg] = assert_checkequal(complex(%inf,%nan),complex(%inf,%nan)); +checkassert ( flag , errmsg , "success" ); +// +//////////////////////////////////////////////////////// +// Check various types +// +// Mlist +s=mlist(["V","name","value"],["a","b";"c" "d"],[1 2; 3 4]); +t=s; +assert_checkequal(s, t); +// +// Tlist +s=tlist(["V","name","value"],["a","b";"c" "d"],[1 2; 3 4]); +t=s; +assert_checkequal(s, t); +// +// Polynomial +s=poly(0,"s"); +t=s; +assert_checkequal(s, t); +// +// Sparse +s=spzeros(3,5); +t=s; +assert_checkequal(s, t); +s(1)=12; +instr="assert_checkequal(s, t)"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal(ierr, 10000); + +// +// Boolean +s=(ones(3,5)==ones(3,5)); +t=s; +assert_checkequal(s, t); +// +// Sparse Boolean +s=(spzeros(3,5)==spzeros(3,5)); +t=s; +assert_checkequal(s, t); +s(1)=%f; +instr="assert_checkequal(s, t)"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal(ierr, 10000); + +// +// Integer 8 +s=int8(3); +t=s; +assert_checkequal(s, t); +// +// String +s="foo"; +t=s; +assert_checkequal(s, t); +// +// List +s=list("foo",2); +t=s; +assert_checkequal(s, t); +// +// Hypermatrix +// - Double +s = rand(2,2,2); +t = s; +assert_checkequal(s,t); +// - int8 +s = int8(rand(2,2,2)); +t = s; +assert_checkequal(s,t); +// - wrong type +s = rand(2,2,2); +t = int8(s); +instr="assert_checkequal(s, t)"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal(ierr, 10000); + + + + + + + + + + + + + + + + + + diff --git a/modules/development_tools/tests/unit_tests/assert/checkerror.dia.ref b/modules/development_tools/tests/unit_tests/assert/checkerror.dia.ref new file mode 100755 index 000000000..8ab1afeab --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkerror.dia.ref @@ -0,0 +1,239 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +// These tests are rather abstract. +// This is because we test the assert_checkerror function, +// which generates errors. +// To check that assert_checkerror performs well, we use +// execstr. +// We obviously do not want to use assert_checkerror, since a +// bug in assert_checkerror would make the current test fail in a +// weird way. +// Moreover, the current tests are localized, so that +// a Scilab in English or in French equally pass the test. +function y = f(x) + [lhs,rhs]=argn() + if ( rhs <> 1 ) then + lstr=gettext("%s: Wrong number of input argument: %d expected.\n") + errmsg = sprintf ( lstr , "f" , 1 ) + error(errmsg) + end + if ( typeof(x) <> "constant" ) then + lstr=gettext("%s: Wrong type for input argument #%d: Matrix expected.\n") + errmsg = sprintf ( lstr , "f" , 1 ) + error(errmsg,123456789) + end + y = x +endfunction +/////////////////////////////////////////////// +// 1. Check our test-function f (the old shool way), +// i.e. check that the function function is correctly written. +// The test of the assert_checkerror function starts at step 2. +MY_assert_equal ( f(2) , 2 ); +// +instr = "f()"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +ferrmsg = msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"),"f",1); +MY_assert_equal ( lerr , ferrmsg ); +// +instr = "f(""aa"")"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 123456789 ); +lerr = lasterror(); +ferrmsg = msprintf(gettext("%s: Wrong type for input argument #%d: Matrix expected.\n"),"f",1); +MY_assert_equal ( lerr , ferrmsg ); +// +/////////////////////////////////////////////// +// 2. Check the error messages produced by assert_checkerror +// in case of wrong use of assert_checkerror +// +// Check error message when number of input arguments is false +instr = "assert_checkerror ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +asserterrmsg = sprintf ( gettext ( "%s: Wrong number of input argument: At least %d expected.\n") , "assert_checkerror" , 2 ); +MY_assert_equal ( lerr , asserterrmsg ); +// +// Check when number of output arguments is false +// +instr = "[o1,o2,o3]=assert_checkerror ( ""y=f(1)"" , """" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +// +// Check error message when type of 1st argument of assert_checkerror is false +instr = "assert_checkerror ( 1 , """" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkerror" , 1 ) ); +// +// Check error message when type of 2nd argument of assert_checkerror is false +instr = "assert_checkerror ( """" , 1 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkerror" , 2 ) ); +// +// Check error message when type of 3d argument of assert_checkerror is false +instr = "assert_checkerror ( """" , """" , """" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_checkerror" , 3 ) ); +// +// Check error message when size of 1st argument of assert_checkerror is false +instr = "assert_checkerror ( ["""" """"], """" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkerror" , 1 , 1, 1) ); +// +// Check error message when size of 2nd argument of assert_checkerror is true +// +instr = "assert_checkerror ( """" , ["""" """"] )"; +ierr = execstr(instr, "errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf( gettext ( "%s: No error was produced while evaluating ""%s"".") , "assert_checkerror" , "") ); +// +// Check error message when size of 3d argument of assert_checkerror is false +instr = "assert_checkerror ( """" , """", [1 2] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkerror" , 3 , 1, 1) ); +// +// Check error message when value of 3d argument of assert_checkerror is false +instr = "assert_checkerror ( """" , """", -12 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong value for input argument #%d: Non-negative integers expected.\n" ) , "assert_checkerror" , 3 ) ); +// +// Check error message when no error is produced by f +instr = "assert_checkerror ( ""y=f(1)"" , ""foo"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , "assert_checkerror: No error was produced while evaluating ""y=f(1)""." ); +// +// Check error message when no error is produced by f (and error number is given) +instr = "assert_checkerror ( ""y=f(1)"" , ""foo"" , 12 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf( gettext ( "%s: No error was produced while evaluating ""%s"".") , "assert_checkerror" , "y=f(1)" ) ); +// +// Check error message when formatting the error message generates an error (!). +instr = "assert_checkerror ( ""y=f()"" , ""foo"" , [] , 2 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +msprerrmsg = sprintf(gettext("%s: Wrong number of input arguments: at most %d expected.\n"),"msprintf",0); +MY_assert_equal ( lerr , sprintf( gettext ( "%s: Error while formatting the error message: ""%s""") , "assert_checkerror" , msprerrmsg ) ); +// +/////////////////////////////////////////////// +// +// Typical use-cases : the test pass +// +msg1=msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"),"f",1); +msg2=msprintf(gettext("%s: Wrong type for input argument #%d: Matrix expected.\n"),"f",1); +assert_checkerror ( "y=f()" , msg1 ); +assert_checkerror ( "y=f(""a"")" , msg2 ); +assert_checkerror ( "y=f()" , msg1 , 10000 ); +assert_checkerror ( "y=f(""a"")" , msg2 , 123456789 ); +// Check error message when the good error is produced by f (and errmsg is not given) +flag = assert_checkerror ( "y=f()" , msg1 ); +MY_assert_equal ( flag , %t ); +// +flag = assert_checkerror ( "y=f(""a"")" , msg2 ); +MY_assert_equal ( flag , %t ); +// +// Check error message and error number +flag = assert_checkerror ( "y=f()" , msg1 , 10000 ); +MY_assert_equal ( flag , %t ); +// +flag = assert_checkerror ( "y=f(""a"")" , msg2 , 123456789 ); +MY_assert_equal ( flag , %t ); +// +// Check error message when the good error is produced by f (and errmsg is an output argument) +[flag,errmsg] = assert_checkerror ( "y=f()" , msg1 ); +MY_assert_equal ( flag , %t ); +MY_assert_equal ( errmsg , "" ); +// +// Check error message and error number (and errmsg is given is an output argument) +[flag,errmsg] = assert_checkerror ( "y=f()" , msg1 , 10000 ); +MY_assert_equal ( flag , %t ); +MY_assert_equal ( errmsg , "" ); +// +// Let assert_checkerror localize the message +lcl1="%s: Wrong number of input argument: %d expected.\n"; +lcl2="%s: Wrong type for input argument #%d: Matrix expected.\n"; +assert_checkerror ( "y=f()" , lcl1 , [] , "f" , 1); +assert_checkerror ( "y=f(""a"")" , lcl2 , [] , "f" , 1); +// +/////////////////////////////////////////////// +// +// Typical use-cases : the test fails because the message is no the same +// +// Check error message when the wrong error is produced by f (and errmsg is not given) +instr = "assert_checkerror ( ""y=f()"" , ""oups"" )"; +ierr = execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s""."); +asserterrmsg = msprintf(localstr,"assert_checkerror","oups",msg1); +MY_assert_equal ( lerr , asserterrmsg ); +// +instr = "assert_checkerror ( ""y=f(""""a"""")"" , ""oups"" )"; +ierr = execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s""."); +asserterrmsg = msprintf(localstr,"assert_checkerror","oups",msg2); +MY_assert_equal ( lerr , asserterrmsg ); +// +// Check when errmsg output argument is given +// +[flag,errmsg]=assert_checkerror ( "y=f()" , "oups" ); +MY_assert_equal ( flag , %f ); +localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s""."); +asserterrmsg = msprintf(localstr,"assert_checkerror","oups",msg1); +MY_assert_equal ( errmsg , asserterrmsg ); +// +[flag,errmsg]=assert_checkerror ( "y=f(""a"")" , "oups" ); +MY_assert_equal ( flag , %f ); +localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s""."); +asserterrmsg = msprintf(localstr,"assert_checkerror","oups",msg2); +MY_assert_equal ( errmsg , asserterrmsg ); +/////////////////////////////////////////////// +// +// Typical use-cases : the test fails because the error number is no the same +// +instr = "assert_checkerror ( ""y=f()"" , "+sci2exp(msg1)+" , 12 )"; +ierr = execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +refmsg = msprintf( gettext( "%s: Assertion failed: expected error number = %d while computed error number = %d." ) , "assert_checkerror" , 12 , 10000 ); +MY_assert_equal ( lerr , refmsg ); +// +[flag,errmsg]=assert_checkerror ( "y=f()" , msg1 , 12 ); +MY_assert_equal ( flag , %f ); +MY_assert_equal ( errmsg , refmsg ); diff --git a/modules/development_tools/tests/unit_tests/assert/checkerror.tst b/modules/development_tools/tests/unit_tests/assert/checkerror.tst new file mode 100755 index 000000000..56ecfa401 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkerror.tst @@ -0,0 +1,246 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - 2011 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +// These tests are rather abstract. +// This is because we test the assert_checkerror function, +// which generates errors. +// To check that assert_checkerror performs well, we use +// execstr. +// We obviously do not want to use assert_checkerror, since a +// bug in assert_checkerror would make the current test fail in a +// weird way. +// Moreover, the current tests are localized, so that +// a Scilab in English or in French equally pass the test. + +function y = f(x) + [lhs,rhs]=argn() + if ( rhs <> 1 ) then + lstr=gettext("%s: Wrong number of input argument: %d expected.\n") + errmsg = sprintf ( lstr , "f" , 1 ) + error(errmsg) + end + if ( typeof(x) <> "constant" ) then + lstr=gettext("%s: Wrong type for input argument #%d: Matrix expected.\n") + errmsg = sprintf ( lstr , "f" , 1 ) + error(errmsg,123456789) + end + y = x +endfunction + +/////////////////////////////////////////////// +// 1. Check our test-function f (the old shool way), +// i.e. check that the function function is correctly written. +// The test of the assert_checkerror function starts at step 2. +MY_assert_equal ( f(2) , 2 ); +// +instr = "f()"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +ferrmsg = msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"),"f",1); +MY_assert_equal ( lerr , ferrmsg ); +// +instr = "f(""aa"")"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 123456789 ); +lerr = lasterror(); +ferrmsg = msprintf(gettext("%s: Wrong type for input argument #%d: Matrix expected.\n"),"f",1); +MY_assert_equal ( lerr , ferrmsg ); +// +/////////////////////////////////////////////// +// 2. Check the error messages produced by assert_checkerror +// in case of wrong use of assert_checkerror +// +// Check error message when number of input arguments is false +instr = "assert_checkerror ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +asserterrmsg = sprintf ( gettext ( "%s: Wrong number of input argument: At least %d expected.\n") , "assert_checkerror" , 2 ); +MY_assert_equal ( lerr , asserterrmsg ); +// +// Check when number of output arguments is false +// +instr = "[o1,o2,o3]=assert_checkerror ( ""y=f(1)"" , """" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +// +// Check error message when type of 1st argument of assert_checkerror is false +instr = "assert_checkerror ( 1 , """" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkerror" , 1 ) ); +// +// Check error message when type of 2nd argument of assert_checkerror is false +instr = "assert_checkerror ( """" , 1 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n") , "assert_checkerror" , 2 ) ); +// +// Check error message when type of 3d argument of assert_checkerror is false +instr = "assert_checkerror ( """" , """" , """" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong type for input argument #%d: Matrix expected.\n") , "assert_checkerror" , 3 ) ); +// +// Check error message when size of 1st argument of assert_checkerror is false +instr = "assert_checkerror ( ["""" """"], """" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkerror" , 1 , 1, 1) ); +// +// Check error message when size of 2nd argument of assert_checkerror is true +// +instr = "assert_checkerror ( """" , ["""" """"] )"; +ierr = execstr(instr, "errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf( gettext ( "%s: No error was produced while evaluating ""%s"".") , "assert_checkerror" , "") ); +// +// Check error message when size of 3d argument of assert_checkerror is false +instr = "assert_checkerror ( """" , """", [1 2] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n") , "assert_checkerror" , 3 , 1, 1) ); +// +// Check error message when value of 3d argument of assert_checkerror is false +instr = "assert_checkerror ( """" , """", -12 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf ( gettext ( "%s: Wrong value for input argument #%d: Non-negative integers expected.\n" ) , "assert_checkerror" , 3 ) ); +// +// Check error message when no error is produced by f +instr = "assert_checkerror ( ""y=f(1)"" , ""foo"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , "assert_checkerror: No error was produced while evaluating ""y=f(1)""." ); +// +// Check error message when no error is produced by f (and error number is given) +instr = "assert_checkerror ( ""y=f(1)"" , ""foo"" , 12 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +MY_assert_equal ( lerr , sprintf( gettext ( "%s: No error was produced while evaluating ""%s"".") , "assert_checkerror" , "y=f(1)" ) ); +// +// Check error message when formatting the error message generates an error (!). +instr = "assert_checkerror ( ""y=f()"" , ""foo"" , [] , 2 )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +msprerrmsg = sprintf(gettext("%s: Wrong number of input arguments: at most %d expected.\n"),"msprintf",0); +MY_assert_equal ( lerr , sprintf( gettext ( "%s: Error while formatting the error message: ""%s""") , "assert_checkerror" , msprerrmsg ) ); +// +/////////////////////////////////////////////// +// +// Typical use-cases : the test pass +// +msg1=msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"),"f",1); +msg2=msprintf(gettext("%s: Wrong type for input argument #%d: Matrix expected.\n"),"f",1); +assert_checkerror ( "y=f()" , msg1 ); +assert_checkerror ( "y=f(""a"")" , msg2 ); +assert_checkerror ( "y=f()" , msg1 , 10000 ); +assert_checkerror ( "y=f(""a"")" , msg2 , 123456789 ); +// Check error message when the good error is produced by f (and errmsg is not given) +flag = assert_checkerror ( "y=f()" , msg1 ); +MY_assert_equal ( flag , %t ); +// +flag = assert_checkerror ( "y=f(""a"")" , msg2 ); +MY_assert_equal ( flag , %t ); +// +// Check error message and error number +flag = assert_checkerror ( "y=f()" , msg1 , 10000 ); +MY_assert_equal ( flag , %t ); +// +flag = assert_checkerror ( "y=f(""a"")" , msg2 , 123456789 ); +MY_assert_equal ( flag , %t ); +// +// Check error message when the good error is produced by f (and errmsg is an output argument) +[flag,errmsg] = assert_checkerror ( "y=f()" , msg1 ); +MY_assert_equal ( flag , %t ); +MY_assert_equal ( errmsg , "" ); +// +// Check error message and error number (and errmsg is given is an output argument) +[flag,errmsg] = assert_checkerror ( "y=f()" , msg1 , 10000 ); +MY_assert_equal ( flag , %t ); +MY_assert_equal ( errmsg , "" ); +// +// Let assert_checkerror localize the message +lcl1="%s: Wrong number of input argument: %d expected.\n"; +lcl2="%s: Wrong type for input argument #%d: Matrix expected.\n"; +assert_checkerror ( "y=f()" , lcl1 , [] , "f" , 1); +assert_checkerror ( "y=f(""a"")" , lcl2 , [] , "f" , 1); +// +/////////////////////////////////////////////// +// +// Typical use-cases : the test fails because the message is no the same +// +// Check error message when the wrong error is produced by f (and errmsg is not given) +instr = "assert_checkerror ( ""y=f()"" , ""oups"" )"; +ierr = execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s""."); +asserterrmsg = msprintf(localstr,"assert_checkerror","oups",msg1); +MY_assert_equal ( lerr , asserterrmsg ); +// +instr = "assert_checkerror ( ""y=f(""""a"""")"" , ""oups"" )"; +ierr = execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s""."); +asserterrmsg = msprintf(localstr,"assert_checkerror","oups",msg2); +MY_assert_equal ( lerr , asserterrmsg ); +// +// Check when errmsg output argument is given +// +[flag,errmsg]=assert_checkerror ( "y=f()" , "oups" ); +MY_assert_equal ( flag , %f ); +localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s""."); +asserterrmsg = msprintf(localstr,"assert_checkerror","oups",msg1); +MY_assert_equal ( errmsg , asserterrmsg ); +// +[flag,errmsg]=assert_checkerror ( "y=f(""a"")" , "oups" ); +MY_assert_equal ( flag , %f ); +localstr = gettext("%s: Assertion failed: expected error message = ""%s"" while computed error message = ""%s""."); +asserterrmsg = msprintf(localstr,"assert_checkerror","oups",msg2); +MY_assert_equal ( errmsg , asserterrmsg ); + +/////////////////////////////////////////////// +// +// Typical use-cases : the test fails because the error number is no the same +// +instr = "assert_checkerror ( ""y=f()"" , "+sci2exp(msg1)+" , 12 )"; +ierr = execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +lerr = lasterror(); +refmsg = msprintf( gettext( "%s: Assertion failed: expected error number = %d while computed error number = %d." ) , "assert_checkerror" , 12 , 10000 ); +MY_assert_equal ( lerr , refmsg ); +// +[flag,errmsg]=assert_checkerror ( "y=f()" , msg1 , 12 ); +MY_assert_equal ( flag , %f ); +MY_assert_equal ( errmsg , refmsg ); + diff --git a/modules/development_tools/tests/unit_tests/assert/checkfalse.dia.ref b/modules/development_tools/tests/unit_tests/assert/checkfalse.dia.ref new file mode 100755 index 000000000..d8a237d3a --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkfalse.dia.ref @@ -0,0 +1,60 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction +format("v",10); +// Check error message when number of arguments is false +instr = "assert_checkfalse ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checkfalse ( %f )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +////////////////////////////////////////// +// Check error message when type of arguments is false +instr = "assert_checkfalse ( ""a"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +// +// Check that the error message is correctly handled. +instr = "assert_checkfalse ( [%f %t] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf( gettext ( "%s: Assertion failed: found false entry in condition = %s" ) , "assert_checkfalse", "[F ...]"); +MY_assert_equal ( errmsg , refmsg ); +// +[flag,errmsg] = assert_checkfalse ( %f ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkfalse ( [%f %f] ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkfalse ( %t ); +checkassert ( flag , errmsg , "failure" ); +// +[flag,errmsg] = assert_checkfalse ( [%t %f] ); +checkassert ( flag , errmsg , "failure" ); diff --git a/modules/development_tools/tests/unit_tests/assert/checkfalse.tst b/modules/development_tools/tests/unit_tests/assert/checkfalse.tst new file mode 100755 index 000000000..d916ff449 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkfalse.tst @@ -0,0 +1,66 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction + +format("v",10); + +// Check error message when number of arguments is false +instr = "assert_checkfalse ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checkfalse ( %f )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +////////////////////////////////////////// +// Check error message when type of arguments is false +instr = "assert_checkfalse ( ""a"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +// +// Check that the error message is correctly handled. +instr = "assert_checkfalse ( [%f %t] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf( gettext ( "%s: Assertion failed: found false entry in condition = %s" ) , "assert_checkfalse", "[F ...]"); +MY_assert_equal ( errmsg , refmsg ); +// +[flag,errmsg] = assert_checkfalse ( %f ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkfalse ( [%f %f] ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checkfalse ( %t ); +checkassert ( flag , errmsg , "failure" ); +// +[flag,errmsg] = assert_checkfalse ( [%t %f] ); +checkassert ( flag , errmsg , "failure" ); + diff --git a/modules/development_tools/tests/unit_tests/assert/checkfilesequal.dia.ref b/modules/development_tools/tests/unit_tests/assert/checkfilesequal.dia.ref new file mode 100755 index 000000000..44838d977 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkfilesequal.dia.ref @@ -0,0 +1,280 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction +format("v",10); +// Check error message when number of arguments is false +instr = "assert_checkfilesequal ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkfilesequal ( ""foo.txt"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checkfilesequal ( ""foo.txt"" , ""foo.txt"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +// +////////////////////////////////////////// +// +// Check error message when type of arguments is false +instr = "assert_checkfilesequal ( ""foo.txt"" , %t )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkfilesequal ( %t , ""foo.txt"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkfilesequal ( %t , %t )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +////////////////////////////////////////// +// +// Check error message when size of arguments is false +instr = "assert_checkfilesequal ( [ ""foo.txt"" ""foo.txt"" ] , ""foo.txt"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkfilesequal ( ""foo.txt"" , [ ""foo.txt"" ""foo.txt"" ] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +////////////////////////////////////////// +// +// Prepare data for the tests +// fileref1 : three lines of text. +// filecomp1 : == fileref1 +// filecomp2 : <> fileref1 +// +// fileref1 +fileref1 = fullfile(TMPDIR,"fileref.txt"); +txt1 = [ + "Line #1" + "Line #2" + "Line #3" +]; +fd = mopen(fileref1,"w"); +mputl(txt1,fd); +mclose(fd); +// +// filecomp1 +filecomp1 = fullfile(TMPDIR,"filecomp1.txt"); +fd = mopen(filecomp1,"w"); +mputl(txt1,fd); +mclose(fd); +// +filecomp2 = fullfile(TMPDIR,"filecomp2.txt"); +txt2 = [ + "Line #1" + "Line #4" + "Line #3" +]; +fd = mopen(filecomp2,"w"); +mputl(txt2,fd); +mclose(fd); +// +////////////////////////////////////////// +// +// A test which pass +[flag,errmsg] = assert_checkfilesequal ( filecomp1 , fileref1 ); +checkassert ( flag , errmsg , "success" ); +// +// A test which pass. +// Replay it, to make sure that the files are correctly closed. +[flag,errmsg] = assert_checkfilesequal ( filecomp1 , fileref1 ); +checkassert ( flag , errmsg , "success" ); +// +// Failure: filecomp2 <> fileref1 +[flag,errmsg] = assert_checkfilesequal ( filecomp2 , fileref1 ); +checkassert ( flag , errmsg , "failure" ); +// +// Failure: filecomp2 <> fileref1 +// Replay it, to make sure that the files are correctly closed. +[flag,errmsg] = assert_checkfilesequal ( filecomp2 , fileref1 ); +checkassert ( flag , errmsg , "failure" ); +// +// Failure: fileref does not exist. +[flag,errmsg] = assert_checkfilesequal ( filecomp2 , "foo.txt" ); +checkassert ( flag , errmsg , "failure" ); +// +// Failure: filecomp does not exist. +[flag,errmsg] = assert_checkfilesequal ( "foo.txt" , fileref1 ); +checkassert ( flag , errmsg , "failure" ); +// +////////////////////////////////////////// +// +// A test with a comparison function which ignores comment lines. +// +// Define the filter +function otxt = myfilter ( itxt ) + nr = size(itxt,"r") + // This is the pattern for a comment line of the form "// blabla" + pattern = "/\/\/.*/" + k = 1 + for i = 1 : nr + start = regexp(itxt(i),pattern) + if ( start == [] ) then + otxt(k) = itxt(i) + k = k + 1 + end + end +endfunction +// +// Check that the filter works as expected. +itxt = [ + "bla 1" + "// bla 2" + "bla 3" + "// bla 4" + "bla 5" + ]; +otxt = myfilter ( itxt ); +etxt = [ + "bla 1" + "bla 3" + "bla 5" + ]; +MY_assert_equal ( otxt , etxt ); +// +// Define the comparison function +function areequal = mycompfun ( ctxt , etxt ) + ctxt = myfilter ( ctxt ) + etxt = myfilter ( etxt ) + areequal = ( ctxt == etxt ) +endfunction +// +// Use the comparison function. +// fileref2 == filecomp3, given that comment lines are ignored. +// fileref2 <> filecomp4, given that comment lines are ignored. +// Notice that the comments are inserted at different positions in the files: +// sometimes at the begining, sometimes in the middle. +// +// Prepare data files +// +// fileref2 +fileref2 = fullfile(TMPDIR,"fileref2.txt"); +txt = [ + "// bla 2" + "Line #1" + "// bla 2" + "Line #2" + "Line #3" +]; +fd = mopen(fileref2,"w"); +mputl(txt,fd); +mclose(fd); +// +// filecomp3 +filecomp3 = fullfile(TMPDIR,"filecomp3.txt"); +txt = [ + "Line #1" + "// bla 5168" + "Line #2" + "Line #3" + "// bla oups" +]; +fd = mopen(filecomp3,"w"); +mputl(txt,fd); +mclose(fd); +// +// filecomp4 +filecomp4 = fullfile(TMPDIR,"filecomp4.txt"); +txt = [ + "// bla 3" + "Line #1" + "Line #4" + "// bla 5168" + "Line #3" + "// bla oups" +]; +fd = mopen(filecomp4,"w"); +mputl(txt,fd); +mclose(fd); +// +// A test which pass +[flag,errmsg] = assert_checkfilesequal ( filecomp3 , fileref2 , mycompfun ); +checkassert ( flag , errmsg , "success" ); +// +// A test which fails +[flag,errmsg] = assert_checkfilesequal ( filecomp4 , fileref2 , mycompfun ); +checkassert ( flag , errmsg , "failure" ); +// +/////////////////////////////////////////////////////////////////// +// +// A comparison function with an additional argument +// +// A test with a comparison function which ignores comment lines. +// +// Define the filter +function otxt = myfilter2 ( itxt , pattern ) + nr = size(itxt,"r") + k = 1 + for i = 1 : nr + start = regexp(itxt(i),pattern) + if ( start == [] ) then + otxt(k) = itxt(i) + k = k + 1 + end + end +endfunction +// +// Check that the filter works as expected. +// This is the pattern for a comment line of the form "// blabla" +pattern = "/\/\/.*/" + pattern = + + /\/\/.*/ +itxt = [ + "bla 1" + "// bla 2" + "bla 3" + "// bla 4" + "bla 5" + ]; +otxt = myfilter2 ( itxt , pattern ); +etxt = [ + "bla 1" + "bla 3" + "bla 5" + ]; +MY_assert_equal ( otxt , etxt ); +// +// Define the comparison function +function areequal = mycompfun2 ( ctxt , etxt , pattern ) + ctxt = myfilter2 ( ctxt , pattern ) + etxt = myfilter2 ( etxt , pattern ) + areequal = ( ctxt == etxt ) +endfunction +// +// A test which pass +mycompfun3 = list ( mycompfun2 , pattern ); +[flag,errmsg] = assert_checkfilesequal ( filecomp3 , fileref2 , mycompfun3 ); +checkassert ( flag , errmsg , "success" ); +// +// A test which fails +[flag,errmsg] = assert_checkfilesequal ( filecomp4 , fileref2 , mycompfun3 ); +checkassert ( flag , errmsg , "failure" ); diff --git a/modules/development_tools/tests/unit_tests/assert/checkfilesequal.tst b/modules/development_tools/tests/unit_tests/assert/checkfilesequal.tst new file mode 100755 index 000000000..3e722d6b6 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checkfilesequal.tst @@ -0,0 +1,284 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction + +format("v",10); + +// Check error message when number of arguments is false +instr = "assert_checkfilesequal ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkfilesequal ( ""foo.txt"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checkfilesequal ( ""foo.txt"" , ""foo.txt"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +// +////////////////////////////////////////// +// +// Check error message when type of arguments is false +instr = "assert_checkfilesequal ( ""foo.txt"" , %t )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkfilesequal ( %t , ""foo.txt"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkfilesequal ( %t , %t )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +////////////////////////////////////////// +// +// Check error message when size of arguments is false +instr = "assert_checkfilesequal ( [ ""foo.txt"" ""foo.txt"" ] , ""foo.txt"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "assert_checkfilesequal ( ""foo.txt"" , [ ""foo.txt"" ""foo.txt"" ] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +////////////////////////////////////////// +// +// Prepare data for the tests +// fileref1 : three lines of text. +// filecomp1 : == fileref1 +// filecomp2 : <> fileref1 +// +// fileref1 +fileref1 = fullfile(TMPDIR,"fileref.txt"); +txt1 = [ +"Line #1" +"Line #2" +"Line #3" +]; +fd = mopen(fileref1,"w"); +mputl(txt1,fd); +mclose(fd); +// +// filecomp1 +filecomp1 = fullfile(TMPDIR,"filecomp1.txt"); +fd = mopen(filecomp1,"w"); +mputl(txt1,fd); +mclose(fd); +// +filecomp2 = fullfile(TMPDIR,"filecomp2.txt"); +txt2 = [ +"Line #1" +"Line #4" +"Line #3" +]; +fd = mopen(filecomp2,"w"); +mputl(txt2,fd); +mclose(fd); +// +////////////////////////////////////////// +// +// A test which pass +[flag,errmsg] = assert_checkfilesequal ( filecomp1 , fileref1 ); +checkassert ( flag , errmsg , "success" ); +// +// A test which pass. +// Replay it, to make sure that the files are correctly closed. +[flag,errmsg] = assert_checkfilesequal ( filecomp1 , fileref1 ); +checkassert ( flag , errmsg , "success" ); +// +// Failure: filecomp2 <> fileref1 +[flag,errmsg] = assert_checkfilesequal ( filecomp2 , fileref1 ); +checkassert ( flag , errmsg , "failure" ); +// +// Failure: filecomp2 <> fileref1 +// Replay it, to make sure that the files are correctly closed. +[flag,errmsg] = assert_checkfilesequal ( filecomp2 , fileref1 ); +checkassert ( flag , errmsg , "failure" ); +// +// Failure: fileref does not exist. +[flag,errmsg] = assert_checkfilesequal ( filecomp2 , "foo.txt" ); +checkassert ( flag , errmsg , "failure" ); +// +// Failure: filecomp does not exist. +[flag,errmsg] = assert_checkfilesequal ( "foo.txt" , fileref1 ); +checkassert ( flag , errmsg , "failure" ); +// +////////////////////////////////////////// +// +// A test with a comparison function which ignores comment lines. +// +// Define the filter +function otxt = myfilter ( itxt ) + nr = size(itxt,"r") + // This is the pattern for a comment line of the form "// blabla" + pattern = "/\/\/.*/" + k = 1 + for i = 1 : nr + start = regexp(itxt(i),pattern) + if ( start == [] ) then + otxt(k) = itxt(i) + k = k + 1 + end + end +endfunction +// +// Check that the filter works as expected. +itxt = [ +"bla 1" +"// bla 2" +"bla 3" +"// bla 4" +"bla 5" +]; +otxt = myfilter ( itxt ); +etxt = [ +"bla 1" +"bla 3" +"bla 5" +]; +MY_assert_equal ( otxt , etxt ); +// +// Define the comparison function +function areequal = mycompfun ( ctxt , etxt ) + ctxt = myfilter ( ctxt ) + etxt = myfilter ( etxt ) + areequal = ( ctxt == etxt ) +endfunction + +// +// Use the comparison function. +// fileref2 == filecomp3, given that comment lines are ignored. +// fileref2 <> filecomp4, given that comment lines are ignored. +// Notice that the comments are inserted at different positions in the files: +// sometimes at the begining, sometimes in the middle. +// +// Prepare data files +// +// fileref2 +fileref2 = fullfile(TMPDIR,"fileref2.txt"); +txt = [ +"// bla 2" +"Line #1" +"// bla 2" +"Line #2" +"Line #3" +]; +fd = mopen(fileref2,"w"); +mputl(txt,fd); +mclose(fd); +// +// filecomp3 +filecomp3 = fullfile(TMPDIR,"filecomp3.txt"); +txt = [ +"Line #1" +"// bla 5168" +"Line #2" +"Line #3" +"// bla oups" +]; +fd = mopen(filecomp3,"w"); +mputl(txt,fd); +mclose(fd); +// +// filecomp4 +filecomp4 = fullfile(TMPDIR,"filecomp4.txt"); +txt = [ +"// bla 3" +"Line #1" +"Line #4" +"// bla 5168" +"Line #3" +"// bla oups" +]; +fd = mopen(filecomp4,"w"); +mputl(txt,fd); +mclose(fd); +// +// A test which pass +[flag,errmsg] = assert_checkfilesequal ( filecomp3 , fileref2 , mycompfun ); +checkassert ( flag , errmsg , "success" ); +// +// A test which fails +[flag,errmsg] = assert_checkfilesequal ( filecomp4 , fileref2 , mycompfun ); +checkassert ( flag , errmsg , "failure" ); +// +/////////////////////////////////////////////////////////////////// +// +// A comparison function with an additional argument +// +// A test with a comparison function which ignores comment lines. +// +// Define the filter +function otxt = myfilter2 ( itxt , pattern ) + nr = size(itxt,"r") + k = 1 + for i = 1 : nr + start = regexp(itxt(i),pattern) + if ( start == [] ) then + otxt(k) = itxt(i) + k = k + 1 + end + end +endfunction +// +// Check that the filter works as expected. +// This is the pattern for a comment line of the form "// blabla" +pattern = "/\/\/.*/" +itxt = [ +"bla 1" +"// bla 2" +"bla 3" +"// bla 4" +"bla 5" +]; +otxt = myfilter2 ( itxt , pattern ); +etxt = [ +"bla 1" +"bla 3" +"bla 5" +]; +MY_assert_equal ( otxt , etxt ); +// +// Define the comparison function +function areequal = mycompfun2 ( ctxt , etxt , pattern ) + ctxt = myfilter2 ( ctxt , pattern ) + etxt = myfilter2 ( etxt , pattern ) + areequal = ( ctxt == etxt ) +endfunction +// +// A test which pass +mycompfun3 = list ( mycompfun2 , pattern ); +[flag,errmsg] = assert_checkfilesequal ( filecomp3 , fileref2 , mycompfun3 ); +checkassert ( flag , errmsg , "success" ); +// +// A test which fails +[flag,errmsg] = assert_checkfilesequal ( filecomp4 , fileref2 , mycompfun3 ); +checkassert ( flag , errmsg , "failure" ); + diff --git a/modules/development_tools/tests/unit_tests/assert/checktrue.dia.ref b/modules/development_tools/tests/unit_tests/assert/checktrue.dia.ref new file mode 100755 index 000000000..714a5a616 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checktrue.dia.ref @@ -0,0 +1,60 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction +format("v",10); +// Check error message when number of arguments is false +instr = "assert_checktrue ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checktrue ( %t )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +////////////////////////////////////////// +// Check error message when type of arguments is false +instr = "assert_checktrue ( ""a"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +// +// Check that the error message is correctly handled. +instr = "assert_checktrue ( [%f %t] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf( gettext( "%s: Assertion failed: found false entry in condition = %s" ) , "assert_checktrue", "[F ...]"); +MY_assert_equal ( errmsg , refmsg ); +// +[flag,errmsg] = assert_checktrue ( %t ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checktrue ( [%t %t] ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checktrue ( %f ); +checkassert ( flag , errmsg , "failure" ); +// +[flag,errmsg] = assert_checktrue ( [%t %f] ); +checkassert ( flag , errmsg , "failure" ); diff --git a/modules/development_tools/tests/unit_tests/assert/checktrue.tst b/modules/development_tools/tests/unit_tests/assert/checktrue.tst new file mode 100755 index 000000000..d176b624f --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/checktrue.tst @@ -0,0 +1,66 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +function checkassert ( flag , errmsg , ctype ) + if ( ctype == "success" ) then + MY_assert_equal ( (flag==%t) & (errmsg==""), %t ) + else + MY_assert_equal ( (flag==%f) & (errmsg<>""), %t ) + end +endfunction + +format("v",10); + +// Check error message when number of arguments is false +instr = "assert_checktrue ( )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +instr = "[o1,o2,o3]=assert_checktrue ( %t )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 59 ); +////////////////////////////////////////// +// Check error message when type of arguments is false +instr = "assert_checktrue ( ""a"" )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +// +// +// Check that the error message is correctly handled. +instr = "assert_checktrue ( [%f %t] )"; +ierr=execstr(instr,"errcatch"); +MY_assert_equal ( ierr , 10000 ); +errmsg = lasterror(); +refmsg = msprintf( gettext( "%s: Assertion failed: found false entry in condition = %s" ) , "assert_checktrue", "[F ...]"); +MY_assert_equal ( errmsg , refmsg ); +// +[flag,errmsg] = assert_checktrue ( %t ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checktrue ( [%t %t] ); +checkassert ( flag , errmsg , "success" ); +// +[flag,errmsg] = assert_checktrue ( %f ); +checkassert ( flag , errmsg , "failure" ); +// +[flag,errmsg] = assert_checktrue ( [%t %f] ); +checkassert ( flag , errmsg , "failure" ); + diff --git a/modules/development_tools/tests/unit_tests/assert/comparecomplex.dia.ref b/modules/development_tools/tests/unit_tests/assert/comparecomplex.dia.ref new file mode 100755 index 000000000..3872c3192 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/comparecomplex.dia.ref @@ -0,0 +1,214 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +// Compare real values +order = assert_comparecomplex ( 1 , -1 ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( -1 , 1 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1 , 1 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1 , -1 , %eps , 0 ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( -1 , 1 , %eps , 0 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1 , 1 , %eps , 0 ); +MY_assert_equal ( order , 0 ); +// +// Compare complex values #1 +order = assert_comparecomplex ( 1+2*%i , 1+3*%i , %eps , 0 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1+3*%i , 1+2*%i , %eps , 0 ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( 1+2*%i , 1+2*%i , %eps , 0 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+2*%i , 1+3*%i ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1+3*%i , 1+2*%i ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( 1+2*%i , 1+2*%i ); +MY_assert_equal ( order , 0 ); +// +// Compare complex values #2 +order = assert_comparecomplex ( 1+%i , -1+%i ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( -1+%i , 1+%i ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1+%i , 1+%i ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+%i , -1+%i , %eps , 0 ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( -1+%i , 1+%i , %eps , 0 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1+%i , 1+%i , %eps , 0 ); +MY_assert_equal ( order , 0 ); +// +// Compare with tolerances : equality cases +order = assert_comparecomplex ( 1.2345+%i , 1.2346+%i , %eps , 1.e-3 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1.2345+%i , 1.2346+%i , 1.e12*%eps , 0 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+1.2345*%i , 1+1.2347*%i , %eps , 1.e-3 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+1.2345*%i , 1+1.2347*%i , 1.e12*%eps , 0 ); +MY_assert_equal ( order , 0 ); +// +// Compare more realistic data +x = [ +-0.123452 - 0.123454 * %i +-0.123451 + 0.123453 * %i +0.123458 - 0.123459 * %i +0.123456 + 0.123457 * %i +]; +// Consider less than 4 significant digits +for i = 1 : size(x,"*")-1 + order(i) = assert_comparecomplex ( x(i) , x(i+1) , 1.e-4 ); +end +MY_assert_equal ( order , -ones(3,1) ); +clear order; +// Compare data from bug #415 +x = [ +-1.9914145 +-1.895889 +-1.6923826 +-1.4815461 +-1.1302576 +-0.5652256 - 0.0655080 * %i +-0.5652256 + 0.0655080 * %i +0.3354023 - 0.1602902 * %i +0.3354023 + 0.1602902 * %i +1.3468911 +1.5040136 +1.846668 +1.9736772 +1.9798866 +]; +// Consider less than 4 significant digits +for i = 1 : size(x,"*")-1 + order(i) = assert_comparecomplex ( x(i) , x(i+1) , 1.e-5 ); +end +MY_assert_equal ( order , -ones(13,1) ); +clear order; +// +order = assert_comparecomplex ( 1 , 1 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+%eps , 1 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 0 , 0 , 0 , 1.e-5 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1 , 2 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1.e-4 , 0 , 0 , 1.e-5 ); +MY_assert_equal ( order , 1 ); +// +// Success: not obvious! +// The two values are equal, very small, but nonzero. +// The relative tolerance must be used here. +// If, instead, a bug in the assert function is so that the +// absolute tolerance is used as 10^-16, then the output +// of this comparison is wrong. +order = assert_comparecomplex ( 1.23456789123456789e-30 , 1.23456789123456789e-30 ); +MY_assert_equal ( order , 0 ); +// +// Failure : not obvious! +// There is only one significant digit here and we require the +// maximum precision. +// The test must fail because the relative tolerance must be used here. +// If, instead, there is a bug in the comparison and +// the absolute tolerance is used and set to +// 10^-16, the output of this test is wrong. +order = assert_comparecomplex ( 1.23456789123456789e-30 , 1.3e-30 ); +MY_assert_equal ( order , -1 ); +// +// Success : not obvious! +// The expected result is zero, so that the absolute tolerance is used. +order = assert_comparecomplex ( 1.23456789123456789e-30 , 0 , 0 , 1.e-10 ); +MY_assert_equal ( order , 0 ); +// +// Check that slightly different values cannot pass basic test +// Simple sequence with default settings +order = assert_comparecomplex ( 1 + 5 * %eps , 1 , %eps ); +MY_assert_equal ( order , 1 ); +// +// Customize the relative precision so that a test can pass +// Simple sequence with default settings +order = assert_comparecomplex ( 1 + 5 * %eps , 1 , 10*%eps , 0 ); +MY_assert_equal ( order , 0 ); +// +// Customize the absolute precision so that a test can pass +// Simple sequence with default settings +order = assert_comparecomplex ( 5 * %eps , 0 , 0 , 10*%eps ); +MY_assert_equal ( order , 0 ); +// +// An example where the relative error is used, +// with a customized tolerance. +order = assert_comparecomplex ( 1.23456 , 1.23457 , 1.e11*%eps , 0 ); +MY_assert_equal ( order , 0 ); +// +// Test all IEEE values +// We choose -%inf < 0 < %inf < %nan. +table = [ + %inf 0 1 + %inf %inf 0 + %inf -%inf 1 + %inf %nan -1 + -%inf 0 -1 + -%inf %inf -1 + -%inf -%inf 0 + -%inf %nan -1 + %nan 0 1 + %nan %inf 1 + %nan -%inf 1 + %nan %nan 0 + 0 0 0 + 0 %inf -1 + 0 -%inf 1 + 0 %nan -1 +]; +ntests = size(table,"r"); +for i = 1 : ntests + a = table(i,1); + b = table(i,2); + expected = table(i,3); + order = assert_comparecomplex ( a , b ); + MY_assert_equal ( order , expected ); + order = assert_comparecomplex ( b , a ); + MY_assert_equal ( order , -expected ); +end diff --git a/modules/development_tools/tests/unit_tests/assert/comparecomplex.tst b/modules/development_tools/tests/unit_tests/assert/comparecomplex.tst new file mode 100755 index 000000000..80cdc01a0 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/comparecomplex.tst @@ -0,0 +1,223 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +// Compare real values +order = assert_comparecomplex ( 1 , -1 ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( -1 , 1 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1 , 1 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1 , -1 , %eps , 0 ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( -1 , 1 , %eps , 0 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1 , 1 , %eps , 0 ); +MY_assert_equal ( order , 0 ); +// + +// Compare complex values #1 +order = assert_comparecomplex ( 1+2*%i , 1+3*%i , %eps , 0 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1+3*%i , 1+2*%i , %eps , 0 ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( 1+2*%i , 1+2*%i , %eps , 0 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+2*%i , 1+3*%i ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1+3*%i , 1+2*%i ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( 1+2*%i , 1+2*%i ); +MY_assert_equal ( order , 0 ); +// + +// Compare complex values #2 +order = assert_comparecomplex ( 1+%i , -1+%i ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( -1+%i , 1+%i ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1+%i , 1+%i ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+%i , -1+%i , %eps , 0 ); +MY_assert_equal ( order , 1 ); +// +order = assert_comparecomplex ( -1+%i , 1+%i , %eps , 0 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1+%i , 1+%i , %eps , 0 ); +MY_assert_equal ( order , 0 ); +// + +// Compare with tolerances : equality cases +order = assert_comparecomplex ( 1.2345+%i , 1.2346+%i , %eps , 1.e-3 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1.2345+%i , 1.2346+%i , 1.e12*%eps , 0 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+1.2345*%i , 1+1.2347*%i , %eps , 1.e-3 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+1.2345*%i , 1+1.2347*%i , 1.e12*%eps , 0 ); +MY_assert_equal ( order , 0 ); +// + +// Compare more realistic data +x = [ +-0.123452 - 0.123454 * %i +-0.123451 + 0.123453 * %i +0.123458 - 0.123459 * %i +0.123456 + 0.123457 * %i +]; +// Consider less than 4 significant digits +for i = 1 : size(x,"*")-1 + order(i) = assert_comparecomplex ( x(i) , x(i+1) , 1.e-4 ); +end +MY_assert_equal ( order , -ones(3,1) ); +clear order; + +// Compare data from bug #415 +x = [ +-1.9914145 +-1.895889 +-1.6923826 +-1.4815461 +-1.1302576 +-0.5652256 - 0.0655080 * %i +-0.5652256 + 0.0655080 * %i +0.3354023 - 0.1602902 * %i +0.3354023 + 0.1602902 * %i +1.3468911 +1.5040136 +1.846668 +1.9736772 +1.9798866 +]; +// Consider less than 4 significant digits +for i = 1 : size(x,"*")-1 + order(i) = assert_comparecomplex ( x(i) , x(i+1) , 1.e-5 ); +end +MY_assert_equal ( order , -ones(13,1) ); +clear order; +// +order = assert_comparecomplex ( 1 , 1 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1+%eps , 1 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 0 , 0 , 0 , 1.e-5 ); +MY_assert_equal ( order , 0 ); +// +order = assert_comparecomplex ( 1 , 2 ); +MY_assert_equal ( order , -1 ); +// +order = assert_comparecomplex ( 1.e-4 , 0 , 0 , 1.e-5 ); +MY_assert_equal ( order , 1 ); +// +// Success: not obvious! +// The two values are equal, very small, but nonzero. +// The relative tolerance must be used here. +// If, instead, a bug in the assert function is so that the +// absolute tolerance is used as 10^-16, then the output +// of this comparison is wrong. +order = assert_comparecomplex ( 1.23456789123456789e-30 , 1.23456789123456789e-30 ); +MY_assert_equal ( order , 0 ); +// +// Failure : not obvious! +// There is only one significant digit here and we require the +// maximum precision. +// The test must fail because the relative tolerance must be used here. +// If, instead, there is a bug in the comparison and +// the absolute tolerance is used and set to +// 10^-16, the output of this test is wrong. +order = assert_comparecomplex ( 1.23456789123456789e-30 , 1.3e-30 ); +MY_assert_equal ( order , -1 ); +// +// Success : not obvious! +// The expected result is zero, so that the absolute tolerance is used. +order = assert_comparecomplex ( 1.23456789123456789e-30 , 0 , 0 , 1.e-10 ); +MY_assert_equal ( order , 0 ); +// +// Check that slightly different values cannot pass basic test +// Simple sequence with default settings +order = assert_comparecomplex ( 1 + 5 * %eps , 1 , %eps ); +MY_assert_equal ( order , 1 ); +// +// Customize the relative precision so that a test can pass +// Simple sequence with default settings +order = assert_comparecomplex ( 1 + 5 * %eps , 1 , 10*%eps , 0 ); +MY_assert_equal ( order , 0 ); +// +// Customize the absolute precision so that a test can pass +// Simple sequence with default settings +order = assert_comparecomplex ( 5 * %eps , 0 , 0 , 10*%eps ); +MY_assert_equal ( order , 0 ); +// +// An example where the relative error is used, +// with a customized tolerance. +order = assert_comparecomplex ( 1.23456 , 1.23457 , 1.e11*%eps , 0 ); +MY_assert_equal ( order , 0 ); +// +// Test all IEEE values +// We choose -%inf < 0 < %inf < %nan. +table = [ + %inf 0 1 + %inf %inf 0 + %inf -%inf 1 + %inf %nan -1 + -%inf 0 -1 + -%inf %inf -1 + -%inf -%inf 0 + -%inf %nan -1 + %nan 0 1 + %nan %inf 1 + %nan -%inf 1 + %nan %nan 0 + 0 0 0 + 0 %inf -1 + 0 -%inf 1 + 0 %nan -1 +]; +ntests = size(table,"r"); +for i = 1 : ntests + a = table(i,1); + b = table(i,2); + expected = table(i,3); + order = assert_comparecomplex ( a , b ); + MY_assert_equal ( order , expected ); + order = assert_comparecomplex ( b , a ); + MY_assert_equal ( order , -expected ); +end + diff --git a/modules/development_tools/tests/unit_tests/assert/computedigits.dia.ref b/modules/development_tools/tests/unit_tests/assert/computedigits.dia.ref new file mode 100755 index 000000000..3e37773b9 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/computedigits.dia.ref @@ -0,0 +1,162 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +format("v",10); +// +dmax = -log(2^(-53))/log(10); +// +computed = assert_computedigits ( 1 , 1 ); +MY_assert_equal ( computed , dmax ); +// +computed = assert_computedigits ( 0 , 0 ); +MY_assert_equal ( computed , dmax ); +// +computed = assert_computedigits ( 1 , 0 ); +MY_assert_equal ( computed , 0 ); +// +computed = assert_computedigits ( 0 , 1 ); +MY_assert_equal ( computed , 0 ); +// +computed = assert_computedigits ( 3.1415926 , %pi ); +MY_assert_equal ( computed , 7.467037797136421240 ); +// +computed = assert_computedigits ( 3.1415926 , %pi , 2 ); +MY_assert_equal ( computed , 24.804962643893318841037 ); +// +computed = assert_computedigits ( [0 0 1 1] , [0 1 0 1] ); +MY_assert_equal ( computed , [dmax 0 0 dmax] ); +// +computed = assert_computedigits(ones(3,2),ones(3,2)); +MY_assert_equal ( computed , dmax * ones(3,2) ); +// +computed = assert_computedigits([%nan %nan %nan %nan],[%nan %inf -%inf 0]); +MY_assert_equal ( computed , [dmax 0 0 0] ); +// +computed = assert_computedigits([%inf %inf %inf %inf],[%nan %inf -%inf 0]); +MY_assert_equal ( computed , [0 dmax 0 0] ); +// +computed = assert_computedigits([-%inf -%inf -%inf -%inf],[%nan %inf -%inf 0]); +MY_assert_equal ( computed , [0 0 dmax 0] ); +// +computed = assert_computedigits([0 0 0 0],[%nan %inf -%inf 0]); +MY_assert_equal ( computed , [0 0 0 dmax] ); +// +computed = assert_computedigits(1.224646799D-16,8.462643383D-18); +MY_assert_equal ( computed , 0 ); +// +computed = assert_computedigits ( 1.2345 + %i*6.7891 , 1.23456789 + %i*6.789123456 ); +MY_assert_equal ( computed , 3.9586791728311578886235 ); +// +// The sign bit of the number of digits may be wrong because +// ieee(2); z=max(-0,0); 1/z is -%inf +back = ieee(); +ieee(2); +computed = assert_computedigits ( 1.e-305 , 0 ); +MY_assert_equal ( 1/computed , %inf ); +// +computed = assert_computedigits ( 0 , 1.e-305 ); +MY_assert_equal ( 1/computed , %inf ); +ieee(back); +// +// An empirically found test case +a = [ +3.982729777831130693D-59 +2.584939414228211484D-26 +4.391531370352049090D+43 +1.725436586898508346D+68 +]; +b = [ +3.982729777831130693D-59 +2.584939414228211484D-26 +4.391531370352048595D+43 +1.725436586898508107D+68 +]; +c = assert_computedigits ( a , b , 2 ); +e = [ +53. +53. +51.977632 +51.678072 +]; +assert_checkalmostequal ( c , e , 1.e-7 ); +// +// Check that the vectorization was correct, i.e. no specific +// case in the processing of the data is forgotten. +// +function pI = permInverse(p) + // Given the permutation p, compute the + // inverse permutation pI. + N = size(p,"*") + pI(p) = (1:N)' +endfunction +a = [ +1.234567891234567891 +1.2345678912345678 +1.23456789123456 +1.234567891234 +1.2345678912 +1.23456789 +1.234567 +1.2345 +1.23 +1.2 +1. +0. +%nan +%nan +%nan +%inf +%inf +%inf +-%inf +-%inf +-%inf +0. +0. +-0. +-0. +]; +N = size(a,"*"); +for k = 1 : 10 + mprintf("Test #%d\n",k); + p1 = grand(1,"prm",(1:N)'); + p2 = grand(1,"prm",(1:N)'); + computed = a(p1); + expected = a(p2); + d1 = assert_computedigits(computed,expected); + // Permute both computed and expected with the same permutation p3: + // d must not change. + p3 = grand(1,"prm",(1:N)'); + computedP = computed(p3); + expectedP = expected(p3); + d2 = assert_computedigits(computedP,expectedP); + // Apply inverse permutation on d2. + pI = permInverse(p3); + d2 = d2(pI); + assert_checkequal(d1,d2); +end +Test #1 +Test #2 +Test #3 +Test #4 +Test #5 +Test #6 +Test #7 +Test #8 +Test #9 +Test #10 diff --git a/modules/development_tools/tests/unit_tests/assert/computedigits.tst b/modules/development_tools/tests/unit_tests/assert/computedigits.tst new file mode 100755 index 000000000..cc4361e58 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/computedigits.tst @@ -0,0 +1,161 @@ +// Copyright (C) 2008 - INRIA - Michael Baudin +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +format("v",10); + +// +dmax = -log(2^(-53))/log(10); +// +computed = assert_computedigits ( 1 , 1 ); +MY_assert_equal ( computed , dmax ); +// +computed = assert_computedigits ( 0 , 0 ); +MY_assert_equal ( computed , dmax ); +// +computed = assert_computedigits ( 1 , 0 ); +MY_assert_equal ( computed , 0 ); +// +computed = assert_computedigits ( 0 , 1 ); +MY_assert_equal ( computed , 0 ); +// +computed = assert_computedigits ( 3.1415926 , %pi ); +MY_assert_equal ( computed , 7.467037797136421240 ); +// +computed = assert_computedigits ( 3.1415926 , %pi , 2 ); +MY_assert_equal ( computed , 24.804962643893318841037 ); +// +computed = assert_computedigits ( [0 0 1 1] , [0 1 0 1] ); +MY_assert_equal ( computed , [dmax 0 0 dmax] ); +// +computed = assert_computedigits(ones(3,2),ones(3,2)); +MY_assert_equal ( computed , dmax * ones(3,2) ); +// +computed = assert_computedigits([%nan %nan %nan %nan],[%nan %inf -%inf 0]); +MY_assert_equal ( computed , [dmax 0 0 0] ); +// +computed = assert_computedigits([%inf %inf %inf %inf],[%nan %inf -%inf 0]); +MY_assert_equal ( computed , [0 dmax 0 0] ); +// +computed = assert_computedigits([-%inf -%inf -%inf -%inf],[%nan %inf -%inf 0]); +MY_assert_equal ( computed , [0 0 dmax 0] ); +// +computed = assert_computedigits([0 0 0 0],[%nan %inf -%inf 0]); +MY_assert_equal ( computed , [0 0 0 dmax] ); +// +computed = assert_computedigits(1.224646799D-16,8.462643383D-18); +MY_assert_equal ( computed , 0 ); +// +computed = assert_computedigits ( 1.2345 + %i*6.7891 , 1.23456789 + %i*6.789123456 ); +MY_assert_equal ( computed , 3.9586791728311578886235 ); +// +// The sign bit of the number of digits may be wrong because +// ieee(2); z=max(-0,0); 1/z is -%inf +back = ieee(); +ieee(2); +computed = assert_computedigits ( 1.e-305 , 0 ); +MY_assert_equal ( 1/computed , %inf ); +// +computed = assert_computedigits ( 0 , 1.e-305 ); +MY_assert_equal ( 1/computed , %inf ); +ieee(back); + +// +// An empirically found test case +a = [ +3.982729777831130693D-59 +2.584939414228211484D-26 +4.391531370352049090D+43 +1.725436586898508346D+68 +]; +b = [ +3.982729777831130693D-59 +2.584939414228211484D-26 +4.391531370352048595D+43 +1.725436586898508107D+68 +]; +c = assert_computedigits ( a , b , 2 ); +e = [ +53. +53. +51.977632 +51.678072 +]; +assert_checkalmostequal ( c , e , 1.e-7 ); +// +// Check that the vectorization was correct, i.e. no specific +// case in the processing of the data is forgotten. +// +function pI = permInverse(p) + // Given the permutation p, compute the + // inverse permutation pI. + N = size(p,"*") + pI(p) = (1:N)' +endfunction + +a = [ +1.234567891234567891 +1.2345678912345678 +1.23456789123456 +1.234567891234 +1.2345678912 +1.23456789 +1.234567 +1.2345 +1.23 +1.2 +1. +0. +%nan +%nan +%nan +%inf +%inf +%inf +-%inf +-%inf +-%inf +0. +0. +-0. +-0. +]; + +N = size(a,"*"); +for k = 1 : 10 + mprintf("Test #%d\n",k); + p1 = grand(1,"prm",(1:N)'); + p2 = grand(1,"prm",(1:N)'); + computed = a(p1); + expected = a(p2); + d1 = assert_computedigits(computed,expected); + // Permute both computed and expected with the same permutation p3: + // d must not change. + p3 = grand(1,"prm",(1:N)'); + computedP = computed(p3); + expectedP = expected(p3); + d2 = assert_computedigits(computedP,expectedP); + // Apply inverse permutation on d2. + pI = permInverse(p3); + d2 = d2(pI); + assert_checkequal(d1,d2); +end + + diff --git a/modules/development_tools/tests/unit_tests/assert/cond2reltol.dia.ref b/modules/development_tools/tests/unit_tests/assert/cond2reltol.dia.ref new file mode 100755 index 000000000..a91b1cc29 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/cond2reltol.dia.ref @@ -0,0 +1,71 @@ +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +// +condition = [ + 0 + 1 + 1.e1 + 1.e2 + 1.e3 + 1.e13 + 1.e14 + 1.e15 + 1.e16 + 1.e17 + 1.e18 +]; +computed = assert_cond2reltol ( condition ); +expected = [ + 1.110223024625162210D-16 + 1.110223024625162210D-16 + 1.110223024625162260D-15 + 1.110223024625162220D-14 + 1.110223024625162220D-13 + 1.110223024625157625D-03 + 1.110223024625162265D-02 + 1.110223024625157789D-01 + 1.000000000000000000D+00 + 1.000000000000000000D+00 + 1.000000000000000000D+00 +]; +assert_checkalmostequal ( computed , expected , 100*%eps); +// +// With offset +computed = assert_cond2reltol ( 1.e2 , [5 4 3 2 1 0 -1 -2 -3 -4 -5]' ); +expected = [ + 1.110223024625162210D-16 + 1.110223024625162210D-16 + 1.110223024625162210D-16 + 1.110223024625162210D-16 + 1.110223024625162260D-15 + 1.110223024625162220D-14 + 1.110223024625162220D-13 + 1.110223024625162195D-12 + 1.110223024625162195D-11 + 1.110223024625162227D-10 + 1.110223024625162331D-09 +]; +assert_checkalmostequal ( computed , expected , 100*%eps); +// +computed = assert_cond2reltol ( 1.e14 , [0 -1 -2 -3] ); +expected = [1.110223024625162265D-02 1.110223024625162230D-01 1.000000000000000000D+00 1.000000000000000000D+00]; +assert_checkalmostequal ( computed , expected , 100*%eps); +// +computed = assert_cond2reltol ( 1.e2 , [0 1 2 3] ) ; +expected = [1.110223024625162220D-14 1.110223024625162260D-15 1.110223024625162210D-16 1.110223024625162210D-16]; +assert_checkalmostequal ( computed , expected , 100*%eps); diff --git a/modules/development_tools/tests/unit_tests/assert/cond2reltol.tst b/modules/development_tools/tests/unit_tests/assert/cond2reltol.tst new file mode 100755 index 000000000..8569c2b35 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/cond2reltol.tst @@ -0,0 +1,75 @@ +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +// +condition = [ + 0 + 1 + 1.e1 + 1.e2 + 1.e3 + 1.e13 + 1.e14 + 1.e15 + 1.e16 + 1.e17 + 1.e18 +]; +computed = assert_cond2reltol ( condition ); +expected = [ + 1.110223024625162210D-16 + 1.110223024625162210D-16 + 1.110223024625162260D-15 + 1.110223024625162220D-14 + 1.110223024625162220D-13 + 1.110223024625157625D-03 + 1.110223024625162265D-02 + 1.110223024625157789D-01 + 1.000000000000000000D+00 + 1.000000000000000000D+00 + 1.000000000000000000D+00 +]; +assert_checkalmostequal ( computed , expected , 100*%eps); +// +// With offset +computed = assert_cond2reltol ( 1.e2 , [5 4 3 2 1 0 -1 -2 -3 -4 -5]' ); +expected = [ + 1.110223024625162210D-16 + 1.110223024625162210D-16 + 1.110223024625162210D-16 + 1.110223024625162210D-16 + 1.110223024625162260D-15 + 1.110223024625162220D-14 + 1.110223024625162220D-13 + 1.110223024625162195D-12 + 1.110223024625162195D-11 + 1.110223024625162227D-10 + 1.110223024625162331D-09 +]; +assert_checkalmostequal ( computed , expected , 100*%eps); +// +computed = assert_cond2reltol ( 1.e14 , [0 -1 -2 -3] ); +expected = [1.110223024625162265D-02 1.110223024625162230D-01 1.000000000000000000D+00 1.000000000000000000D+00]; +assert_checkalmostequal ( computed , expected , 100*%eps); +// +computed = assert_cond2reltol ( 1.e2 , [0 1 2 3] ) ; +expected = [1.110223024625162220D-14 1.110223024625162260D-15 1.110223024625162210D-16 1.110223024625162210D-16]; +assert_checkalmostequal ( computed , expected , 100*%eps); + diff --git a/modules/development_tools/tests/unit_tests/assert/cond2reqdigits.dia.ref b/modules/development_tools/tests/unit_tests/assert/cond2reqdigits.dia.ref new file mode 100755 index 000000000..47d429cc5 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/cond2reqdigits.dia.ref @@ -0,0 +1,118 @@ +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +// +condition = [ + 0 + 1 + 1.e1 + 1.e2 + 1.e3 + 1.e13 + 1.e14 + 1.e15 + 1.e16 + 1.e17 + 1.e18 +]; +computed = assert_cond2reqdigits ( condition ); +expected = [ + 15.954589770191001107946 + 15.954589770191001107946 + 14.954589770191001107946 + 13.954589770191001107946 + 12.954589770191001107946 + 2.954589770191002884303 + 1.9545897701910011079462 + 0.954589770191002884303 + 0. + 0. + 0. +]; +MY_assert_equal ( computed , expected ); +// +// With offset +computed = assert_cond2reqdigits ( 1.e2 , [5 4 3 2 1 0 -1 -2 -3 -4 -5]' ); +expected = [ + 15.954589770191001107946 + 15.954589770191001107946 + 15.954589770191001107946 + 15.954589770191001107946 + 14.954589770191001107946 + 13.954589770191001107946 + 12.954589770191001107946 + 11.954589770191001107946 + 10.954589770191001107946 + 9.9545897701910011079462 + 8.9545897701910011079462 +]; +MY_assert_equal ( computed , expected ); +// +computed = assert_cond2reqdigits ( 1.e14 , [0 -1 -2 -3] ); +expected = [1.9545897701910011079462 0.9545897701910011079462 0. 0.]; +MY_assert_equal ( computed , expected ); +// +computed = assert_cond2reqdigits ( 1.e2 , [0 1 2 3] ) ; +expected = [13.954589770191001107946 14.954589770191001107946 15.954589770191001107946 15.954589770191001107946]; +MY_assert_equal ( computed , expected ); +// +// Use base-2 +condition = [ + 0 + 1 + 1.e1 + 1.e2 + 1.e3 + 1.e13 + 1.e14 + 1.e15 + 1.e16 + 1.e17 + 1.e18 +]; +computed = assert_cond2reqdigits ( condition , [] , 2 ); +expected = [ + 53. + 53. + 49.678071905112638262381 + 46.3561438102252765248 + 43.034215715337914787142 + 9.814934766464290305521 + 6.4930066715769214624743 + 3.1710785766895668302823 + 0. + 0. + 0. +]; +MY_assert_equal ( computed , expected ); +// +// With offset +computed = assert_cond2reqdigits ( 1.e2 , [5 4 3 2 1 0 -1 -2 -3 -4 -5]' , 2 ); +expected = [ + 51.3561438102252765248 + 50.3561438102252765248 + 49.3561438102252765248 + 48.3561438102252765248 + 47.3561438102252765248 + 46.3561438102252765248 + 45.3561438102252765248 + 44.3561438102252765248 + 43.3561438102252765248 + 42.3561438102252765248 + 41.3561438102252765248 +]; +MY_assert_equal ( computed , expected ); diff --git a/modules/development_tools/tests/unit_tests/assert/cond2reqdigits.tst b/modules/development_tools/tests/unit_tests/assert/cond2reqdigits.tst new file mode 100755 index 000000000..b5da66a81 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/cond2reqdigits.tst @@ -0,0 +1,122 @@ +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +// +condition = [ + 0 + 1 + 1.e1 + 1.e2 + 1.e3 + 1.e13 + 1.e14 + 1.e15 + 1.e16 + 1.e17 + 1.e18 +]; +computed = assert_cond2reqdigits ( condition ); +expected = [ + 15.954589770191001107946 + 15.954589770191001107946 + 14.954589770191001107946 + 13.954589770191001107946 + 12.954589770191001107946 + 2.954589770191002884303 + 1.9545897701910011079462 + 0.954589770191002884303 + 0. + 0. + 0. +]; +MY_assert_equal ( computed , expected ); +// +// With offset +computed = assert_cond2reqdigits ( 1.e2 , [5 4 3 2 1 0 -1 -2 -3 -4 -5]' ); +expected = [ + 15.954589770191001107946 + 15.954589770191001107946 + 15.954589770191001107946 + 15.954589770191001107946 + 14.954589770191001107946 + 13.954589770191001107946 + 12.954589770191001107946 + 11.954589770191001107946 + 10.954589770191001107946 + 9.9545897701910011079462 + 8.9545897701910011079462 +]; +MY_assert_equal ( computed , expected ); +// +computed = assert_cond2reqdigits ( 1.e14 , [0 -1 -2 -3] ); +expected = [1.9545897701910011079462 0.9545897701910011079462 0. 0.]; +MY_assert_equal ( computed , expected ); +// +computed = assert_cond2reqdigits ( 1.e2 , [0 1 2 3] ) ; +expected = [13.954589770191001107946 14.954589770191001107946 15.954589770191001107946 15.954589770191001107946]; +MY_assert_equal ( computed , expected ); +// +// Use base-2 +condition = [ + 0 + 1 + 1.e1 + 1.e2 + 1.e3 + 1.e13 + 1.e14 + 1.e15 + 1.e16 + 1.e17 + 1.e18 +]; +computed = assert_cond2reqdigits ( condition , [] , 2 ); +expected = [ + 53. + 53. + 49.678071905112638262381 + 46.3561438102252765248 + 43.034215715337914787142 + 9.814934766464290305521 + 6.4930066715769214624743 + 3.1710785766895668302823 + 0. + 0. + 0. +]; +MY_assert_equal ( computed , expected ); +// +// With offset +computed = assert_cond2reqdigits ( 1.e2 , [5 4 3 2 1 0 -1 -2 -3 -4 -5]' , 2 ); +expected = [ + 51.3561438102252765248 + 50.3561438102252765248 + 49.3561438102252765248 + 48.3561438102252765248 + 47.3561438102252765248 + 46.3561438102252765248 + 45.3561438102252765248 + 44.3561438102252765248 + 43.3561438102252765248 + 42.3561438102252765248 + 41.3561438102252765248 +]; +MY_assert_equal ( computed , expected ); + diff --git a/modules/development_tools/tests/unit_tests/assert/generror.dia.ref b/modules/development_tools/tests/unit_tests/assert/generror.dia.ref new file mode 100755 index 000000000..da431b3c2 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/generror.dia.ref @@ -0,0 +1,42 @@ +// Copyright (C) 2009 - 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then bugmes();quit;end +endfunction +instr = "assert_generror ( ""oups"" )"; +ierr=execstr(instr,"errcatch"); +lerr = lasterror(); +MY_assert_equal ( ierr , 10000 ); +MY_assert_equal ( lerr , "oups" ); +// +instr = "assert_generror ( ""oups"" , 123456789 )"; +ierr=execstr(instr,"errcatch"); +lerr = lasterror(); +MY_assert_equal ( ierr , 123456789 ); +MY_assert_equal ( lerr , "oups" ); +// +instr = "assert_generror ( 12 )"; +ierr=execstr(instr,"errcatch"); +lerr = lasterror(); +MY_assert_equal ( ierr , 10000 ); +refmsg = msprintf( gettext( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" ) , "assert_generror" , 1 ); +MY_assert_equal ( lerr , refmsg ); +// +instr = "assert_generror ( )"; +ierr=execstr(instr,"errcatch"); +lerr = lasterror(); +MY_assert_equal ( ierr , 10000 ); +refmsg = msprintf( gettext( "%s: Wrong number of input arguments: %d to %d expected." ) , "assert_generror" , 1 , 2 ); +MY_assert_equal ( lerr , refmsg ); diff --git a/modules/development_tools/tests/unit_tests/assert/generror.tst b/modules/development_tools/tests/unit_tests/assert/generror.tst new file mode 100755 index 000000000..5f2271cbd --- /dev/null +++ b/modules/development_tools/tests/unit_tests/assert/generror.tst @@ -0,0 +1,47 @@ +// Copyright (C) 2009 - 2010 - DIGITEO - Michael Baudin +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function flag = MY_assert_equal ( computed , expected ) + if computed==expected then + flag = 1; + else + flag = 0; + end + if flag <> 1 then pause,end +endfunction + +instr = "assert_generror ( ""oups"" )"; +ierr=execstr(instr,"errcatch"); +lerr = lasterror(); +MY_assert_equal ( ierr , 10000 ); +MY_assert_equal ( lerr , "oups" ); +// +instr = "assert_generror ( ""oups"" , 123456789 )"; +ierr=execstr(instr,"errcatch"); +lerr = lasterror(); +MY_assert_equal ( ierr , 123456789 ); +MY_assert_equal ( lerr , "oups" ); +// +instr = "assert_generror ( 12 )"; +ierr=execstr(instr,"errcatch"); +lerr = lasterror(); +MY_assert_equal ( ierr , 10000 ); +refmsg = msprintf( gettext( "%s: Wrong type for input argument #%d: Matrix of strings expected.\n" ) , "assert_generror" , 1 ); +MY_assert_equal ( lerr , refmsg ); +// +instr = "assert_generror ( )"; +ierr=execstr(instr,"errcatch"); +lerr = lasterror(); +MY_assert_equal ( ierr , 10000 ); +refmsg = msprintf( gettext( "%s: Wrong number of input arguments: %d to %d expected." ) , "assert_generror" , 1 , 2 ); +MY_assert_equal ( lerr , refmsg ); + diff --git a/modules/development_tools/tests/unit_tests/example_run.tst b/modules/development_tools/tests/unit_tests/example_run.tst new file mode 100755 index 000000000..6e26b5e59 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/example_run.tst @@ -0,0 +1,48 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// Do not check ref since execution depends on Scilab version used (Source, Binary, ...) +// <-- NO CHECK REF --> + +// Test errors +refMsg = msprintf(gettext("%s: Wrong type for input argument #%d: A row array of strings expected.\n"), "example_run", 1); +assert_checkerror("example_run(10);", refMsg); +refMsg = msprintf(gettext("%s: Wrong size for input argument #%d: A row array of strings expected.\n"), "example_run", 1); +assert_checkerror("example_run([""core"",""xml""]);", refMsg); + +refMsg = msprintf(gettext("%s: Wrong type for input argument #%d: A row array of strings or empty matrix expected.\n"), "example_run", 2); +assert_checkerror("example_run(""core"", 12);", refMsg); +refMsg = msprintf(gettext("%s: Wrong size for input argument #%d: A row array of strings or empty matrix expected.\n"), "example_run", 2); +assert_checkerror("example_run(""core"", [""extraction"", ""insertion""]);", refMsg); + +refMsg = msprintf(gettext("%s: Wrong type for input argument #%d: A string expected.\n"), "example_run", 3); +assert_checkerror("example_run(""core"", ""extraction"", 12);", refMsg); +refMsg = msprintf(gettext("%s: Wrong size for input argument #%d: A string expected.\n"), "example_run", 3); +assert_checkerror("example_run(""core"", ""extraction"", [""en_US"", ""fr_FR""]);", refMsg); + +refMsg = msprintf(gettext("%s: Wrong value for input argument #%d: A Scilab module name expected.\n"), "example_run", 1); +assert_checkerror("example_run(""toto"");", refMsg); + +// On Windows, the binary version doesn't contain help directory +if isdir(fullfile(SCI,"modules","core","help")) then + refMsg = msprintf(gettext("%s: Wrong value for input argument #%d: A ''%s'' module function name expected.\n"), "example_run", 2, "core"); + assert_checkerror("example_run(""core"", ""doesnotexistsname"");", refMsg); + + refMsg = msprintf(gettext("%s: Wrong value for input argument #%d: A valid language expected.\n"), "example_run", 3); + assert_checkerror("example_run(""core"", ""extraction"", ""aa_BB"");", refMsg); +end + +if ~isempty(ls("SCI/modules/xml/help/en_US/*.xml")) then // Help XML sources must be available for the following lines + example_run("xml", [], "", "short_summary"); + example_run("functions", "argn", "", "short_summary"); + example_run("core", ["extraction"; "insertion"], "", "short_summary"); + example_run("core", "extraction", "en_US", "short_summary"); + example_run("core", "extraction", "en_US", ["no_check_error_output", "short_summary"]); + example_run("core", "extraction", "en_US", ["no_check_error_output", "short_summary"], TMPDIR + "/example_run.xml"); +end diff --git a/modules/development_tools/tests/unit_tests/test_run_32bits.linux.dia.ref b/modules/development_tools/tests/unit_tests/test_run_32bits.linux.dia.ref new file mode 100755 index 000000000..3f74bc0fd --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_32bits.linux.dia.ref @@ -0,0 +1,27 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +OS = getos(); +[v info] = getversion(); +arch = info(2); +if OS == "Linux" then + assert_checkequal(OS, "Linux") + ans = + + T + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Windows" then + assert_checkequal(OS, "Windows") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Darwin" then + assert_checkequal(OS, "Darwin") +end diff --git a/modules/development_tools/tests/unit_tests/test_run_32bits.linux32.dia.ref b/modules/development_tools/tests/unit_tests/test_run_32bits.linux32.dia.ref new file mode 100755 index 000000000..807bee3c9 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_32bits.linux32.dia.ref @@ -0,0 +1,30 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +OS = getos(); +[v info] = getversion(); +arch = info(2); +if OS == "Linux" then + assert_checkequal(OS, "Linux") + ans = + + T + if arch == "x86" then + assert_checkequal(arch, "x86") + ans = + + T + end +elseif OS == "Windows" then + assert_checkequal(OS, "Windows") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Darwin" then + assert_checkequal(OS, "Darwin") +end diff --git a/modules/development_tools/tests/unit_tests/test_run_32bits.macosx.dia.ref b/modules/development_tools/tests/unit_tests/test_run_32bits.macosx.dia.ref new file mode 100755 index 000000000..d9f91fc81 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_32bits.macosx.dia.ref @@ -0,0 +1,27 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +OS = getos(); +[v info] = getversion(); +arch = info(2); +if OS == "Linux" then + assert_checkequal(OS, "Linux") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Windows" then + assert_checkequal(OS, "Windows") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Darwin" then + assert_checkequal(OS, "Darwin") + ans = + + T +end diff --git a/modules/development_tools/tests/unit_tests/test_run_32bits.tst b/modules/development_tools/tests/unit_tests/test_run_32bits.tst new file mode 100755 index 000000000..69a48a42c --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_32bits.tst @@ -0,0 +1,25 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> + +OS = getos(); +[v info] = getversion(); +arch = info(2); +if OS == "Linux" then + assert_checkequal(OS, "Linux") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Windows" then + assert_checkequal(OS, "Windows") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Darwin" then + assert_checkequal(OS, "Darwin") +end diff --git a/modules/development_tools/tests/unit_tests/test_run_32bits.unix.dia.ref b/modules/development_tools/tests/unit_tests/test_run_32bits.unix.dia.ref new file mode 100755 index 000000000..ef24b8769 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_32bits.unix.dia.ref @@ -0,0 +1,24 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +OS = getos(); +[v info] = getversion(); +arch = info(2); +if OS == "Linux" then + assert_checkequal(OS, "Linux") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Windows" then + assert_checkequal(OS, "Windows") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +else + assert_checkequal(OS, "Darwin") +end diff --git a/modules/development_tools/tests/unit_tests/test_run_32bits.win.dia.ref b/modules/development_tools/tests/unit_tests/test_run_32bits.win.dia.ref new file mode 100755 index 000000000..cc386dbcb --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_32bits.win.dia.ref @@ -0,0 +1,27 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +OS = getos(); +[v info] = getversion(); +arch = info(2); +if OS == "Linux" then + assert_checkequal(OS, "Linux") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Windows" then + assert_checkequal(OS, "Windows") + ans = + + T + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Darwin" then + assert_checkequal(OS, "Darwin") +end diff --git a/modules/development_tools/tests/unit_tests/test_run_32bits.win32.dia.ref b/modules/development_tools/tests/unit_tests/test_run_32bits.win32.dia.ref new file mode 100755 index 000000000..dcd636d79 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_32bits.win32.dia.ref @@ -0,0 +1,30 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +OS = getos(); +[v info] = getversion(); +arch = info(2); +if OS == "Linux" then + assert_checkequal(OS, "Linux") + if arch == "x86" then + assert_checkequal(arch, "x86") + end +elseif OS == "Windows" then + assert_checkequal(OS, "Windows") + ans = + + T + if arch == "x86" then + assert_checkequal(arch, "x86") + ans = + + T + end +elseif OS == "Darwin" then + assert_checkequal(OS, "Darwin") +end diff --git a/modules/development_tools/tests/unit_tests/test_run_export.tst b/modules/development_tools/tests/unit_tests/test_run_export.tst new file mode 100755 index 000000000..15a6f2916 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_export.tst @@ -0,0 +1,45 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- NO CHECK REF --> +// +// <-- CLI SHELL MODE --> +//exec modules/development_tools/macros/test_run.sci; + +// Checks that this file is launched in nwni mode. +//test_run("development_tools",["checkequal","checktrue","checkfalse"],["show_diff","show_error"],"/tmp/results.xml"); + +targetXML=TMPDIR+"/plop.xml"; +test_run(["symbolic","xml"],[],["show_diff","show_error"],targetXML); + +assert_checktrue(isfile(targetXML)); +xmlElem=xmlRead(targetXML); +assert_checktrue(xmlElem.root.children.size == 2); + +assert_checkequal(xmlElem.root.children(1).name, "testsuite"); +assert_checktrue(evstr(xmlElem.root.children(1).attributes.tests) > 0); +assert_checkequal(xmlElem.root.children(1).children.size, evstr(xmlElem.root.children(1).attributes.tests)); + +assert_checkequal(xmlElem.root.children(1).children(1).name, "testcase"); +assert_checktrue(length(xmlElem.root.children(1).children(1).attributes.name) > 0); + +assert_checkequal(xmlElem.root.children(2).name, "testsuite"); +assert_checktrue(evstr(xmlElem.root.children(2).attributes.tests) > 0); +assert_checkequal(xmlElem.root.children(2).children.size, evstr(xmlElem.root.children(2).attributes.tests)); + +assert_checkequal(xmlElem.root.children(2).children(1).name, "testcase"); +assert_checktrue(length(xmlElem.root.children(2).children(1).attributes.name) > 0); +listModule = xmlXPath(xmlElem,"//testsuites/testsuite"); +assert_checkequal(listModule.size, 2); + +test_run(["time"],["datenum"],["show_diff","show_error"], targetXML); +doc=xmlRead(targetXML); +listModule = xmlXPath(doc,"//testsuites/testsuite"); +// Check that the append worked +assert_checkequal(listModule.size, 3); + +xmlDelete(doc); diff --git a/modules/development_tools/tests/unit_tests/test_run_interactive.tst b/modules/development_tools/tests/unit_tests/test_run_interactive.tst new file mode 100755 index 000000000..0203f31cb --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_interactive.tst @@ -0,0 +1,14 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- INTERACTIVE TEST --> + +// Checks that this test is skipped because it is interactive. +l1 = list("choice 1",1,["toggle c1","toggle c2","toggle c3"]); +l2 = list("choice 2",2,["toggle d1","toggle d2","toggle d3"]); +l3 = list("choice 3",3,["toggle e1","toggle e2"]); +rep = x_choices("Toggle Menu",list(l1,l2,l3)) diff --git a/modules/development_tools/tests/unit_tests/test_run_level_1.tst b/modules/development_tools/tests/unit_tests/test_run_level_1.tst new file mode 100755 index 000000000..55321d18e --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_level_1.tst @@ -0,0 +1,15 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - Scilab Enterprises - Clement DAVID +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- NO CHECK REF --> +// Simple launcher for run level 1 +try + test_run_level(1); +catch + exit(-1); +end +exit(0) + diff --git a/modules/development_tools/tests/unit_tests/test_run_level_2.tst b/modules/development_tools/tests/unit_tests/test_run_level_2.tst new file mode 100755 index 000000000..104f408ea --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_level_2.tst @@ -0,0 +1,15 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012 - Scilab Enterprises - Clement DAVID +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- NO CHECK REF --> +// Simple launcher for run level 2 +try + test_run_level(2); +catch + exit(-1); +end +exit(0) + diff --git a/modules/development_tools/tests/unit_tests/test_run_linuxonly.dia.ref b/modules/development_tools/tests/unit_tests/test_run_linuxonly.dia.ref new file mode 100755 index 000000000..19b2c84a3 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_linuxonly.dia.ref @@ -0,0 +1,10 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- LINUX ONLY --> +// Checks that this file is launched on Linux +OS=getos(); +assert_checkequal(OS,"Linux"); diff --git a/modules/development_tools/tests/unit_tests/test_run_linuxonly.tst b/modules/development_tools/tests/unit_tests/test_run_linuxonly.tst new file mode 100755 index 000000000..52301ec49 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_linuxonly.tst @@ -0,0 +1,13 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- LINUX ONLY --> + +// Checks that this file is launched on Linux +OS=getos(); +assert_checkequal(OS,"Linux"); + diff --git a/modules/development_tools/tests/unit_tests/test_run_longtime.tst b/modules/development_tools/tests/unit_tests/test_run_longtime.tst new file mode 100755 index 000000000..9b85356dc --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_longtime.tst @@ -0,0 +1,20 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- LONG TIME EXECUTION --> + +// Checks that this test is skipped because it requires a long time (5 seconds). +delay = 5; +j = 2; +tic(); +while ( %t ) + t = toc(); + if ( t > delay ) then + break + end + j = j+1; +end diff --git a/modules/development_tools/tests/unit_tests/test_run_nocheckerror.dia.ref b/modules/development_tools/tests/unit_tests/test_run_nocheckerror.dia.ref new file mode 100755 index 000000000..a99e4efac --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_nocheckerror.dia.ref @@ -0,0 +1,9 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- NO CHECK ERROR OUTPUT --> +// Checks that the error output is not checked. +unix("Foo!"); diff --git a/modules/development_tools/tests/unit_tests/test_run_nocheckerror.tst b/modules/development_tools/tests/unit_tests/test_run_nocheckerror.tst new file mode 100755 index 000000000..d6028c2ff --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_nocheckerror.tst @@ -0,0 +1,11 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- NO CHECK ERROR OUTPUT --> + +// Checks that the error output is not checked. +unix("Foo!"); diff --git a/modules/development_tools/tests/unit_tests/test_run_nocheckref.dia.ref b/modules/development_tools/tests/unit_tests/test_run_nocheckref.dia.ref new file mode 100755 index 000000000..982350d9c --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_nocheckref.dia.ref @@ -0,0 +1,14 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- NO CHECK REF --> +// Checks that the ref file is not checked. +// The date changes everytime, so this test cannot pass. +format("v",25); +getdate("s") + ans = + + 1305538720. diff --git a/modules/development_tools/tests/unit_tests/test_run_nocheckref.tst b/modules/development_tools/tests/unit_tests/test_run_nocheckref.tst new file mode 100755 index 000000000..6b536e8f5 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_nocheckref.tst @@ -0,0 +1,13 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- NO CHECK REF --> + +// Checks that the ref file is not checked. +// The date changes everytime, so this test cannot pass. +format("v",25); +getdate("s")
\ No newline at end of file diff --git a/modules/development_tools/tests/unit_tests/test_run_nojvm.dia.ref b/modules/development_tools/tests/unit_tests/test_run_nojvm.dia.ref new file mode 100755 index 000000000..b5bfd9d4d --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_nojvm.dia.ref @@ -0,0 +1,10 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// Checks that this file is launched in nwni mode. +m = getscilabmode(); +assert_checkequal(m,"NWNI"); diff --git a/modules/development_tools/tests/unit_tests/test_run_nojvm.tst b/modules/development_tools/tests/unit_tests/test_run_nojvm.tst new file mode 100755 index 000000000..7770c3b9a --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_nojvm.tst @@ -0,0 +1,12 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// Checks that this file is launched in nwni mode. +m = getscilabmode(); +assert_checkequal(m,"NWNI"); diff --git a/modules/development_tools/tests/unit_tests/test_run_notfixed.tst b/modules/development_tools/tests/unit_tests/test_run_notfixed.tst new file mode 100755 index 000000000..5e8937125 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_notfixed.tst @@ -0,0 +1,11 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- NOT FIXED --> + +// Checks that this file is never launched +assert_checktrue(%f); diff --git a/modules/development_tools/tests/unit_tests/test_run_windowsonly.dia.ref b/modules/development_tools/tests/unit_tests/test_run_windowsonly.dia.ref new file mode 100755 index 000000000..010718c57 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_windowsonly.dia.ref @@ -0,0 +1,10 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- WINDOWS ONLY --> +// Checks that this file is launched on Linux +OS=getos(); +assert_checkequal(OS,"Windows"); diff --git a/modules/development_tools/tests/unit_tests/test_run_windowsonly.tst b/modules/development_tools/tests/unit_tests/test_run_windowsonly.tst new file mode 100755 index 000000000..fd45ac530 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_windowsonly.tst @@ -0,0 +1,13 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- WINDOWS ONLY --> + +// Checks that this file is launched on Linux +OS=getos(); +assert_checkequal(OS,"Windows"); + diff --git a/modules/development_tools/tests/unit_tests/test_run_withgraphics.dia.ref b/modules/development_tools/tests/unit_tests/test_run_withgraphics.dia.ref new file mode 100755 index 000000000..ccb22bc69 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_withgraphics.dia.ref @@ -0,0 +1,11 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- TEST WITH GRAPHIC --> +// Checks that this file is launched in graphics mode. +m = getscilabmode(); +assert_checkequal(m,"NW"); +plot(); diff --git a/modules/development_tools/tests/unit_tests/test_run_withgraphics.tst b/modules/development_tools/tests/unit_tests/test_run_withgraphics.tst new file mode 100755 index 000000000..c9c85e322 --- /dev/null +++ b/modules/development_tools/tests/unit_tests/test_run_withgraphics.tst @@ -0,0 +1,13 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- TEST WITH GRAPHIC --> + +// Checks that this file is launched in graphics mode. +m = getscilabmode(); +assert_checkequal(m,"NW"); +plot(); |