tests/regression/misc/bugs-1.cir, regression test for bug #294
This commit is contained in:
parent
c79d2482ae
commit
ba85aaf88f
|
|
@ -1182,6 +1182,7 @@ AC_CONFIG_FILES([Makefile
|
|||
tests/regression/parser/Makefile
|
||||
tests/regression/func/Makefile
|
||||
tests/regression/model/Makefile
|
||||
tests/regression/misc/Makefile
|
||||
tests/sensitivity/Makefile
|
||||
tests/transient/Makefile
|
||||
tests/transmission/Makefile
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = lib-processing parser subckt-processing func model
|
||||
SUBDIRS = lib-processing parser subckt-processing func model misc
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
|
||||
TESTS = bugs-1.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
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
test for regression of already fixed bugs
|
||||
|
||||
* (exec-spice "ngspice -b %s")
|
||||
|
||||
* Bug Tracker
|
||||
* #294 B source failure when using an unary minus
|
||||
|
||||
b1001_t n1001_t 0 V=(- (5))
|
||||
v1001_g n1001_g 0 -5
|
||||
|
||||
v1002_aux aux1002 0 DC=3
|
||||
|
||||
b1002_t n1002_t 0 V=(-(v(aux1002)))
|
||||
v1002_g n1002_g 0 -3
|
||||
|
||||
* ----------------------------------------
|
||||
|
||||
.control
|
||||
|
||||
define mismatch(a,b,err) abs(a-b)>err
|
||||
|
||||
op
|
||||
|
||||
let total_count = 0
|
||||
let fail_count = 0
|
||||
|
||||
let tests = 1001 + vector(2)
|
||||
|
||||
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
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
Circuit: test for regression of already fixed bugs
|
||||
|
||||
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
|
||||
|
||||
|
||||
No. of Data Rows : 1
|
||||
INFO: 0 of 2 tests failed
|
||||
Loading…
Reference in New Issue