Skip to content

Commit

Permalink
Merge branch 'stable-1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfwilson committed May 22, 2021
2 parents b98f611 + 24ed11d commit bc55fe2
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 24 deletions.
45 changes: 35 additions & 10 deletions gap/utils.gi
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,26 @@ end);
InstallGlobalFunction(DigraphsTestStandard,
function(arg)
local opts, dir;
if Length(arg) = 1 and IsRecord(arg[2]) then
opts := arg[1];
if Length(arg) = 1 and IsRecord(arg[1]) then
opts := ShallowCopy(arg[1]);
elif Length(arg) <> 0 then
ErrorNoReturn("there must be no arguments, or the argument ",
"must be a record");
else
opts := rec(suppressStatusMessage := true,
earlyStop := true,
testOptions := rec(showProgress := false));
opts := rec();
fi;

if not IsBound(opts.suppressStatusMessage) then
opts.suppressStatusMessage := true;
fi;
if not IsBound(opts.earlyStop) then
opts.earlyStop := true;
fi;
if not IsBound(opts.testOptions) or not IsRecord(opts.testOptions) then
opts.testOptions := rec();
fi;
if not IsBound(opts.testOptions.showProgress) then
opts.testOptions.showProgress := false;
fi;

dir := DirectoriesPackageLibrary("digraphs", "tst/standard/");
Expand All @@ -170,15 +181,29 @@ function(arg)
"and try again,");
fi;

if Length(arg) = 1 and IsRecord(arg[2]) then
opts := arg[1];
if Length(arg) = 1 and IsRecord(arg[1]) then
opts := ShallowCopy(arg[1]);
elif Length(arg) <> 0 then
ErrorNoReturn("there must be no arguments, or the argument ",
"must be a record");
else
opts := rec(suppressStatusMessage := true,
earlyStop := true,
testOptions := rec(showProgress := "some"));
opts := rec();
fi;

if not IsBound(opts.suppressStatusMessage) then
opts.suppressStatusMessage := true;
fi;
if not IsBound(opts.earlyStop) then
opts.earlyStop := true;
fi;
if not IsBound(opts.testOptions) or not IsRecord(opts.testOptions) then
opts.testOptions := rec();
fi;
if not IsBound(opts.testOptions.showProgress) then
opts.testOptions.showProgress := false;
fi;
if not IsBound(opts.testOptions.showProgress) then
opts.suppressStatusMessage := "some";
fi;

dir := DirectoriesPackageLibrary("digraphs", "tst/extreme/");
Expand Down
29 changes: 19 additions & 10 deletions tst/testall.g
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
LoadPackage("digraphs");

DigraphsMakeDoc();
if DigraphsTestInstall()
and DigraphsTestStandard()
and DIGRAPHS_RunTest(DigraphsTestManualExamples)
and DigraphsTestExtreme() then
FORCE_QUIT_GAP(0);
#############################################################################
##
#W testall.g
#Y Copyright (C) 2021 Wilf A. Wilson
##
## Licensing information can be found in the README file of this package.
##
#############################################################################
##
LoadPackage("digraphs", false);;
opts := rec(earlyStop := false);
if SizeBlist([DigraphsTestInstall(),
DigraphsTestStandard(opts),
DIGRAPHS_RunTest(DigraphsTestManualExamples),
DigraphsTestExtreme(opts)]) = 4 then
QUIT_GAP(0);
else
QUIT_GAP(1);
fi;

FORCE_QUIT_GAP(1);
FORCE_QUIT_GAP(1); # if we ever get here, there was an error
8 changes: 4 additions & 4 deletions tst/teststandard.g
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#############################################################################
##
LoadPackage("digraphs", false);;
# These "{No} errors detected" lines currently have to be printed in this way
# The "{No} errors detected" lines currently have to be printed in this way
# to satisfy the automated GAP testing system that runs on Jenkins.
# This requirement will hopefully go soon.
if DigraphsTestInstall()
and DigraphsTestStandard()
and DIGRAPHS_RunTest(DigraphsTestManualExamples) then
if SizeBlist([DigraphsTestInstall(),
DigraphsTestStandard(rec(earlyStop := false)),
DIGRAPHS_RunTest(DigraphsTestManualExamples)]) = 3 then
Print("#I No errors detected while testing\n\n");
QUIT_GAP(0);
else
Expand Down

0 comments on commit bc55fe2

Please sign in to comment.