mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-09-08 06:07:32 +02:00
Paranoia_Parallel: a test suite for more than 100 test circuits,
running in parallel on a multi-core machine (12 min execution time on a i9 9900, ngspice compiled with gcc, debug mode enabled. Linux with Valgrind and Parallel are required.
This commit is contained in:
committed by
Holger Vogt
parent
2988b5db66
commit
d881158a41
@@ -0,0 +1,46 @@
|
||||
Test sequences for ngspice control structures
|
||||
*vectors are used (except foreach)
|
||||
*start in interactive mode
|
||||
|
||||
.control
|
||||
|
||||
* test for label, goto
|
||||
echo
|
||||
let index = 0
|
||||
label starthere2
|
||||
let loop = 0
|
||||
echo We are at start with index "$&index" and loop "$&loop"
|
||||
if index < 6
|
||||
label inhere
|
||||
let index = index + 1
|
||||
if loop < 3
|
||||
let loop = loop + 1
|
||||
if index > 1
|
||||
echo jump2
|
||||
goto starthere2
|
||||
end
|
||||
end
|
||||
echo jump
|
||||
goto inhere
|
||||
end
|
||||
echo We are at end with index "$&index" and loop "$&loop"
|
||||
|
||||
* test goto in while loop
|
||||
echo
|
||||
let loop = 0
|
||||
if 1 ; outer loop to allow nested forward label 'endlabel'
|
||||
while loop < 10
|
||||
if loop > 5
|
||||
echo jump
|
||||
goto endlabel
|
||||
end
|
||||
let loop = loop + 1
|
||||
end
|
||||
echo before ; never reached
|
||||
label endlabel
|
||||
echo after "$&loop"
|
||||
end
|
||||
|
||||
|
||||
quit
|
||||
.endc
|
||||
Reference in New Issue
Block a user