diff --git a/Sources/TestKit2/Expect+Text.swift b/Sources/TestKit2/Expect+Text.swift index a3d63489..6c749df0 100644 --- a/Sources/TestKit2/Expect+Text.swift +++ b/Sources/TestKit2/Expect+Text.swift @@ -22,19 +22,3 @@ import CoreKit #expect(input.description == expectation, sourceLocation: location) #expect(String(describing: input) == expectation, sourceLocation: location) } - -//*============================================================================* -// MARK: * Expect x Text x Integers -//*============================================================================* - -/// Tests whether an integer's description is stable. -@inlinable public func Ɣexpect( - _ format: TextInt, - bidirectional integer: T, - at location: SourceLocation = #_sourceLocation -) throws where T: BinaryInteger { - - let encoded = integer.description(as: format) - let decoded = try T.init(encoded, as: format) - #expect(decoded == integer, "BinaryInteger/description(_:as:) then BinaryInteger.init(_:as:)", sourceLocation: location) -} diff --git a/Tests/CoreKitTests/CoreInt+Text.swift b/Tests/CoreKitTests/CoreInt+Text.swift deleted file mode 100644 index a425dfbc..00000000 --- a/Tests/CoreKitTests/CoreInt+Text.swift +++ /dev/null @@ -1,59 +0,0 @@ -//=----------------------------------------------------------------------------= -// This source file is part of the Ultimathnum open source project. -// -// Copyright (c) 2023 Oscar Byström Ericsson -// Licensed under Apache License, Version 2.0 -// -// See http://www.apache.org/licenses/LICENSE-2.0 for license information. -//=----------------------------------------------------------------------------= - -import CoreKit -import DoubleIntKit -import TestKit - -//*============================================================================* -// MARK: * Core Int x Text -//*============================================================================* - -extension CoreIntTests { - - //=------------------------------------------------------------------------= - // MARK: Tests x Pyramids - //=------------------------------------------------------------------------= - - func testDescriptionByBaseNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - for radix: UX in 2 ... 36 { - Test().descriptionByBaseNumeralPyramid(T.self, radix: radix) - } - } - - for type in Self.types { - whereIs(type) - } - } - - func testDescriptionByEachNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - for radix: UX in 2 ... 36 { - Test().descriptionByEachNumeralPyramid(T.self, radix: radix) - } - } - - for type in Self.types { - whereIs(type) - } - } - - func testDescriptionByHighNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - for radix: UX in 2 ... 36 { - Test().descriptionByHighNumeralPyramid(T.self, radix: radix) - } - } - - for type in Self.types { - whereIs(type) - } - } -} diff --git a/Tests/DoubleIntKitTests/DoubleInt+Text.swift b/Tests/DoubleIntKitTests/DoubleInt+Text.swift deleted file mode 100644 index d2b3b198..00000000 --- a/Tests/DoubleIntKitTests/DoubleInt+Text.swift +++ /dev/null @@ -1,74 +0,0 @@ -//=----------------------------------------------------------------------------= -// This source file is part of the Ultimathnum open source project. -// -// Copyright (c) 2023 Oscar Byström Ericsson -// Licensed under Apache License, Version 2.0 -// -// See http://www.apache.org/licenses/LICENSE-2.0 for license information. -//=----------------------------------------------------------------------------= - -import CoreKit -import DoubleIntKit -import TestKit - -//*============================================================================* -// MARK: * Double Int x Text -//*============================================================================* - -extension DoubleIntTests { - - //=------------------------------------------------------------------------= - // MARK: Tests x Pyramids - //=------------------------------------------------------------------------= - - func testDescriptionByBaseNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - #if DEBUG - Test().descriptionByBaseNumeralPyramid(T.self, radix: 10) - Test().descriptionByBaseNumeralPyramid(T.self, radix: 16) - #else - for radix: UX in 2 ... 36 { - Test().descriptionByBaseNumeralPyramid(T.self, radix: radix) - } - #endif - } - - for type in Self.types { - whereIs(type) - } - } - - func testDescriptionByEachNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - #if DEBUG - Test().descriptionByEachNumeralPyramid(T.self, radix: 10) - Test().descriptionByEachNumeralPyramid(T.self, radix: 16) - #else - for radix: UX in 2 ... 36 { - Test().descriptionByEachNumeralPyramid(T.self, radix: radix) - } - #endif - } - - for type in Self.types { - whereIs(type) - } - } - - func testDescriptionByHighNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - #if DEBUG - Test().descriptionByHighNumeralPyramid(T.self, radix: 10) - Test().descriptionByHighNumeralPyramid(T.self, radix: 16) - #else - for radix: UX in 2 ... 36 { - Test().descriptionByHighNumeralPyramid(T.self, radix: radix) - } - #endif - } - - for type in Self.types { - whereIs(type) - } - } -} diff --git a/Tests/InfiniIntKitTests/InfiniInt+Text.swift b/Tests/InfiniIntKitTests/InfiniInt+Text.swift deleted file mode 100644 index 067c938a..00000000 --- a/Tests/InfiniIntKitTests/InfiniInt+Text.swift +++ /dev/null @@ -1,1125 +0,0 @@ -//=----------------------------------------------------------------------------= -// This source file is part of the Ultimathnum open source project. -// -// Copyright (c) 2023 Oscar Byström Ericsson -// Licensed under Apache License, Version 2.0 -// -// See http://www.apache.org/licenses/LICENSE-2.0 for license information. -//=----------------------------------------------------------------------------= - -import CoreKit -import InfiniIntKit -import TestKit - -//*============================================================================* -// MARK: * Infini Int x Text -//*============================================================================* - -extension InfiniIntTests { - - //=------------------------------------------------------------------------= - // MARK: Tests - //=------------------------------------------------------------------------= - - func testTextForEachRadixWhereIs1s0s() { - func whereIsSigned(_ type: T.Type) where T: SignedInteger { - for radix: UX in 2 ... 36 { - Test().description(~0 as T, radix: radix, body: "-1") - Test().description( 0 as T, radix: radix, body: "0") - Test().description( 1 as T, radix: radix, body: "1") - } - } - - func whereIsUnsigned(_ type: T.Type) where T: UnsignedInteger { - for radix: UX in 2 ... 36 { - Test().description(~1 as T, radix: radix, body: "&1") - Test().description(~0 as T, radix: radix, body: "&0") - Test().description( 0 as T, radix: radix, body: "0") - Test().description( 1 as T, radix: radix, body: "1") - } - } - - for type in Self.typesWhereIsSigned { - whereIsSigned(type) - } - - for type in Self.typesWhereIsUnsigned { - whereIsUnsigned(type) - } - } - - //=------------------------------------------------------------------------= - // MARK: Tests x Pyramids - //=------------------------------------------------------------------------= - - func testDescriptionByBaseNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - #if DEBUG - Test().descriptionByBaseNumeralPyramid(T.self, radix: 10, limit: 64) - Test().descriptionByBaseNumeralPyramid(T.self, radix: 16, limit: 64) - #else - for radix: UX in 2 ... 36 { - Test().descriptionByBaseNumeralPyramid(T.self, radix: radix, limit: 64) - } - #endif - } - - for type in Self.types { - whereIs(type) - } - } - - func testDescriptionByEachNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - #if DEBUG - Test().descriptionByEachNumeralPyramid(T.self, radix: 10, limit: 64) - Test().descriptionByEachNumeralPyramid(T.self, radix: 16, limit: 64) - #else - for radix: UX in 2 ... 36 { - Test().descriptionByEachNumeralPyramid(T.self, radix: radix, limit: 64) - } - #endif - } - - for type in Self.types { - whereIs(type) - } - } - - func testDescriptionByHighNumeralPyramid() { - func whereIs(_ type: T.Type) where T: BinaryInteger { - #if DEBUG - Test().descriptionByHighNumeralPyramid(T.self, radix: 10, limit: 64) - Test().descriptionByHighNumeralPyramid(T.self, radix: 16, limit: 64) - #else - for radix: UX in 2 ... 36 { - Test().descriptionByHighNumeralPyramid(T.self, radix: radix, limit: 64) - } - #endif - } - - for type in Self.types { - whereIs(type) - } - } -} - -//=----------------------------------------------------------------------------= -// MARK: + For Each Radix -//=----------------------------------------------------------------------------= - -final class InfiniIntTestsOnText: XCTestCase { - - //=------------------------------------------------------------------------= - // MARK: State - //=------------------------------------------------------------------------= - - /// The bit pattern: `0xfffefdfcfbfaf9f8...0706050403020100`. - static let ascending = UXL(Array(U8.min...U8.max)) - - /// The bit pattern: `0x0001020304050607...f8f9fafbfcfdfeff`. - static let descending = UXL(Array(U8.min...U8.max).reversed()) - - //=------------------------------------------------------------------------= - // MARK: Tests x Ascending, Descending - //=------------------------------------------------------------------------= - - func testGenerateInstancesTryRoundtrip() throws { - #if DEBUG - throw XCTSkip("req. release mode") - #else - var magnitudes: [UXL] = [] - - for x in [Self.ascending, Self.descending] { - magnitudes.append(x) - magnitudes.append(x.toggled()) - } - - for i in magnitudes.indices[..<2] { - for j in magnitudes.indices[2..<4] { - magnitudes.append(magnitudes[i] &* magnitudes[j]) - magnitudes.append(magnitudes[i] &+ magnitudes[j]) - magnitudes.append(magnitudes[i] &- magnitudes[j]) - } - } - - func whereIs(_ type: T.Type) where T: BinaryInteger { - for x in magnitudes.lazy.map(T.init(load:)) { - for radix: UX in 2 ... 36 { - Test().description(roundtripping: x, radix: radix) - } - } - } - - for type in InfiniIntTests.types { - whereIs(type) - } - #endif - } - - //=------------------------------------------------------------------------= - // MARK: Tests x Ascending, Descending - //=------------------------------------------------------------------------= - - func test02() { - Test().description(Self.ascending, radix: 02, body: """ - 1111111111111110111111011111110011111011111110101111100111111000\ - 1111011111110110111101011111010011110011111100101111000111110000\ - 1110111111101110111011011110110011101011111010101110100111101000\ - 1110011111100110111001011110010011100011111000101110000111100000\ - 1101111111011110110111011101110011011011110110101101100111011000\ - 1101011111010110110101011101010011010011110100101101000111010000\ - 1100111111001110110011011100110011001011110010101100100111001000\ - 1100011111000110110001011100010011000011110000101100000111000000\ - 1011111110111110101111011011110010111011101110101011100110111000\ - 1011011110110110101101011011010010110011101100101011000110110000\ - 1010111110101110101011011010110010101011101010101010100110101000\ - 1010011110100110101001011010010010100011101000101010000110100000\ - 1001111110011110100111011001110010011011100110101001100110011000\ - 1001011110010110100101011001010010010011100100101001000110010000\ - 1000111110001110100011011000110010001011100010101000100110001000\ - 1000011110000110100001011000010010000011100000101000000110000000\ - 0111111101111110011111010111110001111011011110100111100101111000\ - 0111011101110110011101010111010001110011011100100111000101110000\ - 0110111101101110011011010110110001101011011010100110100101101000\ - 0110011101100110011001010110010001100011011000100110000101100000\ - 0101111101011110010111010101110001011011010110100101100101011000\ - 0101011101010110010101010101010001010011010100100101000101010000\ - 0100111101001110010011010100110001001011010010100100100101001000\ - 0100011101000110010001010100010001000011010000100100000101000000\ - 0011111100111110001111010011110000111011001110100011100100111000\ - 0011011100110110001101010011010000110011001100100011000100110000\ - 0010111100101110001011010010110000101011001010100010100100101000\ - 0010011100100110001001010010010000100011001000100010000100100000\ - 0001111100011110000111010001110000011011000110100001100100011000\ - 0001011100010110000101010001010000010011000100100001000100010000\ - 0000111100001110000011010000110000001011000010100000100100001000\ - 0000011100000110000001010000010000000011000000100000000100000000 - """) - - Test().description(Self.descending, radix: 02, body: """ - 0000000000000001000000100000001100000100000001010000011000000111\ - 0000100000001001000010100000101100001100000011010000111000001111\ - 0001000000010001000100100001001100010100000101010001011000010111\ - 0001100000011001000110100001101100011100000111010001111000011111\ - 0010000000100001001000100010001100100100001001010010011000100111\ - 0010100000101001001010100010101100101100001011010010111000101111\ - 0011000000110001001100100011001100110100001101010011011000110111\ - 0011100000111001001110100011101100111100001111010011111000111111\ - 0100000001000001010000100100001101000100010001010100011001000111\ - 0100100001001001010010100100101101001100010011010100111001001111\ - 0101000001010001010100100101001101010100010101010101011001010111\ - 0101100001011001010110100101101101011100010111010101111001011111\ - 0110000001100001011000100110001101100100011001010110011001100111\ - 0110100001101001011010100110101101101100011011010110111001101111\ - 0111000001110001011100100111001101110100011101010111011001110111\ - 0111100001111001011110100111101101111100011111010111111001111111\ - 1000000010000001100000101000001110000100100001011000011010000111\ - 1000100010001001100010101000101110001100100011011000111010001111\ - 1001000010010001100100101001001110010100100101011001011010010111\ - 1001100010011001100110101001101110011100100111011001111010011111\ - 1010000010100001101000101010001110100100101001011010011010100111\ - 1010100010101001101010101010101110101100101011011010111010101111\ - 1011000010110001101100101011001110110100101101011011011010110111\ - 1011100010111001101110101011101110111100101111011011111010111111\ - 1100000011000001110000101100001111000100110001011100011011000111\ - 1100100011001001110010101100101111001100110011011100111011001111\ - 1101000011010001110100101101001111010100110101011101011011010111\ - 1101100011011001110110101101101111011100110111011101111011011111\ - 1110000011100001111000101110001111100100111001011110011011100111\ - 1110100011101001111010101110101111101100111011011110111011101111\ - 1111000011110001111100101111001111110100111101011111011011110111\ - 1111100011111001111110101111101111111100111111011111111011111111 - """) - } - - func test03() { - Test().description(Self.ascending, radix: 03, body: """ - 0000000000000000000000000000000000000000000000000001011122001202\ - 0221000010120021121012122122121210201121000021000121212010111102\ - 0021022202211121121121221212000020201221122210202201001002201010\ - 0210001212020121021021121001210100100102120102122200201001202102\ - 2220222111112021200221211122210111211012110122021212001101101012\ - 0200211111121022021211100122022012211112112221002121112202200001\ - 1001122202020122210212021001020200222212112100211020020010002221\ - 0111000010011011101010021210201220102122102122212202102012220100\ - 0111020201112002211002010001100110020220111111012101100222010221\ - 0010122122022201020000102121202021200201200211001212202010110021\ - 2001010202202101112000210220201111022010220200012021000020111021\ - 2201012002120201120221122221012002222200122120210000120121000201\ - 2012211022021200001122102120002110221102210110111021200002120202\ - 2010012002002102202002201200210100102202220110101222010000222022\ - 0200112200201010002020101100200110010000000002001202111210200020\ - 0002120001222001110002220220221011110011011012201210101122122001\ - 2111021020102211121020000002111101220000201210122212002012102220\ - 1110200122122112012100001022010221010222101020220010000121012012\ - 0010010122111111120110221020002211102201221020121121212111201100\ - 0200121221120002212120101220100120101121122112221220012112011121\ - 0121001121010221102001120121101000020200001000211102020110221110 - """) - - Test().description(Self.descending, radix: 03, body: """ - 0000000000000000000000000000000000000000000000000000000000000100\ - 1201120210220100110000101022020200210120211212120010111000100200\ - 1201120210200222221112211112120122111002022121212221220020020021\ - 1211112200121202200221110201112022200111011002001111211001001210\ - 2220102000012100211210021120211221200212210011220221221210221212\ - 2222022220122111000220122201210100221211021220102010112022011111\ - 0121021201001110200122102112201202022222200221000101120200212101\ - 1010021021022221120101211200201110000211111122201202020202110221\ - 0022120111200020110102012011210110000211200010220002101111120101\ - 1221102201020120002022010122120111111211222012011211212110222012\ - 1202220212201211110122201021001011010112010211112010202102100001\ - 1201212220101111022210120202211012001102022221101101221222200111\ - 0101010020020220000112200212022001021010021100102210101022210211\ - 1202021010021102110001202120201000202122002011122102011220111101\ - 1012211121220210021002212210112100210201120111010221022120001212\ - 1222110100200211122221210100020221110011222001202222000211010100\ - 1122110212221111011200112012012002220201002201222110102200111201\ - 0111111101220210011222012010020001021121201122201012021221210210\ - 2110011012222121222020020212110121100210220002222011101221021021\ - 0112202220101220011210212011210102200110100021221220200201110011\ - 0022000111200121201021102000112221002012210222221221112222201100 - """) - } - - func test04() { - Test().description(Self.ascending, radix: 04, body: """ - 3333333233313330332333223321332033133312331133103303330233013300\ - 3233323232313230322332223221322032133212321132103203320232013200\ - 3133313231313130312331223121312031133112311131103103310231013100\ - 3033303230313030302330223021302030133012301130103003300230013000\ - 2333233223312330232323222321232023132312231123102303230223012300\ - 2233223222312230222322222221222022132212221122102203220222012200\ - 2133213221312130212321222121212021132112211121102103210221012100\ - 2033203220312030202320222021202020132012201120102003200220012000\ - 1333133213311330132313221321132013131312131113101303130213011300\ - 1233123212311230122312221221122012131212121112101203120212011200\ - 1133113211311130112311221121112011131112111111101103110211011100\ - 1033103210311030102310221021102010131012101110101003100210011000\ - 0333033203310330032303220321032003130312031103100303030203010300\ - 0233023202310230022302220221022002130212021102100203020202010200\ - 0133013201310130012301220121012001130112011101100103010201010100\ - 0033003200310030002300220021002000130012001100100003000200010000 - """) - - Test().description(Self.descending, radix: 04, body: """ - 0000000100020003001000110012001300200021002200230030003100320033\ - 0100010101020103011001110112011301200121012201230130013101320133\ - 0200020102020203021002110212021302200221022202230230023102320233\ - 0300030103020303031003110312031303200321032203230330033103320333\ - 1000100110021003101010111012101310201021102210231030103110321033\ - 1100110111021103111011111112111311201121112211231130113111321133\ - 1200120112021203121012111212121312201221122212231230123112321233\ - 1300130113021303131013111312131313201321132213231330133113321333\ - 2000200120022003201020112012201320202021202220232030203120322033\ - 2100210121022103211021112112211321202121212221232130213121322133\ - 2200220122022203221022112212221322202221222222232230223122322233\ - 2300230123022303231023112312231323202321232223232330233123322333\ - 3000300130023003301030113012301330203021302230233030303130323033\ - 3100310131023103311031113112311331203121312231233130313131323133\ - 3200320132023203321032113212321332203221322232233230323132323233\ - 3300330133023303331033113312331333203321332233233330333133323333 - """) - } - - func test05() { - Test().description(Self.ascending, radix: 05, body: """ - 0000000000000101011133132112303401331203113040334201212224114333\ - 1331210120311431302322401423134214144114302234223323124032013102\ - 2031310012312133044114114101403342401111141021424131121343010430\ - 1421121331201040013433442113440322214443111221044313323014144300\ - 0442200211013021440424413104144331034304433134022344442034220120\ - 0203022440403030041413132134201411232022143440134130244204021202\ - 4204221131331321003014044044023244032003434441023101312044413410\ - 1432032422222011101300422133144024022310244143301333333131313132\ - 1133101212222113330424040311111134211430243400332404421303012024\ - 3301033334140414340340314003013204313402213301322411212023034201\ - 2004134224142103031424130211110200431412144004241140022344304021\ - 2024422012034413242431014044023232132211032301042413413421403001\ - 0304124320331131120040124432124112202220433320304324003340021343\ - 1324223134224004424011000321223301220134021034313232023030324130 - """) - - Test().description(Self.descending, radix: 05, body: """ - 0000000000000000000011112220410043202330011120133410031040004330\ - 4341221403222404433322102144041223114211314323343204434113224023\ - 4202133231041330002312141443032100300431040042214130113344324022\ - 0003033132111304421001413014203324242214223404240341232242231142\ - 3340214011113104001131004242024004221443142132444122344311101242\ - 1004023141340203330402132300004344144322442200321404111130230232\ - 3133343130231214411012031114143432214413020420233100440220432423\ - 2243141404410214044100142011212104313004030243322344322310333323\ - 3024401130130344314420430011223234330142032224324334134040231223\ - 3411402203220101304223402340422200404331110030013243131121203033\ - 4421222201121212122344111102000123003033403313011113442344310321\ - 0212040323210123133413431243330144102203032410432301243134312231\ - 0222420103420141120210200140403304423210100101323244203323144103\ - 2244421302202340120224210321141312243002114134133313000033010430 - """) - } - - func test06() { - Test().description(Self.ascending, radix: 06, body: """ - 0000000000000000000000000000000000000001345131000552333115344121\ - 1214023443243324324333122442522233415252532225231130540122100214\ - 0215244235522514322330122325410454305413105211242412413243515420\ - 4031415411205525200543134520405500520504130422250301225525122255\ - 5304444554221253253024400132115002405214044033240245530335422552\ - 3230145401344324044315001345525133204253014235441544150342233311\ - 3102525333433242251435152053450224205545410400155320525214003341\ - 0114031334552553523440515235201104055151034451040431352324424022\ - 3220325011454332550413335135033252231132320134203510232401355331\ - 2020345410240441033104340125314154522445134135421334244051303551\ - 0152420450032004440445510515505305150554300514513545121304233402\ - 1512140511314534242423200345252352143342420322435054213022035002\ - 4325250215312305241230104233141315022325103343150130404400523320 - """) - - Test().description(Self.descending, radix: 06, body: """ - 0000000000000000000000000000000000000000000001101244524030103050\ - 5531042315523235333525101305553312125110054220232435524352224142\ - 2053151321544434335040524214255145034313244420015104114444532130\ - 5131211403354545331043000404415555115552254524500234324052054544\ - 0212530234155222352503522355044401441443444123253343143251424324\ - 4134551510104424455502335515404533114302125220421213020520110411\ - 1504043310005143320344204330350455513552351141214450322440103324\ - 3125500135505231115445012513503141220340440111403544321144410454\ - 4434544550051012214002454222455235433415531502214521123242404320\ - 4014321430553334134451431214532201142053235043445501013550154325\ - 3024252321100454253441131350205155431304043512204000014004531004\ - 2034152112152200254215340255540550522204504133200444140500531431\ - 2233041532325315013225020141304435140311224252411541420101544143 - """) - } - - func test07() { - Test().description(Self.ascending, radix: 07, body: """ - 0000000000000000000000000000000000000024653320130023336353601340\ - 0355512020400135330313404163116323361665214341655231546035543041\ - 3335061463602013225153316300026621432263543366545536433610205024\ - 3003025201644424044635410411626456311635136110623401315661102442\ - 0612331166566162241453601510216450625624416556453020643500526255\ - 4225530231005403046503563131246643640004650324634650424453045323\ - 3644226261554166110441022133064452150660600363500515360604100635\ - 1324126506201641562342434011560236352122640326266120664210323233\ - 2635011020024026201015103132011050236605005335425545336151120104\ - 5113112534231011226633116051366211215560241650222456652010032225\ - 3614546631516640255632303266244531025632554125633416523166131412\ - 3533422165650541466015660324101553116436025240606246521266532034 - """) - - Test().description(Self.descending, radix: 07, body: """ - 0000000000000000000000000000000000000000000046215156341104144413\ - 6064621423661545444654615066360306060465143246516123400132545065\ - 2014515155412342351261361320435321015260445542345153424665323461\ - 0114416030513346553314263163630631425445505265616243343122362104\ - 2000460423064644315166540105254001105315016506520645232434362254\ - 4331411646406403010516610221633665334030662154232055411300246353\ - 0310563254056060056622336540260033560331003320163152232604433135\ - 4164235460542041401510521102142062156431435343046560332465042201\ - 6511235106510212216314244536164605241220642565660111156412634233\ - 6556106632453464235621424215600534606530001631160211606003002230\ - 1611605222100443162203206534603240202153655435353545022116362124\ - 6026410120242432506346633405306601261561020623142104244113610216 - """) - } - - func test08() { - Test().description(Self.ascending, radix: 08, body: """ - 0000000000000000000003777757677476775371761737667537236374570760\ - 7376735573165752723643477156274470761341701577366735633366554730\ - 6575332565151722643503176354671462745311621437066134230360540700\ - 5773727557135672563342675553266454731261541276565332625352524650\ - 5172324551121642503202374751663446715231461136264531222344510620\ - 4370721543105612423042074150260440701201400775763727617336474570\ - 3567316535071562342701573346655432665151320635463126214330460540\ - 2765713527055532262541272545252424651121240475162324611322444510\ - 2164310521041502202400771743647416635071160334661523206314430460\ - 1362705513025452122240471142244410621041100174360721603306414430\ - 0561302505011422042100170340641402605011020034060120200300400400 - """) - - Test().description(Self.descending, radix: 08, body: """ - 0000000000000000000000000020100301002406016040110240541403207017\ - 0401042204612025054134300621503307016436076200411042144411223047\ - 1202445212626055134274601423106315032466156340711643547417237077\ - 2004050220642105214435102224511323046516236501212445152425253127\ - 2605453226656135274575403026114331062546316641513246555433267157\ - 3407056234672165354735703627517337076576377002014050160441303207\ - 4210461242706215435076204431122345112626457142314651563447317237\ - 5012064250722245515236505232525353126656537302615453166455333267\ - 5613467256736275575377006034130361142706617443116254571463347317\ - 6415072264752325655537306635533367156736677603417056174471363347\ - 7216475272766355735677607437136375172766757743717657577477377377 - """) - } - - func test09() { - Test().description(Self.ascending, radix: 09, body: """ - 0000000000000000000000000000000000000000000000000000000001148052\ - 2700350753557855364700701776344207282747547855006657583681032633\ - 2305521723753171031251258063167286874467627748714735418255041335\ - 2074453825431826574548707748260131582218725231220885470736203087\ - 1400313433325365637837878236581014221462732101313226444171328127\ - 0357828120037766762162405566340761122671460726644263820167006437\ - 8116252152758716288057670051702165738250048376073842713437602522\ - 6316207266265071038281335810086820480633066340613100002052453606\ - 0250186140282683440413565334856174236384536002441800653585065386\ - 4361857517003812712833680301716503118444513836084381836547774640\ - 2055750277635631634757585617514717047127361517330220030742213843 - """) - - Test().description(Self.descending, radix: 09, body: """ - 0000000000000000000000000000000000000000000000000000000000000010\ - 5152381040033822071675550343032051523628845745518432277787806207\ - 5448055262742146861413204473105386360170753246757625704827853855\ - 8828657402658171085425636346814417251043618375652288627011520771\ - 3323728751175064302444865222242708514606412164713024603802344511\ - 5738121606811851445486515477386552825654418637034115124463672301\ - 5178634428352273504228734185861411106226015625261233240383338724\ - 5223324240167663067806457215644135747823232783470721514127276055\ - 5841062458771022740486168802411048425844150465162821081873380451\ - 1444182315816320124764863525772373135877866225417323802864357237\ - 1568635615376471261330785662140408014617637360487065728857488640 - """) - } - - func test10() { - Test().description(Self.ascending, radix: 10, body: """ - 0000000000000000000000032316509077753586139510713445660514514047\ - 1715800934968659014776021432245405574123404729692361840203777454\ - 0863807743939745614194869975427379141886998502749960224378577364\ - 6750786158629119897527698459159582903277348091197804306308450975\ - 2765897157258671077139706248797954495766510537726453385451362891\ - 2932640350906509210810910107747204614412263847494852734365334510\ - 5797020149055603954704727773430317796884279167058635246262041734\ - 9145786264563977273862044757186140910253489061210709169291375411\ - 8235589361595220880511748744523688475088623430039909767486996242\ - 6348425792929710270231641017897005896324246640151098893336183040 - """) - - Test().description(Self.descending, radix: 10, body: """ - 0000000000000000000000000000496993557421161204163243009437446396\ - 9310896219871662288678253814305983104785527242321753388930859433\ - 0932284445862203797761045073664730366928240142078351838709159365\ - 4245305591568630492124408336898055480790220185594414336311305186\ - 5615046227503033628676752271565095933109248377684204700624161099\ - 9460398201284924128155924134321292864244193101990764869167297695\ - 2280785510275422238003732540719940795979897949667308357456420122\ - 4430197246959039185181992218946191962058782195636399032805876159\ - 1937103770751746973746316925269816124638211869823911785029642701\ - 0987117809205722959373004300581599055823946915702512166260047615 - """) - } - - func test11() { - Test().description(Self.ascending, radix: 11, body: """ - 0000000000000000000000000000000000000000000000010142aa3554859615\ - 1a9204496a56113782737a0530594194878213854265484228a2873210376102\ - 298531554729267773485a52aaa2030350391963a7a0a94819183a184061767a\ - a1664196a92a29124a90906677a6159283540713930a23461662230751976003\ - 75aa406a38a465902249a525645153a635a40a420899916a90a1749213325274\ - 6766792593268189a459a23695332111336a2574023146139a17034537465a24\ - 8967a2a50a37a69914126a360951448575372782095382a02084543002870940\ - 85532153a572629110a97679073778890291691419a246a95a6016478938298a\ - 358425533763a551898a379424822a252aa411a696485496052a6871743a226a\ - 8989647385195622111666334615228957638330392039898693611430034583 - """) - - Test().description(Self.descending, radix: 11, body: """ - 0000000000000000000000000000000000000000000000000000256148a85586\ - 5197664763a413508459939466315799165a6237763aa375593223a736658a62\ - 6175a059a7751a78641a7a475619616477939520a087332893696097491542a0\ - 32141834910a431662128201852a11559a110337a57054a296643718815a7a80\ - 48479962aa316851a2904aa35279872922828167a735214a27215a821861a384\ - 99815a0961a3737601288254235997668057936329799a941615802815674803\ - 25786a7644882756447532455a8a3a35981a95a6909a13497286502490619a17\ - 1a77888724a210a717362256366a598950960902066765804a99481685943069\ - 59110458713a51298801a11123297018992a5501098a28a26006692109193391\ - a16a79092aa045204411a34032199992178aa6827439a86a4a1162545251105a - """) - } - - func test12() { - Test().description(Self.ascending, radix: 12, body: """ - 00001b9367266a6039066116339183036aaa985742938485bbb3a46470645276\ - 569234baa5161788742348681a4a5b25ba61622633b09273b03b9aaa7514aa58\ - 900baa9a74852ab0219481b21a86a3153bab534868478662a6191b1659b54964\ - ab9654b6430343071b655848847330017058b16480bb191b0985b8521152b521\ - 563996041b3a74992b7126029326661485b6632a381a4ab4a820460396996731\ - 1955a0b949642455a94aa27512b620a30373879b06207879078319104b12b4b9\ - b2ba94a962459429a746627b83089334822b767922152b60a66b497450a07244\ - b845b1558994981851b953005363a121880435bb95b546ab1558447212026a12\ - 954b5492aa0367a34a0a961a50ba9a07b6279269932a4957a644a2a3a3920540 - """) - - Test().description(Self.descending, radix: 12, body: """ - 00000000076b918968899b991b3a0b667713391937b3bb902301ab6145a77307\ - 44a2b60b437594576b487310178a094b5808bb63727175a001311367a6b15b60\ - a32b64505a7714b4726537456122412432166973a068b703039439a92559b5b6\ - 5b0a431247a475b7b73780620429b5646b5980809950201652a5a17013a53004\ - 9278712658818566b19311073b683072337992902a246221355872288749aa1a\ - 8b591341aaba72b3b98a0799b919741387205aa722a5a05582862a92506ba89b\ - a307a1a27768ba2575796b18278b74a250523680499a1a60492b1910ba644782\ - 6784970931559000310546aba16a418a4827544331254b700900bb405448b2a4\ - 4b093020088bb2535b47963b7b44608a93421b127bb07b00246477a7b8115053 - """) - } - - func test13() { - Test().description(Self.ascending, radix: 13, body: """ - 000000000000000000000031cb7486735908c0144bc1018ac182c82a930a12ca\ - 74aa7825455c0218a1479ca12843cb94baa0938378c1c8384b19b34340a64b01\ - 4c927b86217b9a059379c40089c4314b035b5c702c8371c7c80104445bc99b56\ - 057a91abc9acb1bc37950647b72045a5a647587b15c865bb75c2380191829a66\ - 04a1184400818b29b9513b8c59490494649a18069b449c472c2366c76a2ca852\ - 5096cc27207409700b2a636668139b428455c9a6ac67131b4589833577743c3a\ - 7a091a293275c628b8a06625cb2a15734b58b3a57163a48014a7a5c277499614\ - 79955285c36bc06b629543773288158648aa581166a042608899014254840857\ - 15273b93212a908443abc9abc7929ba5810113319924a7468970130052605289 - """) - - Test().description(Self.descending, radix: 13, body: """ - 000000000000000000000000001500b062c1244a5ca682353200a96937353c93\ - 73069a0b203a0697c45513ab9487a7205bb57cc5c425a5c032a2474a01bc3aa7\ - 7990173264abb8b83613121b5528156c4048b81422ac426709bccc65a508b4cb\ - 132b977345a9202198a9c32785c770890b69240b96ca5b132b8b9b817411a933\ - 4b72342699707c6b5c874c92ab31903c758988696cca9690145b772b03085bc3\ - 169a4bc0c135baab68558c0798367ba3406b38007b90c8885160454934686c89\ - 4cb56950cba1887a6a20b95b1c99c6b275100512542006c230c4193161a27012\ - 95b489091b11513a7b6aa93691a756cb65c77ca95668543158b357ca8ab95a44\ - a00348774316caaac9b21502a3302702c852a8bb56b24b5400628a24276750bc - """) - } - - func test14() { - Test().description(Self.ascending, radix: 14, body: """ - 00000000000000000000000000000000000000ad0745312ac38003406c77772a\ - c5d337dc56d71b0120a8035c347cd412ba206c7a19b3638983ad6c7dac8866db\ - ad3165c94d93a13248c199cda6773520749b9430c797c2bb0d8ca867ba5a063b\ - 83d226939c0cbd8ab945b687021c84a90d7ba0d68cd37869a55260d1d780666b\ - 0b6a3a99600cd5b1d80b84cc30bd74702723a1126cbdb5a42c285669194da766\ - c63c8d6d1aad3cc15dda115b2445580577049b2b7b818a839a3d0713a25586d3\ - 109b2a74bb9cb5947074d06003a7d8559a8ab638c511c84c158d5c7033b7385d\ - 777b7d6c35b83b7c4a497aa9b859dc77b943581b1799d547b62548548666b945\ - 8d240951c39596c82589a5602b65a7c3b356a46269456953341674c2567b81c4 - """) - - Test().description(Self.descending, radix: 14, body: """ - 000000000000000000000000000000000000000000665b20da8c012072742a9c\ - a5cd039c351d1954c650a78d38b82408a4277196aba9762211d09d8cd8b0d860\ - 6a3a66d5813834054475593121b4b9b0413200c31c0a2b0dba384d9032706145\ - d308b314144dacdd01dd8587897b13064dbc82a519ca81a734516c2298c2880a\ - 78c76978d6386d10859b60bb745899c01badadda1999d5b791193187c567c0a8\ - 32a2abc1cd43d1c3560bba8d56b67cab62bcd597b554a3d9b2ac51adc018d6cc\ - 80c0126414d43729179abd98859db7a875258b438c6b3a2a285d3786ddb0ad49\ - 5ba3add41a36735295c13053243d4a14dd747ac3353a4dd77b9314a9c9a79560\ - 6101643ad12c8242bac710666c8139696c146dd4da84974da56d48c94dbb007d - """) - } - - func test15() { - Test().description(Self.ascending, radix: 15, body: """ - 0000000000000000000000000000000000000000000000000001adcc42d77564\ - 2e8d25576598e679706b39b634284eb4323514682a6a176bc422a0b453010958\ - 11db137066d571a2b91ec47eb29e5870c08bb8759a29eae1e60de477c04c2c97\ - a272774aaa2573b20764ea2a18c62d7c3660ec0387a7b658d71e5d9dc14245d0\ - 163d05e294dac37d9a00339a9b41ee29b3c604d4350739ee6c2617a77c226325\ - 8d6ca4cd40eb15b65a6341963a35035c8441616e6c21e1ec9d1bd1e3ed0a7c5b\ - 349c68802a1365081776371784a3c99b4ab7774eaa850176c7e9d1c8cda75827\ - 5e4ab4757030038b383714cd32c87c560ab2ecb8d102219ec16d0616544bcb2b\ - 651732d918a54ee364a155a488725ac7ce563e994b90e86e485ad50d52e0aab0 - """) - - Test().description(Self.descending, radix: 15, body: """ - 0000000000000000000000000000000000000000000000000000000152b2d1a6\ - b8a8c0121657243d73087ce18b51dc75b4205004346095046c5560a817deba1c\ - d4a5a3105bc83eb096390746c90c20224a8317a34198e7cb73c7e970c60b5c74\ - 6a7d68177d9dd4e2c75c15d13b1646d63a900d38b4dc5286319dbb87c4a62e54\ - bd6d6d4d86509dd7036a27ab6d0bb6807483e90ebc70d57282906edbb53123b3\ - 9129135e549279d96ae4b2a1c7147cc03e4b73a279854b5d2a009b6de5301ad4\ - 059d1ae0989433c36c9bbee5a3645c426e40848de409cd82d902da7de45c0bb2\ - ab154e42536bca71849298d982c69e34e86a6a8b20990845809947073d753ba4\ - 370db27a2d22de47e12ab6e298b283e65b3d8b42e273650b315020dc1aa22960 - """) - } - - func test16() { - Test().description(Self.ascending, radix: 16, body: """ - fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0\ - dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0\ - bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a0\ - 9f9e9d9c9b9a999897969594939291908f8e8d8c8b8a89888786858483828180\ - 7f7e7d7c7b7a797877767574737271706f6e6d6c6b6a69686766656463626160\ - 5f5e5d5c5b5a595857565554535251504f4e4d4c4b4a49484746454443424140\ - 3f3e3d3c3b3a393837363534333231302f2e2d2c2b2a29282726252423222120\ - 1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 - """) - - Test().description(Self.descending, radix: 16, body: """ - 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\ - 202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f\ - 404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f\ - 606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f\ - 808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f\ - a0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf\ - c0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf\ - e0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff - """) - } - - func test17() { - Test().description(Self.ascending, radix: 17, body: """ - 0000000000124b16c3g69bbbag36b77367c8366826a1260aafe896c41e5bebd6\ - eff1edf76b5c850269d547g2993fg898a7eg88g8db235g6c407d4898b5a17d05\ - 9g1d0fc9bgf991cagd36gae0bag2bg730e02b8265dg2e55825g7cdfe2fgedcg1\ - ba3dcc62916e6d11ggf6c160e48154efaf86ce618584dba7d1049ge226f62945\ - cgde056dffgb718cb2211bg5g72g77d5agd7e6b055e6b4ge71gg2e56be45c585\ - e31a98e65adc1c4560b001595gee6a7ec3cdgfb6248a0e351c5fa7gd40bc4afd\ - 2cddf99e175db6fgf31545e48gfb055b4g39cca53b5a97f743922d73b7afb7d7\ - 4928154d92b20gg7992e38cb96c1dd4bea7c7728fgb1127e0e47469feag585g0 - """) - - Test().description(Self.descending, radix: 17, body: """ - 0000000000000017ce9c05e067e38a806859ca9f32f4efb5bbc0b1443434a7fe\ - 11f6g3f2g2a7bd55278c6b700309c5bge3dead4e678ab3f9a664703f66f716cg\ - 5b0f53e1655cc321011f1bb33625b5d44580930a9687c4b2926aa7c1gcbc4g63\ - 7c70abfcb0f4bdcfcf7174c446a2417b77512bg9321849db9e8d78e616gd76c8\ - bad838eb8085deb36c92839aee7569412499e53b92427c236dce21aga885bd0d\ - 67ecca7c6dgcdb3bdeb3569gg55a7age3ddb6gf122b89bafce283776af88gd6b\ - 63c8a6b7ab753cfd54cacgbd6cggf6fc12a29dc712bf067e0c0962d1f0e95abc\ - 1aa0038be0af74bb752866508e5b7463abfe155ac0e5a17f758733fa2f7c0fg0 - """) - } - - func test18() { - Test().description(Self.ascending, radix: 18, body: """ - 0000000000000000000018bga551hha58097eef06aa64bdbh0172b1dcf80417e\ - g30bdd9b1ac2bf53e416fgc92ef713dh5gfc36gcfa8961d4c4eef393d8c95hc4\ - 0bf67b02ag05e7g833b3g6372d4b45169d4693ee6h64h53h6f9c34105cchd1b7\ - 85h609326e8b38343d11a48cebcd7gd402h9d1gb4d9g74f33h1b6d5d47bd9bcf\ - h477eb91g0dd00f428942a478b32bb0eeddb0ch9822e66dbfd615bg4598h7eca\ - 87f81ade8268f1c0fed0b0bh607g9dff3800a9ed58c0036d0258393463e561f1\ - 96ag9g9d2af8495ge2bg3d961a7c04gf931h399da9f8g0d7540b9458fag6d4g1\ - 85055ae5915ch6e98ab88g522b1cb92872cah62f92aa4c75ddg37ed0e80g746c - """) - - Test().description(Self.descending, radix: 18, body: """ - 000000000000000000000000270e4hdf6dde52265g40e1282b6aa8168f0963da\ - a204h4758c9e66b1gf0d7829ad10gch037cbfh4ba69ce6ac12hbe8hf78gh56ac\ - 0hbfa1dgca543f87g84hbf49degbe3h24c31bab01fe5b1be1f62c93866gecd28\ - 4782bgdb95a257g94d5c7a8d8afhgb272aeg5g0gf9153d45b4e26dfa841fe13b\ - a8991ead426ffdc8h73089bfc86fc703hf408ah1bg4haed5595fb6b2b80fh5e3\ - dc0d9ghf5b82592g56773bef87fc7bhgafdf4208dbf79h84gh3e0bdfa5cdh664\ - 7a4e6a1cb51c653ae1ad97fg64c170a59120f1a703bb1a0c2g6gf83304c3d0g4\ - 2af3g30d227eegf3gfb234cdfh59bcgb73ehh1g6hbfeca767501ge43584gfcf9 - """) - } - - func test19() { - Test().description(Self.ascending, radix: 19, body: """ - 0000000000000000000000000000017g2f692gg45a5gdf57gcg2g07g4h04bhfa\ - f8c01abeh9d0da94477aa600ddg25953cbh2363a71ghfdehi84ce7782ba4h3i0\ - 3a3822ff9dg3hfh8h61cf785057g74ea5c4821g6ii4h020eif1992fihdh9hedf\ - 020e2dfi21cii026d675dh1819abb0h2bd231egc2h34ei7egf3f4fg2dh0c7422\ - a26c52hgfe1cih2a6ahadie59ae8082c8e0ib75a3h9gdc10bh4d8969b7h57i38\ - 2fb4806i8829h9591ch498hhc7b7d4c9f4d0gb28g72419a2298b3fa9731a32dc\ - d312cai90h6fi0g8401c1561f97gg2fia9822h6575ab83id41bab5cgbgihdaee\ - 7aib31f1gah964c8076a4a1c91ghb0bg7hb407f2h52e28c213d98b3156g85i51 - """) - - Test().description(Self.descending, radix: 19, body: """ - 0000000000000000000000000000000002ff85ged5dcd5040bbea5e4dca9f325\ - 2d50797cg4a534i759233di0e13d9c05ic161ced73c61bf5i1b7eg831g16f2b3\ - 5b86g899a83fh5g0ac2id610ieidih0f571cf29dc56f8h812aggi0ga4f65hea6\ - 29ed2c3546e0f0269eh5ihae73d8a56hh3aa38bbf5dh33230cg394hdaa40ga3f\ - 6ii1baa7ag5acb1af0f2fb9cd681c8dc123ahh93cicii5f48c01558eg8gbf6c4\ - 771h4cb4fi896h5b28fgb5gh9b06i28dgfea807g01hh3c98dai86bg2aghi4f46\ - 61d2gc1b6eh2ahhd2dhdd3f0f0eae020hg28ae15bi58c6993f4b1310g9744aef\ - 101f49g24d393ah000ag8ifecbf05ba1de4977e694c9c90497cf4c70dh8caa34 - """) - } - - func test20() { - Test().description(Self.ascending, radix: 20, body: """ - 00000000000000000000000000000000000000d5050cagd94ghbfad415d73775\ - 385hih85hd9d80ec925gehjg1j04f2hhiahd169328ai8099750j9jf64g3eg281\ - 863fi1cihc58jdec239iea6i88ci5640be2eddf81i0fj3005gib3ja486927438\ - 6b499cdjj20f29d033023fa1f790bd472c7654g8b4eia3caf829di82457dgd8e\ - f03ch599i30j2bi0f383j43c59035c93d36g7h833ce0hd7555c378hh728j723b\ - 71j23d885j99j36eb72703a83a5418h5ha0bcai1f6724dabd294104ieff49f37\ - ed043626hj5g7eccjjd76chd29g1a2520a88j370bcgac00a5j4h24dc168jgc16\ - 431i8ced8d553fa0jg40cd577ich5ce5a93e8i8jdfa192c27390cff0a87b2hc0 - """) - - Test().description(Self.descending, radix: 20, body: """ - 000000000000000000000000000000000000000001cc1j30fcdbj1dgc663fbjb\ - 546f35de96ii52h53cd61cg1i4efi3e42idj30cebgf2b4j64971agf1a9d3fc58\ - 9beg7iaf27741i965c2ccbi4bcahf7hf3c6i8j5974a570gi9b4gfci570abd1b1\ - ijij319a541dej23a5ce69gea7ge595c15gca2h75j6hc142b0ee47658d4gfe0e\ - ej41j5hca7b66iji50ifhchb9aji636ifcig69h9fehce48206a1ae3hbfd52j39\ - d9ad795jifief05d1ebf1387cfi2cef9cab12je6hb4g989971j0cjjg3f06eg55\ - 2f0h1370j335023gie3hd23a81c88ea6h1f7ega4e8373c24jc3fed84ig1d4d8b\ - cbee83a9aah41b143dj910b9i1fd1chcf4278j5ic6j8c1dgg4i68d919hg55j0f - """) - } - - func test21() { - Test().description(Self.ascending, radix: 21, body: """ - 00000000000000000000000000000000000000000000025c52fbheeggjg8507d\ - fje9hf92hjbbficeaf8fi1634i6dbc8ccc4bci9a754b580283fibjbkkbdg8080\ - 26g8e9h734gjj5547ek5hdafj86jab9kf90k9gg6ijiad7415f2eecba9k15891i\ - i929h5478643id40cfhfj51737ga9ggh2281a726a517daefbjafa83kegkgc6gg\ - e2a12973961j9d6ee925i231ja10046cka7j1ckg1391g5h35bj286a0ia14k0d3\ - 3b6c7bi2278fffj4674h6bcjhhi4bg0f65h5h36878023282j9jc9c131di2ake8\ - ka3geadbckebhk979843g6ki6hbkh3a5h4k262h0g6f89k4896gk6aj93g8gje63\ - 409g09916bb8e39hi5ci6djciki7hbd192de689hfjcab3ca39ie0fhg21ea33ji - """) - - Test().description(Self.descending, radix: 21, body: """ - 00000000000000000000000000000000000000000000000006g6de0ai8b68b3i\ - c5fjhf6jbg4j4j67h89ffkhead04h99kb290k718afgj8j6jf2f77e57cch210gd\ - jf3f5h95kb3gd0f1jb06d307d06ha0ej2dge91ag1h756eahcabkjdfijd2d2a6c\ - 2144fa9173b69684gkkf8d0c31j3a5k5kab56h975172k04kfhf2h1d0ibb21kc9\ - 09ca372586ad9fghj3dk931f3bk76ca395ikf6g702631k63ke56hbhji67ib077\ - h4883ghb1j6371j6e51e21de93db7ka84ae00d8k9c7a486kehbe572d246d3b1g\ - 601jjhe1e4e9c056agif5gbd928b9g469956g61d975f65kdbacjb4b360ggchej\ - 7cjb53cgag999edk1gd63eegh35bj1jk3g266052f70eei1c7h15d5ka51k0k4j6 - """) - } - - func test22() { - Test().description(Self.ascending, radix: 22, body: """ - 000000000000000000000000000000000000000000000000000023icle03ja5d\ - 3hla1053987fc3i93924f5g21bledal5817e1ld8kd7hkl5ic03k8ji34bh740hf\ - jgj2cald12k4b36b2ffd5j09eej95024514ig2db9h3j4i19efbk269k785alk7g\ - hkd6fkf5e6804di2ek2gajf4j3db0l7cgi80jc1j68cib7211ada3616de8628ae\ - k8g9bka30fbe1ahde1c036ch92bckdg6kgg858b214i8518e404b29682a897hf4\ - 3ibdi74gi642k7k14d5aj407j3agk5k1h04dfllc976ahdljcf64j18f14460hhd\ - 4g6ikd7kh496eij9llkeif94kf6g0eg73k6i5226fd2i22ee11hjddj7ah0cij5j\ - kjklak3374ei0e8e0h32e55hef6d1e14b7gd05cgg9fii44kkckgd9fedh07h19e - """) - - Test().description(Self.descending, radix: 22, body: """ - 000000000000000000000000000000000000000000000000000000007i81bj9f\ - d3800a8d8khk24l27ebd4eli42akghk19ac6hdg78eka61il30flg9alg1eieib3\ - 1d3jc7b4h690f22i4c186gh06950f3l50ldche6c6e86je71j81625hbi34jalgk\ - 6gbf893f216j93cb8cee3778elak46h23g5dcfi09k99cje2icijk1bl5f5gk90f\ - 792ejgbd93c7342chjlhl3gakh60bcg3i97k56bh6ladld8g4fcb7e96db32bclh\ - i59769iaf9f5dg655dh2bcia0i7a7kl10bbh4l4563hkfhh1kkb9if5k9bk8c51g\ - 95kge1kch27jjfea8d37acg24ei5i0fafia4ga5lh2klibakg5kld8eljd3ciebc\ - 32i1bhkca7j1i4g5764lj4da091flf43j8ha4ec13j04abghh88cc8egki99f5dl - """) - } - - func test23() { - Test().description(Self.ascending, radix: 23, body: """ - 00000000000000000000000000000000000000000000000000000000000a4bj8\ - bale0d596ej9c12m593176b2m0lj5jdelhj11f35ffkh37ja5c4ff45hcffi725e\ - 8cll095fbda26h4ab2mif00639jgmk0429bfl60a8j6fih25al8c04m9e9kgk9gf\ - j6lhf2h8bk6hel39dh1ebb5ik04f4egcfghihj2idmg2ch783i026fmmgj2e2kf6\ - 85g0lkakj0ch8j0c2fel0ffg1k5eg0k0deimgfk4llii0i67g3ghd3ghmehkbbm8\ - 32hael03fh143mk2ebeek17mjk7513c1ff98dmhfg12khmfff1077jl6cgg83085\ - 7ce5lmh42bjmd10madl9m2m58kme472e3a8j79lj43d65m84be21l06h1h8hhd2f\ - 7c13423b97i3b63d627ig0hg3mh0406dem3i77jfifj76ade42d66f48i5cmkg4l - """) - - Test().description(Self.descending, radix: 23, body: """ - 000000000000000000000000000000000000000000000000000000000000001k\ - k65fglbgdjki6jld3a8l24hf44hgikie82g6g326eam4g7m05593jg194ell5gl7\ - 9l9c1imblh904ggjegb50l86kjf86222lk342kac5h1kc2ii351hj8ll726g95fh\ - 0dckbdjg1mc045iif4gj44llj2l5g1chb7c2lm2m28a28kfci4kme5jmld5ie917\ - 603f5g8c5fjgd844339c82mjfi1113f71m2f7ebm524d6e35j7c2jbmefkiad36l\ - a65ji1lm3le51ia8k5h2am2fi0ahc59g79ek3515be0a7f4788baejfcaf1da535\ - 3ifdl69b4lkim95fm03b064074aa3669cce3463128920f7lih06e7d0hk9ed3h1\ - ma8251l5l6j6lf8557gk2dgh38h2b83ih6b0d594047g0mb9ik48lj602k7350h5 - """) - } - - func test24() { - Test().description(Self.ascending, radix: 24, body: """ - 08ehhcaace58bei72i8ja72f5hjbgi07b6j65idm59bb5ni8eji1f6lc5g4d6h4g\ - j19gm0ke7lb5d34abbg45fdahn43hmb9gdmh2bn8g529al6jn540id9cjhle26hl\ - i7fm2bmcc1kj35583j173maele2kn5334k1gbm8kcajb2di0ff1hi1ad44adld34\ - a0a32n07mgij7k607949577b62d1c0abfina2jck0l8n1m2mh7ih6mh67dmc2ca4\ - 58ihh733h1mbna818ifeh4b7im6j3gfchhfkj2jkcfd61e1i8inkliigg5f49967\ - 7c1dd7b2nidi934nc3n0k1gj3dj2gg4g22lhg6nm1720kd1imbmf7ia45039bhn5\ - 3lhc76memd39mlh4gbcim3a4n6a3fg86hgk1i29091ccj2md7h5gf2m92eg9l180 - """) - - Test().description(Self.descending, radix: 24, body: """ - 00001jmkd0lc7da2k8135ecji7m7k0m7liie7778n9mkj5207l6ma5m1m620jl4c\ - dkffmna0cfh56al9e6j5fh123bm7e905c825ndccabdmcj5582iedi5k04kg70a8\ - j4i11addmi4m57ag8ke9bnh0b0475fcn1k7g3c684mg1l95i7b07ke3n2i781gj4\ - n074501j3dg5ibmad4bii9ab3afjad8f54gb2ccm39ci7mgen0jdgichm0fc94ij\ - jb122182hdldk1dgghn3i37fmbkd6je22e67434a2g7dk303hhdhd73gckndk6jf\ - 9lhnlb2c23gc5fe2ghl1akdn8bghdlaifln67a2aamb76a1gff2l9ljgib5ekf20\ - a186gcecc5mf90ha3kfm52847lji8hfgmdbai334ndaflkj89l5g01ifgbmck32f - """) - } - - func test25() { - Test().description(Self.ascending, radix: 25, body: """ - 0000001116i8b7fj1i736fkim1bce6ni8gb1ag9gfdck9d8m99l9fcjcid7kh1g2\ - agg07gbi4l96l1kimk6695bmlg78n14f9b78ga5k1jiob8o3cbon67b4n8hf99n0\ - 4ma261fbo4elg49ng3n4ngj2dooajc1a232ekkff4988bja96dac9jk8lfem4272\ - m4c6gi8b0f94ko2ho3a3nol2g1gaolj59h3ecca6580mbi9ke2d5elnf8iiggggh\ - 6i577cb8i4e43666jb9fej0ie4m831aei13ij949j3kgk31h4gj2bi1he6bad3m1\ - a48me9b339e826620n979k4e6k2dofkbaema73o8eeg1ko2hh8c63d14e8ljbkf1\ - 347nai6g70k7oh7l7acaniafne0ik28n8ecgjck4mk603bci1c1j25jghh2ffhlf - """) - - Test().description(Self.descending, radix: 25, body: """ - 000000000066cal0nadf16a8j535k0nfnlc93ce4nic5bo47d6m6gndjh4nl8ckd\ - m28hg48f0d799n3b0f4g40mblf6iohkc033gh684m51lf9aieec9cj4e3ldcmd6m\ - ikbk66g406g0mm2k4c9n9bholcjn657m542glj23i428d00no9ncoc0h9466fd2h\ - gijgfd79l573699jhbo824adg0o2anedcn994l294l09a6bb4gf432nhdohd5iid\ - fek6f83ogoan06chji1m3cehnj8kkd7dj6kc3c11fmdkdkmc0kng60f1hn86bafi\ - obcc17777do66201d0fiki8168odog3b2743db1d8j8n7ni1o5c33e5nd1egjgcg\ - 2cm13m1l725a1kki4mh5511hhoaid9l3com82adk72eb3b987ef26lj8i800i14f - """) - } - - func test26() { - Test().description(Self.ascending, radix: 26, body: """ - 0000000000009ng7mg5k5b246fh6fejejo9g6je8amap102c3k88e96fdk7bbl0d\ - l937l2ii3hf448chk6imkjd827pek6j6f3k1gjcb2nbgmeg2639a3ldlgmd14ek2\ - ng6eh4194l1hp8dli4gl0k2m2lpna181bo90dfm7fh45jg1d5ijc591a754k6p28\ - bkkojapjhi24fj9p3paf7fkle9j67mefn6h47hoec2lpmcdg96po0eenja8b1p8h\ - 34c36nckbl597ah5g424apke4h56kd2fho6nmph6cc66d32fhkg6944gk0e0i3og\ - lhjoo6ncaha3a7b9pdg14b12hl18ap0aga2b9eil7ebbalj1j8hb69g1g1nkb1ln\ - h5hgimc7k353o0im2kikcfcpi6m7mi6po47d3o6h868aoef5nb652fm0979373nm - """) - - Test().description(Self.descending, radix: 26, body: """ - 0000000000000002hge9dae3h4nj1m0oh96867me28a0b3cdd369i3aghejk8ngh\ - ih3k7ikdi8bn7m8dgo61mp9363242dnnjk312npkjg86h066mhodcgddhf7mg4kb\ - gl8i0o83gkapdl368765eggd64kckmpfoi7e1akc1a05dene3lg901o8g19040e5\ - cjm2iokb5di020cgg0f66fh03l401gd1kgj0k7oc20lkf16pdf4514g81i56bd4p\ - j488gghi26p6nd9g3fgjl04fj6kagbg55k79k0jlppiefaacb68jh56oiaeh8jhj\ - lkm1nf88n6alama7187pg8gbn7iom3da54a1lkonoa08j4bh14gk496bfhf7bea4\ - a60n43hp2ifl6m8ib8honnmafchinij6g2l7h4l72f28h0ck226obh7cmc2gid5p - """) - } - - func test27() { - Test().description(Self.ascending, radix: 27, body: """ - 00000000000000000aeifkl0aimlgppnb4l0l1nfad678kmgggpn06jphlkj12j3\ - 70gk5bbe9g333n3no69flqkpdfn2ndqaecgaonf443fimdg87m9h85meep2geki1\ - 9eok5p7k9b68pml7b210qac09cd39nb5j7p7qh76hj0d6je2m2319c6odd5a9q3p\ - 15nkob03nfkf6f79goj42f3b874f2bk4cobk0fl0jcnj52fjfphp52qihfl0fg0j\ - jpbkf0eln0m8cp44bf0n6o9f6786852a188ja5o92ooieij326a9ic30021kdli6\ - 0n0hid0q88ad1aaog3enigclj8dli07d5i25aqf6g8jcihhe59183p3qa6o30g55\ - 115mde48b0pcohb5egmfc21nmi8gj5j1j4mphnigfdlg1g3pb1fga06i10mb6cpc - """) - - Test().description(Self.descending, radix: 27, body: """ - 00000000000000000000354kbj1913ok2akegiac121jfliqpemefhd28gnpo667\ - gdo5fo8d6dko4a9idg99g8j60g2e9mken2h9eknnbnhq8ohd0ohjl9pm7ob3e84d\ - 5bf9d65lmofkqo893e67lc9llqmj5e2492ddq56k7bl8fdi6cb54lc0mi3o2adfa\ - hcob50kj5n4dghjjggm8jn8kh5daq3l3cafbdfb7704jnoad8lfkm51b8paapqid\ - 3a22804o7kiba2c3p3bp7e6l9m7957k327o6dp6ejd45mgol72nle9ljfd3p8f1n\ - hm367eqg328d1hifqi7a34pbhmce1fff8k385pa81e3ddaol4q53617gjhj57pll\ - m1aqnhk27m5c780qjchbbah8j5iebfea81a0nnk249c80digj7b0ep25lqppeqj9 - """) - } - - func test28() { - Test().description(Self.ascending, radix: 28, body: """ - 00000000000000000000011940hqcnpe5i8ehn6cf9c2f0qdd011eaflded1422e\ - 75634p2b6b92chjhi5hhj17dg9o0bbn24c2anpjq2fdikdqfgnqp0em6ornlbkm4\ - 4kajr457ir7f5mnrn5kaoo5o6m34f61gp10ra4g47pk8457hn4m0cpmqe8i6bm5g\ - 1pprale858hm4bp4j20a1pof3dco6f09dpmo2f56ld770b761k5k3e9min8i2la8\ - 9h90bi08n24m3pi37oiojg5pphr13mq8kdd4hfcnd8lmccraap804jjrim5m2qb9\ - 2mnq4r96h4br824079ppojp20nrkmn6jra3gnrrip79ipp2b5d2dd239reenhfib\ - il1on3k9nncfhqfm0obdc9o3a1f6ilq96k8d1ikpmb0e3epn148mhjcoe78rnld4 - """) - - Test().description(Self.descending, radix: 28, body: """ - 00000000000000000000000009p61rcc333fehpommgkqa37omq8oirgng1rj56b\ - mr6qqjiodrcom1ok5boqe8comk6prpdpj3bcg2j15519ec3oarm25994fj709b6p\ - rfbgpkdegi8nkk90fhejri2m6bcp332rnj04ghn6i9r6l1hqrj5do0gkp3r5c6gi\ - gchhkhimhcni94m682j26rkgj84356eg2jf66155q0d7nqorn8kpoi6offn1inch\ - 5b1facgrbe7h1bmm90d1pih2o3i8kjg1mlb1b7h57b2bg4gpl6ppfl5cn8c0bkkr\ - nbdg0k144dh8gp5n11een6585k8169b0i7a61p8d7q3f5f2e2dj190ge5f255487\ - 1hah1c54arhc5nlmngnlnio897p1f9kpd2a076k1kqqp4ld75h78j4qn0448fl3r - """) - } - - func test29() { - Test().description(Self.ascending, radix: 29, body: """ - 000000000000000000000000006qgf3bdirlm095h66i56k8k9p11hol00og9a39\ - 3mqh7jjofh6bk49k4pbo044bb7k05ppq1jjo8j2kqe8iagllm50r6cdsafdlh915\ - k3iip9mns1o1o0rkaagpab2p8c50gd2cfc2gki5n448pjdsa5i6hsee9s2rp1n01\ - fa1grb4914df5l5l6e9ag8g511og0203m9hncndck52s220rb2f2bpng9leg4mbo\ - qpm0m9k203lrc9mg6fmg8bnmql4fnq3loe2q5nebe4aen0p5nmfadh9nfm8gf612\ - jle8mfq7c1712cgmfiiq0li30gbn883sch73j4ga098h64fqe3s7322rgjh335kp\ - 5csoq4lqelgl4bjom4p15apc6aakaqi1h1lijpmcdogappk3l0caksrcscf2b6cd - """) - - Test().description(Self.descending, radix: 29, body: """ - 000000000000000000000000000002h6iifm5gl740qqhok7oeklc0kdhdlepf80\ - ifsan6o6jndhpqshgr16le6d7c58k8i5noh3p632c95df1gdsi1s56gsfoqeali9\ - djgp50kgedfaa9jocfa4qa1caq9lcso27jn7rc63deilrksmjgmreja47r3a9nhh\ - 3boffpbh48npgmsdhl742oknsqo00kdan8qcffh2leb68h9b4049jnk98g5dnls0\ - rhlab9qp643g7f4gp2aj37b18kikrmnl0ifcardkj8kicge9on49j21dd3lkndqp\ - 6im0m33dp5e3h0ls17aqieg24lqd39ng4sj0j74k17o6dj65ambc12c2rap1lms1\ - bonlcs0gii9mgbj7fglh9c7979pdkj0273fd05hj8khnamjcp37l1smagrp4obp2 - """) - } - - func test30() { - Test().description(Self.ascending, radix: 30, body: """ - 0000000000000000000000000000003gc906ob8d00p50qelnf8ma3n5p9phlaqa\ - csshfcol0gn470qt5shaa9prondsstf5jldjq1mjbj8droha6pganj1pnnkqhskb\ - qjd5k8b2lq7dhb3a0n6kmh0k4880q63tr6dpe3a1d7rr5p85pjirlar50b1tk9ht\ - ca9d5fpimnb4po0qombqsms8rb4re1rf41a629hbt9akhtn9ndoo2lgelmq0johi\ - ca565dm8o566k05eq1mg4d0f69rjcl9jlqi5jojeltt6a23b2pp9gkalr40o97o7\ - pgktp83180hdp6q0pfbhme70qi2apg738m324dao0ro0ak55q9e88aan0qre4r81\ - r76f8rfcca39dp5o34teq57r5jpl56aql1imhq4l9dmcom2ebtk25ddgth4jlss0 - """) - - Test().description(Self.descending, radix: 30, body: """ - 0000000000000000000000000000000001e5g8keo886n2mmihcs1soq5pk1fqm3\ - 6hipgmbprhtgnan7m5eogj51a2ebna097ttt1g49ns3i5tc5s3mhpadssjpm8ser\ - 4ma5n1ldsb70or5k4eg1n1di6cnc0j8as5sqsihc76s33b3aask0k1j4j3gn7ck3\ - 6d9l5n01h8872ddh6scqpqbggshj3sap3mdo97nllpefcr8cil8b26ldh7455lap\ - 40o98i88mcr6heib67chn6hojt95iqf59trsesre3t4idsqktedm1b3qem1ifoas\ - 1ltgcg03765i7no0isqanh36t6700mh5cedb5s37m2rrs0ht7ef00ibg8c53a9b9\ - g4fgdo0363shp7g6e6d9i4286ng1j4nbe25k8pf6clt8251rqfsdl9q6gg33qhaf - """) - } - - func test31() { - Test().description(Self.ascending, radix: 31, body: """ - 00000000000000000000000000000000003o1q4rle1mom6e5aqbf2gi8q7r00tp\ - ktgt1mu2mfrkrhpo94lg60q0i8el6jk98q2k76nnh40nodjtolp3ps6m01lf72g5\ - qnhpnukeb6e74b1602gfgnoa71i0k8nit8onlcjlqeq2k7t7i3l6n279dalhl0t9\ - b9ibbpc1fa3anjjh7sb55fks9k08p3cl8fgabmrputg7smh3bh2d8on1q72c9qc2\ - oq4ka5pem6u93lkqjk0jk5ssqgd98er49nq1c4upp6726kalnqcpij5gg1rru7df\ - m8g0oscmlu68ffof2b9auiiga5bg8ob3qi8fbrg9fjr3aktct14c9cpjnres9rci\ - dso2trmmkneiq23h298ljg31mb43p1dq7qdl6lmb7de57euffnt5gas6r38j6018 - """) - - Test().description(Self.descending, radix: 31, body: """ - 00000000000000000000000000000000000001mjhjojnfirn3c5brjtjk678qds\ - eobfaoo3u4pt6c8gp3qq7d3gs6mhic3bt5u8albbjs084e2df2lk0emlpnk5i1n7\ - 03pihpu5l0pi4tk105oig7aiebgiu5j5sr5b25l6972cu4cj91npannpnc2728dc\ - q1igcra12qk77hapu1b1qr6d4sskf9ab7j7m60452eh7aadkdpdid946fq12ri1j\ - q727jria8qda7db990diombqtjds5bn0h275frk8n7d2jifftqlb9dkjp0ls0blq\ - 7jubdjr23abk7n6in56etkbbis6bbp90fns3qgo1smgnasor6pf4nf32q1fttojs\ - sijo13oepa99njdhrb4hldth0rbbho66pmrsp76p4g13khulkdj6dgj4hojgk8fu - """) - } - - func test32() { - Test().description(Self.ascending, radix: 32, body: """ - 000000000000000000000000000000000000007vvruvpuvqv7sfftnlujpv5sfg\ - tvnerr7btbkuhpv6snie7on1s3fttnesrfddjm6nqrat9kuiq78cvjmdpj5slie8\ - ov3cbh63ob0s1ftunmubnelpn2rrdddkmepb3c5flqmqpatal6kaf9l5kihq58d0\ - juf9r74rjacph5smima974khi27ot3cche58j247gq2o90s2g607uvjtfhtnkubo\ - etr7at3je9on0rredlm6mqj9d1jmcpb4cdh62o2vbpelomqqb5c5elilah9l4kag\ - 9t74qj2b994kghq68l246gi180vjsf9s7ct3ie1n6oqj8cpi64o2ubhd5glika98\ - 4sj2a91348gi07ou3ke1m6gp30bhc58k2c91240f1o6go2oa1440e1g50g1g4080 - """) - - Test().description(Self.descending, radix: 32, body: """ - 0000000000000000000000000000000000000000041061050o3gg28a1c60q3gf\ - 208h44ok2kb1e60p38dho78u3sg228h34giic9p854l2mb1d5onj0c9i6cq3adhn\ - 70sjkeps7kv3ug21891k8ha68t44iiib9h6ksjqga5956l2lapblgmaqbde5qniv\ - c1gm4or4clj6eq39d9lmorbedto72sjjehqnctrof5t7mv3tfpvo10c2ge28b1k7\ - h24ol2schm78v44hia9p95cmiuc9j6krjiept7t0k6ha7955kqjqhadalemarblf\ - m2or5ctkmmrbfe5pnatrpfdunv0c3gm3oj2sdhu8p75cnj6dpr7t1keiqfadblmn\ - r3ctlmusrnfdvo71sbhu9pf6svkejqnbtjmutrvgu7pf7t7lurrvhufqvfufrvnv - """) - } - - func test33() { - Test().description(Self.ascending, radix: 33, body: """ - 000000000000000000000000000000000000000000wf08osbkbu36iuk1a0c3mg\ - swowotq5g5rfb59tjo423qm0opnic8ukf83hnvggfa3ikaeqh7msfvwtd1m18tct\ - nrwfg3md55vf923rqh2grih41picatv6nf68ofkgn6gg312aomp3jo3ng217vrbs\ - lif6g8g5p29uhn54tck1q2dk22bfkoguw2fgc9gnnn492r3a0pgme41d6202qr53\ - 0cnpf5tpu6pir1uk45l463l6lf91n1w99hicve8ts1ggum0jtup4rti3514019hd\ - f92b9vdnhu2ip86jhue3wol6d37l4njo26s9dmpow9dcwivflpts8lwrjci34ui3\ - seih7hhjjsn6equebc7ca2cr22guqmdsekwewboqq0mgptsi7nkqdrudnahilbl3 - """) - - Test().description(Self.descending, radix: 33, body: """ - 000000000000000000000000000000000000000000000huu8mu1391be05tiior\ - sugdp9856i3vo2c0eg05gbcenilm7rpi94op52duat3m17fjo352wmr7wugsnpau\ - ggfq6nshd3ru8d9ovlc0jta1okqtorlhwjgco8c32e8q9otw6lr82id874k8ut1f\ - cag9cadwg5lpwvrk3jl2eh993e5wumehcwns9a2f8s086arsvukpb6pn3umep923\ - l38rajfap3ovwupv90jgvkku2mmp52n9t6il3surpkrlpggihcllh3dhtr83qsb4\ - 6l89pj79tsu1gurf3uetwi9onlcik36ugenvfhd8e4llunsn5v1d7anaiad60wbr\ - uq5tpbad4f1qdno3arm2cdr2e3b1lkpqpkgcjnmwjo5u04s5573v9jg3002jrogl - """) - } - - func test34() { - Test().description(Self.ascending, radix: 34, body: """ - 00000000000000000000000000000000000000000000075eo27x9nu9tn7fi1ce\ - 359cvtxx1332aewm3x4qd5llkfj17hxkrsc33uo3sdpp32kj0j3d6vtkmskluagv\ - m4x8d4vojgwvomju3b26lpor71l0a0do4xmdqh8jdiaj2bkokjuwh0v37ladu2he\ - pv65khfagbfqb0xnepxhi81rds2mup1k3i1db3ixlr1bb91x7rkolfoxd500wu41\ - wj3vbgxatgq5fw2p7tnfjn05u4gec6mt0x25d5k0adkodmjf248pl99ij159xxfd\ - 64fw3ikxscupn4eks94cfnjxxcp954x6xb9mg3sbdqc0oai87dv16k2bqf06x42u\ - 2vms3unwqoukwt8v36cmaavlecb5henbvw55gsp1ditrbk6amh0xdapxfqow7e80 - """) - - Test().description(Self.descending, radix: 34, body: """ - 0000000000000000000000000000000000000000000000004b4u5cfn5h1xh89d\ - arnchrh1qf49301ph2rjhwdimd3lhg973lh1199v2tlj1uis340cgxnsrssdoa02\ - 61h9bb1gpmw7wp6ahnic3d61a2atxmf9l7dks4sqd1tlml9c7ghomvid96gl1ia7\ - vfwupqgiaibmexrhdb568iiuxv3og4fw3llepqw2wlre0hcpissu0jo3wfg2gabf\ - crrirps1mnr2d16o5kmuroimut7jqtl379gl0676dqj5ns6dui1gj7intmml9e05\ - n370k1qtcqrldu01rv2mg4sx4wawi5ttwnvikn37jpjggjm14r265oputhi2dauf\ - 2ivs8hvh14miwn2ht27s3ne00710gshi4wjdd9irtw3gq9im9rljn7f05tfm03xh - """) - } - - func test35() { - Test().description(Self.ascending, radix: 35, body: """ - 0000000000000000000000000000000000000000000000002ndxwb3ok6s4k5p5\ - ymr8u7p67b6xfhwiwyojwteq5qvdgrigdp50hwnq9e5dogmrg7x392dbx2vxkkr6\ - siwb3rnmah6xi2cee4qldu99xky5ggganqyaxgo7j22st8d5yj6l0wj78r31tkup\ - 9e65y798485dsmnlnsbw9j8hdcbxntls6j4w30j3va6alba73h1c3rn98gsr7aey\ - x4ba5r79ufl1jelh6yeui0t5e5a9o021bsqphjxjy68g1ubmmcfec789r3v3cux0\ - 5yyfhsi04iyjkiwbg2xjff5fw6y70eqsdhrajifhm2q9ybk11yy5tvh0bsxk0ttq\ - fpweb9h70r4fpx177pqg23dm8ck1xnvovqgvs2qp9g7nrlr4kpbnbhuowibrctep - """) - - Test().description(Self.descending, radix: 35, body: """ - 0000000000000000000000000000000000000000000000000001qkgbhr64tc6b\ - 17vdeio9gje48qcyx4eo3e4sxidf1957u7eh03vsy3sw2us3ikyvkllqcfow48mt\ - 4q9hb9g00wpif6guu41gaxyka76n9yimb23jocx1834e0emuvgcinkyi772jn0ae\ - ct3x1yrafusiiroujcnp25ao4lx7ffrp7e6qnrd310cjyq8rrcadniwokk9wf0o8\ - s9xmemd1mmu8f81m7w3t5ncubi2ihwajjwscjhxuug0j2fikf17yw8bypxnyv1kt\ - ajv7q6xa08dhoxb8427vjjby5ge5sbpn9cj3b2klwetn5tjfngy3a955xkk12tdu\ - 6cs10ev42acvbmytmqmc4yehncbc7k4y560tije2r18fsl37vgcwma4sa33jmlwk - """) - } - - func test36() { - Test().description(Self.ascending, radix: 36, body: """ - 0000000000000000000000000000000000000000000000000001mvj05wljbmpd\ - 8a2mrglgkrl8gqwelpwwxehf7iy1e62a2bgqnwhakfi8fhp4yiy96w7gg8pkrvyc\ - ojpy7czhc5r9tcoz0w5494eh31ezh8ezx4stye8xhigo1k7u2owa4olg2tx3nqhw\ - kiay1mrg4rb09twvlcqx1qnsbsb3qfl7j2wxlrkqhanbcxt2gcztp40bxcwwa0lp\ - 1a39mzhxwmovwnc745vv3sv44jnfgqoekcku7trkz49lvn3kwf7kk1mcn6fg1nxj\ - ccmy6g4p3j4m1hjpywgt9pnq9mgovinv1wq4u3c4s4tv5bux5b5yi5avnt894fm2\ - b8a57jtmggfc3thfwalqq3eruydie3u2rhh2bjf5g8i6qla9b2fh6lrb1ios0wlc - """) - - Test().description(Self.descending, radix: 36, body: """ - 000000000000000000000000000000000000000000000000000000168swoi6iu\ - zj4fbwknlnh695zl88v65qcfgnwrwepqcxb9dysmluowqahvt3r9gsc1v47ssxdi\ - vjda3nttl6r044pzz7zwhtgu2mkow5ts28x2mbwenh3wfz4s1sarspfhlrakvqrg\ - pmzb66sgtz2lzbotl7r28wcq8925c747b44l60vrk3scrin4zvnwn7pdsukgo6lg\ - jhu1nuwj7yt1h9ujpe3os17onsk7sp4ysmytu568do2tqetwnrmbxb2dtd8kqorc\ - oakaizlm9svr8axe1acxfursz11nubrhighfd64yhmp99ucvzr944n8co01o4x64\ - cmbd8be0hqbm2zy5uwe4uplc4sa50xajel4bkkxb1kh21pisna37eqwpbpq11ypr - """) - } -} diff --git a/Tests/StdlibIntKitTests/StdlibInt+Stride.swift b/Tests/StdlibIntKitTests/StdlibInt+Stride.swift index e7d0dcbc..45e0cac2 100644 --- a/Tests/StdlibIntKitTests/StdlibInt+Stride.swift +++ b/Tests/StdlibIntKitTests/StdlibInt+Stride.swift @@ -33,7 +33,7 @@ import TestKit2 // MARK: Tests //=------------------------------------------------------------------------= - @Test("StdlibInt/stride: vs StdlibInt.Base", .tags(.forwarding), arguments: fuzzers) + @Test("StdlibInt/stride: vs StdlibInt.Base", .tags(.forwarding, .random), arguments: fuzzers) func forwarding(randomness: consuming FuzzerInt) throws { for _ in 0 ..< 256 { let start = IXL.entropic(through: Shift.max(or: 255), using: &randomness) diff --git a/Tests/StdlibIntKitTests/StdlibInt+Text.swift b/Tests/StdlibIntKitTests/StdlibInt+Text.swift index 14807ed2..44db5f50 100644 --- a/Tests/StdlibIntKitTests/StdlibInt+Text.swift +++ b/Tests/StdlibIntKitTests/StdlibInt+Text.swift @@ -33,27 +33,31 @@ import TestKit2 // MARK: Tests //=------------------------------------------------------------------------= - /// Here we check that `StdlibInt/description` matches `IXL/description`. - @Test("BinaryInteger/description [bidirectional][entropic][comparison]", arguments: fuzzers) - func description(_ randomness: consuming FuzzerInt) throws { + @Test( + "BinaryInteger/text: vs StdlibInt.Base", + Tag.List.tags(.forwarding, .random), + arguments: fuzzers + ) func forwarding(randomness: consuming FuzzerInt) throws { for _ in 0 ..< 128 { - let radix = IX.random(in: 2...36, using: &randomness) - let coder = try TextInt(radix: radix) let value = IXL.entropic(size: 256, using: &randomness) + let radix = IX .random(in: 02...36, using: &randomness) + let coder = try TextInt(radix: radix) let lowercase = value.description(as: coder.lowercased()) let uppercase = value.description(as: coder.uppercased()) - #expect(try StdlibInt(lowercase, as: coder) == StdlibInt(value)) - #expect(try StdlibInt(uppercase, as: coder) == StdlibInt(value)) - #expect(StdlibInt(value).description(as: coder.lowercased()) == lowercase) - #expect(StdlibInt(value).description(as: coder.uppercased()) == uppercase) - #expect(String(StdlibInt(value), radix: Swift.Int(radix), uppercase: false) == lowercase) - #expect(String(StdlibInt(value), radix: Swift.Int(radix), uppercase: true ) == uppercase) + try #require(try StdlibInt(lowercase, as: coder) == StdlibInt(value)) + try #require(try StdlibInt(uppercase, as: coder) == StdlibInt(value)) + + try #require(StdlibInt(value).description(as: coder.lowercased()) == lowercase) + try #require(StdlibInt(value).description(as: coder.uppercased()) == uppercase) + + try #require(String(StdlibInt(value), radix: Swift.Int(radix), uppercase: false) == lowercase) + try #require(String(StdlibInt(value), radix: Swift.Int(radix), uppercase: true ) == uppercase) if radix == 10 { - #expect(StdlibInt(lowercase) == StdlibInt(value)) - #expect(StdlibInt(value).description == lowercase) - #expect(String(StdlibInt(((value)))) == lowercase) + try #require(StdlibInt(lowercase) == StdlibInt(value)) + try #require(StdlibInt(value).description == lowercase) + try #require(String(StdlibInt(((value)))) == lowercase) } } } diff --git a/Tests/UltimathnumTests/BinaryInteger+Text.swift b/Tests/UltimathnumTests/BinaryInteger+Text.swift index 1f4a5445..4b808761 100644 --- a/Tests/UltimathnumTests/BinaryInteger+Text.swift +++ b/Tests/UltimathnumTests/BinaryInteger+Text.swift @@ -8,8 +8,6 @@ //=----------------------------------------------------------------------------= import CoreKit -import DoubleIntKit -import InfiniIntKit import RandomIntKit import TestKit2 @@ -23,19 +21,292 @@ import TestKit2 // MARK: Tests //=------------------------------------------------------------------------= - @Test("BinaryInteger/description [bidirectional][entropic]", arguments: typesAsBinaryInteger, fuzzers) - func description(_ type: any BinaryInteger.Type, _ randomness: consuming FuzzerInt) throws { + @Test( + "BinaryInteger/text: description is stable", + Tag.List.tags(.generic, .random), + arguments: typesAsBinaryInteger, fuzzers + ) func descriptionIsStable(type: any BinaryInteger.Type, randomness: consuming FuzzerInt) throws { try whereIs(type) func whereIs(_ type: T.Type) throws where T: BinaryInteger { - let size = IX(size: type) ?? conditional(debug: 256, release: 4096) + let size = IX(size: T.self) ?? conditional(debug: 256, release: 4096) - for _ in 0 ..< conditional(debug: 32, release: 1024) { - let radix = UX.random(in: 2...36, using: &randomness) - let coder = try TextInt(radix: radix) + for _ in 0 ..< conditional(debug: 64, release: 1024) { + let value = T.entropic(size: size, using: &randomness) + let radix = UX.random(in: 02...36, using: &randomness) + let uppercase = Bool.random(using: &randomness.stdlib) + let letters = TextInt.Letters(uppercase: uppercase) + let coder = try TextInt(radix: radix, letters: letters) + try Ɣrequire(bidirectional: value, using: coder) + } + + for _ in 0 ..< conditional(debug: 64, release: 1024) { + let value = T.entropic(size: size, using: &randomness) + try Ɣrequire(bidirectional: value, using: TextInt.decimal) + try Ɣrequire(bidirectional: value, using: TextInt.hexadecimal.lowercased()) + try Ɣrequire(bidirectional: value, using: TextInt.hexadecimal.uppercased()) + } + + func Ɣrequire(bidirectional value: T, using coder: TextInt, at location: SourceLocation = #_sourceLocation) throws { + let encoded = value.description(as: coder) + let decoded = try T(((encoded)),as: coder) + try #require(decoded == value, sourceLocation: location) + } + } + } + + @Test( + "BinaryInteger/text: description letter case is stable", + Tag.List.tags(.generic, .random), + arguments: typesAsBinaryInteger, fuzzers + ) func descriptionLetterCaseIsStable(type: any BinaryInteger.Type, randomness: consuming FuzzerInt) throws { + try whereIs(type) + + func whereIs(_ type: T.Type) throws where T: BinaryInteger { + let size = IX(size: T.self) ?? conditional(debug: 256, release: 4096) + + for _ in 0 ..< conditional(debug: 64, release: 1024) { let value = T.entropic(size: size, using: &randomness) - try Ɣexpect(coder.lowercased(), bidirectional: value) - try Ɣexpect(coder.uppercased(), bidirectional: value) + let radix = UX.random(in: 02...36, using: &randomness) + let coder = try TextInt(radix: radix) + + let lowercased: String = value.description(as: coder.lowercased()) + let uppercased: String = value.description(as: coder.uppercased()) + + if radix <= 10 { + try #require(lowercased == uppercased) + } + + try #require(lowercased == lowercased.lowercased()) + try #require(uppercased == uppercased.uppercased()) + } + } + } +} + +//*============================================================================* +// MARK: * Binary Integer x Text x Conveniences +//*============================================================================* + +@Suite(.tags(.forwarding)) struct BinaryIntegerTestsOnTextConveniences { + + //=------------------------------------------------------------------------= + // MARK: Tests + //=------------------------------------------------------------------------= + + @Test( + "BinaryInteger/text/conveniences: decimal", + Tag.List.tags(.generic, .random), + arguments: typesAsBinaryInteger, fuzzers + ) func decimal(type: any BinaryInteger.Type, randomness: consuming FuzzerInt) throws { + try whereIs(type) + + func whereIs(_ type: T.Type) throws where T: BinaryInteger { + try #require(T(String()) == nil) + + for byte: U8 in U8.min ... 47 { + try #require(T(String(UnicodeScalar(UInt8(byte)))) == nil) + } + + for byte: U8 in 58 ... U8.max { + try #require(T(String(UnicodeScalar(UInt8(byte)))) == nil) + } + + for _ in 0 ..< 32 { + let decoded = T.entropic(through: Shift.max(or: 255), using: &randomness) + let encoded = decoded.description(as: TextInt.decimal) + + try #require(decoded == T(encoded)) + try #require(encoded == decoded.description) + } + } + } +} + +//*============================================================================* +// MARK: * Binary Integer x Text x Pyramids +//*============================================================================* + +@Suite(.tags(.important)) struct BinaryIntegerTestsOnTextPyramids { + + //=------------------------------------------------------------------------= + // MARK: Metadata + //=------------------------------------------------------------------------= + + static let coders: [TextInt] = Self.radices.map(TextInt.radix) + + static let radices: [UX] = conditional(debug: [10, 16], release: [UX](2...36)) + + //=------------------------------------------------------------------------= + // MARK: Tests + //=------------------------------------------------------------------------= + + /// Here we check the following sequence: + /// + /// 1 + /// 10 + /// 100 + /// 1000 + /// ..... + /// + @Test( + "BinaryInteger/text/pyramids: one followed by zeros", + Tag.List.tags(.generic), + arguments: typesAsBinaryInteger + ) func pyramidOfOneFollowedByZeros(type: any BinaryInteger.Type) throws { + try whereIs(type) + + func whereIs(_ type: T.Type) throws where T: BinaryInteger { + for coder: TextInt in Self.coders { + var encoded = String("1") + var decoded = Fallible(T(1)) + let radix = T(coder.radix) + + for _ in 0 ..< 64 { + if decoded.error { break } + try #require(encoded == decoded.value.description(as: coder)) + try #require(try decoded.value == T.init(encoded, as: coder)) + + encoded.append("0") + decoded = decoded.value.times(radix) + } + } + } + } + + /// Here we check the following sequence: + /// + /// 1 + /// 12 + /// 123 + /// 1234 + /// ..... + /// + @Test( + "BinaryInteger/text/pyramids: ascending numeral cycle", + Tag.List.tags(.generic), + arguments: typesAsBinaryInteger + ) func pyramidOfAscendingNumeralCycle(type: any BinaryInteger.Type) throws { + try whereIs(type) + + func whereIs(_ type: T.Type) throws where T: BinaryInteger { + for coder: TextInt in Self.coders { + var encoded = String() + var decoded = Fallible(T( )) + let radix = T(coder.radix) + + for index: U8 in 1 ... 64 { + let element = index % coder.radix + let numeral = try coder.numerals.encode(element) + + decoded = decoded.map{$0.times(T((radix)))} + decoded = decoded.map{$0.plus (T(element))} + encoded.append(String(UnicodeScalar(UInt8(numeral)))) + + if decoded.error { break } + try #require(encoded == decoded.value.description(as: coder)) + try #require(try decoded.value == T.init(encoded, as: coder)) + } + } + } + } + + /// Here we check the following sequence: + /// + /// x + /// xx + /// xxx + /// xxxx + /// ..... + /// where x is radix - 1 + /// + @Test( + "BinaryInteger/text/pyramids: repeating highest numeral", + Tag.List.tags(.generic), + arguments: typesAsBinaryInteger + ) func pyramidOfRepeatingHighestNumeral(type: any BinaryInteger.Type) throws { + try whereIs(type) + + func whereIs(_ type: T.Type) throws where T: BinaryInteger { + for coder: TextInt in Self.coders { + var encoded = String() + var decoded = Fallible(T( )) + let radix = T(coder.radix) + let value = T(coder.radix - 1) + let numeral = try coder.numerals.encode(coder.radix - 1) + + for _ in 0 ..< 64 { + decoded = decoded.map{$0.times(radix)} + decoded = decoded.map{$0.plus (value)} + encoded.append(String(UnicodeScalar(UInt8(numeral)))) + + if decoded.error { break } + try #require(encoded == decoded.value.description(as: coder)) + try #require(try decoded.value == T.init(encoded, as: coder)) + } + } + } + } +} + +//*============================================================================* +// MARK: * Binary Integer x Text x Edge Cases +//*============================================================================* + +@Suite struct BinaryIntegerTestsOnTextEdgeCases { + + //=------------------------------------------------------------------------= + // MARK: Tests + //=------------------------------------------------------------------------= + + @Test( + "BinaryInteger/text/edge-cases: description of negative vs positive", + Tag.List.tags(.generic, .random), + arguments: typesAsBinaryIntegerAsSigned, fuzzers + ) func descriptionOfNegativeVersusPositive(type: any SignedInteger.Type, randomness: consuming FuzzerInt) throws { + try whereIs(type) + + func whereIs(_ type: T.Type) throws where T: SignedInteger { + for _ in 0 ..< 32 { + let negative = T.entropic(through: Shift.max(or: 255), as: Domain.natural, using: &randomness).toggled() + let positive = negative.magnitude() + + try #require(negative.isNegative) + try #require(positive.isPositive) + + for _ in 0 ..< 8 { + let radix = UX.random(in: 02...36, using: &randomness) + let uppercase = Bool.random(using: &randomness.stdlib) + let letters = TextInt.Letters(uppercase: uppercase) + let coder = try TextInt(radix: radix,letters: letters) + try #require(negative.description(as: coder) == "-\(positive.description(as: coder))") + } + } + } + } + + @Test( + "BinaryInteger/text/edge-cases: description of infinite vs finite", + Tag.List.tags(.generic, .random), + arguments: typesAsArbitraryIntegerAsUnsigned, fuzzers + ) func descriptionOfInfiniteVersusFinite(type: any ArbitraryIntegerAsUnsigned.Type, randomness: consuming FuzzerInt) throws { + try whereIs(type) + + func whereIs(_ type: T.Type) throws where T: ArbitraryIntegerAsUnsigned { + for _ in 0 ..< 32 { + let (finite) = T.entropic(size: 256, as: Domain.finite, using: &randomness) + let infinite = finite.toggled() + + try #require(!(finite).isInfinite) + try #require( infinite.isInfinite) + + for _ in 0 ..< 8 { + let radix = UX.random(in: 02...36, using: &randomness) + let uppercase = Bool.random(using: &randomness.stdlib) + let letters = TextInt.Letters(uppercase: uppercase) + let coder = try TextInt(radix: radix,letters: letters) + try #require(infinite.description(as: coder) == "&\(finite.description(as: coder))") + } } } }