diff options
Diffstat (limited to 'Windows/spice/tests/regression/parser')
-rw-r--r-- | Windows/spice/tests/regression/parser/Makefile.am | 12 | ||||
-rw-r--r-- | Windows/spice/tests/regression/parser/Makefile.in | 512 | ||||
-rw-r--r-- | Windows/spice/tests/regression/parser/minus-minus.cir | 36 | ||||
-rw-r--r-- | Windows/spice/tests/regression/parser/xpressn-1.cir | 425 | ||||
-rw-r--r-- | Windows/spice/tests/regression/parser/xpressn-2.cir | 261 |
5 files changed, 0 insertions, 1246 deletions
diff --git a/Windows/spice/tests/regression/parser/Makefile.am b/Windows/spice/tests/regression/parser/Makefile.am deleted file mode 100644 index 4a53ca10..00000000 --- a/Windows/spice/tests/regression/parser/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -## Process this file with automake to produce Makefile.in - - -TESTS = minus-minus.cir xpressn-1.cir xpressn-2.cir - -TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice - -EXTRA_DIST = \ - $(TESTS) \ - $(TESTS:.cir=.out) - -MAINTAINERCLEANFILES = Makefile.in diff --git a/Windows/spice/tests/regression/parser/Makefile.in b/Windows/spice/tests/regression/parser/Makefile.in deleted file mode 100644 index f7eeb597..00000000 --- a/Windows/spice/tests/regression/parser/Makefile.in +++ /dev/null @@ -1,512 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -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 = tests/regression/parser -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -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_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -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__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMSXML = @ADMSXML@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NOTVLADEVDIR = @NOTVLADEVDIR@ -NOTXGRAPH = @NOTXGRAPH@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CFLAGS = @OPENMP_CFLAGS@ -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@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STATIC = @STATIC@ -STRIP = @STRIP@ -TCL_LIB_SPEC = @TCL_LIB_SPEC@ -TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ -VERSION = @VERSION@ -VLADEV = @VLADEV@ -VLADEVDIR = @VLADEVDIR@ -XGRAPHDIR = @XGRAPHDIR@ -XMKMF = @XMKMF@ -XSPICEDLLIBS = @XSPICEDLLIBS@ -XSPICEINIT = @XSPICEINIT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -TESTS = minus-minus.cir xpressn-1.cir xpressn-2.cir -TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice -EXTRA_DIST = \ - $(TESTS) \ - $(TESTS:.cir=.out) - -MAINTAINERCLEANFILES = Makefile.in -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) --gnu tests/regression/parser/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/regression/parser/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 -TAGS: - -ctags: CTAGS -CTAGS: - - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi - -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-TESTS -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." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -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: check-am install-am install-strip - -.PHONY: all all-am check check-TESTS check-am clean clean-generic \ - clean-libtool 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 \ - uninstall uninstall-am - - -# 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/Windows/spice/tests/regression/parser/minus-minus.cir b/Windows/spice/tests/regression/parser/minus-minus.cir deleted file mode 100644 index b44c169a..00000000 --- a/Windows/spice/tests/regression/parser/minus-minus.cir +++ /dev/null @@ -1,36 +0,0 @@ -test dash dash - -* (exec-spice "ngspice -b %s") - -v1 1 0 '2--3' -b2 2 0 v = 2--3 - -.control - -define mismatch(a,b,err) abs(a-b)>err - -op - -let foo = 2--3 - -if mismatch(v(1), 5.0, 1e-9) - echo "ERROR: v(1) failed" -end - -if mismatch(v(2), 5.0, 1e-9) - echo "ERROR: v(2) failed" -end - -if mismatch(foo, 5.0, 1e-9) - echo "ERROR: foo failed" -end - -print v(1) v(2) foo - -echo "INFO: -- yes we can, print dash dash --" -echo "INFO: -- yes we can, print upper and lower case --" -quit 0 - -.endc - -.end diff --git a/Windows/spice/tests/regression/parser/xpressn-1.cir b/Windows/spice/tests/regression/parser/xpressn-1.cir deleted file mode 100644 index a680633c..00000000 --- a/Windows/spice/tests/regression/parser/xpressn-1.cir +++ /dev/null @@ -1,425 +0,0 @@ -* 'xpressn-1' check xpressn.c parser - -* (exec-spice "ngspice -b %s") -* (tests-aux-renumber) - -* ---------------------------------------- -* arbitrary tests - -v1001_t n1001_t 0 '1+2' -v1002_t n1002_t 0 '1 + 2 ' -v1003_t n1003_t 0 '1+2*3' -v1004_t n1004_t 0 '(1?2:3)+100' -v1005_t n1005_t 0 '(1>2?2*4:1+2*3)+100' - -v1001_g n1001_g 0 '3' -v1002_g n1002_g 0 '3' -v1003_g n1003_g 0 '7' -v1004_g n1004_g 0 '102' -v1005_g n1005_g 0 '107' - - -v1006_t n1006_t 0 '1-2.1' -v1007_t n1007_t 0 '1--1' -v1008_t n1008_t 0 '5+2/-4' - -v1006_g n1006_g 0 '-1.1' -v1007_g n1007_g 0 '2' -v1008_g n1008_g 0 '4.5' - - -* ---------------------------------------- -* boolean operators '&&' '||' '!' -* output: 0.0 or 1.0 -* input: 0.0 is 'false', everything else is 'true' - -* --------------- -* `&&' operator - -v1009_t n1009_t 0 '0 && 0' -v1010_t n1010_t 0 '0 && 1' -v1011_t n1011_t 0 '1 && 0' -v1012_t n1012_t 0 '0.1 && 0.2' -v1013_t n1013_t 0 '-0.1 && 0.2' - -v1009_g n1009_g 0 '0' -v1010_g n1010_g 0 '0' -v1011_g n1011_g 0 '0' -v1012_g n1012_g 0 '1' -v1013_g n1013_g 0 '1' - - -* --------------- -* `||' operator - -v1014_t n1014_t 0 '0 || 0' -v1015_t n1015_t 0 '0 || 0.1' -v1016_t n1016_t 0 '-0.1 || 0' -v1017_t n1017_t 0 '0.1 || -0.2' - -v1014_g n1014_g 0 '0' -v1015_g n1015_g 0 '1' -v1016_g n1016_g 0 '1' -v1017_g n1017_g 0 '1' - - -* --------------- -* `!' operator - -v1018_t n1018_t 0 '! 0.0' -v1019_t n1019_t 0 '! 0.1' -v1020_t n1020_t 0 '! (-0.1)' - -v1018_g n1018_g 0 '1' -v1019_g n1019_g 0 '0' -v1020_g n1020_g 0 '0' - - - -* ---------------------------------------- -* comparison operators -* output: 0.0 or 1.0 - -* ---------- -* `>' - -v1021_t n1021_t 0 '3 > 2' -v1022_t n1022_t 0 '2 > 3' -v1023_t n1023_t 0 '2 > 2' - -v1021_g n1021_g 0 '1' -v1022_g n1022_g 0 '0' -v1023_g n1023_g 0 '0' - - -* ---------- -* '<' - -v1024_t n1024_t 0 '3 < 2' -v1025_t n1025_t 0 '2 < 3' -v1026_t n1026_t 0 '2 < 2' - -v1024_g n1024_g 0 '0' -v1025_g n1025_g 0 '1' -v1026_g n1026_g 0 '0' - - -* ---------- -* '<=' - -v1027_t n1027_t 0 '3 >= 2' -v1028_t n1028_t 0 '2 >= 3' -v1029_t n1029_t 0 '2 >= 2' - -v1027_g n1027_g 0 '1' -v1028_g n1028_g 0 '0' -v1029_g n1029_g 0 '1' - - -* ---------- -* '>=' - -v1030_t n1030_t 0 '3 <= 2' -v1031_t n1031_t 0 '2 <= 3' -v1032_t n1032_t 0 '2 <= 2' - -v1030_g n1030_g 0 '0' -v1031_g n1031_g 0 '1' -v1032_g n1032_g 0 '1' - - -* ---------- -* '==' - -v1033_t n1033_t 0 '3 == 2' -v1034_t n1034_t 0 '2 == 3' -v1035_t n1035_t 0 '2 == 2' - -v1033_g n1033_g 0 '0' -v1034_g n1034_g 0 '0' -v1035_g n1035_g 0 '1' - - -* ---------- -* '!=' - -v1036_t n1036_t 0 '3 != 2' -v1037_t n1037_t 0 '2 != 3' -v1038_t n1038_t 0 '2 != 2' - -v1036_g n1036_g 0 '1' -v1037_g n1037_g 0 '1' -v1038_g n1038_g 0 '0' - - -* ---------------------------------------- -* four variants of exponentiation - -v1039_t n1039_t 0 '2 ^ 3' -v1039_g n1039_g 0 '8' - -v1040_t n1040_t 0 '2 ** 3' -v1040_g n1040_g 0 '8' - -v1041_t n1041_t 0 'pwr(2,3)' -v1041_g n1041_g 0 '8' - -v1042_t n1042_t 0 'pow(2,3)' -v1042_g n1042_g 0 '8' - - -* ---------------------------------------- -* ternary 'c ? x : y' operator -* input: 0.0 is false, everything else is true - -v1043_t n1043_t 0 ' 0.1 ? 42 : 43' -v1044_t n1044_t 0 '-0.1 ? 42 : 43' -v1045_t n1045_t 0 ' 0.0 ? 42 : 43' - -v1043_g n1043_g 0 '42' -v1044_g n1044_g 0 '42' -v1045_g n1045_g 0 '43' - -* assoziativity - -v1046_t n1046_t 0 '1 ? 42 : 1 ? 41 : 40' -v1047_t n1047_t 0 '1 ? 42 : 0 ? 41 : 40' -v1048_t n1048_t 0 '0 ? 42 : 1 ? 41 : 40' -v1049_t n1049_t 0 '0 ? 42 : 0 ? 41 : 40' - -v1046_g n1046_g 0 '42' -v1047_g n1047_g 0 '42' -v1048_g n1048_g 0 '41' -v1049_g n1049_g 0 '40' - -* -------------------- -* regression tests -* these failed in the past, due to incorrect transformations in inpcom.c - -* was incorrectly transformed --> (3>2)||ternary_fcn((1<4),0.2,0.3) -v1050_t n1050_t 0 '(3>2)||(1<4) ? 0.2 : 0.3' -v1050_g n1050_g 0 '0.2' - -* was incorrectly transformed --> controlled_exit() -v1051_t n1051_t 0 '(3>2) ? (3+2)*((2>1)?1:1) : 42' -v1051_g n1051_g 0 '5' - -* was incorrectly transformed --> ternary_fcn((3>2),42,(2*2))3 -v1052_t n1052_t 0 '(3>2) ? 42 : (2*2)+3' -v1052_g n1052_g 0 '42' - - -* ---------------------------------------- -* functions - -v1053_t n1053_t 0 'sin(0.3)' -v1054_t n1054_t 0 'cos(0.3)' -v1055_t n1055_t 0 'tan(0.3)' -v1056_t n1056_t 0 'asin(0.3)' -v1057_t n1057_t 0 'acos(0.3)' -v1058_t n1058_t 0 'atan(0.3)' -v1059_t n1059_t 0 'arctan(0.3)' -v1060_t n1060_t 0 'sinh(0.3)' -v1061_t n1061_t 0 'cosh(0.3)' -v1062_t n1062_t 0 'tanh(0.3)' -v1063_t n1063_t 0 'asinh(0.3)' -v1064_t n1064_t 0 'acosh(1.3)' -v1065_t n1065_t 0 'atanh(0.3)' - -v1053_g n1053_g 0 '0.29552020666133955' -v1054_g n1054_g 0 '0.955336489125606' -v1055_g n1055_g 0 '0.30933624960962325' -v1056_g n1056_g 0 '0.3046926540153975' -v1057_g n1057_g 0 '1.266103672779499' -v1058_g n1058_g 0 '0.29145679447786704' -v1059_g n1059_g 0 '0.29145679447786704' -v1060_g n1060_g 0 '0.3045202934471426' -v1061_g n1061_g 0 '1.0453385141288605' -v1062_g n1062_g 0 '0.2913126124515909' -v1063_g n1063_g 0 '0.2956730475634223' -v1064_g n1064_g 0 '0.7564329108569595' -v1065_g n1065_g 0 '0.3095196042031116' - -* ---------- - -v1066_t n1066_t 0 'exp(2.0)' -v1067_t n1067_t 0 'exp(-2.0)' - -v1066_g n1066_g 0 '7.38905609893065' -v1067_g n1067_g 0 '0.1353352832366127' - -* ---------- - -v1068_t n1068_t 0 'log(2.0)' -v1069_t n1069_t 0 'log(0.5)' - -v1068_g n1068_g 0 '0.6931471805599453' -v1069_g n1069_g 0 '-0.6931471805599453' - -v1070_t n1070_t 0 'ln(2.0)' -v1071_t n1071_t 0 'ln(0.5)' - -v1070_g n1070_g 0 '0.6931471805599453' -v1071_g n1071_g 0 '-0.6931471805599453' - -* ---------- - -v1072_t n1072_t 0 'sqrt(2.0)' -v1072_g n1072_g 0 '1.4142135623730951' - -v1073_t n1073_t 0 'sqr(2.0)' -v1073_g n1073_g 0 '4.0' - - -* ---------------------------------------- -* functions - -v1074_t n1074_t 0 'abs(2.0)' -v1075_t n1075_t 0 'abs(-2.0)' - -v1074_g n1074_g 0 '2' -v1075_g n1075_g 0 '2' - - -v1076_t n1076_t 0 'sgn(2.0)' -v1077_t n1077_t 0 'sgn(0.0)' -v1078_t n1078_t 0 'sgn(-2.0)' - -v1076_g n1076_g 0 '1' -v1077_g n1077_g 0 '0' -v1078_g n1078_g 0 '-1' - - -v1079_t n1079_t 0 'int(2.1)' -v1080_t n1080_t 0 'int(1.9)' -v1081_t n1081_t 0 'int(0)' -v1082_t n1082_t 0 'int(-1.9)' -v1083_t n1083_t 0 'int(-2.1)' - -v1079_g n1079_g 0 '2' -v1080_g n1080_g 0 '1' -v1081_g n1081_g 0 '0' -v1082_g n1082_g 0 '-1' -v1083_g n1083_g 0 '-2' - - -v1084_t n1084_t 0 'nint(2.6)' -v1085_t n1085_t 0 'nint(2.5)' -v1086_t n1086_t 0 'nint(2.4)' -v1087_t n1087_t 0 'nint(1.6)' -v1088_t n1088_t 0 'nint(1.5)' -v1089_t n1089_t 0 'nint(1.4)' -v1090_t n1090_t 0 'nint(0.6)' -v1091_t n1091_t 0 'nint(0.5)' -v1092_t n1092_t 0 'nint(0.4)' -v1093_t n1093_t 0 'nint(0)' -v1094_t n1094_t 0 'nint(-0.4)' -v1095_t n1095_t 0 'nint(-0.5)' -v1096_t n1096_t 0 'nint(-0.6)' -v1097_t n1097_t 0 'nint(-1.4)' -v1098_t n1098_t 0 'nint(-1.5)' -v1099_t n1099_t 0 'nint(-1.6)' -v1100_t n1100_t 0 'nint(-2.4)' -v1101_t n1101_t 0 'nint(-2.5)' -v1102_t n1102_t 0 'nint(-2.6)' - -v1084_g n1084_g 0 '3' -v1085_g n1085_g 0 '2' -v1086_g n1086_g 0 '2' -v1087_g n1087_g 0 '2' -v1088_g n1088_g 0 '2' -v1089_g n1089_g 0 '1' -v1090_g n1090_g 0 '1' -v1091_g n1091_g 0 '0' -v1092_g n1092_g 0 '0' -v1093_g n1093_g 0 '0' -v1094_g n1094_g 0 '0' -v1095_g n1095_g 0 '0' -v1096_g n1096_g 0 '-1' -v1097_g n1097_g 0 '-1' -v1098_g n1098_g 0 '-2' -v1099_g n1099_g 0 '-2' -v1100_g n1100_g 0 '-2' -v1101_g n1101_g 0 '-2' -v1102_g n1102_g 0 '-3' - - -v1103_t n1103_t 0 'floor(2.1)' -v1104_t n1104_t 0 'floor(1.9)' -v1105_t n1105_t 0 'floor(0)' -v1106_t n1106_t 0 'floor(-1.9)' -v1107_t n1107_t 0 'floor(-2.1)' - -v1103_g n1103_g 0 '2' -v1104_g n1104_g 0 '1' -v1105_g n1105_g 0 '0' -v1106_g n1106_g 0 '-2' -v1107_g n1107_g 0 '-3' - - -v1108_t n1108_t 0 'ceil(2.1)' -v1109_t n1109_t 0 'ceil(1.9)' -v1110_t n1110_t 0 'ceil(0)' -v1111_t n1111_t 0 'ceil(-1.9)' -v1112_t n1112_t 0 'ceil(-2.1)' - -v1108_g n1108_g 0 '3' -v1109_g n1109_g 0 '2' -v1110_g n1110_g 0 '0' -v1111_g n1111_g 0 '-1' -v1112_g n1112_g 0 '-2' - - -* ---------------------------------------- -* min(a,b) max(a,b) - -v1113_t n1113_t 0 'min(1.1, 2.1)' -v1114_t n1114_t 0 'min(2.1, 1.1)' - -v1113_g n1113_g 0 '1.1' -v1114_g n1114_g 0 '1.1' - - -v1115_t n1115_t 0 'max(1.1, 2.1)' -v1116_t n1116_t 0 'max(2.1, 1.1)' - -v1115_g n1115_g 0 '2.1' -v1116_g n1116_g 0 '2.1' - - -* ---------------------------------------- - -.control - -define mismatch(a,b,err) abs(a-b)>err - -op - -let total_count = 0 -let fail_count = 0 - -let tests = 1001 + vector(116) - -foreach n $&tests - set n_test = "n{$n}_t" - set n_gold = "n{$n}_g" - if mismatch(v($n_test), v($n_gold), 1e-9) - let v_test = v($n_test) - let v_gold = v($n_gold) - echo "ERROR, test failure, v($n_test) = $&v_test but should be $&v_gold" - let fail_count = fail_count + 1 - end - let total_count = total_count + 1 -end - -if fail_count > 0 - echo "ERROR: $&fail_count of $&total_count tests failed" - quit 1 -else - echo "INFO: $&fail_count of $&total_count tests failed" - quit 0 -end - -.endc - -.end diff --git a/Windows/spice/tests/regression/parser/xpressn-2.cir b/Windows/spice/tests/regression/parser/xpressn-2.cir deleted file mode 100644 index 2c3ecb75..00000000 --- a/Windows/spice/tests/regression/parser/xpressn-2.cir +++ /dev/null @@ -1,261 +0,0 @@ -check precision of some functions - -* do not change this file, its generated -* (exec-spice "ngspice -b %s") - -v0 n0 0 'sin(1.0e-9)' -v1 n1 0 'sin(1.0e-1)' -v2 n2 0 'sin(7.0e-1)' -v3 n3 0 'cos(1.0e-9)' -v4 n4 0 'cos(1.0e-1)' -v5 n5 0 'cos(7.0e-1)' -v6 n6 0 'tan(1.0e-9)' -v7 n7 0 'tan(1.0e-1)' -v8 n8 0 'tan(7.0e-1)' -v9 n9 0 'asin(1.0e-9)' -v10 n10 0 'asin(1.0e-1)' -v11 n11 0 'asin(7.0e-1)' -v12 n12 0 'acos(1.0e-9)' -v13 n13 0 'acos(1.0e-1)' -v14 n14 0 'acos(7.0e-1)' -v15 n15 0 'atan(1.0e-9)' -v16 n16 0 'atan(1.0e-1)' -v17 n17 0 'atan(7.0e-1)' -v18 n18 0 'sinh(1.0e-9)' -v19 n19 0 'sinh(1.0e-1)' -v20 n20 0 'sinh(7.0e-1)' -v21 n21 0 'cosh(1.0e-9)' -v22 n22 0 'cosh(1.0e-1)' -v23 n23 0 'cosh(7.0e-1)' -v24 n24 0 'tanh(1.0e-9)' -v25 n25 0 'tanh(1.0e-1)' -v26 n26 0 'tanh(7.0e-1)' -v27 n27 0 'asinh(1.0e-9)' -v28 n28 0 'asinh(1.0e-1)' -v29 n29 0 'asinh(7.0e-1)' -v30 n30 0 'acosh(1.2e+0)' -v31 n31 0 'atanh(1.0e-9)' -v32 n32 0 'atanh(1.0e-1)' -v33 n33 0 'atanh(7.0e-1)' - - -.control - -op - -let eps = 1.1102230246251568e-16 - -define mismatch(y,gold,err) abs(y-gold)>(err*gold) - -define relerr_(y,gold) (y-gold)/(gold*eps) - - -if mismatch(v(n0), 1.0e-9, 10*eps) - let relerr = relerr_(v(n0), 1.0e-9) - echo "ERROR, sin(1.0e-9) versus 1.0e-9 mismatch" - print relerr -end - -if mismatch(v(n1), 9.983341664682815e-2, 10*eps) - let relerr = relerr_(v(n1), 9.983341664682815e-2) - echo "ERROR, sin(1.0e-1) versus 9.983341664682815e-2 mismatch" - print relerr -end - -if mismatch(v(n2), 6.44217687237691e-1, 10*eps) - let relerr = relerr_(v(n2), 6.44217687237691e-1) - echo "ERROR, sin(7.0e-1) versus 6.44217687237691e-1 mismatch" - print relerr -end - -if mismatch(v(n3), 1.0e+0, 10*eps) - let relerr = relerr_(v(n3), 1.0e+0) - echo "ERROR, cos(1.0e-9) versus 1.0e+0 mismatch" - print relerr -end - -if mismatch(v(n4), 9.950041652780258e-1, 10*eps) - let relerr = relerr_(v(n4), 9.950041652780258e-1) - echo "ERROR, cos(1.0e-1) versus 9.950041652780258e-1 mismatch" - print relerr -end - -if mismatch(v(n5), 7.648421872844885e-1, 10*eps) - let relerr = relerr_(v(n5), 7.648421872844885e-1) - echo "ERROR, cos(7.0e-1) versus 7.648421872844885e-1 mismatch" - print relerr -end - -if mismatch(v(n6), 1.0e-9, 10*eps) - let relerr = relerr_(v(n6), 1.0e-9) - echo "ERROR, tan(1.0e-9) versus 1.0e-9 mismatch" - print relerr -end - -if mismatch(v(n7), 1.0033467208545055e-1, 10*eps) - let relerr = relerr_(v(n7), 1.0033467208545055e-1) - echo "ERROR, tan(1.0e-1) versus 1.0033467208545055e-1 mismatch" - print relerr -end - -if mismatch(v(n8), 8.422883804630794e-1, 10*eps) - let relerr = relerr_(v(n8), 8.422883804630794e-1) - echo "ERROR, tan(7.0e-1) versus 8.422883804630794e-1 mismatch" - print relerr -end - -if mismatch(v(n9), 1.0e-9, 10*eps) - let relerr = relerr_(v(n9), 1.0e-9) - echo "ERROR, asin(1.0e-9) versus 1.0e-9 mismatch" - print relerr -end - -if mismatch(v(n10), 1.0016742116155979e-1, 10*eps) - let relerr = relerr_(v(n10), 1.0016742116155979e-1) - echo "ERROR, asin(1.0e-1) versus 1.0016742116155979e-1 mismatch" - print relerr -end - -if mismatch(v(n11), 7.753974966107529e-1, 10*eps) - let relerr = relerr_(v(n11), 7.753974966107529e-1) - echo "ERROR, asin(7.0e-1) versus 7.753974966107529e-1 mismatch" - print relerr -end - -if mismatch(v(n12), 1.5707963257948965e+0, 10*eps) - let relerr = relerr_(v(n12), 1.5707963257948965e+0) - echo "ERROR, acos(1.0e-9) versus 1.5707963257948965e+0 mismatch" - print relerr -end - -if mismatch(v(n13), 1.470628905633337e+0, 10*eps) - let relerr = relerr_(v(n13), 1.470628905633337e+0) - echo "ERROR, acos(1.0e-1) versus 1.470628905633337e+0 mismatch" - print relerr -end - -if mismatch(v(n14), 7.953988301841437e-1, 10*eps) - let relerr = relerr_(v(n14), 7.953988301841437e-1) - echo "ERROR, acos(7.0e-1) versus 7.953988301841437e-1 mismatch" - print relerr -end - -if mismatch(v(n15), 1.0e-9, 10*eps) - let relerr = relerr_(v(n15), 1.0e-9) - echo "ERROR, atan(1.0e-9) versus 1.0e-9 mismatch" - print relerr -end - -if mismatch(v(n16), 9.966865249116206e-2, 10*eps) - let relerr = relerr_(v(n16), 9.966865249116206e-2) - echo "ERROR, atan(1.0e-1) versus 9.966865249116206e-2 mismatch" - print relerr -end - -if mismatch(v(n17), 6.107259643892086e-1, 10*eps) - let relerr = relerr_(v(n17), 6.107259643892086e-1) - echo "ERROR, atan(7.0e-1) versus 6.107259643892086e-1 mismatch" - print relerr -end - -if mismatch(v(n18), 1.0e-9, 10*eps) - let relerr = relerr_(v(n18), 1.0e-9) - echo "ERROR, sinh(1.0e-9) versus 1.0e-9 mismatch" - print relerr -end - -if mismatch(v(n19), 1.0016675001984403e-1, 10*eps) - let relerr = relerr_(v(n19), 1.0016675001984403e-1) - echo "ERROR, sinh(1.0e-1) versus 1.0016675001984403e-1 mismatch" - print relerr -end - -if mismatch(v(n20), 7.585837018395335e-1, 10*eps) - let relerr = relerr_(v(n20), 7.585837018395335e-1) - echo "ERROR, sinh(7.0e-1) versus 7.585837018395335e-1 mismatch" - print relerr -end - -if mismatch(v(n21), 1.0e+0, 10*eps) - let relerr = relerr_(v(n21), 1.0e+0) - echo "ERROR, cosh(1.0e-9) versus 1.0e+0 mismatch" - print relerr -end - -if mismatch(v(n22), 1.0050041680558035e+0, 10*eps) - let relerr = relerr_(v(n22), 1.0050041680558035e+0) - echo "ERROR, cosh(1.0e-1) versus 1.0050041680558035e+0 mismatch" - print relerr -end - -if mismatch(v(n23), 1.255169005630943e+0, 10*eps) - let relerr = relerr_(v(n23), 1.255169005630943e+0) - echo "ERROR, cosh(7.0e-1) versus 1.255169005630943e+0 mismatch" - print relerr -end - -if mismatch(v(n24), 1.0e-9, 10*eps) - let relerr = relerr_(v(n24), 1.0e-9) - echo "ERROR, tanh(1.0e-9) versus 1.0e-9 mismatch" - print relerr -end - -if mismatch(v(n25), 9.966799462495581e-2, 10*eps) - let relerr = relerr_(v(n25), 9.966799462495581e-2) - echo "ERROR, tanh(1.0e-1) versus 9.966799462495581e-2 mismatch" - print relerr -end - -if mismatch(v(n26), 6.043677771171635e-1, 10*eps) - let relerr = relerr_(v(n26), 6.043677771171635e-1) - echo "ERROR, tanh(7.0e-1) versus 6.043677771171635e-1 mismatch" - print relerr -end - -if mismatch(v(n27), 1.0e-9, 10*eps) - let relerr = relerr_(v(n27), 1.0e-9) - echo "ERROR, asinh(1.0e-9) versus 1.0e-9 mismatch" - print relerr -end - -if mismatch(v(n28), 9.983407889920759e-2, 10*eps) - let relerr = relerr_(v(n28), 9.983407889920759e-2) - echo "ERROR, asinh(1.0e-1) versus 9.983407889920759e-2 mismatch" - print relerr -end - -if mismatch(v(n29), 6.526665660823557e-1, 10*eps) - let relerr = relerr_(v(n29), 6.526665660823557e-1) - echo "ERROR, asinh(7.0e-1) versus 6.526665660823557e-1 mismatch" - print relerr -end - -if mismatch(v(n30), 6.223625037147784e-1, 10*eps) - let relerr = relerr_(v(n30), 6.223625037147784e-1) - echo "ERROR, acosh(1.2e+0) versus 6.223625037147784e-1 mismatch" - print relerr -end - -if mismatch(v(n31), 1.0e-9, 10*eps) - let relerr = relerr_(v(n31), 1.0e-9) - echo "ERROR, atanh(1.0e-9) versus 1.0e-9 mismatch" - print relerr -end - -if mismatch(v(n32), 1.0033534773107558e-1, 10*eps) - let relerr = relerr_(v(n32), 1.0033534773107558e-1) - echo "ERROR, atanh(1.0e-1) versus 1.0033534773107558e-1 mismatch" - print relerr -end - -if mismatch(v(n33), 8.673005276940532e-1, 10*eps) - let relerr = relerr_(v(n33), 8.673005276940532e-1) - echo "ERROR, atanh(7.0e-1) versus 8.673005276940532e-1 mismatch" - print relerr -end - - -quit 0 - - -.endc |