Skip to content

Commit 48bc594

Browse files
committed
suggestion fixes + formats
1 parent 2c5aa59 commit 48bc594

2 files changed

Lines changed: 28 additions & 28 deletions

File tree

gap/io.gi

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2222,15 +2222,15 @@ InstallMethod(Graph6String, "for a digraph by out-neighbours",
22222222
[IsDigraphByOutNeighboursRep],
22232223
function(D)
22242224
local list, adj, n, lenlist, tablen, blist, i, j, pos, block;
2225-
if IsMultiDigraph(D) then
2226-
ErrorNoReturn("the argument <D> must not have multiple edges; ",
2227-
"consider encoding in Disparse6 or Digraph6");
2228-
elif not IsSymmetricDigraph(D) then
2229-
ErrorNoReturn("the argument <D> must be a symmetric digraph; ",
2230-
"consider encoding in Sparse6 or Disparse6");
2225+
if not IsSymmetricDigraph(D) then
2226+
ErrorNoReturn("the argument <D> must be a symmetric digraph;\n",
2227+
"consider encoding in Digraph6 or Disparse6");
2228+
elif IsMultiDigraph(D) then
2229+
ErrorNoReturn("the argument <D> must not have multiple edges;\n",
2230+
"consider encoding in Sparse6 or Disparse6");
22312231
elif DigraphHasLoops(D) then
2232-
ErrorNoReturn("the argument <D> must not have loops; ",
2233-
"consider encoding in Sparse6 or Disparse6");
2232+
ErrorNoReturn("the argument <D> must not have loops;\n",
2233+
"consider encoding in Sparse6, Digraph6, or Disparse6");
22342234
fi;
22352235

22362236
list := [];
@@ -2292,11 +2292,11 @@ function(D)
22922292

22932293
if IsMultiDigraph(D) then
22942294
if IsSymmetricDigraph(D) then
2295-
ErrorNoReturn("the argument <D> must not have multiple edges ",
2296-
"consider encoding in Sparse6 or Disparse6, ");
2295+
ErrorNoReturn("the argument <D> must not have multiple edges;\n",
2296+
"consider encoding in Sparse6 or Disparse6");
22972297
fi;
2298-
ErrorNoReturn("the argument <D> must not have multiple edges ",
2299-
"consider encoding in Disparse6, ");
2298+
ErrorNoReturn("the argument <D> must not have multiple edges;\n",
2299+
"consider encoding in Disparse6");
23002300
fi;
23012301

23022302
# First write the special character '&'
@@ -2354,10 +2354,10 @@ function(D)
23542354

23552355
if not IsSymmetricDigraph(D) then
23562356
if IsMultiDigraph(D) then
2357-
ErrorNoReturn("the argument <D> must be a symmetric digraph; ",
2357+
ErrorNoReturn("the argument <D> must be a symmetric digraph;\n",
23582358
"consider encoding in Disparse6");
23592359
else
2360-
ErrorNoReturn("the argument <D> must be a symmetric digraph; ",
2360+
ErrorNoReturn("the argument <D> must be a symmetric digraph;\n",
23612361
"consider encoding in Digraph6 or Disparse6");
23622362
fi;
23632363
fi;

tst/standard/io.tst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ true
283283
gap> gr[3] := Digraph([[1, 2], [1, 2]]);
284284
<immutable digraph with 2 vertices, 4 edges>
285285
gap> WriteDigraphs(filename, Digraph([[2], []]), Graph6String);
286-
Error, the argument <D> must be a symmetric digraph; consider encoding in Spar\
287-
se6 or Disparse6
286+
Error, the argument <D> must be a symmetric digraph;
287+
consider encoding in Digraph6 or Disparse6
288288
gap> OnBreak := oldOnBreak;;
289289
gap> IO_Close(IO.OpenFiles[Length(IO.OpenFiles)]);;
290290
gap> filename := Concatenation(DIGRAPHS_Dir(), "/tst/out/test.s6.bz2");;
@@ -320,8 +320,8 @@ gap> ReadDigraphs(f);
320320
gap> IO_Close(f);;
321321
gap> f := DigraphFile(filename, "a");;
322322
gap> WriteDigraphs(f, CycleDigraph(5));
323-
Error, the argument <D> must be a symmetric digraph; consider encoding in Spar\
324-
se6 or Disparse6
323+
Error, the argument <D> must be a symmetric digraph;
324+
consider encoding in Digraph6 or Disparse6
325325
gap> WriteDigraphs(f, JohnsonDigraph(6, 3));
326326
IO_OK
327327
gap> IO_Close(f);;
@@ -546,8 +546,8 @@ Error, the 2nd argument <s> is not a valid disparse6 string,
546546

547547
# Special format characters
548548
gap> Sparse6String(ChainDigraph(3));
549-
Error, the argument <D> must be a symmetric digraph; consider encoding in Digr\
550-
aph6 or Disparse6
549+
Error, the argument <D> must be a symmetric digraph;
550+
consider encoding in Digraph6 or Disparse6
551551
gap> Sparse6String(CompleteDigraph(1));
552552
":@"
553553
gap> gr := Digraph([[1], []]);;
@@ -563,20 +563,20 @@ gap> Sparse6String(last);
563563
# Multiple Edges Digraph6
564564
gap> gr := Digraph([[1, 1], [2]]);;
565565
gap> Digraph6String(gr);
566-
Error, the argument <D> must not have multiple edges consider encoding in Spar\
567-
se6 or Disparse6,
566+
Error, the argument <D> must not have multiple edges;
567+
consider encoding in Sparse6 or Disparse6
568568

569569
# Non-symmetric Digraph in Sparse6
570570
gap> gr := Digraph([[2], []]);;
571571
gap> Sparse6String(gr);
572-
Error, the argument <D> must be a symmetric digraph; consider encoding in Digr\
573-
aph6 or Disparse6
572+
Error, the argument <D> must be a symmetric digraph;
573+
consider encoding in Digraph6 or Disparse6
574574

575575
# Digraph with loops in Sparse6
576576
gap> gr := Digraph([[1], [2]]);;
577577
gap> Graph6String(gr);
578-
Error, the argument <D> must not have loops; consider encoding in Sparse6 or D\
579-
isparse6
578+
Error, the argument <D> must not have loops;
579+
consider encoding in Sparse6, Digraph6, or Disparse6
580580

581581
# DigraphPlainTextLineDecoder: bad input
582582
gap> DigraphPlainTextLineDecoder(" ", " ", 1, ".");
@@ -678,8 +678,8 @@ Error, cannot open the file given as the 1st argument <name>,
678678
679679
# DigraphPlainTextLineDecoder: bad input
680680
gap> Graph6String(ChainDigraph(4));
681-
Error, the argument <D> must be a symmetric digraph; consider encoding in Spar\
682-
se6 or Disparse6
681+
Error, the argument <D> must be a symmetric digraph;
682+
consider encoding in Digraph6 or Disparse6
683683
gap> DIGRAPHS_Graph6Length(-1);
684684
fail
685685
gap> DIGRAPHS_Graph6Length(68719476737);

0 commit comments

Comments
 (0)