Skip to content

Commit

Permalink
fix: Allow parameter migration test script to handle changes in the n…
Browse files Browse the repository at this point in the history
…umber of `nodeOperator`s
  • Loading branch information
abensonca committed Dec 15, 2024
1 parent 5eda1e0 commit e94a696
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion testSuite/test-parameter-migration.pl
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env perl
use strict;
use warnings;
use lib $ENV{'GALACTICUS_EXEC_PATH'}."/perl";
use XML::Simple;
use Data::Dumper;
use List::ExtraUtils;

# Test migration of parameter files.
# Andrew Benson (27-January-2023)
Expand All @@ -20,8 +22,9 @@
my $parameters = $xml->XMLin("outputs/parameterMigrated.xml");

# Check expected state.
my @nodeOperators = &List::ExtraUtils::as_array($parameters->{'nodeOperator'}->{'nodeOperator'});
print "FAILED: missing parameter 'massDestructionAbsolute'\n"
unless ( exists($parameters->{'nodeOperator'}->{'nodeOperator'}->{'massDestructionAbsolute'}) );
unless ( exists($nodeOperators[0]->{'massDestructionAbsolute'}) );
print "FAILED: unremoved parameter 'spheroidVerySimpleTrackLuminosities'\n"
if ( exists($parameters->{'spheroidVerySimpleTrackLuminosities'}) );

Expand Down

0 comments on commit e94a696

Please sign in to comment.