Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  word.tst   Sprache: unbekannt

 
Spracherkennung für: .tst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

#############################################################################
##
##  standard/fp/word.tst
#Y  Copyright (C) 2020-2022                                Murray T. Whyte
##
##  Licensing information can be found in the README file of this package.
##
#############################################################################
##

#@local A, w
gap> START_TEST("Semigroups package: standard/fp/word.tst");
gap> LoadPackage("semigroups", false);;

#
gap> SEMIGROUPS.StartTest();

# Test WordToString
gap> WordToString("abc", [11213]);
"aabac"
gap> WordToString("e3a", [3331]);
"aaae"
gap> WordToString("abc", []);
""
gap> WordToString("", []);
""
gap> WordToString("abc", [1]);
"a"
gap> WordToString("abc", [4]);
Error, the 1st argument (a string) is too short, expected at least 
4 but found 3
gap> WordToString("ab", [1, -1]);
Error, expected list of positive integers as 2nd argument

# Test RandomWord
gap> Length(RandomWord(44)) = 4;
true
gap> Length(RandomWord(310)) = 3;
true
gap> IsEmpty(RandomWord(0100));
true
gap> Length(DuplicateFreeList(RandomWord(10020))) <= 20;
true
gap> RandomWord(00);
[  ]
gap> RandomWord(10);
Error, the 1st argument (an integer) cannot be non-zero if the 2nd argument is\
 0
gap> RandomWord(-12);
Error, expected non-negative integer as 1st argument
gap> RandomWord(2, -1);
Error, expected non-negative integer as 2nd argument

# Test StandardiseWord
gap> A := [310021003];
310021003 ]
gap> StandardiseWord(A);
12321 ]
gap> A;
12321 ]
gap> A := [];
[  ]
gap> StandardiseWord(A);
[  ]
gap> StandardiseWord([10]);
1 ]
gap> A := [12345];
12345 ]
gap> StandardiseWord(A);
12345 ]
gap> A := [111111113];
111111113 ]
gap> StandardizeWord(A);
111111112 ]
gap> A := [21232];
21232 ]
gap> StandardiseWord(A);
12131 ]
gap> StandardiseWord([0121]);
Error, expected a list of positive integers as 2nd argument
gap> StandardiseWord([[12], [0]]);
Error, expected a list of positive integers as 2nd argument

# Test StringToWord
gap> w := "aabaacaad";
"aabaacaad"
gap> StringToWord(w);
112113114 ]
gap> w;
"aabaacaad"
gap> w := "3a5bz!";
"3a5bz!"
gap> StringToWord(w);
123456 ]
gap> w := "xyab77x";
"xyab77x"
gap> StringToWord(w);
1234551 ]
gap> StringToWord("");
[  ]
gap> StringToWord("a");
1 ]

#
gap> SEMIGROUPS.StopTest();
gap> STOP_TEST("Semigroups package: standard/fp/word.tst");

[Dauer der Verarbeitung: 0.14 Sekunden, vorverarbeitet 2026-06-17]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik