From ff4b8dcf41b3c2537cc3bf097898422ec2763169 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 13 Aug 2017 18:00:42 +0200 Subject: [PATCH] Revert "retain perl compatibility" this did reintroduce hundreds of warnings: defined(%hash) is deprecated at ...ngspice/tests/bin/runQaTests.pl line 331. (Maybe you should just omit the defined()?) this was deprecated aproximately 2001 with perl version v5.6.1 see https://perldoc.perl.org/perl561delta.html obviously for good reason, because defined(%hash) did have a semantics which did not exactly match the users expectation. --- tests/bin/modelQaTestRoutines.pm | 2 +- tests/bin/runQaTests.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/bin/modelQaTestRoutines.pm b/tests/bin/modelQaTestRoutines.pm index 60f0ce6c3..0fb95c9ac 100644 --- a/tests/bin/modelQaTestRoutines.pm +++ b/tests/bin/modelQaTestRoutines.pm @@ -201,7 +201,7 @@ sub processTestSpec { @main::ModelParameters=(); @main::TestVariants=@main::Variants; undef(%main::BiasFor); - if (defined(%main::isGeneralFloatingPin)) { + if (%main::isGeneralFloatingPin) { %main::isFloatingPin=%main::isGeneralFloatingPin; } else { undef(%main::isFloatingPin); diff --git a/tests/bin/runQaTests.pl b/tests/bin/runQaTests.pl index 2afaa6798..4605e2e8a 100755 --- a/tests/bin/runQaTests.pl +++ b/tests/bin/runQaTests.pl @@ -329,7 +329,7 @@ if ($reallyVerbose) { $flag=""; } foreach $test (@Test) { - next if (defined(%doTest) && !$doTest{$test}); + next if (%doTest && !$doTest{$test}); if ($verbose) {print "\n****** Running test ($simulatorName): $test"} @@ -343,7 +343,7 @@ foreach $test (@Test) { } else { $refFile="$resultsDirectory/$test.standard"; } - next if (defined(%doVariant) && !$doVariant{$variant}); + next if (%doVariant && !$doVariant{$variant}); $simFile="$resultsDirectory/$test.$variant"; if ($outputDc) { if (($forceSimulation || ! -r $simFile) && !$onlyDoComparison) {