mammoth_generated_test.go 463 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120
  1. // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
  2. // Use of this source code is governed by a MIT license found in the LICENSE file.
  3. // Code generated from mammoth-test.go.tmpl - DO NOT EDIT.
  4. package codec
  5. import "testing"
  6. import "fmt"
  7. import "reflect"
  8. // TestMammoth has all the different paths optimized in fast-path
  9. // It has all the primitives, slices and maps.
  10. //
  11. // For each of those types, it has a pointer and a non-pointer field.
  12. func init() { _ = fmt.Printf } // so we can include fmt as needed
  13. type TestMammoth struct {
  14. FIntf interface{}
  15. FptrIntf *interface{}
  16. FString string
  17. FptrString *string
  18. FFloat32 float32
  19. FptrFloat32 *float32
  20. FFloat64 float64
  21. FptrFloat64 *float64
  22. FUint uint
  23. FptrUint *uint
  24. FUint8 uint8
  25. FptrUint8 *uint8
  26. FUint16 uint16
  27. FptrUint16 *uint16
  28. FUint32 uint32
  29. FptrUint32 *uint32
  30. FUint64 uint64
  31. FptrUint64 *uint64
  32. FUintptr uintptr
  33. FptrUintptr *uintptr
  34. FInt int
  35. FptrInt *int
  36. FInt8 int8
  37. FptrInt8 *int8
  38. FInt16 int16
  39. FptrInt16 *int16
  40. FInt32 int32
  41. FptrInt32 *int32
  42. FInt64 int64
  43. FptrInt64 *int64
  44. FBool bool
  45. FptrBool *bool
  46. FSliceIntf []interface{}
  47. FptrSliceIntf *[]interface{}
  48. FSliceString []string
  49. FptrSliceString *[]string
  50. FSliceFloat32 []float32
  51. FptrSliceFloat32 *[]float32
  52. FSliceFloat64 []float64
  53. FptrSliceFloat64 *[]float64
  54. FSliceUint []uint
  55. FptrSliceUint *[]uint
  56. FSliceUint16 []uint16
  57. FptrSliceUint16 *[]uint16
  58. FSliceUint32 []uint32
  59. FptrSliceUint32 *[]uint32
  60. FSliceUint64 []uint64
  61. FptrSliceUint64 *[]uint64
  62. FSliceUintptr []uintptr
  63. FptrSliceUintptr *[]uintptr
  64. FSliceInt []int
  65. FptrSliceInt *[]int
  66. FSliceInt8 []int8
  67. FptrSliceInt8 *[]int8
  68. FSliceInt16 []int16
  69. FptrSliceInt16 *[]int16
  70. FSliceInt32 []int32
  71. FptrSliceInt32 *[]int32
  72. FSliceInt64 []int64
  73. FptrSliceInt64 *[]int64
  74. FSliceBool []bool
  75. FptrSliceBool *[]bool
  76. FMapIntfIntf map[interface{}]interface{}
  77. FptrMapIntfIntf *map[interface{}]interface{}
  78. FMapIntfString map[interface{}]string
  79. FptrMapIntfString *map[interface{}]string
  80. FMapIntfUint map[interface{}]uint
  81. FptrMapIntfUint *map[interface{}]uint
  82. FMapIntfUint8 map[interface{}]uint8
  83. FptrMapIntfUint8 *map[interface{}]uint8
  84. FMapIntfUint16 map[interface{}]uint16
  85. FptrMapIntfUint16 *map[interface{}]uint16
  86. FMapIntfUint32 map[interface{}]uint32
  87. FptrMapIntfUint32 *map[interface{}]uint32
  88. FMapIntfUint64 map[interface{}]uint64
  89. FptrMapIntfUint64 *map[interface{}]uint64
  90. FMapIntfUintptr map[interface{}]uintptr
  91. FptrMapIntfUintptr *map[interface{}]uintptr
  92. FMapIntfInt map[interface{}]int
  93. FptrMapIntfInt *map[interface{}]int
  94. FMapIntfInt8 map[interface{}]int8
  95. FptrMapIntfInt8 *map[interface{}]int8
  96. FMapIntfInt16 map[interface{}]int16
  97. FptrMapIntfInt16 *map[interface{}]int16
  98. FMapIntfInt32 map[interface{}]int32
  99. FptrMapIntfInt32 *map[interface{}]int32
  100. FMapIntfInt64 map[interface{}]int64
  101. FptrMapIntfInt64 *map[interface{}]int64
  102. FMapIntfFloat32 map[interface{}]float32
  103. FptrMapIntfFloat32 *map[interface{}]float32
  104. FMapIntfFloat64 map[interface{}]float64
  105. FptrMapIntfFloat64 *map[interface{}]float64
  106. FMapIntfBool map[interface{}]bool
  107. FptrMapIntfBool *map[interface{}]bool
  108. FMapStringIntf map[string]interface{}
  109. FptrMapStringIntf *map[string]interface{}
  110. FMapStringString map[string]string
  111. FptrMapStringString *map[string]string
  112. FMapStringUint map[string]uint
  113. FptrMapStringUint *map[string]uint
  114. FMapStringUint8 map[string]uint8
  115. FptrMapStringUint8 *map[string]uint8
  116. FMapStringUint16 map[string]uint16
  117. FptrMapStringUint16 *map[string]uint16
  118. FMapStringUint32 map[string]uint32
  119. FptrMapStringUint32 *map[string]uint32
  120. FMapStringUint64 map[string]uint64
  121. FptrMapStringUint64 *map[string]uint64
  122. FMapStringUintptr map[string]uintptr
  123. FptrMapStringUintptr *map[string]uintptr
  124. FMapStringInt map[string]int
  125. FptrMapStringInt *map[string]int
  126. FMapStringInt8 map[string]int8
  127. FptrMapStringInt8 *map[string]int8
  128. FMapStringInt16 map[string]int16
  129. FptrMapStringInt16 *map[string]int16
  130. FMapStringInt32 map[string]int32
  131. FptrMapStringInt32 *map[string]int32
  132. FMapStringInt64 map[string]int64
  133. FptrMapStringInt64 *map[string]int64
  134. FMapStringFloat32 map[string]float32
  135. FptrMapStringFloat32 *map[string]float32
  136. FMapStringFloat64 map[string]float64
  137. FptrMapStringFloat64 *map[string]float64
  138. FMapStringBool map[string]bool
  139. FptrMapStringBool *map[string]bool
  140. FMapFloat32Intf map[float32]interface{}
  141. FptrMapFloat32Intf *map[float32]interface{}
  142. FMapFloat32String map[float32]string
  143. FptrMapFloat32String *map[float32]string
  144. FMapFloat32Uint map[float32]uint
  145. FptrMapFloat32Uint *map[float32]uint
  146. FMapFloat32Uint8 map[float32]uint8
  147. FptrMapFloat32Uint8 *map[float32]uint8
  148. FMapFloat32Uint16 map[float32]uint16
  149. FptrMapFloat32Uint16 *map[float32]uint16
  150. FMapFloat32Uint32 map[float32]uint32
  151. FptrMapFloat32Uint32 *map[float32]uint32
  152. FMapFloat32Uint64 map[float32]uint64
  153. FptrMapFloat32Uint64 *map[float32]uint64
  154. FMapFloat32Uintptr map[float32]uintptr
  155. FptrMapFloat32Uintptr *map[float32]uintptr
  156. FMapFloat32Int map[float32]int
  157. FptrMapFloat32Int *map[float32]int
  158. FMapFloat32Int8 map[float32]int8
  159. FptrMapFloat32Int8 *map[float32]int8
  160. FMapFloat32Int16 map[float32]int16
  161. FptrMapFloat32Int16 *map[float32]int16
  162. FMapFloat32Int32 map[float32]int32
  163. FptrMapFloat32Int32 *map[float32]int32
  164. FMapFloat32Int64 map[float32]int64
  165. FptrMapFloat32Int64 *map[float32]int64
  166. FMapFloat32Float32 map[float32]float32
  167. FptrMapFloat32Float32 *map[float32]float32
  168. FMapFloat32Float64 map[float32]float64
  169. FptrMapFloat32Float64 *map[float32]float64
  170. FMapFloat32Bool map[float32]bool
  171. FptrMapFloat32Bool *map[float32]bool
  172. FMapFloat64Intf map[float64]interface{}
  173. FptrMapFloat64Intf *map[float64]interface{}
  174. FMapFloat64String map[float64]string
  175. FptrMapFloat64String *map[float64]string
  176. FMapFloat64Uint map[float64]uint
  177. FptrMapFloat64Uint *map[float64]uint
  178. FMapFloat64Uint8 map[float64]uint8
  179. FptrMapFloat64Uint8 *map[float64]uint8
  180. FMapFloat64Uint16 map[float64]uint16
  181. FptrMapFloat64Uint16 *map[float64]uint16
  182. FMapFloat64Uint32 map[float64]uint32
  183. FptrMapFloat64Uint32 *map[float64]uint32
  184. FMapFloat64Uint64 map[float64]uint64
  185. FptrMapFloat64Uint64 *map[float64]uint64
  186. FMapFloat64Uintptr map[float64]uintptr
  187. FptrMapFloat64Uintptr *map[float64]uintptr
  188. FMapFloat64Int map[float64]int
  189. FptrMapFloat64Int *map[float64]int
  190. FMapFloat64Int8 map[float64]int8
  191. FptrMapFloat64Int8 *map[float64]int8
  192. FMapFloat64Int16 map[float64]int16
  193. FptrMapFloat64Int16 *map[float64]int16
  194. FMapFloat64Int32 map[float64]int32
  195. FptrMapFloat64Int32 *map[float64]int32
  196. FMapFloat64Int64 map[float64]int64
  197. FptrMapFloat64Int64 *map[float64]int64
  198. FMapFloat64Float32 map[float64]float32
  199. FptrMapFloat64Float32 *map[float64]float32
  200. FMapFloat64Float64 map[float64]float64
  201. FptrMapFloat64Float64 *map[float64]float64
  202. FMapFloat64Bool map[float64]bool
  203. FptrMapFloat64Bool *map[float64]bool
  204. FMapUintIntf map[uint]interface{}
  205. FptrMapUintIntf *map[uint]interface{}
  206. FMapUintString map[uint]string
  207. FptrMapUintString *map[uint]string
  208. FMapUintUint map[uint]uint
  209. FptrMapUintUint *map[uint]uint
  210. FMapUintUint8 map[uint]uint8
  211. FptrMapUintUint8 *map[uint]uint8
  212. FMapUintUint16 map[uint]uint16
  213. FptrMapUintUint16 *map[uint]uint16
  214. FMapUintUint32 map[uint]uint32
  215. FptrMapUintUint32 *map[uint]uint32
  216. FMapUintUint64 map[uint]uint64
  217. FptrMapUintUint64 *map[uint]uint64
  218. FMapUintUintptr map[uint]uintptr
  219. FptrMapUintUintptr *map[uint]uintptr
  220. FMapUintInt map[uint]int
  221. FptrMapUintInt *map[uint]int
  222. FMapUintInt8 map[uint]int8
  223. FptrMapUintInt8 *map[uint]int8
  224. FMapUintInt16 map[uint]int16
  225. FptrMapUintInt16 *map[uint]int16
  226. FMapUintInt32 map[uint]int32
  227. FptrMapUintInt32 *map[uint]int32
  228. FMapUintInt64 map[uint]int64
  229. FptrMapUintInt64 *map[uint]int64
  230. FMapUintFloat32 map[uint]float32
  231. FptrMapUintFloat32 *map[uint]float32
  232. FMapUintFloat64 map[uint]float64
  233. FptrMapUintFloat64 *map[uint]float64
  234. FMapUintBool map[uint]bool
  235. FptrMapUintBool *map[uint]bool
  236. FMapUint8Intf map[uint8]interface{}
  237. FptrMapUint8Intf *map[uint8]interface{}
  238. FMapUint8String map[uint8]string
  239. FptrMapUint8String *map[uint8]string
  240. FMapUint8Uint map[uint8]uint
  241. FptrMapUint8Uint *map[uint8]uint
  242. FMapUint8Uint8 map[uint8]uint8
  243. FptrMapUint8Uint8 *map[uint8]uint8
  244. FMapUint8Uint16 map[uint8]uint16
  245. FptrMapUint8Uint16 *map[uint8]uint16
  246. FMapUint8Uint32 map[uint8]uint32
  247. FptrMapUint8Uint32 *map[uint8]uint32
  248. FMapUint8Uint64 map[uint8]uint64
  249. FptrMapUint8Uint64 *map[uint8]uint64
  250. FMapUint8Uintptr map[uint8]uintptr
  251. FptrMapUint8Uintptr *map[uint8]uintptr
  252. FMapUint8Int map[uint8]int
  253. FptrMapUint8Int *map[uint8]int
  254. FMapUint8Int8 map[uint8]int8
  255. FptrMapUint8Int8 *map[uint8]int8
  256. FMapUint8Int16 map[uint8]int16
  257. FptrMapUint8Int16 *map[uint8]int16
  258. FMapUint8Int32 map[uint8]int32
  259. FptrMapUint8Int32 *map[uint8]int32
  260. FMapUint8Int64 map[uint8]int64
  261. FptrMapUint8Int64 *map[uint8]int64
  262. FMapUint8Float32 map[uint8]float32
  263. FptrMapUint8Float32 *map[uint8]float32
  264. FMapUint8Float64 map[uint8]float64
  265. FptrMapUint8Float64 *map[uint8]float64
  266. FMapUint8Bool map[uint8]bool
  267. FptrMapUint8Bool *map[uint8]bool
  268. FMapUint16Intf map[uint16]interface{}
  269. FptrMapUint16Intf *map[uint16]interface{}
  270. FMapUint16String map[uint16]string
  271. FptrMapUint16String *map[uint16]string
  272. FMapUint16Uint map[uint16]uint
  273. FptrMapUint16Uint *map[uint16]uint
  274. FMapUint16Uint8 map[uint16]uint8
  275. FptrMapUint16Uint8 *map[uint16]uint8
  276. FMapUint16Uint16 map[uint16]uint16
  277. FptrMapUint16Uint16 *map[uint16]uint16
  278. FMapUint16Uint32 map[uint16]uint32
  279. FptrMapUint16Uint32 *map[uint16]uint32
  280. FMapUint16Uint64 map[uint16]uint64
  281. FptrMapUint16Uint64 *map[uint16]uint64
  282. FMapUint16Uintptr map[uint16]uintptr
  283. FptrMapUint16Uintptr *map[uint16]uintptr
  284. FMapUint16Int map[uint16]int
  285. FptrMapUint16Int *map[uint16]int
  286. FMapUint16Int8 map[uint16]int8
  287. FptrMapUint16Int8 *map[uint16]int8
  288. FMapUint16Int16 map[uint16]int16
  289. FptrMapUint16Int16 *map[uint16]int16
  290. FMapUint16Int32 map[uint16]int32
  291. FptrMapUint16Int32 *map[uint16]int32
  292. FMapUint16Int64 map[uint16]int64
  293. FptrMapUint16Int64 *map[uint16]int64
  294. FMapUint16Float32 map[uint16]float32
  295. FptrMapUint16Float32 *map[uint16]float32
  296. FMapUint16Float64 map[uint16]float64
  297. FptrMapUint16Float64 *map[uint16]float64
  298. FMapUint16Bool map[uint16]bool
  299. FptrMapUint16Bool *map[uint16]bool
  300. FMapUint32Intf map[uint32]interface{}
  301. FptrMapUint32Intf *map[uint32]interface{}
  302. FMapUint32String map[uint32]string
  303. FptrMapUint32String *map[uint32]string
  304. FMapUint32Uint map[uint32]uint
  305. FptrMapUint32Uint *map[uint32]uint
  306. FMapUint32Uint8 map[uint32]uint8
  307. FptrMapUint32Uint8 *map[uint32]uint8
  308. FMapUint32Uint16 map[uint32]uint16
  309. FptrMapUint32Uint16 *map[uint32]uint16
  310. FMapUint32Uint32 map[uint32]uint32
  311. FptrMapUint32Uint32 *map[uint32]uint32
  312. FMapUint32Uint64 map[uint32]uint64
  313. FptrMapUint32Uint64 *map[uint32]uint64
  314. FMapUint32Uintptr map[uint32]uintptr
  315. FptrMapUint32Uintptr *map[uint32]uintptr
  316. FMapUint32Int map[uint32]int
  317. FptrMapUint32Int *map[uint32]int
  318. FMapUint32Int8 map[uint32]int8
  319. FptrMapUint32Int8 *map[uint32]int8
  320. FMapUint32Int16 map[uint32]int16
  321. FptrMapUint32Int16 *map[uint32]int16
  322. FMapUint32Int32 map[uint32]int32
  323. FptrMapUint32Int32 *map[uint32]int32
  324. FMapUint32Int64 map[uint32]int64
  325. FptrMapUint32Int64 *map[uint32]int64
  326. FMapUint32Float32 map[uint32]float32
  327. FptrMapUint32Float32 *map[uint32]float32
  328. FMapUint32Float64 map[uint32]float64
  329. FptrMapUint32Float64 *map[uint32]float64
  330. FMapUint32Bool map[uint32]bool
  331. FptrMapUint32Bool *map[uint32]bool
  332. FMapUint64Intf map[uint64]interface{}
  333. FptrMapUint64Intf *map[uint64]interface{}
  334. FMapUint64String map[uint64]string
  335. FptrMapUint64String *map[uint64]string
  336. FMapUint64Uint map[uint64]uint
  337. FptrMapUint64Uint *map[uint64]uint
  338. FMapUint64Uint8 map[uint64]uint8
  339. FptrMapUint64Uint8 *map[uint64]uint8
  340. FMapUint64Uint16 map[uint64]uint16
  341. FptrMapUint64Uint16 *map[uint64]uint16
  342. FMapUint64Uint32 map[uint64]uint32
  343. FptrMapUint64Uint32 *map[uint64]uint32
  344. FMapUint64Uint64 map[uint64]uint64
  345. FptrMapUint64Uint64 *map[uint64]uint64
  346. FMapUint64Uintptr map[uint64]uintptr
  347. FptrMapUint64Uintptr *map[uint64]uintptr
  348. FMapUint64Int map[uint64]int
  349. FptrMapUint64Int *map[uint64]int
  350. FMapUint64Int8 map[uint64]int8
  351. FptrMapUint64Int8 *map[uint64]int8
  352. FMapUint64Int16 map[uint64]int16
  353. FptrMapUint64Int16 *map[uint64]int16
  354. FMapUint64Int32 map[uint64]int32
  355. FptrMapUint64Int32 *map[uint64]int32
  356. FMapUint64Int64 map[uint64]int64
  357. FptrMapUint64Int64 *map[uint64]int64
  358. FMapUint64Float32 map[uint64]float32
  359. FptrMapUint64Float32 *map[uint64]float32
  360. FMapUint64Float64 map[uint64]float64
  361. FptrMapUint64Float64 *map[uint64]float64
  362. FMapUint64Bool map[uint64]bool
  363. FptrMapUint64Bool *map[uint64]bool
  364. FMapUintptrIntf map[uintptr]interface{}
  365. FptrMapUintptrIntf *map[uintptr]interface{}
  366. FMapUintptrString map[uintptr]string
  367. FptrMapUintptrString *map[uintptr]string
  368. FMapUintptrUint map[uintptr]uint
  369. FptrMapUintptrUint *map[uintptr]uint
  370. FMapUintptrUint8 map[uintptr]uint8
  371. FptrMapUintptrUint8 *map[uintptr]uint8
  372. FMapUintptrUint16 map[uintptr]uint16
  373. FptrMapUintptrUint16 *map[uintptr]uint16
  374. FMapUintptrUint32 map[uintptr]uint32
  375. FptrMapUintptrUint32 *map[uintptr]uint32
  376. FMapUintptrUint64 map[uintptr]uint64
  377. FptrMapUintptrUint64 *map[uintptr]uint64
  378. FMapUintptrUintptr map[uintptr]uintptr
  379. FptrMapUintptrUintptr *map[uintptr]uintptr
  380. FMapUintptrInt map[uintptr]int
  381. FptrMapUintptrInt *map[uintptr]int
  382. FMapUintptrInt8 map[uintptr]int8
  383. FptrMapUintptrInt8 *map[uintptr]int8
  384. FMapUintptrInt16 map[uintptr]int16
  385. FptrMapUintptrInt16 *map[uintptr]int16
  386. FMapUintptrInt32 map[uintptr]int32
  387. FptrMapUintptrInt32 *map[uintptr]int32
  388. FMapUintptrInt64 map[uintptr]int64
  389. FptrMapUintptrInt64 *map[uintptr]int64
  390. FMapUintptrFloat32 map[uintptr]float32
  391. FptrMapUintptrFloat32 *map[uintptr]float32
  392. FMapUintptrFloat64 map[uintptr]float64
  393. FptrMapUintptrFloat64 *map[uintptr]float64
  394. FMapUintptrBool map[uintptr]bool
  395. FptrMapUintptrBool *map[uintptr]bool
  396. FMapIntIntf map[int]interface{}
  397. FptrMapIntIntf *map[int]interface{}
  398. FMapIntString map[int]string
  399. FptrMapIntString *map[int]string
  400. FMapIntUint map[int]uint
  401. FptrMapIntUint *map[int]uint
  402. FMapIntUint8 map[int]uint8
  403. FptrMapIntUint8 *map[int]uint8
  404. FMapIntUint16 map[int]uint16
  405. FptrMapIntUint16 *map[int]uint16
  406. FMapIntUint32 map[int]uint32
  407. FptrMapIntUint32 *map[int]uint32
  408. FMapIntUint64 map[int]uint64
  409. FptrMapIntUint64 *map[int]uint64
  410. FMapIntUintptr map[int]uintptr
  411. FptrMapIntUintptr *map[int]uintptr
  412. FMapIntInt map[int]int
  413. FptrMapIntInt *map[int]int
  414. FMapIntInt8 map[int]int8
  415. FptrMapIntInt8 *map[int]int8
  416. FMapIntInt16 map[int]int16
  417. FptrMapIntInt16 *map[int]int16
  418. FMapIntInt32 map[int]int32
  419. FptrMapIntInt32 *map[int]int32
  420. FMapIntInt64 map[int]int64
  421. FptrMapIntInt64 *map[int]int64
  422. FMapIntFloat32 map[int]float32
  423. FptrMapIntFloat32 *map[int]float32
  424. FMapIntFloat64 map[int]float64
  425. FptrMapIntFloat64 *map[int]float64
  426. FMapIntBool map[int]bool
  427. FptrMapIntBool *map[int]bool
  428. FMapInt8Intf map[int8]interface{}
  429. FptrMapInt8Intf *map[int8]interface{}
  430. FMapInt8String map[int8]string
  431. FptrMapInt8String *map[int8]string
  432. FMapInt8Uint map[int8]uint
  433. FptrMapInt8Uint *map[int8]uint
  434. FMapInt8Uint8 map[int8]uint8
  435. FptrMapInt8Uint8 *map[int8]uint8
  436. FMapInt8Uint16 map[int8]uint16
  437. FptrMapInt8Uint16 *map[int8]uint16
  438. FMapInt8Uint32 map[int8]uint32
  439. FptrMapInt8Uint32 *map[int8]uint32
  440. FMapInt8Uint64 map[int8]uint64
  441. FptrMapInt8Uint64 *map[int8]uint64
  442. FMapInt8Uintptr map[int8]uintptr
  443. FptrMapInt8Uintptr *map[int8]uintptr
  444. FMapInt8Int map[int8]int
  445. FptrMapInt8Int *map[int8]int
  446. FMapInt8Int8 map[int8]int8
  447. FptrMapInt8Int8 *map[int8]int8
  448. FMapInt8Int16 map[int8]int16
  449. FptrMapInt8Int16 *map[int8]int16
  450. FMapInt8Int32 map[int8]int32
  451. FptrMapInt8Int32 *map[int8]int32
  452. FMapInt8Int64 map[int8]int64
  453. FptrMapInt8Int64 *map[int8]int64
  454. FMapInt8Float32 map[int8]float32
  455. FptrMapInt8Float32 *map[int8]float32
  456. FMapInt8Float64 map[int8]float64
  457. FptrMapInt8Float64 *map[int8]float64
  458. FMapInt8Bool map[int8]bool
  459. FptrMapInt8Bool *map[int8]bool
  460. FMapInt16Intf map[int16]interface{}
  461. FptrMapInt16Intf *map[int16]interface{}
  462. FMapInt16String map[int16]string
  463. FptrMapInt16String *map[int16]string
  464. FMapInt16Uint map[int16]uint
  465. FptrMapInt16Uint *map[int16]uint
  466. FMapInt16Uint8 map[int16]uint8
  467. FptrMapInt16Uint8 *map[int16]uint8
  468. FMapInt16Uint16 map[int16]uint16
  469. FptrMapInt16Uint16 *map[int16]uint16
  470. FMapInt16Uint32 map[int16]uint32
  471. FptrMapInt16Uint32 *map[int16]uint32
  472. FMapInt16Uint64 map[int16]uint64
  473. FptrMapInt16Uint64 *map[int16]uint64
  474. FMapInt16Uintptr map[int16]uintptr
  475. FptrMapInt16Uintptr *map[int16]uintptr
  476. FMapInt16Int map[int16]int
  477. FptrMapInt16Int *map[int16]int
  478. FMapInt16Int8 map[int16]int8
  479. FptrMapInt16Int8 *map[int16]int8
  480. FMapInt16Int16 map[int16]int16
  481. FptrMapInt16Int16 *map[int16]int16
  482. FMapInt16Int32 map[int16]int32
  483. FptrMapInt16Int32 *map[int16]int32
  484. FMapInt16Int64 map[int16]int64
  485. FptrMapInt16Int64 *map[int16]int64
  486. FMapInt16Float32 map[int16]float32
  487. FptrMapInt16Float32 *map[int16]float32
  488. FMapInt16Float64 map[int16]float64
  489. FptrMapInt16Float64 *map[int16]float64
  490. FMapInt16Bool map[int16]bool
  491. FptrMapInt16Bool *map[int16]bool
  492. FMapInt32Intf map[int32]interface{}
  493. FptrMapInt32Intf *map[int32]interface{}
  494. FMapInt32String map[int32]string
  495. FptrMapInt32String *map[int32]string
  496. FMapInt32Uint map[int32]uint
  497. FptrMapInt32Uint *map[int32]uint
  498. FMapInt32Uint8 map[int32]uint8
  499. FptrMapInt32Uint8 *map[int32]uint8
  500. FMapInt32Uint16 map[int32]uint16
  501. FptrMapInt32Uint16 *map[int32]uint16
  502. FMapInt32Uint32 map[int32]uint32
  503. FptrMapInt32Uint32 *map[int32]uint32
  504. FMapInt32Uint64 map[int32]uint64
  505. FptrMapInt32Uint64 *map[int32]uint64
  506. FMapInt32Uintptr map[int32]uintptr
  507. FptrMapInt32Uintptr *map[int32]uintptr
  508. FMapInt32Int map[int32]int
  509. FptrMapInt32Int *map[int32]int
  510. FMapInt32Int8 map[int32]int8
  511. FptrMapInt32Int8 *map[int32]int8
  512. FMapInt32Int16 map[int32]int16
  513. FptrMapInt32Int16 *map[int32]int16
  514. FMapInt32Int32 map[int32]int32
  515. FptrMapInt32Int32 *map[int32]int32
  516. FMapInt32Int64 map[int32]int64
  517. FptrMapInt32Int64 *map[int32]int64
  518. FMapInt32Float32 map[int32]float32
  519. FptrMapInt32Float32 *map[int32]float32
  520. FMapInt32Float64 map[int32]float64
  521. FptrMapInt32Float64 *map[int32]float64
  522. FMapInt32Bool map[int32]bool
  523. FptrMapInt32Bool *map[int32]bool
  524. FMapInt64Intf map[int64]interface{}
  525. FptrMapInt64Intf *map[int64]interface{}
  526. FMapInt64String map[int64]string
  527. FptrMapInt64String *map[int64]string
  528. FMapInt64Uint map[int64]uint
  529. FptrMapInt64Uint *map[int64]uint
  530. FMapInt64Uint8 map[int64]uint8
  531. FptrMapInt64Uint8 *map[int64]uint8
  532. FMapInt64Uint16 map[int64]uint16
  533. FptrMapInt64Uint16 *map[int64]uint16
  534. FMapInt64Uint32 map[int64]uint32
  535. FptrMapInt64Uint32 *map[int64]uint32
  536. FMapInt64Uint64 map[int64]uint64
  537. FptrMapInt64Uint64 *map[int64]uint64
  538. FMapInt64Uintptr map[int64]uintptr
  539. FptrMapInt64Uintptr *map[int64]uintptr
  540. FMapInt64Int map[int64]int
  541. FptrMapInt64Int *map[int64]int
  542. FMapInt64Int8 map[int64]int8
  543. FptrMapInt64Int8 *map[int64]int8
  544. FMapInt64Int16 map[int64]int16
  545. FptrMapInt64Int16 *map[int64]int16
  546. FMapInt64Int32 map[int64]int32
  547. FptrMapInt64Int32 *map[int64]int32
  548. FMapInt64Int64 map[int64]int64
  549. FptrMapInt64Int64 *map[int64]int64
  550. FMapInt64Float32 map[int64]float32
  551. FptrMapInt64Float32 *map[int64]float32
  552. FMapInt64Float64 map[int64]float64
  553. FptrMapInt64Float64 *map[int64]float64
  554. FMapInt64Bool map[int64]bool
  555. FptrMapInt64Bool *map[int64]bool
  556. FMapBoolIntf map[bool]interface{}
  557. FptrMapBoolIntf *map[bool]interface{}
  558. FMapBoolString map[bool]string
  559. FptrMapBoolString *map[bool]string
  560. FMapBoolUint map[bool]uint
  561. FptrMapBoolUint *map[bool]uint
  562. FMapBoolUint8 map[bool]uint8
  563. FptrMapBoolUint8 *map[bool]uint8
  564. FMapBoolUint16 map[bool]uint16
  565. FptrMapBoolUint16 *map[bool]uint16
  566. FMapBoolUint32 map[bool]uint32
  567. FptrMapBoolUint32 *map[bool]uint32
  568. FMapBoolUint64 map[bool]uint64
  569. FptrMapBoolUint64 *map[bool]uint64
  570. FMapBoolUintptr map[bool]uintptr
  571. FptrMapBoolUintptr *map[bool]uintptr
  572. FMapBoolInt map[bool]int
  573. FptrMapBoolInt *map[bool]int
  574. FMapBoolInt8 map[bool]int8
  575. FptrMapBoolInt8 *map[bool]int8
  576. FMapBoolInt16 map[bool]int16
  577. FptrMapBoolInt16 *map[bool]int16
  578. FMapBoolInt32 map[bool]int32
  579. FptrMapBoolInt32 *map[bool]int32
  580. FMapBoolInt64 map[bool]int64
  581. FptrMapBoolInt64 *map[bool]int64
  582. FMapBoolFloat32 map[bool]float32
  583. FptrMapBoolFloat32 *map[bool]float32
  584. FMapBoolFloat64 map[bool]float64
  585. FptrMapBoolFloat64 *map[bool]float64
  586. FMapBoolBool map[bool]bool
  587. FptrMapBoolBool *map[bool]bool
  588. }
  589. type typMbsSliceIntf []interface{}
  590. func (_ typMbsSliceIntf) MapBySlice() {}
  591. type typMbsSliceString []string
  592. func (_ typMbsSliceString) MapBySlice() {}
  593. type typMbsSliceFloat32 []float32
  594. func (_ typMbsSliceFloat32) MapBySlice() {}
  595. type typMbsSliceFloat64 []float64
  596. func (_ typMbsSliceFloat64) MapBySlice() {}
  597. type typMbsSliceUint []uint
  598. func (_ typMbsSliceUint) MapBySlice() {}
  599. type typMbsSliceUint16 []uint16
  600. func (_ typMbsSliceUint16) MapBySlice() {}
  601. type typMbsSliceUint32 []uint32
  602. func (_ typMbsSliceUint32) MapBySlice() {}
  603. type typMbsSliceUint64 []uint64
  604. func (_ typMbsSliceUint64) MapBySlice() {}
  605. type typMbsSliceUintptr []uintptr
  606. func (_ typMbsSliceUintptr) MapBySlice() {}
  607. type typMbsSliceInt []int
  608. func (_ typMbsSliceInt) MapBySlice() {}
  609. type typMbsSliceInt8 []int8
  610. func (_ typMbsSliceInt8) MapBySlice() {}
  611. type typMbsSliceInt16 []int16
  612. func (_ typMbsSliceInt16) MapBySlice() {}
  613. type typMbsSliceInt32 []int32
  614. func (_ typMbsSliceInt32) MapBySlice() {}
  615. type typMbsSliceInt64 []int64
  616. func (_ typMbsSliceInt64) MapBySlice() {}
  617. type typMbsSliceBool []bool
  618. func (_ typMbsSliceBool) MapBySlice() {}
  619. type typMapMapIntfIntf map[interface{}]interface{}
  620. type typMapMapIntfString map[interface{}]string
  621. type typMapMapIntfUint map[interface{}]uint
  622. type typMapMapIntfUint8 map[interface{}]uint8
  623. type typMapMapIntfUint16 map[interface{}]uint16
  624. type typMapMapIntfUint32 map[interface{}]uint32
  625. type typMapMapIntfUint64 map[interface{}]uint64
  626. type typMapMapIntfUintptr map[interface{}]uintptr
  627. type typMapMapIntfInt map[interface{}]int
  628. type typMapMapIntfInt8 map[interface{}]int8
  629. type typMapMapIntfInt16 map[interface{}]int16
  630. type typMapMapIntfInt32 map[interface{}]int32
  631. type typMapMapIntfInt64 map[interface{}]int64
  632. type typMapMapIntfFloat32 map[interface{}]float32
  633. type typMapMapIntfFloat64 map[interface{}]float64
  634. type typMapMapIntfBool map[interface{}]bool
  635. type typMapMapStringIntf map[string]interface{}
  636. type typMapMapStringString map[string]string
  637. type typMapMapStringUint map[string]uint
  638. type typMapMapStringUint8 map[string]uint8
  639. type typMapMapStringUint16 map[string]uint16
  640. type typMapMapStringUint32 map[string]uint32
  641. type typMapMapStringUint64 map[string]uint64
  642. type typMapMapStringUintptr map[string]uintptr
  643. type typMapMapStringInt map[string]int
  644. type typMapMapStringInt8 map[string]int8
  645. type typMapMapStringInt16 map[string]int16
  646. type typMapMapStringInt32 map[string]int32
  647. type typMapMapStringInt64 map[string]int64
  648. type typMapMapStringFloat32 map[string]float32
  649. type typMapMapStringFloat64 map[string]float64
  650. type typMapMapStringBool map[string]bool
  651. type typMapMapFloat32Intf map[float32]interface{}
  652. type typMapMapFloat32String map[float32]string
  653. type typMapMapFloat32Uint map[float32]uint
  654. type typMapMapFloat32Uint8 map[float32]uint8
  655. type typMapMapFloat32Uint16 map[float32]uint16
  656. type typMapMapFloat32Uint32 map[float32]uint32
  657. type typMapMapFloat32Uint64 map[float32]uint64
  658. type typMapMapFloat32Uintptr map[float32]uintptr
  659. type typMapMapFloat32Int map[float32]int
  660. type typMapMapFloat32Int8 map[float32]int8
  661. type typMapMapFloat32Int16 map[float32]int16
  662. type typMapMapFloat32Int32 map[float32]int32
  663. type typMapMapFloat32Int64 map[float32]int64
  664. type typMapMapFloat32Float32 map[float32]float32
  665. type typMapMapFloat32Float64 map[float32]float64
  666. type typMapMapFloat32Bool map[float32]bool
  667. type typMapMapFloat64Intf map[float64]interface{}
  668. type typMapMapFloat64String map[float64]string
  669. type typMapMapFloat64Uint map[float64]uint
  670. type typMapMapFloat64Uint8 map[float64]uint8
  671. type typMapMapFloat64Uint16 map[float64]uint16
  672. type typMapMapFloat64Uint32 map[float64]uint32
  673. type typMapMapFloat64Uint64 map[float64]uint64
  674. type typMapMapFloat64Uintptr map[float64]uintptr
  675. type typMapMapFloat64Int map[float64]int
  676. type typMapMapFloat64Int8 map[float64]int8
  677. type typMapMapFloat64Int16 map[float64]int16
  678. type typMapMapFloat64Int32 map[float64]int32
  679. type typMapMapFloat64Int64 map[float64]int64
  680. type typMapMapFloat64Float32 map[float64]float32
  681. type typMapMapFloat64Float64 map[float64]float64
  682. type typMapMapFloat64Bool map[float64]bool
  683. type typMapMapUintIntf map[uint]interface{}
  684. type typMapMapUintString map[uint]string
  685. type typMapMapUintUint map[uint]uint
  686. type typMapMapUintUint8 map[uint]uint8
  687. type typMapMapUintUint16 map[uint]uint16
  688. type typMapMapUintUint32 map[uint]uint32
  689. type typMapMapUintUint64 map[uint]uint64
  690. type typMapMapUintUintptr map[uint]uintptr
  691. type typMapMapUintInt map[uint]int
  692. type typMapMapUintInt8 map[uint]int8
  693. type typMapMapUintInt16 map[uint]int16
  694. type typMapMapUintInt32 map[uint]int32
  695. type typMapMapUintInt64 map[uint]int64
  696. type typMapMapUintFloat32 map[uint]float32
  697. type typMapMapUintFloat64 map[uint]float64
  698. type typMapMapUintBool map[uint]bool
  699. type typMapMapUint8Intf map[uint8]interface{}
  700. type typMapMapUint8String map[uint8]string
  701. type typMapMapUint8Uint map[uint8]uint
  702. type typMapMapUint8Uint8 map[uint8]uint8
  703. type typMapMapUint8Uint16 map[uint8]uint16
  704. type typMapMapUint8Uint32 map[uint8]uint32
  705. type typMapMapUint8Uint64 map[uint8]uint64
  706. type typMapMapUint8Uintptr map[uint8]uintptr
  707. type typMapMapUint8Int map[uint8]int
  708. type typMapMapUint8Int8 map[uint8]int8
  709. type typMapMapUint8Int16 map[uint8]int16
  710. type typMapMapUint8Int32 map[uint8]int32
  711. type typMapMapUint8Int64 map[uint8]int64
  712. type typMapMapUint8Float32 map[uint8]float32
  713. type typMapMapUint8Float64 map[uint8]float64
  714. type typMapMapUint8Bool map[uint8]bool
  715. type typMapMapUint16Intf map[uint16]interface{}
  716. type typMapMapUint16String map[uint16]string
  717. type typMapMapUint16Uint map[uint16]uint
  718. type typMapMapUint16Uint8 map[uint16]uint8
  719. type typMapMapUint16Uint16 map[uint16]uint16
  720. type typMapMapUint16Uint32 map[uint16]uint32
  721. type typMapMapUint16Uint64 map[uint16]uint64
  722. type typMapMapUint16Uintptr map[uint16]uintptr
  723. type typMapMapUint16Int map[uint16]int
  724. type typMapMapUint16Int8 map[uint16]int8
  725. type typMapMapUint16Int16 map[uint16]int16
  726. type typMapMapUint16Int32 map[uint16]int32
  727. type typMapMapUint16Int64 map[uint16]int64
  728. type typMapMapUint16Float32 map[uint16]float32
  729. type typMapMapUint16Float64 map[uint16]float64
  730. type typMapMapUint16Bool map[uint16]bool
  731. type typMapMapUint32Intf map[uint32]interface{}
  732. type typMapMapUint32String map[uint32]string
  733. type typMapMapUint32Uint map[uint32]uint
  734. type typMapMapUint32Uint8 map[uint32]uint8
  735. type typMapMapUint32Uint16 map[uint32]uint16
  736. type typMapMapUint32Uint32 map[uint32]uint32
  737. type typMapMapUint32Uint64 map[uint32]uint64
  738. type typMapMapUint32Uintptr map[uint32]uintptr
  739. type typMapMapUint32Int map[uint32]int
  740. type typMapMapUint32Int8 map[uint32]int8
  741. type typMapMapUint32Int16 map[uint32]int16
  742. type typMapMapUint32Int32 map[uint32]int32
  743. type typMapMapUint32Int64 map[uint32]int64
  744. type typMapMapUint32Float32 map[uint32]float32
  745. type typMapMapUint32Float64 map[uint32]float64
  746. type typMapMapUint32Bool map[uint32]bool
  747. type typMapMapUint64Intf map[uint64]interface{}
  748. type typMapMapUint64String map[uint64]string
  749. type typMapMapUint64Uint map[uint64]uint
  750. type typMapMapUint64Uint8 map[uint64]uint8
  751. type typMapMapUint64Uint16 map[uint64]uint16
  752. type typMapMapUint64Uint32 map[uint64]uint32
  753. type typMapMapUint64Uint64 map[uint64]uint64
  754. type typMapMapUint64Uintptr map[uint64]uintptr
  755. type typMapMapUint64Int map[uint64]int
  756. type typMapMapUint64Int8 map[uint64]int8
  757. type typMapMapUint64Int16 map[uint64]int16
  758. type typMapMapUint64Int32 map[uint64]int32
  759. type typMapMapUint64Int64 map[uint64]int64
  760. type typMapMapUint64Float32 map[uint64]float32
  761. type typMapMapUint64Float64 map[uint64]float64
  762. type typMapMapUint64Bool map[uint64]bool
  763. type typMapMapUintptrIntf map[uintptr]interface{}
  764. type typMapMapUintptrString map[uintptr]string
  765. type typMapMapUintptrUint map[uintptr]uint
  766. type typMapMapUintptrUint8 map[uintptr]uint8
  767. type typMapMapUintptrUint16 map[uintptr]uint16
  768. type typMapMapUintptrUint32 map[uintptr]uint32
  769. type typMapMapUintptrUint64 map[uintptr]uint64
  770. type typMapMapUintptrUintptr map[uintptr]uintptr
  771. type typMapMapUintptrInt map[uintptr]int
  772. type typMapMapUintptrInt8 map[uintptr]int8
  773. type typMapMapUintptrInt16 map[uintptr]int16
  774. type typMapMapUintptrInt32 map[uintptr]int32
  775. type typMapMapUintptrInt64 map[uintptr]int64
  776. type typMapMapUintptrFloat32 map[uintptr]float32
  777. type typMapMapUintptrFloat64 map[uintptr]float64
  778. type typMapMapUintptrBool map[uintptr]bool
  779. type typMapMapIntIntf map[int]interface{}
  780. type typMapMapIntString map[int]string
  781. type typMapMapIntUint map[int]uint
  782. type typMapMapIntUint8 map[int]uint8
  783. type typMapMapIntUint16 map[int]uint16
  784. type typMapMapIntUint32 map[int]uint32
  785. type typMapMapIntUint64 map[int]uint64
  786. type typMapMapIntUintptr map[int]uintptr
  787. type typMapMapIntInt map[int]int
  788. type typMapMapIntInt8 map[int]int8
  789. type typMapMapIntInt16 map[int]int16
  790. type typMapMapIntInt32 map[int]int32
  791. type typMapMapIntInt64 map[int]int64
  792. type typMapMapIntFloat32 map[int]float32
  793. type typMapMapIntFloat64 map[int]float64
  794. type typMapMapIntBool map[int]bool
  795. type typMapMapInt8Intf map[int8]interface{}
  796. type typMapMapInt8String map[int8]string
  797. type typMapMapInt8Uint map[int8]uint
  798. type typMapMapInt8Uint8 map[int8]uint8
  799. type typMapMapInt8Uint16 map[int8]uint16
  800. type typMapMapInt8Uint32 map[int8]uint32
  801. type typMapMapInt8Uint64 map[int8]uint64
  802. type typMapMapInt8Uintptr map[int8]uintptr
  803. type typMapMapInt8Int map[int8]int
  804. type typMapMapInt8Int8 map[int8]int8
  805. type typMapMapInt8Int16 map[int8]int16
  806. type typMapMapInt8Int32 map[int8]int32
  807. type typMapMapInt8Int64 map[int8]int64
  808. type typMapMapInt8Float32 map[int8]float32
  809. type typMapMapInt8Float64 map[int8]float64
  810. type typMapMapInt8Bool map[int8]bool
  811. type typMapMapInt16Intf map[int16]interface{}
  812. type typMapMapInt16String map[int16]string
  813. type typMapMapInt16Uint map[int16]uint
  814. type typMapMapInt16Uint8 map[int16]uint8
  815. type typMapMapInt16Uint16 map[int16]uint16
  816. type typMapMapInt16Uint32 map[int16]uint32
  817. type typMapMapInt16Uint64 map[int16]uint64
  818. type typMapMapInt16Uintptr map[int16]uintptr
  819. type typMapMapInt16Int map[int16]int
  820. type typMapMapInt16Int8 map[int16]int8
  821. type typMapMapInt16Int16 map[int16]int16
  822. type typMapMapInt16Int32 map[int16]int32
  823. type typMapMapInt16Int64 map[int16]int64
  824. type typMapMapInt16Float32 map[int16]float32
  825. type typMapMapInt16Float64 map[int16]float64
  826. type typMapMapInt16Bool map[int16]bool
  827. type typMapMapInt32Intf map[int32]interface{}
  828. type typMapMapInt32String map[int32]string
  829. type typMapMapInt32Uint map[int32]uint
  830. type typMapMapInt32Uint8 map[int32]uint8
  831. type typMapMapInt32Uint16 map[int32]uint16
  832. type typMapMapInt32Uint32 map[int32]uint32
  833. type typMapMapInt32Uint64 map[int32]uint64
  834. type typMapMapInt32Uintptr map[int32]uintptr
  835. type typMapMapInt32Int map[int32]int
  836. type typMapMapInt32Int8 map[int32]int8
  837. type typMapMapInt32Int16 map[int32]int16
  838. type typMapMapInt32Int32 map[int32]int32
  839. type typMapMapInt32Int64 map[int32]int64
  840. type typMapMapInt32Float32 map[int32]float32
  841. type typMapMapInt32Float64 map[int32]float64
  842. type typMapMapInt32Bool map[int32]bool
  843. type typMapMapInt64Intf map[int64]interface{}
  844. type typMapMapInt64String map[int64]string
  845. type typMapMapInt64Uint map[int64]uint
  846. type typMapMapInt64Uint8 map[int64]uint8
  847. type typMapMapInt64Uint16 map[int64]uint16
  848. type typMapMapInt64Uint32 map[int64]uint32
  849. type typMapMapInt64Uint64 map[int64]uint64
  850. type typMapMapInt64Uintptr map[int64]uintptr
  851. type typMapMapInt64Int map[int64]int
  852. type typMapMapInt64Int8 map[int64]int8
  853. type typMapMapInt64Int16 map[int64]int16
  854. type typMapMapInt64Int32 map[int64]int32
  855. type typMapMapInt64Int64 map[int64]int64
  856. type typMapMapInt64Float32 map[int64]float32
  857. type typMapMapInt64Float64 map[int64]float64
  858. type typMapMapInt64Bool map[int64]bool
  859. type typMapMapBoolIntf map[bool]interface{}
  860. type typMapMapBoolString map[bool]string
  861. type typMapMapBoolUint map[bool]uint
  862. type typMapMapBoolUint8 map[bool]uint8
  863. type typMapMapBoolUint16 map[bool]uint16
  864. type typMapMapBoolUint32 map[bool]uint32
  865. type typMapMapBoolUint64 map[bool]uint64
  866. type typMapMapBoolUintptr map[bool]uintptr
  867. type typMapMapBoolInt map[bool]int
  868. type typMapMapBoolInt8 map[bool]int8
  869. type typMapMapBoolInt16 map[bool]int16
  870. type typMapMapBoolInt32 map[bool]int32
  871. type typMapMapBoolInt64 map[bool]int64
  872. type typMapMapBoolFloat32 map[bool]float32
  873. type typMapMapBoolFloat64 map[bool]float64
  874. type typMapMapBoolBool map[bool]bool
  875. func doTestMammothSlices(t *testing.T, h Handle) {
  876. var v1va [8]interface{}
  877. for _, v := range [][]interface{}{nil, {}, {"string-is-an-interface-2", nil, nil, "string-is-an-interface"}} {
  878. var v1v1, v1v2 []interface{}
  879. v1v1 = v
  880. bs1 := testMarshalErr(v1v1, h, t, "enc-slice-v1")
  881. if v == nil {
  882. v1v2 = nil
  883. } else {
  884. v1v2 = make([]interface{}, len(v))
  885. }
  886. testUnmarshalErr(v1v2, bs1, h, t, "dec-slice-v1")
  887. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1")
  888. if v == nil {
  889. v1v2 = nil
  890. } else {
  891. v1v2 = make([]interface{}, len(v))
  892. }
  893. testUnmarshalErr(reflect.ValueOf(v1v2), bs1, h, t, "dec-slice-v1-noaddr") // non-addressable value
  894. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-noaddr")
  895. // ...
  896. bs1 = testMarshalErr(&v1v1, h, t, "enc-slice-v1-p")
  897. v1v2 = nil
  898. testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p")
  899. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p")
  900. v1va = [8]interface{}{} // clear the array
  901. v1v2 = v1va[:1:1]
  902. testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-1")
  903. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-1")
  904. v1va = [8]interface{}{} // clear the array
  905. v1v2 = v1va[:len(v1v1):len(v1v1)]
  906. testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-len")
  907. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-len")
  908. v1va = [8]interface{}{} // clear the array
  909. v1v2 = v1va[:]
  910. testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-cap")
  911. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-cap")
  912. if len(v1v1) > 1 {
  913. v1va = [8]interface{}{} // clear the array
  914. testUnmarshalErr((&v1va)[:len(v1v1)], bs1, h, t, "dec-slice-v1-p-len-noaddr")
  915. testDeepEqualErr(v1v1, v1va[:len(v1v1)], t, "equal-slice-v1-p-len-noaddr")
  916. v1va = [8]interface{}{} // clear the array
  917. testUnmarshalErr((&v1va)[:], bs1, h, t, "dec-slice-v1-p-cap-noaddr")
  918. testDeepEqualErr(v1v1, v1va[:len(v1v1)], t, "equal-slice-v1-p-cap-noaddr")
  919. }
  920. // ...
  921. var v1v3, v1v4 typMbsSliceIntf
  922. v1v2 = nil
  923. if v != nil {
  924. v1v2 = make([]interface{}, len(v))
  925. }
  926. v1v3 = typMbsSliceIntf(v1v1)
  927. v1v4 = typMbsSliceIntf(v1v2)
  928. bs1 = testMarshalErr(v1v3, h, t, "enc-slice-v1-custom")
  929. testUnmarshalErr(v1v4, bs1, h, t, "dec-slice-v1-custom")
  930. testDeepEqualErr(v1v3, v1v4, t, "equal-slice-v1-custom")
  931. bs1 = testMarshalErr(&v1v3, h, t, "enc-slice-v1-custom-p")
  932. v1v2 = nil
  933. v1v4 = typMbsSliceIntf(v1v2)
  934. testUnmarshalErr(&v1v4, bs1, h, t, "dec-slice-v1-custom-p")
  935. testDeepEqualErr(v1v3, v1v4, t, "equal-slice-v1-custom-p")
  936. }
  937. var v19va [8]string
  938. for _, v := range [][]string{nil, {}, {"some-string-2", "", "", "some-string"}} {
  939. var v19v1, v19v2 []string
  940. v19v1 = v
  941. bs19 := testMarshalErr(v19v1, h, t, "enc-slice-v19")
  942. if v == nil {
  943. v19v2 = nil
  944. } else {
  945. v19v2 = make([]string, len(v))
  946. }
  947. testUnmarshalErr(v19v2, bs19, h, t, "dec-slice-v19")
  948. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19")
  949. if v == nil {
  950. v19v2 = nil
  951. } else {
  952. v19v2 = make([]string, len(v))
  953. }
  954. testUnmarshalErr(reflect.ValueOf(v19v2), bs19, h, t, "dec-slice-v19-noaddr") // non-addressable value
  955. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-noaddr")
  956. // ...
  957. bs19 = testMarshalErr(&v19v1, h, t, "enc-slice-v19-p")
  958. v19v2 = nil
  959. testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p")
  960. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p")
  961. v19va = [8]string{} // clear the array
  962. v19v2 = v19va[:1:1]
  963. testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-1")
  964. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-1")
  965. v19va = [8]string{} // clear the array
  966. v19v2 = v19va[:len(v19v1):len(v19v1)]
  967. testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-len")
  968. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-len")
  969. v19va = [8]string{} // clear the array
  970. v19v2 = v19va[:]
  971. testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-cap")
  972. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-cap")
  973. if len(v19v1) > 1 {
  974. v19va = [8]string{} // clear the array
  975. testUnmarshalErr((&v19va)[:len(v19v1)], bs19, h, t, "dec-slice-v19-p-len-noaddr")
  976. testDeepEqualErr(v19v1, v19va[:len(v19v1)], t, "equal-slice-v19-p-len-noaddr")
  977. v19va = [8]string{} // clear the array
  978. testUnmarshalErr((&v19va)[:], bs19, h, t, "dec-slice-v19-p-cap-noaddr")
  979. testDeepEqualErr(v19v1, v19va[:len(v19v1)], t, "equal-slice-v19-p-cap-noaddr")
  980. }
  981. // ...
  982. var v19v3, v19v4 typMbsSliceString
  983. v19v2 = nil
  984. if v != nil {
  985. v19v2 = make([]string, len(v))
  986. }
  987. v19v3 = typMbsSliceString(v19v1)
  988. v19v4 = typMbsSliceString(v19v2)
  989. bs19 = testMarshalErr(v19v3, h, t, "enc-slice-v19-custom")
  990. testUnmarshalErr(v19v4, bs19, h, t, "dec-slice-v19-custom")
  991. testDeepEqualErr(v19v3, v19v4, t, "equal-slice-v19-custom")
  992. bs19 = testMarshalErr(&v19v3, h, t, "enc-slice-v19-custom-p")
  993. v19v2 = nil
  994. v19v4 = typMbsSliceString(v19v2)
  995. testUnmarshalErr(&v19v4, bs19, h, t, "dec-slice-v19-custom-p")
  996. testDeepEqualErr(v19v3, v19v4, t, "equal-slice-v19-custom-p")
  997. }
  998. var v37va [8]float32
  999. for _, v := range [][]float32{nil, {}, {22.2, 0, 0, 11.1}} {
  1000. var v37v1, v37v2 []float32
  1001. v37v1 = v
  1002. bs37 := testMarshalErr(v37v1, h, t, "enc-slice-v37")
  1003. if v == nil {
  1004. v37v2 = nil
  1005. } else {
  1006. v37v2 = make([]float32, len(v))
  1007. }
  1008. testUnmarshalErr(v37v2, bs37, h, t, "dec-slice-v37")
  1009. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37")
  1010. if v == nil {
  1011. v37v2 = nil
  1012. } else {
  1013. v37v2 = make([]float32, len(v))
  1014. }
  1015. testUnmarshalErr(reflect.ValueOf(v37v2), bs37, h, t, "dec-slice-v37-noaddr") // non-addressable value
  1016. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-noaddr")
  1017. // ...
  1018. bs37 = testMarshalErr(&v37v1, h, t, "enc-slice-v37-p")
  1019. v37v2 = nil
  1020. testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p")
  1021. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p")
  1022. v37va = [8]float32{} // clear the array
  1023. v37v2 = v37va[:1:1]
  1024. testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-1")
  1025. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-1")
  1026. v37va = [8]float32{} // clear the array
  1027. v37v2 = v37va[:len(v37v1):len(v37v1)]
  1028. testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-len")
  1029. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-len")
  1030. v37va = [8]float32{} // clear the array
  1031. v37v2 = v37va[:]
  1032. testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-cap")
  1033. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-cap")
  1034. if len(v37v1) > 1 {
  1035. v37va = [8]float32{} // clear the array
  1036. testUnmarshalErr((&v37va)[:len(v37v1)], bs37, h, t, "dec-slice-v37-p-len-noaddr")
  1037. testDeepEqualErr(v37v1, v37va[:len(v37v1)], t, "equal-slice-v37-p-len-noaddr")
  1038. v37va = [8]float32{} // clear the array
  1039. testUnmarshalErr((&v37va)[:], bs37, h, t, "dec-slice-v37-p-cap-noaddr")
  1040. testDeepEqualErr(v37v1, v37va[:len(v37v1)], t, "equal-slice-v37-p-cap-noaddr")
  1041. }
  1042. // ...
  1043. var v37v3, v37v4 typMbsSliceFloat32
  1044. v37v2 = nil
  1045. if v != nil {
  1046. v37v2 = make([]float32, len(v))
  1047. }
  1048. v37v3 = typMbsSliceFloat32(v37v1)
  1049. v37v4 = typMbsSliceFloat32(v37v2)
  1050. bs37 = testMarshalErr(v37v3, h, t, "enc-slice-v37-custom")
  1051. testUnmarshalErr(v37v4, bs37, h, t, "dec-slice-v37-custom")
  1052. testDeepEqualErr(v37v3, v37v4, t, "equal-slice-v37-custom")
  1053. bs37 = testMarshalErr(&v37v3, h, t, "enc-slice-v37-custom-p")
  1054. v37v2 = nil
  1055. v37v4 = typMbsSliceFloat32(v37v2)
  1056. testUnmarshalErr(&v37v4, bs37, h, t, "dec-slice-v37-custom-p")
  1057. testDeepEqualErr(v37v3, v37v4, t, "equal-slice-v37-custom-p")
  1058. }
  1059. var v55va [8]float64
  1060. for _, v := range [][]float64{nil, {}, {22.2, 0, 0, 11.1}} {
  1061. var v55v1, v55v2 []float64
  1062. v55v1 = v
  1063. bs55 := testMarshalErr(v55v1, h, t, "enc-slice-v55")
  1064. if v == nil {
  1065. v55v2 = nil
  1066. } else {
  1067. v55v2 = make([]float64, len(v))
  1068. }
  1069. testUnmarshalErr(v55v2, bs55, h, t, "dec-slice-v55")
  1070. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55")
  1071. if v == nil {
  1072. v55v2 = nil
  1073. } else {
  1074. v55v2 = make([]float64, len(v))
  1075. }
  1076. testUnmarshalErr(reflect.ValueOf(v55v2), bs55, h, t, "dec-slice-v55-noaddr") // non-addressable value
  1077. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-noaddr")
  1078. // ...
  1079. bs55 = testMarshalErr(&v55v1, h, t, "enc-slice-v55-p")
  1080. v55v2 = nil
  1081. testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p")
  1082. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p")
  1083. v55va = [8]float64{} // clear the array
  1084. v55v2 = v55va[:1:1]
  1085. testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-1")
  1086. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-1")
  1087. v55va = [8]float64{} // clear the array
  1088. v55v2 = v55va[:len(v55v1):len(v55v1)]
  1089. testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-len")
  1090. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-len")
  1091. v55va = [8]float64{} // clear the array
  1092. v55v2 = v55va[:]
  1093. testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-cap")
  1094. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-cap")
  1095. if len(v55v1) > 1 {
  1096. v55va = [8]float64{} // clear the array
  1097. testUnmarshalErr((&v55va)[:len(v55v1)], bs55, h, t, "dec-slice-v55-p-len-noaddr")
  1098. testDeepEqualErr(v55v1, v55va[:len(v55v1)], t, "equal-slice-v55-p-len-noaddr")
  1099. v55va = [8]float64{} // clear the array
  1100. testUnmarshalErr((&v55va)[:], bs55, h, t, "dec-slice-v55-p-cap-noaddr")
  1101. testDeepEqualErr(v55v1, v55va[:len(v55v1)], t, "equal-slice-v55-p-cap-noaddr")
  1102. }
  1103. // ...
  1104. var v55v3, v55v4 typMbsSliceFloat64
  1105. v55v2 = nil
  1106. if v != nil {
  1107. v55v2 = make([]float64, len(v))
  1108. }
  1109. v55v3 = typMbsSliceFloat64(v55v1)
  1110. v55v4 = typMbsSliceFloat64(v55v2)
  1111. bs55 = testMarshalErr(v55v3, h, t, "enc-slice-v55-custom")
  1112. testUnmarshalErr(v55v4, bs55, h, t, "dec-slice-v55-custom")
  1113. testDeepEqualErr(v55v3, v55v4, t, "equal-slice-v55-custom")
  1114. bs55 = testMarshalErr(&v55v3, h, t, "enc-slice-v55-custom-p")
  1115. v55v2 = nil
  1116. v55v4 = typMbsSliceFloat64(v55v2)
  1117. testUnmarshalErr(&v55v4, bs55, h, t, "dec-slice-v55-custom-p")
  1118. testDeepEqualErr(v55v3, v55v4, t, "equal-slice-v55-custom-p")
  1119. }
  1120. var v73va [8]uint
  1121. for _, v := range [][]uint{nil, {}, {44, 0, 0, 33}} {
  1122. var v73v1, v73v2 []uint
  1123. v73v1 = v
  1124. bs73 := testMarshalErr(v73v1, h, t, "enc-slice-v73")
  1125. if v == nil {
  1126. v73v2 = nil
  1127. } else {
  1128. v73v2 = make([]uint, len(v))
  1129. }
  1130. testUnmarshalErr(v73v2, bs73, h, t, "dec-slice-v73")
  1131. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73")
  1132. if v == nil {
  1133. v73v2 = nil
  1134. } else {
  1135. v73v2 = make([]uint, len(v))
  1136. }
  1137. testUnmarshalErr(reflect.ValueOf(v73v2), bs73, h, t, "dec-slice-v73-noaddr") // non-addressable value
  1138. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-noaddr")
  1139. // ...
  1140. bs73 = testMarshalErr(&v73v1, h, t, "enc-slice-v73-p")
  1141. v73v2 = nil
  1142. testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p")
  1143. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p")
  1144. v73va = [8]uint{} // clear the array
  1145. v73v2 = v73va[:1:1]
  1146. testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-1")
  1147. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-1")
  1148. v73va = [8]uint{} // clear the array
  1149. v73v2 = v73va[:len(v73v1):len(v73v1)]
  1150. testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-len")
  1151. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-len")
  1152. v73va = [8]uint{} // clear the array
  1153. v73v2 = v73va[:]
  1154. testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-cap")
  1155. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-cap")
  1156. if len(v73v1) > 1 {
  1157. v73va = [8]uint{} // clear the array
  1158. testUnmarshalErr((&v73va)[:len(v73v1)], bs73, h, t, "dec-slice-v73-p-len-noaddr")
  1159. testDeepEqualErr(v73v1, v73va[:len(v73v1)], t, "equal-slice-v73-p-len-noaddr")
  1160. v73va = [8]uint{} // clear the array
  1161. testUnmarshalErr((&v73va)[:], bs73, h, t, "dec-slice-v73-p-cap-noaddr")
  1162. testDeepEqualErr(v73v1, v73va[:len(v73v1)], t, "equal-slice-v73-p-cap-noaddr")
  1163. }
  1164. // ...
  1165. var v73v3, v73v4 typMbsSliceUint
  1166. v73v2 = nil
  1167. if v != nil {
  1168. v73v2 = make([]uint, len(v))
  1169. }
  1170. v73v3 = typMbsSliceUint(v73v1)
  1171. v73v4 = typMbsSliceUint(v73v2)
  1172. bs73 = testMarshalErr(v73v3, h, t, "enc-slice-v73-custom")
  1173. testUnmarshalErr(v73v4, bs73, h, t, "dec-slice-v73-custom")
  1174. testDeepEqualErr(v73v3, v73v4, t, "equal-slice-v73-custom")
  1175. bs73 = testMarshalErr(&v73v3, h, t, "enc-slice-v73-custom-p")
  1176. v73v2 = nil
  1177. v73v4 = typMbsSliceUint(v73v2)
  1178. testUnmarshalErr(&v73v4, bs73, h, t, "dec-slice-v73-custom-p")
  1179. testDeepEqualErr(v73v3, v73v4, t, "equal-slice-v73-custom-p")
  1180. }
  1181. var v108va [8]uint16
  1182. for _, v := range [][]uint16{nil, {}, {44, 0, 0, 33}} {
  1183. var v108v1, v108v2 []uint16
  1184. v108v1 = v
  1185. bs108 := testMarshalErr(v108v1, h, t, "enc-slice-v108")
  1186. if v == nil {
  1187. v108v2 = nil
  1188. } else {
  1189. v108v2 = make([]uint16, len(v))
  1190. }
  1191. testUnmarshalErr(v108v2, bs108, h, t, "dec-slice-v108")
  1192. testDeepEqualErr(v108v1, v108v2, t, "equal-slice-v108")
  1193. if v == nil {
  1194. v108v2 = nil
  1195. } else {
  1196. v108v2 = make([]uint16, len(v))
  1197. }
  1198. testUnmarshalErr(reflect.ValueOf(v108v2), bs108, h, t, "dec-slice-v108-noaddr") // non-addressable value
  1199. testDeepEqualErr(v108v1, v108v2, t, "equal-slice-v108-noaddr")
  1200. // ...
  1201. bs108 = testMarshalErr(&v108v1, h, t, "enc-slice-v108-p")
  1202. v108v2 = nil
  1203. testUnmarshalErr(&v108v2, bs108, h, t, "dec-slice-v108-p")
  1204. testDeepEqualErr(v108v1, v108v2, t, "equal-slice-v108-p")
  1205. v108va = [8]uint16{} // clear the array
  1206. v108v2 = v108va[:1:1]
  1207. testUnmarshalErr(&v108v2, bs108, h, t, "dec-slice-v108-p-1")
  1208. testDeepEqualErr(v108v1, v108v2, t, "equal-slice-v108-p-1")
  1209. v108va = [8]uint16{} // clear the array
  1210. v108v2 = v108va[:len(v108v1):len(v108v1)]
  1211. testUnmarshalErr(&v108v2, bs108, h, t, "dec-slice-v108-p-len")
  1212. testDeepEqualErr(v108v1, v108v2, t, "equal-slice-v108-p-len")
  1213. v108va = [8]uint16{} // clear the array
  1214. v108v2 = v108va[:]
  1215. testUnmarshalErr(&v108v2, bs108, h, t, "dec-slice-v108-p-cap")
  1216. testDeepEqualErr(v108v1, v108v2, t, "equal-slice-v108-p-cap")
  1217. if len(v108v1) > 1 {
  1218. v108va = [8]uint16{} // clear the array
  1219. testUnmarshalErr((&v108va)[:len(v108v1)], bs108, h, t, "dec-slice-v108-p-len-noaddr")
  1220. testDeepEqualErr(v108v1, v108va[:len(v108v1)], t, "equal-slice-v108-p-len-noaddr")
  1221. v108va = [8]uint16{} // clear the array
  1222. testUnmarshalErr((&v108va)[:], bs108, h, t, "dec-slice-v108-p-cap-noaddr")
  1223. testDeepEqualErr(v108v1, v108va[:len(v108v1)], t, "equal-slice-v108-p-cap-noaddr")
  1224. }
  1225. // ...
  1226. var v108v3, v108v4 typMbsSliceUint16
  1227. v108v2 = nil
  1228. if v != nil {
  1229. v108v2 = make([]uint16, len(v))
  1230. }
  1231. v108v3 = typMbsSliceUint16(v108v1)
  1232. v108v4 = typMbsSliceUint16(v108v2)
  1233. bs108 = testMarshalErr(v108v3, h, t, "enc-slice-v108-custom")
  1234. testUnmarshalErr(v108v4, bs108, h, t, "dec-slice-v108-custom")
  1235. testDeepEqualErr(v108v3, v108v4, t, "equal-slice-v108-custom")
  1236. bs108 = testMarshalErr(&v108v3, h, t, "enc-slice-v108-custom-p")
  1237. v108v2 = nil
  1238. v108v4 = typMbsSliceUint16(v108v2)
  1239. testUnmarshalErr(&v108v4, bs108, h, t, "dec-slice-v108-custom-p")
  1240. testDeepEqualErr(v108v3, v108v4, t, "equal-slice-v108-custom-p")
  1241. }
  1242. var v126va [8]uint32
  1243. for _, v := range [][]uint32{nil, {}, {44, 0, 0, 33}} {
  1244. var v126v1, v126v2 []uint32
  1245. v126v1 = v
  1246. bs126 := testMarshalErr(v126v1, h, t, "enc-slice-v126")
  1247. if v == nil {
  1248. v126v2 = nil
  1249. } else {
  1250. v126v2 = make([]uint32, len(v))
  1251. }
  1252. testUnmarshalErr(v126v2, bs126, h, t, "dec-slice-v126")
  1253. testDeepEqualErr(v126v1, v126v2, t, "equal-slice-v126")
  1254. if v == nil {
  1255. v126v2 = nil
  1256. } else {
  1257. v126v2 = make([]uint32, len(v))
  1258. }
  1259. testUnmarshalErr(reflect.ValueOf(v126v2), bs126, h, t, "dec-slice-v126-noaddr") // non-addressable value
  1260. testDeepEqualErr(v126v1, v126v2, t, "equal-slice-v126-noaddr")
  1261. // ...
  1262. bs126 = testMarshalErr(&v126v1, h, t, "enc-slice-v126-p")
  1263. v126v2 = nil
  1264. testUnmarshalErr(&v126v2, bs126, h, t, "dec-slice-v126-p")
  1265. testDeepEqualErr(v126v1, v126v2, t, "equal-slice-v126-p")
  1266. v126va = [8]uint32{} // clear the array
  1267. v126v2 = v126va[:1:1]
  1268. testUnmarshalErr(&v126v2, bs126, h, t, "dec-slice-v126-p-1")
  1269. testDeepEqualErr(v126v1, v126v2, t, "equal-slice-v126-p-1")
  1270. v126va = [8]uint32{} // clear the array
  1271. v126v2 = v126va[:len(v126v1):len(v126v1)]
  1272. testUnmarshalErr(&v126v2, bs126, h, t, "dec-slice-v126-p-len")
  1273. testDeepEqualErr(v126v1, v126v2, t, "equal-slice-v126-p-len")
  1274. v126va = [8]uint32{} // clear the array
  1275. v126v2 = v126va[:]
  1276. testUnmarshalErr(&v126v2, bs126, h, t, "dec-slice-v126-p-cap")
  1277. testDeepEqualErr(v126v1, v126v2, t, "equal-slice-v126-p-cap")
  1278. if len(v126v1) > 1 {
  1279. v126va = [8]uint32{} // clear the array
  1280. testUnmarshalErr((&v126va)[:len(v126v1)], bs126, h, t, "dec-slice-v126-p-len-noaddr")
  1281. testDeepEqualErr(v126v1, v126va[:len(v126v1)], t, "equal-slice-v126-p-len-noaddr")
  1282. v126va = [8]uint32{} // clear the array
  1283. testUnmarshalErr((&v126va)[:], bs126, h, t, "dec-slice-v126-p-cap-noaddr")
  1284. testDeepEqualErr(v126v1, v126va[:len(v126v1)], t, "equal-slice-v126-p-cap-noaddr")
  1285. }
  1286. // ...
  1287. var v126v3, v126v4 typMbsSliceUint32
  1288. v126v2 = nil
  1289. if v != nil {
  1290. v126v2 = make([]uint32, len(v))
  1291. }
  1292. v126v3 = typMbsSliceUint32(v126v1)
  1293. v126v4 = typMbsSliceUint32(v126v2)
  1294. bs126 = testMarshalErr(v126v3, h, t, "enc-slice-v126-custom")
  1295. testUnmarshalErr(v126v4, bs126, h, t, "dec-slice-v126-custom")
  1296. testDeepEqualErr(v126v3, v126v4, t, "equal-slice-v126-custom")
  1297. bs126 = testMarshalErr(&v126v3, h, t, "enc-slice-v126-custom-p")
  1298. v126v2 = nil
  1299. v126v4 = typMbsSliceUint32(v126v2)
  1300. testUnmarshalErr(&v126v4, bs126, h, t, "dec-slice-v126-custom-p")
  1301. testDeepEqualErr(v126v3, v126v4, t, "equal-slice-v126-custom-p")
  1302. }
  1303. var v144va [8]uint64
  1304. for _, v := range [][]uint64{nil, {}, {44, 0, 0, 33}} {
  1305. var v144v1, v144v2 []uint64
  1306. v144v1 = v
  1307. bs144 := testMarshalErr(v144v1, h, t, "enc-slice-v144")
  1308. if v == nil {
  1309. v144v2 = nil
  1310. } else {
  1311. v144v2 = make([]uint64, len(v))
  1312. }
  1313. testUnmarshalErr(v144v2, bs144, h, t, "dec-slice-v144")
  1314. testDeepEqualErr(v144v1, v144v2, t, "equal-slice-v144")
  1315. if v == nil {
  1316. v144v2 = nil
  1317. } else {
  1318. v144v2 = make([]uint64, len(v))
  1319. }
  1320. testUnmarshalErr(reflect.ValueOf(v144v2), bs144, h, t, "dec-slice-v144-noaddr") // non-addressable value
  1321. testDeepEqualErr(v144v1, v144v2, t, "equal-slice-v144-noaddr")
  1322. // ...
  1323. bs144 = testMarshalErr(&v144v1, h, t, "enc-slice-v144-p")
  1324. v144v2 = nil
  1325. testUnmarshalErr(&v144v2, bs144, h, t, "dec-slice-v144-p")
  1326. testDeepEqualErr(v144v1, v144v2, t, "equal-slice-v144-p")
  1327. v144va = [8]uint64{} // clear the array
  1328. v144v2 = v144va[:1:1]
  1329. testUnmarshalErr(&v144v2, bs144, h, t, "dec-slice-v144-p-1")
  1330. testDeepEqualErr(v144v1, v144v2, t, "equal-slice-v144-p-1")
  1331. v144va = [8]uint64{} // clear the array
  1332. v144v2 = v144va[:len(v144v1):len(v144v1)]
  1333. testUnmarshalErr(&v144v2, bs144, h, t, "dec-slice-v144-p-len")
  1334. testDeepEqualErr(v144v1, v144v2, t, "equal-slice-v144-p-len")
  1335. v144va = [8]uint64{} // clear the array
  1336. v144v2 = v144va[:]
  1337. testUnmarshalErr(&v144v2, bs144, h, t, "dec-slice-v144-p-cap")
  1338. testDeepEqualErr(v144v1, v144v2, t, "equal-slice-v144-p-cap")
  1339. if len(v144v1) > 1 {
  1340. v144va = [8]uint64{} // clear the array
  1341. testUnmarshalErr((&v144va)[:len(v144v1)], bs144, h, t, "dec-slice-v144-p-len-noaddr")
  1342. testDeepEqualErr(v144v1, v144va[:len(v144v1)], t, "equal-slice-v144-p-len-noaddr")
  1343. v144va = [8]uint64{} // clear the array
  1344. testUnmarshalErr((&v144va)[:], bs144, h, t, "dec-slice-v144-p-cap-noaddr")
  1345. testDeepEqualErr(v144v1, v144va[:len(v144v1)], t, "equal-slice-v144-p-cap-noaddr")
  1346. }
  1347. // ...
  1348. var v144v3, v144v4 typMbsSliceUint64
  1349. v144v2 = nil
  1350. if v != nil {
  1351. v144v2 = make([]uint64, len(v))
  1352. }
  1353. v144v3 = typMbsSliceUint64(v144v1)
  1354. v144v4 = typMbsSliceUint64(v144v2)
  1355. bs144 = testMarshalErr(v144v3, h, t, "enc-slice-v144-custom")
  1356. testUnmarshalErr(v144v4, bs144, h, t, "dec-slice-v144-custom")
  1357. testDeepEqualErr(v144v3, v144v4, t, "equal-slice-v144-custom")
  1358. bs144 = testMarshalErr(&v144v3, h, t, "enc-slice-v144-custom-p")
  1359. v144v2 = nil
  1360. v144v4 = typMbsSliceUint64(v144v2)
  1361. testUnmarshalErr(&v144v4, bs144, h, t, "dec-slice-v144-custom-p")
  1362. testDeepEqualErr(v144v3, v144v4, t, "equal-slice-v144-custom-p")
  1363. }
  1364. var v162va [8]uintptr
  1365. for _, v := range [][]uintptr{nil, {}, {44, 0, 0, 33}} {
  1366. var v162v1, v162v2 []uintptr
  1367. v162v1 = v
  1368. bs162 := testMarshalErr(v162v1, h, t, "enc-slice-v162")
  1369. if v == nil {
  1370. v162v2 = nil
  1371. } else {
  1372. v162v2 = make([]uintptr, len(v))
  1373. }
  1374. testUnmarshalErr(v162v2, bs162, h, t, "dec-slice-v162")
  1375. testDeepEqualErr(v162v1, v162v2, t, "equal-slice-v162")
  1376. if v == nil {
  1377. v162v2 = nil
  1378. } else {
  1379. v162v2 = make([]uintptr, len(v))
  1380. }
  1381. testUnmarshalErr(reflect.ValueOf(v162v2), bs162, h, t, "dec-slice-v162-noaddr") // non-addressable value
  1382. testDeepEqualErr(v162v1, v162v2, t, "equal-slice-v162-noaddr")
  1383. // ...
  1384. bs162 = testMarshalErr(&v162v1, h, t, "enc-slice-v162-p")
  1385. v162v2 = nil
  1386. testUnmarshalErr(&v162v2, bs162, h, t, "dec-slice-v162-p")
  1387. testDeepEqualErr(v162v1, v162v2, t, "equal-slice-v162-p")
  1388. v162va = [8]uintptr{} // clear the array
  1389. v162v2 = v162va[:1:1]
  1390. testUnmarshalErr(&v162v2, bs162, h, t, "dec-slice-v162-p-1")
  1391. testDeepEqualErr(v162v1, v162v2, t, "equal-slice-v162-p-1")
  1392. v162va = [8]uintptr{} // clear the array
  1393. v162v2 = v162va[:len(v162v1):len(v162v1)]
  1394. testUnmarshalErr(&v162v2, bs162, h, t, "dec-slice-v162-p-len")
  1395. testDeepEqualErr(v162v1, v162v2, t, "equal-slice-v162-p-len")
  1396. v162va = [8]uintptr{} // clear the array
  1397. v162v2 = v162va[:]
  1398. testUnmarshalErr(&v162v2, bs162, h, t, "dec-slice-v162-p-cap")
  1399. testDeepEqualErr(v162v1, v162v2, t, "equal-slice-v162-p-cap")
  1400. if len(v162v1) > 1 {
  1401. v162va = [8]uintptr{} // clear the array
  1402. testUnmarshalErr((&v162va)[:len(v162v1)], bs162, h, t, "dec-slice-v162-p-len-noaddr")
  1403. testDeepEqualErr(v162v1, v162va[:len(v162v1)], t, "equal-slice-v162-p-len-noaddr")
  1404. v162va = [8]uintptr{} // clear the array
  1405. testUnmarshalErr((&v162va)[:], bs162, h, t, "dec-slice-v162-p-cap-noaddr")
  1406. testDeepEqualErr(v162v1, v162va[:len(v162v1)], t, "equal-slice-v162-p-cap-noaddr")
  1407. }
  1408. // ...
  1409. var v162v3, v162v4 typMbsSliceUintptr
  1410. v162v2 = nil
  1411. if v != nil {
  1412. v162v2 = make([]uintptr, len(v))
  1413. }
  1414. v162v3 = typMbsSliceUintptr(v162v1)
  1415. v162v4 = typMbsSliceUintptr(v162v2)
  1416. bs162 = testMarshalErr(v162v3, h, t, "enc-slice-v162-custom")
  1417. testUnmarshalErr(v162v4, bs162, h, t, "dec-slice-v162-custom")
  1418. testDeepEqualErr(v162v3, v162v4, t, "equal-slice-v162-custom")
  1419. bs162 = testMarshalErr(&v162v3, h, t, "enc-slice-v162-custom-p")
  1420. v162v2 = nil
  1421. v162v4 = typMbsSliceUintptr(v162v2)
  1422. testUnmarshalErr(&v162v4, bs162, h, t, "dec-slice-v162-custom-p")
  1423. testDeepEqualErr(v162v3, v162v4, t, "equal-slice-v162-custom-p")
  1424. }
  1425. var v180va [8]int
  1426. for _, v := range [][]int{nil, {}, {44, 0, 0, 33}} {
  1427. var v180v1, v180v2 []int
  1428. v180v1 = v
  1429. bs180 := testMarshalErr(v180v1, h, t, "enc-slice-v180")
  1430. if v == nil {
  1431. v180v2 = nil
  1432. } else {
  1433. v180v2 = make([]int, len(v))
  1434. }
  1435. testUnmarshalErr(v180v2, bs180, h, t, "dec-slice-v180")
  1436. testDeepEqualErr(v180v1, v180v2, t, "equal-slice-v180")
  1437. if v == nil {
  1438. v180v2 = nil
  1439. } else {
  1440. v180v2 = make([]int, len(v))
  1441. }
  1442. testUnmarshalErr(reflect.ValueOf(v180v2), bs180, h, t, "dec-slice-v180-noaddr") // non-addressable value
  1443. testDeepEqualErr(v180v1, v180v2, t, "equal-slice-v180-noaddr")
  1444. // ...
  1445. bs180 = testMarshalErr(&v180v1, h, t, "enc-slice-v180-p")
  1446. v180v2 = nil
  1447. testUnmarshalErr(&v180v2, bs180, h, t, "dec-slice-v180-p")
  1448. testDeepEqualErr(v180v1, v180v2, t, "equal-slice-v180-p")
  1449. v180va = [8]int{} // clear the array
  1450. v180v2 = v180va[:1:1]
  1451. testUnmarshalErr(&v180v2, bs180, h, t, "dec-slice-v180-p-1")
  1452. testDeepEqualErr(v180v1, v180v2, t, "equal-slice-v180-p-1")
  1453. v180va = [8]int{} // clear the array
  1454. v180v2 = v180va[:len(v180v1):len(v180v1)]
  1455. testUnmarshalErr(&v180v2, bs180, h, t, "dec-slice-v180-p-len")
  1456. testDeepEqualErr(v180v1, v180v2, t, "equal-slice-v180-p-len")
  1457. v180va = [8]int{} // clear the array
  1458. v180v2 = v180va[:]
  1459. testUnmarshalErr(&v180v2, bs180, h, t, "dec-slice-v180-p-cap")
  1460. testDeepEqualErr(v180v1, v180v2, t, "equal-slice-v180-p-cap")
  1461. if len(v180v1) > 1 {
  1462. v180va = [8]int{} // clear the array
  1463. testUnmarshalErr((&v180va)[:len(v180v1)], bs180, h, t, "dec-slice-v180-p-len-noaddr")
  1464. testDeepEqualErr(v180v1, v180va[:len(v180v1)], t, "equal-slice-v180-p-len-noaddr")
  1465. v180va = [8]int{} // clear the array
  1466. testUnmarshalErr((&v180va)[:], bs180, h, t, "dec-slice-v180-p-cap-noaddr")
  1467. testDeepEqualErr(v180v1, v180va[:len(v180v1)], t, "equal-slice-v180-p-cap-noaddr")
  1468. }
  1469. // ...
  1470. var v180v3, v180v4 typMbsSliceInt
  1471. v180v2 = nil
  1472. if v != nil {
  1473. v180v2 = make([]int, len(v))
  1474. }
  1475. v180v3 = typMbsSliceInt(v180v1)
  1476. v180v4 = typMbsSliceInt(v180v2)
  1477. bs180 = testMarshalErr(v180v3, h, t, "enc-slice-v180-custom")
  1478. testUnmarshalErr(v180v4, bs180, h, t, "dec-slice-v180-custom")
  1479. testDeepEqualErr(v180v3, v180v4, t, "equal-slice-v180-custom")
  1480. bs180 = testMarshalErr(&v180v3, h, t, "enc-slice-v180-custom-p")
  1481. v180v2 = nil
  1482. v180v4 = typMbsSliceInt(v180v2)
  1483. testUnmarshalErr(&v180v4, bs180, h, t, "dec-slice-v180-custom-p")
  1484. testDeepEqualErr(v180v3, v180v4, t, "equal-slice-v180-custom-p")
  1485. }
  1486. var v198va [8]int8
  1487. for _, v := range [][]int8{nil, {}, {44, 0, 0, 33}} {
  1488. var v198v1, v198v2 []int8
  1489. v198v1 = v
  1490. bs198 := testMarshalErr(v198v1, h, t, "enc-slice-v198")
  1491. if v == nil {
  1492. v198v2 = nil
  1493. } else {
  1494. v198v2 = make([]int8, len(v))
  1495. }
  1496. testUnmarshalErr(v198v2, bs198, h, t, "dec-slice-v198")
  1497. testDeepEqualErr(v198v1, v198v2, t, "equal-slice-v198")
  1498. if v == nil {
  1499. v198v2 = nil
  1500. } else {
  1501. v198v2 = make([]int8, len(v))
  1502. }
  1503. testUnmarshalErr(reflect.ValueOf(v198v2), bs198, h, t, "dec-slice-v198-noaddr") // non-addressable value
  1504. testDeepEqualErr(v198v1, v198v2, t, "equal-slice-v198-noaddr")
  1505. // ...
  1506. bs198 = testMarshalErr(&v198v1, h, t, "enc-slice-v198-p")
  1507. v198v2 = nil
  1508. testUnmarshalErr(&v198v2, bs198, h, t, "dec-slice-v198-p")
  1509. testDeepEqualErr(v198v1, v198v2, t, "equal-slice-v198-p")
  1510. v198va = [8]int8{} // clear the array
  1511. v198v2 = v198va[:1:1]
  1512. testUnmarshalErr(&v198v2, bs198, h, t, "dec-slice-v198-p-1")
  1513. testDeepEqualErr(v198v1, v198v2, t, "equal-slice-v198-p-1")
  1514. v198va = [8]int8{} // clear the array
  1515. v198v2 = v198va[:len(v198v1):len(v198v1)]
  1516. testUnmarshalErr(&v198v2, bs198, h, t, "dec-slice-v198-p-len")
  1517. testDeepEqualErr(v198v1, v198v2, t, "equal-slice-v198-p-len")
  1518. v198va = [8]int8{} // clear the array
  1519. v198v2 = v198va[:]
  1520. testUnmarshalErr(&v198v2, bs198, h, t, "dec-slice-v198-p-cap")
  1521. testDeepEqualErr(v198v1, v198v2, t, "equal-slice-v198-p-cap")
  1522. if len(v198v1) > 1 {
  1523. v198va = [8]int8{} // clear the array
  1524. testUnmarshalErr((&v198va)[:len(v198v1)], bs198, h, t, "dec-slice-v198-p-len-noaddr")
  1525. testDeepEqualErr(v198v1, v198va[:len(v198v1)], t, "equal-slice-v198-p-len-noaddr")
  1526. v198va = [8]int8{} // clear the array
  1527. testUnmarshalErr((&v198va)[:], bs198, h, t, "dec-slice-v198-p-cap-noaddr")
  1528. testDeepEqualErr(v198v1, v198va[:len(v198v1)], t, "equal-slice-v198-p-cap-noaddr")
  1529. }
  1530. // ...
  1531. var v198v3, v198v4 typMbsSliceInt8
  1532. v198v2 = nil
  1533. if v != nil {
  1534. v198v2 = make([]int8, len(v))
  1535. }
  1536. v198v3 = typMbsSliceInt8(v198v1)
  1537. v198v4 = typMbsSliceInt8(v198v2)
  1538. bs198 = testMarshalErr(v198v3, h, t, "enc-slice-v198-custom")
  1539. testUnmarshalErr(v198v4, bs198, h, t, "dec-slice-v198-custom")
  1540. testDeepEqualErr(v198v3, v198v4, t, "equal-slice-v198-custom")
  1541. bs198 = testMarshalErr(&v198v3, h, t, "enc-slice-v198-custom-p")
  1542. v198v2 = nil
  1543. v198v4 = typMbsSliceInt8(v198v2)
  1544. testUnmarshalErr(&v198v4, bs198, h, t, "dec-slice-v198-custom-p")
  1545. testDeepEqualErr(v198v3, v198v4, t, "equal-slice-v198-custom-p")
  1546. }
  1547. var v216va [8]int16
  1548. for _, v := range [][]int16{nil, {}, {44, 0, 0, 33}} {
  1549. var v216v1, v216v2 []int16
  1550. v216v1 = v
  1551. bs216 := testMarshalErr(v216v1, h, t, "enc-slice-v216")
  1552. if v == nil {
  1553. v216v2 = nil
  1554. } else {
  1555. v216v2 = make([]int16, len(v))
  1556. }
  1557. testUnmarshalErr(v216v2, bs216, h, t, "dec-slice-v216")
  1558. testDeepEqualErr(v216v1, v216v2, t, "equal-slice-v216")
  1559. if v == nil {
  1560. v216v2 = nil
  1561. } else {
  1562. v216v2 = make([]int16, len(v))
  1563. }
  1564. testUnmarshalErr(reflect.ValueOf(v216v2), bs216, h, t, "dec-slice-v216-noaddr") // non-addressable value
  1565. testDeepEqualErr(v216v1, v216v2, t, "equal-slice-v216-noaddr")
  1566. // ...
  1567. bs216 = testMarshalErr(&v216v1, h, t, "enc-slice-v216-p")
  1568. v216v2 = nil
  1569. testUnmarshalErr(&v216v2, bs216, h, t, "dec-slice-v216-p")
  1570. testDeepEqualErr(v216v1, v216v2, t, "equal-slice-v216-p")
  1571. v216va = [8]int16{} // clear the array
  1572. v216v2 = v216va[:1:1]
  1573. testUnmarshalErr(&v216v2, bs216, h, t, "dec-slice-v216-p-1")
  1574. testDeepEqualErr(v216v1, v216v2, t, "equal-slice-v216-p-1")
  1575. v216va = [8]int16{} // clear the array
  1576. v216v2 = v216va[:len(v216v1):len(v216v1)]
  1577. testUnmarshalErr(&v216v2, bs216, h, t, "dec-slice-v216-p-len")
  1578. testDeepEqualErr(v216v1, v216v2, t, "equal-slice-v216-p-len")
  1579. v216va = [8]int16{} // clear the array
  1580. v216v2 = v216va[:]
  1581. testUnmarshalErr(&v216v2, bs216, h, t, "dec-slice-v216-p-cap")
  1582. testDeepEqualErr(v216v1, v216v2, t, "equal-slice-v216-p-cap")
  1583. if len(v216v1) > 1 {
  1584. v216va = [8]int16{} // clear the array
  1585. testUnmarshalErr((&v216va)[:len(v216v1)], bs216, h, t, "dec-slice-v216-p-len-noaddr")
  1586. testDeepEqualErr(v216v1, v216va[:len(v216v1)], t, "equal-slice-v216-p-len-noaddr")
  1587. v216va = [8]int16{} // clear the array
  1588. testUnmarshalErr((&v216va)[:], bs216, h, t, "dec-slice-v216-p-cap-noaddr")
  1589. testDeepEqualErr(v216v1, v216va[:len(v216v1)], t, "equal-slice-v216-p-cap-noaddr")
  1590. }
  1591. // ...
  1592. var v216v3, v216v4 typMbsSliceInt16
  1593. v216v2 = nil
  1594. if v != nil {
  1595. v216v2 = make([]int16, len(v))
  1596. }
  1597. v216v3 = typMbsSliceInt16(v216v1)
  1598. v216v4 = typMbsSliceInt16(v216v2)
  1599. bs216 = testMarshalErr(v216v3, h, t, "enc-slice-v216-custom")
  1600. testUnmarshalErr(v216v4, bs216, h, t, "dec-slice-v216-custom")
  1601. testDeepEqualErr(v216v3, v216v4, t, "equal-slice-v216-custom")
  1602. bs216 = testMarshalErr(&v216v3, h, t, "enc-slice-v216-custom-p")
  1603. v216v2 = nil
  1604. v216v4 = typMbsSliceInt16(v216v2)
  1605. testUnmarshalErr(&v216v4, bs216, h, t, "dec-slice-v216-custom-p")
  1606. testDeepEqualErr(v216v3, v216v4, t, "equal-slice-v216-custom-p")
  1607. }
  1608. var v234va [8]int32
  1609. for _, v := range [][]int32{nil, {}, {44, 0, 0, 33}} {
  1610. var v234v1, v234v2 []int32
  1611. v234v1 = v
  1612. bs234 := testMarshalErr(v234v1, h, t, "enc-slice-v234")
  1613. if v == nil {
  1614. v234v2 = nil
  1615. } else {
  1616. v234v2 = make([]int32, len(v))
  1617. }
  1618. testUnmarshalErr(v234v2, bs234, h, t, "dec-slice-v234")
  1619. testDeepEqualErr(v234v1, v234v2, t, "equal-slice-v234")
  1620. if v == nil {
  1621. v234v2 = nil
  1622. } else {
  1623. v234v2 = make([]int32, len(v))
  1624. }
  1625. testUnmarshalErr(reflect.ValueOf(v234v2), bs234, h, t, "dec-slice-v234-noaddr") // non-addressable value
  1626. testDeepEqualErr(v234v1, v234v2, t, "equal-slice-v234-noaddr")
  1627. // ...
  1628. bs234 = testMarshalErr(&v234v1, h, t, "enc-slice-v234-p")
  1629. v234v2 = nil
  1630. testUnmarshalErr(&v234v2, bs234, h, t, "dec-slice-v234-p")
  1631. testDeepEqualErr(v234v1, v234v2, t, "equal-slice-v234-p")
  1632. v234va = [8]int32{} // clear the array
  1633. v234v2 = v234va[:1:1]
  1634. testUnmarshalErr(&v234v2, bs234, h, t, "dec-slice-v234-p-1")
  1635. testDeepEqualErr(v234v1, v234v2, t, "equal-slice-v234-p-1")
  1636. v234va = [8]int32{} // clear the array
  1637. v234v2 = v234va[:len(v234v1):len(v234v1)]
  1638. testUnmarshalErr(&v234v2, bs234, h, t, "dec-slice-v234-p-len")
  1639. testDeepEqualErr(v234v1, v234v2, t, "equal-slice-v234-p-len")
  1640. v234va = [8]int32{} // clear the array
  1641. v234v2 = v234va[:]
  1642. testUnmarshalErr(&v234v2, bs234, h, t, "dec-slice-v234-p-cap")
  1643. testDeepEqualErr(v234v1, v234v2, t, "equal-slice-v234-p-cap")
  1644. if len(v234v1) > 1 {
  1645. v234va = [8]int32{} // clear the array
  1646. testUnmarshalErr((&v234va)[:len(v234v1)], bs234, h, t, "dec-slice-v234-p-len-noaddr")
  1647. testDeepEqualErr(v234v1, v234va[:len(v234v1)], t, "equal-slice-v234-p-len-noaddr")
  1648. v234va = [8]int32{} // clear the array
  1649. testUnmarshalErr((&v234va)[:], bs234, h, t, "dec-slice-v234-p-cap-noaddr")
  1650. testDeepEqualErr(v234v1, v234va[:len(v234v1)], t, "equal-slice-v234-p-cap-noaddr")
  1651. }
  1652. // ...
  1653. var v234v3, v234v4 typMbsSliceInt32
  1654. v234v2 = nil
  1655. if v != nil {
  1656. v234v2 = make([]int32, len(v))
  1657. }
  1658. v234v3 = typMbsSliceInt32(v234v1)
  1659. v234v4 = typMbsSliceInt32(v234v2)
  1660. bs234 = testMarshalErr(v234v3, h, t, "enc-slice-v234-custom")
  1661. testUnmarshalErr(v234v4, bs234, h, t, "dec-slice-v234-custom")
  1662. testDeepEqualErr(v234v3, v234v4, t, "equal-slice-v234-custom")
  1663. bs234 = testMarshalErr(&v234v3, h, t, "enc-slice-v234-custom-p")
  1664. v234v2 = nil
  1665. v234v4 = typMbsSliceInt32(v234v2)
  1666. testUnmarshalErr(&v234v4, bs234, h, t, "dec-slice-v234-custom-p")
  1667. testDeepEqualErr(v234v3, v234v4, t, "equal-slice-v234-custom-p")
  1668. }
  1669. var v252va [8]int64
  1670. for _, v := range [][]int64{nil, {}, {44, 0, 0, 33}} {
  1671. var v252v1, v252v2 []int64
  1672. v252v1 = v
  1673. bs252 := testMarshalErr(v252v1, h, t, "enc-slice-v252")
  1674. if v == nil {
  1675. v252v2 = nil
  1676. } else {
  1677. v252v2 = make([]int64, len(v))
  1678. }
  1679. testUnmarshalErr(v252v2, bs252, h, t, "dec-slice-v252")
  1680. testDeepEqualErr(v252v1, v252v2, t, "equal-slice-v252")
  1681. if v == nil {
  1682. v252v2 = nil
  1683. } else {
  1684. v252v2 = make([]int64, len(v))
  1685. }
  1686. testUnmarshalErr(reflect.ValueOf(v252v2), bs252, h, t, "dec-slice-v252-noaddr") // non-addressable value
  1687. testDeepEqualErr(v252v1, v252v2, t, "equal-slice-v252-noaddr")
  1688. // ...
  1689. bs252 = testMarshalErr(&v252v1, h, t, "enc-slice-v252-p")
  1690. v252v2 = nil
  1691. testUnmarshalErr(&v252v2, bs252, h, t, "dec-slice-v252-p")
  1692. testDeepEqualErr(v252v1, v252v2, t, "equal-slice-v252-p")
  1693. v252va = [8]int64{} // clear the array
  1694. v252v2 = v252va[:1:1]
  1695. testUnmarshalErr(&v252v2, bs252, h, t, "dec-slice-v252-p-1")
  1696. testDeepEqualErr(v252v1, v252v2, t, "equal-slice-v252-p-1")
  1697. v252va = [8]int64{} // clear the array
  1698. v252v2 = v252va[:len(v252v1):len(v252v1)]
  1699. testUnmarshalErr(&v252v2, bs252, h, t, "dec-slice-v252-p-len")
  1700. testDeepEqualErr(v252v1, v252v2, t, "equal-slice-v252-p-len")
  1701. v252va = [8]int64{} // clear the array
  1702. v252v2 = v252va[:]
  1703. testUnmarshalErr(&v252v2, bs252, h, t, "dec-slice-v252-p-cap")
  1704. testDeepEqualErr(v252v1, v252v2, t, "equal-slice-v252-p-cap")
  1705. if len(v252v1) > 1 {
  1706. v252va = [8]int64{} // clear the array
  1707. testUnmarshalErr((&v252va)[:len(v252v1)], bs252, h, t, "dec-slice-v252-p-len-noaddr")
  1708. testDeepEqualErr(v252v1, v252va[:len(v252v1)], t, "equal-slice-v252-p-len-noaddr")
  1709. v252va = [8]int64{} // clear the array
  1710. testUnmarshalErr((&v252va)[:], bs252, h, t, "dec-slice-v252-p-cap-noaddr")
  1711. testDeepEqualErr(v252v1, v252va[:len(v252v1)], t, "equal-slice-v252-p-cap-noaddr")
  1712. }
  1713. // ...
  1714. var v252v3, v252v4 typMbsSliceInt64
  1715. v252v2 = nil
  1716. if v != nil {
  1717. v252v2 = make([]int64, len(v))
  1718. }
  1719. v252v3 = typMbsSliceInt64(v252v1)
  1720. v252v4 = typMbsSliceInt64(v252v2)
  1721. bs252 = testMarshalErr(v252v3, h, t, "enc-slice-v252-custom")
  1722. testUnmarshalErr(v252v4, bs252, h, t, "dec-slice-v252-custom")
  1723. testDeepEqualErr(v252v3, v252v4, t, "equal-slice-v252-custom")
  1724. bs252 = testMarshalErr(&v252v3, h, t, "enc-slice-v252-custom-p")
  1725. v252v2 = nil
  1726. v252v4 = typMbsSliceInt64(v252v2)
  1727. testUnmarshalErr(&v252v4, bs252, h, t, "dec-slice-v252-custom-p")
  1728. testDeepEqualErr(v252v3, v252v4, t, "equal-slice-v252-custom-p")
  1729. }
  1730. var v270va [8]bool
  1731. for _, v := range [][]bool{nil, {}, {true, false, false, true}} {
  1732. var v270v1, v270v2 []bool
  1733. v270v1 = v
  1734. bs270 := testMarshalErr(v270v1, h, t, "enc-slice-v270")
  1735. if v == nil {
  1736. v270v2 = nil
  1737. } else {
  1738. v270v2 = make([]bool, len(v))
  1739. }
  1740. testUnmarshalErr(v270v2, bs270, h, t, "dec-slice-v270")
  1741. testDeepEqualErr(v270v1, v270v2, t, "equal-slice-v270")
  1742. if v == nil {
  1743. v270v2 = nil
  1744. } else {
  1745. v270v2 = make([]bool, len(v))
  1746. }
  1747. testUnmarshalErr(reflect.ValueOf(v270v2), bs270, h, t, "dec-slice-v270-noaddr") // non-addressable value
  1748. testDeepEqualErr(v270v1, v270v2, t, "equal-slice-v270-noaddr")
  1749. // ...
  1750. bs270 = testMarshalErr(&v270v1, h, t, "enc-slice-v270-p")
  1751. v270v2 = nil
  1752. testUnmarshalErr(&v270v2, bs270, h, t, "dec-slice-v270-p")
  1753. testDeepEqualErr(v270v1, v270v2, t, "equal-slice-v270-p")
  1754. v270va = [8]bool{} // clear the array
  1755. v270v2 = v270va[:1:1]
  1756. testUnmarshalErr(&v270v2, bs270, h, t, "dec-slice-v270-p-1")
  1757. testDeepEqualErr(v270v1, v270v2, t, "equal-slice-v270-p-1")
  1758. v270va = [8]bool{} // clear the array
  1759. v270v2 = v270va[:len(v270v1):len(v270v1)]
  1760. testUnmarshalErr(&v270v2, bs270, h, t, "dec-slice-v270-p-len")
  1761. testDeepEqualErr(v270v1, v270v2, t, "equal-slice-v270-p-len")
  1762. v270va = [8]bool{} // clear the array
  1763. v270v2 = v270va[:]
  1764. testUnmarshalErr(&v270v2, bs270, h, t, "dec-slice-v270-p-cap")
  1765. testDeepEqualErr(v270v1, v270v2, t, "equal-slice-v270-p-cap")
  1766. if len(v270v1) > 1 {
  1767. v270va = [8]bool{} // clear the array
  1768. testUnmarshalErr((&v270va)[:len(v270v1)], bs270, h, t, "dec-slice-v270-p-len-noaddr")
  1769. testDeepEqualErr(v270v1, v270va[:len(v270v1)], t, "equal-slice-v270-p-len-noaddr")
  1770. v270va = [8]bool{} // clear the array
  1771. testUnmarshalErr((&v270va)[:], bs270, h, t, "dec-slice-v270-p-cap-noaddr")
  1772. testDeepEqualErr(v270v1, v270va[:len(v270v1)], t, "equal-slice-v270-p-cap-noaddr")
  1773. }
  1774. // ...
  1775. var v270v3, v270v4 typMbsSliceBool
  1776. v270v2 = nil
  1777. if v != nil {
  1778. v270v2 = make([]bool, len(v))
  1779. }
  1780. v270v3 = typMbsSliceBool(v270v1)
  1781. v270v4 = typMbsSliceBool(v270v2)
  1782. bs270 = testMarshalErr(v270v3, h, t, "enc-slice-v270-custom")
  1783. testUnmarshalErr(v270v4, bs270, h, t, "dec-slice-v270-custom")
  1784. testDeepEqualErr(v270v3, v270v4, t, "equal-slice-v270-custom")
  1785. bs270 = testMarshalErr(&v270v3, h, t, "enc-slice-v270-custom-p")
  1786. v270v2 = nil
  1787. v270v4 = typMbsSliceBool(v270v2)
  1788. testUnmarshalErr(&v270v4, bs270, h, t, "dec-slice-v270-custom-p")
  1789. testDeepEqualErr(v270v3, v270v4, t, "equal-slice-v270-custom-p")
  1790. }
  1791. }
  1792. func doTestMammothMaps(t *testing.T, h Handle) {
  1793. for _, v := range []map[interface{}]interface{}{nil, {}, {"string-is-an-interface-2": nil, "string-is-an-interface": "string-is-an-interface-2"}} {
  1794. // fmt.Printf(">>>> running mammoth map v2: %v\n", v)
  1795. var v2v1, v2v2 map[interface{}]interface{}
  1796. v2v1 = v
  1797. bs2 := testMarshalErr(v2v1, h, t, "enc-map-v2")
  1798. if v == nil {
  1799. v2v2 = nil
  1800. } else {
  1801. v2v2 = make(map[interface{}]interface{}, len(v))
  1802. } // reset map
  1803. testUnmarshalErr(v2v2, bs2, h, t, "dec-map-v2")
  1804. testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2")
  1805. if v == nil {
  1806. v2v2 = nil
  1807. } else {
  1808. v2v2 = make(map[interface{}]interface{}, len(v))
  1809. } // reset map
  1810. testUnmarshalErr(reflect.ValueOf(v2v2), bs2, h, t, "dec-map-v2-noaddr") // decode into non-addressable map value
  1811. testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-noaddr")
  1812. if v == nil {
  1813. v2v2 = nil
  1814. } else {
  1815. v2v2 = make(map[interface{}]interface{}, len(v))
  1816. } // reset map
  1817. testUnmarshalErr(&v2v2, bs2, h, t, "dec-map-v2-p-len")
  1818. testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-p-len")
  1819. bs2 = testMarshalErr(&v2v1, h, t, "enc-map-v2-p")
  1820. v2v2 = nil
  1821. testUnmarshalErr(&v2v2, bs2, h, t, "dec-map-v2-p-nil")
  1822. testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-p-nil")
  1823. // ...
  1824. if v == nil {
  1825. v2v2 = nil
  1826. } else {
  1827. v2v2 = make(map[interface{}]interface{}, len(v))
  1828. } // reset map
  1829. var v2v3, v2v4 typMapMapIntfIntf
  1830. v2v3 = typMapMapIntfIntf(v2v1)
  1831. v2v4 = typMapMapIntfIntf(v2v2)
  1832. bs2 = testMarshalErr(v2v3, h, t, "enc-map-v2-custom")
  1833. testUnmarshalErr(v2v4, bs2, h, t, "dec-map-v2-p-len")
  1834. testDeepEqualErr(v2v3, v2v4, t, "equal-map-v2-p-len")
  1835. }
  1836. for _, v := range []map[interface{}]string{nil, {}, {"string-is-an-interface": "", "string-is-an-interface-2": "some-string-2"}} {
  1837. // fmt.Printf(">>>> running mammoth map v3: %v\n", v)
  1838. var v3v1, v3v2 map[interface{}]string
  1839. v3v1 = v
  1840. bs3 := testMarshalErr(v3v1, h, t, "enc-map-v3")
  1841. if v == nil {
  1842. v3v2 = nil
  1843. } else {
  1844. v3v2 = make(map[interface{}]string, len(v))
  1845. } // reset map
  1846. testUnmarshalErr(v3v2, bs3, h, t, "dec-map-v3")
  1847. testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3")
  1848. if v == nil {
  1849. v3v2 = nil
  1850. } else {
  1851. v3v2 = make(map[interface{}]string, len(v))
  1852. } // reset map
  1853. testUnmarshalErr(reflect.ValueOf(v3v2), bs3, h, t, "dec-map-v3-noaddr") // decode into non-addressable map value
  1854. testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-noaddr")
  1855. if v == nil {
  1856. v3v2 = nil
  1857. } else {
  1858. v3v2 = make(map[interface{}]string, len(v))
  1859. } // reset map
  1860. testUnmarshalErr(&v3v2, bs3, h, t, "dec-map-v3-p-len")
  1861. testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-p-len")
  1862. bs3 = testMarshalErr(&v3v1, h, t, "enc-map-v3-p")
  1863. v3v2 = nil
  1864. testUnmarshalErr(&v3v2, bs3, h, t, "dec-map-v3-p-nil")
  1865. testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-p-nil")
  1866. // ...
  1867. if v == nil {
  1868. v3v2 = nil
  1869. } else {
  1870. v3v2 = make(map[interface{}]string, len(v))
  1871. } // reset map
  1872. var v3v3, v3v4 typMapMapIntfString
  1873. v3v3 = typMapMapIntfString(v3v1)
  1874. v3v4 = typMapMapIntfString(v3v2)
  1875. bs3 = testMarshalErr(v3v3, h, t, "enc-map-v3-custom")
  1876. testUnmarshalErr(v3v4, bs3, h, t, "dec-map-v3-p-len")
  1877. testDeepEqualErr(v3v3, v3v4, t, "equal-map-v3-p-len")
  1878. }
  1879. for _, v := range []map[interface{}]uint{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  1880. // fmt.Printf(">>>> running mammoth map v4: %v\n", v)
  1881. var v4v1, v4v2 map[interface{}]uint
  1882. v4v1 = v
  1883. bs4 := testMarshalErr(v4v1, h, t, "enc-map-v4")
  1884. if v == nil {
  1885. v4v2 = nil
  1886. } else {
  1887. v4v2 = make(map[interface{}]uint, len(v))
  1888. } // reset map
  1889. testUnmarshalErr(v4v2, bs4, h, t, "dec-map-v4")
  1890. testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4")
  1891. if v == nil {
  1892. v4v2 = nil
  1893. } else {
  1894. v4v2 = make(map[interface{}]uint, len(v))
  1895. } // reset map
  1896. testUnmarshalErr(reflect.ValueOf(v4v2), bs4, h, t, "dec-map-v4-noaddr") // decode into non-addressable map value
  1897. testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-noaddr")
  1898. if v == nil {
  1899. v4v2 = nil
  1900. } else {
  1901. v4v2 = make(map[interface{}]uint, len(v))
  1902. } // reset map
  1903. testUnmarshalErr(&v4v2, bs4, h, t, "dec-map-v4-p-len")
  1904. testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-p-len")
  1905. bs4 = testMarshalErr(&v4v1, h, t, "enc-map-v4-p")
  1906. v4v2 = nil
  1907. testUnmarshalErr(&v4v2, bs4, h, t, "dec-map-v4-p-nil")
  1908. testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-p-nil")
  1909. // ...
  1910. if v == nil {
  1911. v4v2 = nil
  1912. } else {
  1913. v4v2 = make(map[interface{}]uint, len(v))
  1914. } // reset map
  1915. var v4v3, v4v4 typMapMapIntfUint
  1916. v4v3 = typMapMapIntfUint(v4v1)
  1917. v4v4 = typMapMapIntfUint(v4v2)
  1918. bs4 = testMarshalErr(v4v3, h, t, "enc-map-v4-custom")
  1919. testUnmarshalErr(v4v4, bs4, h, t, "dec-map-v4-p-len")
  1920. testDeepEqualErr(v4v3, v4v4, t, "equal-map-v4-p-len")
  1921. }
  1922. for _, v := range []map[interface{}]uint8{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  1923. // fmt.Printf(">>>> running mammoth map v5: %v\n", v)
  1924. var v5v1, v5v2 map[interface{}]uint8
  1925. v5v1 = v
  1926. bs5 := testMarshalErr(v5v1, h, t, "enc-map-v5")
  1927. if v == nil {
  1928. v5v2 = nil
  1929. } else {
  1930. v5v2 = make(map[interface{}]uint8, len(v))
  1931. } // reset map
  1932. testUnmarshalErr(v5v2, bs5, h, t, "dec-map-v5")
  1933. testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5")
  1934. if v == nil {
  1935. v5v2 = nil
  1936. } else {
  1937. v5v2 = make(map[interface{}]uint8, len(v))
  1938. } // reset map
  1939. testUnmarshalErr(reflect.ValueOf(v5v2), bs5, h, t, "dec-map-v5-noaddr") // decode into non-addressable map value
  1940. testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-noaddr")
  1941. if v == nil {
  1942. v5v2 = nil
  1943. } else {
  1944. v5v2 = make(map[interface{}]uint8, len(v))
  1945. } // reset map
  1946. testUnmarshalErr(&v5v2, bs5, h, t, "dec-map-v5-p-len")
  1947. testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-p-len")
  1948. bs5 = testMarshalErr(&v5v1, h, t, "enc-map-v5-p")
  1949. v5v2 = nil
  1950. testUnmarshalErr(&v5v2, bs5, h, t, "dec-map-v5-p-nil")
  1951. testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-p-nil")
  1952. // ...
  1953. if v == nil {
  1954. v5v2 = nil
  1955. } else {
  1956. v5v2 = make(map[interface{}]uint8, len(v))
  1957. } // reset map
  1958. var v5v3, v5v4 typMapMapIntfUint8
  1959. v5v3 = typMapMapIntfUint8(v5v1)
  1960. v5v4 = typMapMapIntfUint8(v5v2)
  1961. bs5 = testMarshalErr(v5v3, h, t, "enc-map-v5-custom")
  1962. testUnmarshalErr(v5v4, bs5, h, t, "dec-map-v5-p-len")
  1963. testDeepEqualErr(v5v3, v5v4, t, "equal-map-v5-p-len")
  1964. }
  1965. for _, v := range []map[interface{}]uint16{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  1966. // fmt.Printf(">>>> running mammoth map v6: %v\n", v)
  1967. var v6v1, v6v2 map[interface{}]uint16
  1968. v6v1 = v
  1969. bs6 := testMarshalErr(v6v1, h, t, "enc-map-v6")
  1970. if v == nil {
  1971. v6v2 = nil
  1972. } else {
  1973. v6v2 = make(map[interface{}]uint16, len(v))
  1974. } // reset map
  1975. testUnmarshalErr(v6v2, bs6, h, t, "dec-map-v6")
  1976. testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6")
  1977. if v == nil {
  1978. v6v2 = nil
  1979. } else {
  1980. v6v2 = make(map[interface{}]uint16, len(v))
  1981. } // reset map
  1982. testUnmarshalErr(reflect.ValueOf(v6v2), bs6, h, t, "dec-map-v6-noaddr") // decode into non-addressable map value
  1983. testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-noaddr")
  1984. if v == nil {
  1985. v6v2 = nil
  1986. } else {
  1987. v6v2 = make(map[interface{}]uint16, len(v))
  1988. } // reset map
  1989. testUnmarshalErr(&v6v2, bs6, h, t, "dec-map-v6-p-len")
  1990. testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-p-len")
  1991. bs6 = testMarshalErr(&v6v1, h, t, "enc-map-v6-p")
  1992. v6v2 = nil
  1993. testUnmarshalErr(&v6v2, bs6, h, t, "dec-map-v6-p-nil")
  1994. testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-p-nil")
  1995. // ...
  1996. if v == nil {
  1997. v6v2 = nil
  1998. } else {
  1999. v6v2 = make(map[interface{}]uint16, len(v))
  2000. } // reset map
  2001. var v6v3, v6v4 typMapMapIntfUint16
  2002. v6v3 = typMapMapIntfUint16(v6v1)
  2003. v6v4 = typMapMapIntfUint16(v6v2)
  2004. bs6 = testMarshalErr(v6v3, h, t, "enc-map-v6-custom")
  2005. testUnmarshalErr(v6v4, bs6, h, t, "dec-map-v6-p-len")
  2006. testDeepEqualErr(v6v3, v6v4, t, "equal-map-v6-p-len")
  2007. }
  2008. for _, v := range []map[interface{}]uint32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  2009. // fmt.Printf(">>>> running mammoth map v7: %v\n", v)
  2010. var v7v1, v7v2 map[interface{}]uint32
  2011. v7v1 = v
  2012. bs7 := testMarshalErr(v7v1, h, t, "enc-map-v7")
  2013. if v == nil {
  2014. v7v2 = nil
  2015. } else {
  2016. v7v2 = make(map[interface{}]uint32, len(v))
  2017. } // reset map
  2018. testUnmarshalErr(v7v2, bs7, h, t, "dec-map-v7")
  2019. testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7")
  2020. if v == nil {
  2021. v7v2 = nil
  2022. } else {
  2023. v7v2 = make(map[interface{}]uint32, len(v))
  2024. } // reset map
  2025. testUnmarshalErr(reflect.ValueOf(v7v2), bs7, h, t, "dec-map-v7-noaddr") // decode into non-addressable map value
  2026. testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-noaddr")
  2027. if v == nil {
  2028. v7v2 = nil
  2029. } else {
  2030. v7v2 = make(map[interface{}]uint32, len(v))
  2031. } // reset map
  2032. testUnmarshalErr(&v7v2, bs7, h, t, "dec-map-v7-p-len")
  2033. testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-p-len")
  2034. bs7 = testMarshalErr(&v7v1, h, t, "enc-map-v7-p")
  2035. v7v2 = nil
  2036. testUnmarshalErr(&v7v2, bs7, h, t, "dec-map-v7-p-nil")
  2037. testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-p-nil")
  2038. // ...
  2039. if v == nil {
  2040. v7v2 = nil
  2041. } else {
  2042. v7v2 = make(map[interface{}]uint32, len(v))
  2043. } // reset map
  2044. var v7v3, v7v4 typMapMapIntfUint32
  2045. v7v3 = typMapMapIntfUint32(v7v1)
  2046. v7v4 = typMapMapIntfUint32(v7v2)
  2047. bs7 = testMarshalErr(v7v3, h, t, "enc-map-v7-custom")
  2048. testUnmarshalErr(v7v4, bs7, h, t, "dec-map-v7-p-len")
  2049. testDeepEqualErr(v7v3, v7v4, t, "equal-map-v7-p-len")
  2050. }
  2051. for _, v := range []map[interface{}]uint64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2052. // fmt.Printf(">>>> running mammoth map v8: %v\n", v)
  2053. var v8v1, v8v2 map[interface{}]uint64
  2054. v8v1 = v
  2055. bs8 := testMarshalErr(v8v1, h, t, "enc-map-v8")
  2056. if v == nil {
  2057. v8v2 = nil
  2058. } else {
  2059. v8v2 = make(map[interface{}]uint64, len(v))
  2060. } // reset map
  2061. testUnmarshalErr(v8v2, bs8, h, t, "dec-map-v8")
  2062. testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8")
  2063. if v == nil {
  2064. v8v2 = nil
  2065. } else {
  2066. v8v2 = make(map[interface{}]uint64, len(v))
  2067. } // reset map
  2068. testUnmarshalErr(reflect.ValueOf(v8v2), bs8, h, t, "dec-map-v8-noaddr") // decode into non-addressable map value
  2069. testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-noaddr")
  2070. if v == nil {
  2071. v8v2 = nil
  2072. } else {
  2073. v8v2 = make(map[interface{}]uint64, len(v))
  2074. } // reset map
  2075. testUnmarshalErr(&v8v2, bs8, h, t, "dec-map-v8-p-len")
  2076. testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-p-len")
  2077. bs8 = testMarshalErr(&v8v1, h, t, "enc-map-v8-p")
  2078. v8v2 = nil
  2079. testUnmarshalErr(&v8v2, bs8, h, t, "dec-map-v8-p-nil")
  2080. testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-p-nil")
  2081. // ...
  2082. if v == nil {
  2083. v8v2 = nil
  2084. } else {
  2085. v8v2 = make(map[interface{}]uint64, len(v))
  2086. } // reset map
  2087. var v8v3, v8v4 typMapMapIntfUint64
  2088. v8v3 = typMapMapIntfUint64(v8v1)
  2089. v8v4 = typMapMapIntfUint64(v8v2)
  2090. bs8 = testMarshalErr(v8v3, h, t, "enc-map-v8-custom")
  2091. testUnmarshalErr(v8v4, bs8, h, t, "dec-map-v8-p-len")
  2092. testDeepEqualErr(v8v3, v8v4, t, "equal-map-v8-p-len")
  2093. }
  2094. for _, v := range []map[interface{}]uintptr{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  2095. // fmt.Printf(">>>> running mammoth map v9: %v\n", v)
  2096. var v9v1, v9v2 map[interface{}]uintptr
  2097. v9v1 = v
  2098. bs9 := testMarshalErr(v9v1, h, t, "enc-map-v9")
  2099. if v == nil {
  2100. v9v2 = nil
  2101. } else {
  2102. v9v2 = make(map[interface{}]uintptr, len(v))
  2103. } // reset map
  2104. testUnmarshalErr(v9v2, bs9, h, t, "dec-map-v9")
  2105. testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9")
  2106. if v == nil {
  2107. v9v2 = nil
  2108. } else {
  2109. v9v2 = make(map[interface{}]uintptr, len(v))
  2110. } // reset map
  2111. testUnmarshalErr(reflect.ValueOf(v9v2), bs9, h, t, "dec-map-v9-noaddr") // decode into non-addressable map value
  2112. testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-noaddr")
  2113. if v == nil {
  2114. v9v2 = nil
  2115. } else {
  2116. v9v2 = make(map[interface{}]uintptr, len(v))
  2117. } // reset map
  2118. testUnmarshalErr(&v9v2, bs9, h, t, "dec-map-v9-p-len")
  2119. testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-p-len")
  2120. bs9 = testMarshalErr(&v9v1, h, t, "enc-map-v9-p")
  2121. v9v2 = nil
  2122. testUnmarshalErr(&v9v2, bs9, h, t, "dec-map-v9-p-nil")
  2123. testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-p-nil")
  2124. // ...
  2125. if v == nil {
  2126. v9v2 = nil
  2127. } else {
  2128. v9v2 = make(map[interface{}]uintptr, len(v))
  2129. } // reset map
  2130. var v9v3, v9v4 typMapMapIntfUintptr
  2131. v9v3 = typMapMapIntfUintptr(v9v1)
  2132. v9v4 = typMapMapIntfUintptr(v9v2)
  2133. bs9 = testMarshalErr(v9v3, h, t, "enc-map-v9-custom")
  2134. testUnmarshalErr(v9v4, bs9, h, t, "dec-map-v9-p-len")
  2135. testDeepEqualErr(v9v3, v9v4, t, "equal-map-v9-p-len")
  2136. }
  2137. for _, v := range []map[interface{}]int{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2138. // fmt.Printf(">>>> running mammoth map v10: %v\n", v)
  2139. var v10v1, v10v2 map[interface{}]int
  2140. v10v1 = v
  2141. bs10 := testMarshalErr(v10v1, h, t, "enc-map-v10")
  2142. if v == nil {
  2143. v10v2 = nil
  2144. } else {
  2145. v10v2 = make(map[interface{}]int, len(v))
  2146. } // reset map
  2147. testUnmarshalErr(v10v2, bs10, h, t, "dec-map-v10")
  2148. testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10")
  2149. if v == nil {
  2150. v10v2 = nil
  2151. } else {
  2152. v10v2 = make(map[interface{}]int, len(v))
  2153. } // reset map
  2154. testUnmarshalErr(reflect.ValueOf(v10v2), bs10, h, t, "dec-map-v10-noaddr") // decode into non-addressable map value
  2155. testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-noaddr")
  2156. if v == nil {
  2157. v10v2 = nil
  2158. } else {
  2159. v10v2 = make(map[interface{}]int, len(v))
  2160. } // reset map
  2161. testUnmarshalErr(&v10v2, bs10, h, t, "dec-map-v10-p-len")
  2162. testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-p-len")
  2163. bs10 = testMarshalErr(&v10v1, h, t, "enc-map-v10-p")
  2164. v10v2 = nil
  2165. testUnmarshalErr(&v10v2, bs10, h, t, "dec-map-v10-p-nil")
  2166. testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-p-nil")
  2167. // ...
  2168. if v == nil {
  2169. v10v2 = nil
  2170. } else {
  2171. v10v2 = make(map[interface{}]int, len(v))
  2172. } // reset map
  2173. var v10v3, v10v4 typMapMapIntfInt
  2174. v10v3 = typMapMapIntfInt(v10v1)
  2175. v10v4 = typMapMapIntfInt(v10v2)
  2176. bs10 = testMarshalErr(v10v3, h, t, "enc-map-v10-custom")
  2177. testUnmarshalErr(v10v4, bs10, h, t, "dec-map-v10-p-len")
  2178. testDeepEqualErr(v10v3, v10v4, t, "equal-map-v10-p-len")
  2179. }
  2180. for _, v := range []map[interface{}]int8{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  2181. // fmt.Printf(">>>> running mammoth map v11: %v\n", v)
  2182. var v11v1, v11v2 map[interface{}]int8
  2183. v11v1 = v
  2184. bs11 := testMarshalErr(v11v1, h, t, "enc-map-v11")
  2185. if v == nil {
  2186. v11v2 = nil
  2187. } else {
  2188. v11v2 = make(map[interface{}]int8, len(v))
  2189. } // reset map
  2190. testUnmarshalErr(v11v2, bs11, h, t, "dec-map-v11")
  2191. testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11")
  2192. if v == nil {
  2193. v11v2 = nil
  2194. } else {
  2195. v11v2 = make(map[interface{}]int8, len(v))
  2196. } // reset map
  2197. testUnmarshalErr(reflect.ValueOf(v11v2), bs11, h, t, "dec-map-v11-noaddr") // decode into non-addressable map value
  2198. testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-noaddr")
  2199. if v == nil {
  2200. v11v2 = nil
  2201. } else {
  2202. v11v2 = make(map[interface{}]int8, len(v))
  2203. } // reset map
  2204. testUnmarshalErr(&v11v2, bs11, h, t, "dec-map-v11-p-len")
  2205. testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-p-len")
  2206. bs11 = testMarshalErr(&v11v1, h, t, "enc-map-v11-p")
  2207. v11v2 = nil
  2208. testUnmarshalErr(&v11v2, bs11, h, t, "dec-map-v11-p-nil")
  2209. testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-p-nil")
  2210. // ...
  2211. if v == nil {
  2212. v11v2 = nil
  2213. } else {
  2214. v11v2 = make(map[interface{}]int8, len(v))
  2215. } // reset map
  2216. var v11v3, v11v4 typMapMapIntfInt8
  2217. v11v3 = typMapMapIntfInt8(v11v1)
  2218. v11v4 = typMapMapIntfInt8(v11v2)
  2219. bs11 = testMarshalErr(v11v3, h, t, "enc-map-v11-custom")
  2220. testUnmarshalErr(v11v4, bs11, h, t, "dec-map-v11-p-len")
  2221. testDeepEqualErr(v11v3, v11v4, t, "equal-map-v11-p-len")
  2222. }
  2223. for _, v := range []map[interface{}]int16{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2224. // fmt.Printf(">>>> running mammoth map v12: %v\n", v)
  2225. var v12v1, v12v2 map[interface{}]int16
  2226. v12v1 = v
  2227. bs12 := testMarshalErr(v12v1, h, t, "enc-map-v12")
  2228. if v == nil {
  2229. v12v2 = nil
  2230. } else {
  2231. v12v2 = make(map[interface{}]int16, len(v))
  2232. } // reset map
  2233. testUnmarshalErr(v12v2, bs12, h, t, "dec-map-v12")
  2234. testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12")
  2235. if v == nil {
  2236. v12v2 = nil
  2237. } else {
  2238. v12v2 = make(map[interface{}]int16, len(v))
  2239. } // reset map
  2240. testUnmarshalErr(reflect.ValueOf(v12v2), bs12, h, t, "dec-map-v12-noaddr") // decode into non-addressable map value
  2241. testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-noaddr")
  2242. if v == nil {
  2243. v12v2 = nil
  2244. } else {
  2245. v12v2 = make(map[interface{}]int16, len(v))
  2246. } // reset map
  2247. testUnmarshalErr(&v12v2, bs12, h, t, "dec-map-v12-p-len")
  2248. testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-p-len")
  2249. bs12 = testMarshalErr(&v12v1, h, t, "enc-map-v12-p")
  2250. v12v2 = nil
  2251. testUnmarshalErr(&v12v2, bs12, h, t, "dec-map-v12-p-nil")
  2252. testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-p-nil")
  2253. // ...
  2254. if v == nil {
  2255. v12v2 = nil
  2256. } else {
  2257. v12v2 = make(map[interface{}]int16, len(v))
  2258. } // reset map
  2259. var v12v3, v12v4 typMapMapIntfInt16
  2260. v12v3 = typMapMapIntfInt16(v12v1)
  2261. v12v4 = typMapMapIntfInt16(v12v2)
  2262. bs12 = testMarshalErr(v12v3, h, t, "enc-map-v12-custom")
  2263. testUnmarshalErr(v12v4, bs12, h, t, "dec-map-v12-p-len")
  2264. testDeepEqualErr(v12v3, v12v4, t, "equal-map-v12-p-len")
  2265. }
  2266. for _, v := range []map[interface{}]int32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  2267. // fmt.Printf(">>>> running mammoth map v13: %v\n", v)
  2268. var v13v1, v13v2 map[interface{}]int32
  2269. v13v1 = v
  2270. bs13 := testMarshalErr(v13v1, h, t, "enc-map-v13")
  2271. if v == nil {
  2272. v13v2 = nil
  2273. } else {
  2274. v13v2 = make(map[interface{}]int32, len(v))
  2275. } // reset map
  2276. testUnmarshalErr(v13v2, bs13, h, t, "dec-map-v13")
  2277. testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13")
  2278. if v == nil {
  2279. v13v2 = nil
  2280. } else {
  2281. v13v2 = make(map[interface{}]int32, len(v))
  2282. } // reset map
  2283. testUnmarshalErr(reflect.ValueOf(v13v2), bs13, h, t, "dec-map-v13-noaddr") // decode into non-addressable map value
  2284. testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-noaddr")
  2285. if v == nil {
  2286. v13v2 = nil
  2287. } else {
  2288. v13v2 = make(map[interface{}]int32, len(v))
  2289. } // reset map
  2290. testUnmarshalErr(&v13v2, bs13, h, t, "dec-map-v13-p-len")
  2291. testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-p-len")
  2292. bs13 = testMarshalErr(&v13v1, h, t, "enc-map-v13-p")
  2293. v13v2 = nil
  2294. testUnmarshalErr(&v13v2, bs13, h, t, "dec-map-v13-p-nil")
  2295. testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-p-nil")
  2296. // ...
  2297. if v == nil {
  2298. v13v2 = nil
  2299. } else {
  2300. v13v2 = make(map[interface{}]int32, len(v))
  2301. } // reset map
  2302. var v13v3, v13v4 typMapMapIntfInt32
  2303. v13v3 = typMapMapIntfInt32(v13v1)
  2304. v13v4 = typMapMapIntfInt32(v13v2)
  2305. bs13 = testMarshalErr(v13v3, h, t, "enc-map-v13-custom")
  2306. testUnmarshalErr(v13v4, bs13, h, t, "dec-map-v13-p-len")
  2307. testDeepEqualErr(v13v3, v13v4, t, "equal-map-v13-p-len")
  2308. }
  2309. for _, v := range []map[interface{}]int64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2310. // fmt.Printf(">>>> running mammoth map v14: %v\n", v)
  2311. var v14v1, v14v2 map[interface{}]int64
  2312. v14v1 = v
  2313. bs14 := testMarshalErr(v14v1, h, t, "enc-map-v14")
  2314. if v == nil {
  2315. v14v2 = nil
  2316. } else {
  2317. v14v2 = make(map[interface{}]int64, len(v))
  2318. } // reset map
  2319. testUnmarshalErr(v14v2, bs14, h, t, "dec-map-v14")
  2320. testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14")
  2321. if v == nil {
  2322. v14v2 = nil
  2323. } else {
  2324. v14v2 = make(map[interface{}]int64, len(v))
  2325. } // reset map
  2326. testUnmarshalErr(reflect.ValueOf(v14v2), bs14, h, t, "dec-map-v14-noaddr") // decode into non-addressable map value
  2327. testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-noaddr")
  2328. if v == nil {
  2329. v14v2 = nil
  2330. } else {
  2331. v14v2 = make(map[interface{}]int64, len(v))
  2332. } // reset map
  2333. testUnmarshalErr(&v14v2, bs14, h, t, "dec-map-v14-p-len")
  2334. testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-p-len")
  2335. bs14 = testMarshalErr(&v14v1, h, t, "enc-map-v14-p")
  2336. v14v2 = nil
  2337. testUnmarshalErr(&v14v2, bs14, h, t, "dec-map-v14-p-nil")
  2338. testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-p-nil")
  2339. // ...
  2340. if v == nil {
  2341. v14v2 = nil
  2342. } else {
  2343. v14v2 = make(map[interface{}]int64, len(v))
  2344. } // reset map
  2345. var v14v3, v14v4 typMapMapIntfInt64
  2346. v14v3 = typMapMapIntfInt64(v14v1)
  2347. v14v4 = typMapMapIntfInt64(v14v2)
  2348. bs14 = testMarshalErr(v14v3, h, t, "enc-map-v14-custom")
  2349. testUnmarshalErr(v14v4, bs14, h, t, "dec-map-v14-p-len")
  2350. testDeepEqualErr(v14v3, v14v4, t, "equal-map-v14-p-len")
  2351. }
  2352. for _, v := range []map[interface{}]float32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 22.2}} {
  2353. // fmt.Printf(">>>> running mammoth map v15: %v\n", v)
  2354. var v15v1, v15v2 map[interface{}]float32
  2355. v15v1 = v
  2356. bs15 := testMarshalErr(v15v1, h, t, "enc-map-v15")
  2357. if v == nil {
  2358. v15v2 = nil
  2359. } else {
  2360. v15v2 = make(map[interface{}]float32, len(v))
  2361. } // reset map
  2362. testUnmarshalErr(v15v2, bs15, h, t, "dec-map-v15")
  2363. testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15")
  2364. if v == nil {
  2365. v15v2 = nil
  2366. } else {
  2367. v15v2 = make(map[interface{}]float32, len(v))
  2368. } // reset map
  2369. testUnmarshalErr(reflect.ValueOf(v15v2), bs15, h, t, "dec-map-v15-noaddr") // decode into non-addressable map value
  2370. testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-noaddr")
  2371. if v == nil {
  2372. v15v2 = nil
  2373. } else {
  2374. v15v2 = make(map[interface{}]float32, len(v))
  2375. } // reset map
  2376. testUnmarshalErr(&v15v2, bs15, h, t, "dec-map-v15-p-len")
  2377. testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-p-len")
  2378. bs15 = testMarshalErr(&v15v1, h, t, "enc-map-v15-p")
  2379. v15v2 = nil
  2380. testUnmarshalErr(&v15v2, bs15, h, t, "dec-map-v15-p-nil")
  2381. testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-p-nil")
  2382. // ...
  2383. if v == nil {
  2384. v15v2 = nil
  2385. } else {
  2386. v15v2 = make(map[interface{}]float32, len(v))
  2387. } // reset map
  2388. var v15v3, v15v4 typMapMapIntfFloat32
  2389. v15v3 = typMapMapIntfFloat32(v15v1)
  2390. v15v4 = typMapMapIntfFloat32(v15v2)
  2391. bs15 = testMarshalErr(v15v3, h, t, "enc-map-v15-custom")
  2392. testUnmarshalErr(v15v4, bs15, h, t, "dec-map-v15-p-len")
  2393. testDeepEqualErr(v15v3, v15v4, t, "equal-map-v15-p-len")
  2394. }
  2395. for _, v := range []map[interface{}]float64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 11.1}} {
  2396. // fmt.Printf(">>>> running mammoth map v16: %v\n", v)
  2397. var v16v1, v16v2 map[interface{}]float64
  2398. v16v1 = v
  2399. bs16 := testMarshalErr(v16v1, h, t, "enc-map-v16")
  2400. if v == nil {
  2401. v16v2 = nil
  2402. } else {
  2403. v16v2 = make(map[interface{}]float64, len(v))
  2404. } // reset map
  2405. testUnmarshalErr(v16v2, bs16, h, t, "dec-map-v16")
  2406. testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16")
  2407. if v == nil {
  2408. v16v2 = nil
  2409. } else {
  2410. v16v2 = make(map[interface{}]float64, len(v))
  2411. } // reset map
  2412. testUnmarshalErr(reflect.ValueOf(v16v2), bs16, h, t, "dec-map-v16-noaddr") // decode into non-addressable map value
  2413. testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-noaddr")
  2414. if v == nil {
  2415. v16v2 = nil
  2416. } else {
  2417. v16v2 = make(map[interface{}]float64, len(v))
  2418. } // reset map
  2419. testUnmarshalErr(&v16v2, bs16, h, t, "dec-map-v16-p-len")
  2420. testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-p-len")
  2421. bs16 = testMarshalErr(&v16v1, h, t, "enc-map-v16-p")
  2422. v16v2 = nil
  2423. testUnmarshalErr(&v16v2, bs16, h, t, "dec-map-v16-p-nil")
  2424. testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-p-nil")
  2425. // ...
  2426. if v == nil {
  2427. v16v2 = nil
  2428. } else {
  2429. v16v2 = make(map[interface{}]float64, len(v))
  2430. } // reset map
  2431. var v16v3, v16v4 typMapMapIntfFloat64
  2432. v16v3 = typMapMapIntfFloat64(v16v1)
  2433. v16v4 = typMapMapIntfFloat64(v16v2)
  2434. bs16 = testMarshalErr(v16v3, h, t, "enc-map-v16-custom")
  2435. testUnmarshalErr(v16v4, bs16, h, t, "dec-map-v16-p-len")
  2436. testDeepEqualErr(v16v3, v16v4, t, "equal-map-v16-p-len")
  2437. }
  2438. for _, v := range []map[interface{}]bool{nil, {}, {"string-is-an-interface": false, "string-is-an-interface-2": true}} {
  2439. // fmt.Printf(">>>> running mammoth map v17: %v\n", v)
  2440. var v17v1, v17v2 map[interface{}]bool
  2441. v17v1 = v
  2442. bs17 := testMarshalErr(v17v1, h, t, "enc-map-v17")
  2443. if v == nil {
  2444. v17v2 = nil
  2445. } else {
  2446. v17v2 = make(map[interface{}]bool, len(v))
  2447. } // reset map
  2448. testUnmarshalErr(v17v2, bs17, h, t, "dec-map-v17")
  2449. testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17")
  2450. if v == nil {
  2451. v17v2 = nil
  2452. } else {
  2453. v17v2 = make(map[interface{}]bool, len(v))
  2454. } // reset map
  2455. testUnmarshalErr(reflect.ValueOf(v17v2), bs17, h, t, "dec-map-v17-noaddr") // decode into non-addressable map value
  2456. testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-noaddr")
  2457. if v == nil {
  2458. v17v2 = nil
  2459. } else {
  2460. v17v2 = make(map[interface{}]bool, len(v))
  2461. } // reset map
  2462. testUnmarshalErr(&v17v2, bs17, h, t, "dec-map-v17-p-len")
  2463. testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-p-len")
  2464. bs17 = testMarshalErr(&v17v1, h, t, "enc-map-v17-p")
  2465. v17v2 = nil
  2466. testUnmarshalErr(&v17v2, bs17, h, t, "dec-map-v17-p-nil")
  2467. testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-p-nil")
  2468. // ...
  2469. if v == nil {
  2470. v17v2 = nil
  2471. } else {
  2472. v17v2 = make(map[interface{}]bool, len(v))
  2473. } // reset map
  2474. var v17v3, v17v4 typMapMapIntfBool
  2475. v17v3 = typMapMapIntfBool(v17v1)
  2476. v17v4 = typMapMapIntfBool(v17v2)
  2477. bs17 = testMarshalErr(v17v3, h, t, "enc-map-v17-custom")
  2478. testUnmarshalErr(v17v4, bs17, h, t, "dec-map-v17-p-len")
  2479. testDeepEqualErr(v17v3, v17v4, t, "equal-map-v17-p-len")
  2480. }
  2481. for _, v := range []map[string]interface{}{nil, {}, {"some-string": nil, "some-string-2": "string-is-an-interface"}} {
  2482. // fmt.Printf(">>>> running mammoth map v20: %v\n", v)
  2483. var v20v1, v20v2 map[string]interface{}
  2484. v20v1 = v
  2485. bs20 := testMarshalErr(v20v1, h, t, "enc-map-v20")
  2486. if v == nil {
  2487. v20v2 = nil
  2488. } else {
  2489. v20v2 = make(map[string]interface{}, len(v))
  2490. } // reset map
  2491. testUnmarshalErr(v20v2, bs20, h, t, "dec-map-v20")
  2492. testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20")
  2493. if v == nil {
  2494. v20v2 = nil
  2495. } else {
  2496. v20v2 = make(map[string]interface{}, len(v))
  2497. } // reset map
  2498. testUnmarshalErr(reflect.ValueOf(v20v2), bs20, h, t, "dec-map-v20-noaddr") // decode into non-addressable map value
  2499. testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-noaddr")
  2500. if v == nil {
  2501. v20v2 = nil
  2502. } else {
  2503. v20v2 = make(map[string]interface{}, len(v))
  2504. } // reset map
  2505. testUnmarshalErr(&v20v2, bs20, h, t, "dec-map-v20-p-len")
  2506. testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-p-len")
  2507. bs20 = testMarshalErr(&v20v1, h, t, "enc-map-v20-p")
  2508. v20v2 = nil
  2509. testUnmarshalErr(&v20v2, bs20, h, t, "dec-map-v20-p-nil")
  2510. testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-p-nil")
  2511. // ...
  2512. if v == nil {
  2513. v20v2 = nil
  2514. } else {
  2515. v20v2 = make(map[string]interface{}, len(v))
  2516. } // reset map
  2517. var v20v3, v20v4 typMapMapStringIntf
  2518. v20v3 = typMapMapStringIntf(v20v1)
  2519. v20v4 = typMapMapStringIntf(v20v2)
  2520. bs20 = testMarshalErr(v20v3, h, t, "enc-map-v20-custom")
  2521. testUnmarshalErr(v20v4, bs20, h, t, "dec-map-v20-p-len")
  2522. testDeepEqualErr(v20v3, v20v4, t, "equal-map-v20-p-len")
  2523. }
  2524. for _, v := range []map[string]string{nil, {}, {"some-string": "", "some-string-2": "some-string"}} {
  2525. // fmt.Printf(">>>> running mammoth map v21: %v\n", v)
  2526. var v21v1, v21v2 map[string]string
  2527. v21v1 = v
  2528. bs21 := testMarshalErr(v21v1, h, t, "enc-map-v21")
  2529. if v == nil {
  2530. v21v2 = nil
  2531. } else {
  2532. v21v2 = make(map[string]string, len(v))
  2533. } // reset map
  2534. testUnmarshalErr(v21v2, bs21, h, t, "dec-map-v21")
  2535. testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21")
  2536. if v == nil {
  2537. v21v2 = nil
  2538. } else {
  2539. v21v2 = make(map[string]string, len(v))
  2540. } // reset map
  2541. testUnmarshalErr(reflect.ValueOf(v21v2), bs21, h, t, "dec-map-v21-noaddr") // decode into non-addressable map value
  2542. testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-noaddr")
  2543. if v == nil {
  2544. v21v2 = nil
  2545. } else {
  2546. v21v2 = make(map[string]string, len(v))
  2547. } // reset map
  2548. testUnmarshalErr(&v21v2, bs21, h, t, "dec-map-v21-p-len")
  2549. testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-p-len")
  2550. bs21 = testMarshalErr(&v21v1, h, t, "enc-map-v21-p")
  2551. v21v2 = nil
  2552. testUnmarshalErr(&v21v2, bs21, h, t, "dec-map-v21-p-nil")
  2553. testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-p-nil")
  2554. // ...
  2555. if v == nil {
  2556. v21v2 = nil
  2557. } else {
  2558. v21v2 = make(map[string]string, len(v))
  2559. } // reset map
  2560. var v21v3, v21v4 typMapMapStringString
  2561. v21v3 = typMapMapStringString(v21v1)
  2562. v21v4 = typMapMapStringString(v21v2)
  2563. bs21 = testMarshalErr(v21v3, h, t, "enc-map-v21-custom")
  2564. testUnmarshalErr(v21v4, bs21, h, t, "dec-map-v21-p-len")
  2565. testDeepEqualErr(v21v3, v21v4, t, "equal-map-v21-p-len")
  2566. }
  2567. for _, v := range []map[string]uint{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2568. // fmt.Printf(">>>> running mammoth map v22: %v\n", v)
  2569. var v22v1, v22v2 map[string]uint
  2570. v22v1 = v
  2571. bs22 := testMarshalErr(v22v1, h, t, "enc-map-v22")
  2572. if v == nil {
  2573. v22v2 = nil
  2574. } else {
  2575. v22v2 = make(map[string]uint, len(v))
  2576. } // reset map
  2577. testUnmarshalErr(v22v2, bs22, h, t, "dec-map-v22")
  2578. testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22")
  2579. if v == nil {
  2580. v22v2 = nil
  2581. } else {
  2582. v22v2 = make(map[string]uint, len(v))
  2583. } // reset map
  2584. testUnmarshalErr(reflect.ValueOf(v22v2), bs22, h, t, "dec-map-v22-noaddr") // decode into non-addressable map value
  2585. testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-noaddr")
  2586. if v == nil {
  2587. v22v2 = nil
  2588. } else {
  2589. v22v2 = make(map[string]uint, len(v))
  2590. } // reset map
  2591. testUnmarshalErr(&v22v2, bs22, h, t, "dec-map-v22-p-len")
  2592. testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-p-len")
  2593. bs22 = testMarshalErr(&v22v1, h, t, "enc-map-v22-p")
  2594. v22v2 = nil
  2595. testUnmarshalErr(&v22v2, bs22, h, t, "dec-map-v22-p-nil")
  2596. testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-p-nil")
  2597. // ...
  2598. if v == nil {
  2599. v22v2 = nil
  2600. } else {
  2601. v22v2 = make(map[string]uint, len(v))
  2602. } // reset map
  2603. var v22v3, v22v4 typMapMapStringUint
  2604. v22v3 = typMapMapStringUint(v22v1)
  2605. v22v4 = typMapMapStringUint(v22v2)
  2606. bs22 = testMarshalErr(v22v3, h, t, "enc-map-v22-custom")
  2607. testUnmarshalErr(v22v4, bs22, h, t, "dec-map-v22-p-len")
  2608. testDeepEqualErr(v22v3, v22v4, t, "equal-map-v22-p-len")
  2609. }
  2610. for _, v := range []map[string]uint8{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2611. // fmt.Printf(">>>> running mammoth map v23: %v\n", v)
  2612. var v23v1, v23v2 map[string]uint8
  2613. v23v1 = v
  2614. bs23 := testMarshalErr(v23v1, h, t, "enc-map-v23")
  2615. if v == nil {
  2616. v23v2 = nil
  2617. } else {
  2618. v23v2 = make(map[string]uint8, len(v))
  2619. } // reset map
  2620. testUnmarshalErr(v23v2, bs23, h, t, "dec-map-v23")
  2621. testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23")
  2622. if v == nil {
  2623. v23v2 = nil
  2624. } else {
  2625. v23v2 = make(map[string]uint8, len(v))
  2626. } // reset map
  2627. testUnmarshalErr(reflect.ValueOf(v23v2), bs23, h, t, "dec-map-v23-noaddr") // decode into non-addressable map value
  2628. testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-noaddr")
  2629. if v == nil {
  2630. v23v2 = nil
  2631. } else {
  2632. v23v2 = make(map[string]uint8, len(v))
  2633. } // reset map
  2634. testUnmarshalErr(&v23v2, bs23, h, t, "dec-map-v23-p-len")
  2635. testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-p-len")
  2636. bs23 = testMarshalErr(&v23v1, h, t, "enc-map-v23-p")
  2637. v23v2 = nil
  2638. testUnmarshalErr(&v23v2, bs23, h, t, "dec-map-v23-p-nil")
  2639. testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-p-nil")
  2640. // ...
  2641. if v == nil {
  2642. v23v2 = nil
  2643. } else {
  2644. v23v2 = make(map[string]uint8, len(v))
  2645. } // reset map
  2646. var v23v3, v23v4 typMapMapStringUint8
  2647. v23v3 = typMapMapStringUint8(v23v1)
  2648. v23v4 = typMapMapStringUint8(v23v2)
  2649. bs23 = testMarshalErr(v23v3, h, t, "enc-map-v23-custom")
  2650. testUnmarshalErr(v23v4, bs23, h, t, "dec-map-v23-p-len")
  2651. testDeepEqualErr(v23v3, v23v4, t, "equal-map-v23-p-len")
  2652. }
  2653. for _, v := range []map[string]uint16{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2654. // fmt.Printf(">>>> running mammoth map v24: %v\n", v)
  2655. var v24v1, v24v2 map[string]uint16
  2656. v24v1 = v
  2657. bs24 := testMarshalErr(v24v1, h, t, "enc-map-v24")
  2658. if v == nil {
  2659. v24v2 = nil
  2660. } else {
  2661. v24v2 = make(map[string]uint16, len(v))
  2662. } // reset map
  2663. testUnmarshalErr(v24v2, bs24, h, t, "dec-map-v24")
  2664. testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24")
  2665. if v == nil {
  2666. v24v2 = nil
  2667. } else {
  2668. v24v2 = make(map[string]uint16, len(v))
  2669. } // reset map
  2670. testUnmarshalErr(reflect.ValueOf(v24v2), bs24, h, t, "dec-map-v24-noaddr") // decode into non-addressable map value
  2671. testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-noaddr")
  2672. if v == nil {
  2673. v24v2 = nil
  2674. } else {
  2675. v24v2 = make(map[string]uint16, len(v))
  2676. } // reset map
  2677. testUnmarshalErr(&v24v2, bs24, h, t, "dec-map-v24-p-len")
  2678. testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-p-len")
  2679. bs24 = testMarshalErr(&v24v1, h, t, "enc-map-v24-p")
  2680. v24v2 = nil
  2681. testUnmarshalErr(&v24v2, bs24, h, t, "dec-map-v24-p-nil")
  2682. testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-p-nil")
  2683. // ...
  2684. if v == nil {
  2685. v24v2 = nil
  2686. } else {
  2687. v24v2 = make(map[string]uint16, len(v))
  2688. } // reset map
  2689. var v24v3, v24v4 typMapMapStringUint16
  2690. v24v3 = typMapMapStringUint16(v24v1)
  2691. v24v4 = typMapMapStringUint16(v24v2)
  2692. bs24 = testMarshalErr(v24v3, h, t, "enc-map-v24-custom")
  2693. testUnmarshalErr(v24v4, bs24, h, t, "dec-map-v24-p-len")
  2694. testDeepEqualErr(v24v3, v24v4, t, "equal-map-v24-p-len")
  2695. }
  2696. for _, v := range []map[string]uint32{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2697. // fmt.Printf(">>>> running mammoth map v25: %v\n", v)
  2698. var v25v1, v25v2 map[string]uint32
  2699. v25v1 = v
  2700. bs25 := testMarshalErr(v25v1, h, t, "enc-map-v25")
  2701. if v == nil {
  2702. v25v2 = nil
  2703. } else {
  2704. v25v2 = make(map[string]uint32, len(v))
  2705. } // reset map
  2706. testUnmarshalErr(v25v2, bs25, h, t, "dec-map-v25")
  2707. testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25")
  2708. if v == nil {
  2709. v25v2 = nil
  2710. } else {
  2711. v25v2 = make(map[string]uint32, len(v))
  2712. } // reset map
  2713. testUnmarshalErr(reflect.ValueOf(v25v2), bs25, h, t, "dec-map-v25-noaddr") // decode into non-addressable map value
  2714. testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-noaddr")
  2715. if v == nil {
  2716. v25v2 = nil
  2717. } else {
  2718. v25v2 = make(map[string]uint32, len(v))
  2719. } // reset map
  2720. testUnmarshalErr(&v25v2, bs25, h, t, "dec-map-v25-p-len")
  2721. testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-p-len")
  2722. bs25 = testMarshalErr(&v25v1, h, t, "enc-map-v25-p")
  2723. v25v2 = nil
  2724. testUnmarshalErr(&v25v2, bs25, h, t, "dec-map-v25-p-nil")
  2725. testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-p-nil")
  2726. // ...
  2727. if v == nil {
  2728. v25v2 = nil
  2729. } else {
  2730. v25v2 = make(map[string]uint32, len(v))
  2731. } // reset map
  2732. var v25v3, v25v4 typMapMapStringUint32
  2733. v25v3 = typMapMapStringUint32(v25v1)
  2734. v25v4 = typMapMapStringUint32(v25v2)
  2735. bs25 = testMarshalErr(v25v3, h, t, "enc-map-v25-custom")
  2736. testUnmarshalErr(v25v4, bs25, h, t, "dec-map-v25-p-len")
  2737. testDeepEqualErr(v25v3, v25v4, t, "equal-map-v25-p-len")
  2738. }
  2739. for _, v := range []map[string]uint64{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2740. // fmt.Printf(">>>> running mammoth map v26: %v\n", v)
  2741. var v26v1, v26v2 map[string]uint64
  2742. v26v1 = v
  2743. bs26 := testMarshalErr(v26v1, h, t, "enc-map-v26")
  2744. if v == nil {
  2745. v26v2 = nil
  2746. } else {
  2747. v26v2 = make(map[string]uint64, len(v))
  2748. } // reset map
  2749. testUnmarshalErr(v26v2, bs26, h, t, "dec-map-v26")
  2750. testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26")
  2751. if v == nil {
  2752. v26v2 = nil
  2753. } else {
  2754. v26v2 = make(map[string]uint64, len(v))
  2755. } // reset map
  2756. testUnmarshalErr(reflect.ValueOf(v26v2), bs26, h, t, "dec-map-v26-noaddr") // decode into non-addressable map value
  2757. testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-noaddr")
  2758. if v == nil {
  2759. v26v2 = nil
  2760. } else {
  2761. v26v2 = make(map[string]uint64, len(v))
  2762. } // reset map
  2763. testUnmarshalErr(&v26v2, bs26, h, t, "dec-map-v26-p-len")
  2764. testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-p-len")
  2765. bs26 = testMarshalErr(&v26v1, h, t, "enc-map-v26-p")
  2766. v26v2 = nil
  2767. testUnmarshalErr(&v26v2, bs26, h, t, "dec-map-v26-p-nil")
  2768. testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-p-nil")
  2769. // ...
  2770. if v == nil {
  2771. v26v2 = nil
  2772. } else {
  2773. v26v2 = make(map[string]uint64, len(v))
  2774. } // reset map
  2775. var v26v3, v26v4 typMapMapStringUint64
  2776. v26v3 = typMapMapStringUint64(v26v1)
  2777. v26v4 = typMapMapStringUint64(v26v2)
  2778. bs26 = testMarshalErr(v26v3, h, t, "enc-map-v26-custom")
  2779. testUnmarshalErr(v26v4, bs26, h, t, "dec-map-v26-p-len")
  2780. testDeepEqualErr(v26v3, v26v4, t, "equal-map-v26-p-len")
  2781. }
  2782. for _, v := range []map[string]uintptr{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2783. // fmt.Printf(">>>> running mammoth map v27: %v\n", v)
  2784. var v27v1, v27v2 map[string]uintptr
  2785. v27v1 = v
  2786. bs27 := testMarshalErr(v27v1, h, t, "enc-map-v27")
  2787. if v == nil {
  2788. v27v2 = nil
  2789. } else {
  2790. v27v2 = make(map[string]uintptr, len(v))
  2791. } // reset map
  2792. testUnmarshalErr(v27v2, bs27, h, t, "dec-map-v27")
  2793. testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27")
  2794. if v == nil {
  2795. v27v2 = nil
  2796. } else {
  2797. v27v2 = make(map[string]uintptr, len(v))
  2798. } // reset map
  2799. testUnmarshalErr(reflect.ValueOf(v27v2), bs27, h, t, "dec-map-v27-noaddr") // decode into non-addressable map value
  2800. testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-noaddr")
  2801. if v == nil {
  2802. v27v2 = nil
  2803. } else {
  2804. v27v2 = make(map[string]uintptr, len(v))
  2805. } // reset map
  2806. testUnmarshalErr(&v27v2, bs27, h, t, "dec-map-v27-p-len")
  2807. testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-p-len")
  2808. bs27 = testMarshalErr(&v27v1, h, t, "enc-map-v27-p")
  2809. v27v2 = nil
  2810. testUnmarshalErr(&v27v2, bs27, h, t, "dec-map-v27-p-nil")
  2811. testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-p-nil")
  2812. // ...
  2813. if v == nil {
  2814. v27v2 = nil
  2815. } else {
  2816. v27v2 = make(map[string]uintptr, len(v))
  2817. } // reset map
  2818. var v27v3, v27v4 typMapMapStringUintptr
  2819. v27v3 = typMapMapStringUintptr(v27v1)
  2820. v27v4 = typMapMapStringUintptr(v27v2)
  2821. bs27 = testMarshalErr(v27v3, h, t, "enc-map-v27-custom")
  2822. testUnmarshalErr(v27v4, bs27, h, t, "dec-map-v27-p-len")
  2823. testDeepEqualErr(v27v3, v27v4, t, "equal-map-v27-p-len")
  2824. }
  2825. for _, v := range []map[string]int{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2826. // fmt.Printf(">>>> running mammoth map v28: %v\n", v)
  2827. var v28v1, v28v2 map[string]int
  2828. v28v1 = v
  2829. bs28 := testMarshalErr(v28v1, h, t, "enc-map-v28")
  2830. if v == nil {
  2831. v28v2 = nil
  2832. } else {
  2833. v28v2 = make(map[string]int, len(v))
  2834. } // reset map
  2835. testUnmarshalErr(v28v2, bs28, h, t, "dec-map-v28")
  2836. testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28")
  2837. if v == nil {
  2838. v28v2 = nil
  2839. } else {
  2840. v28v2 = make(map[string]int, len(v))
  2841. } // reset map
  2842. testUnmarshalErr(reflect.ValueOf(v28v2), bs28, h, t, "dec-map-v28-noaddr") // decode into non-addressable map value
  2843. testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-noaddr")
  2844. if v == nil {
  2845. v28v2 = nil
  2846. } else {
  2847. v28v2 = make(map[string]int, len(v))
  2848. } // reset map
  2849. testUnmarshalErr(&v28v2, bs28, h, t, "dec-map-v28-p-len")
  2850. testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-p-len")
  2851. bs28 = testMarshalErr(&v28v1, h, t, "enc-map-v28-p")
  2852. v28v2 = nil
  2853. testUnmarshalErr(&v28v2, bs28, h, t, "dec-map-v28-p-nil")
  2854. testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-p-nil")
  2855. // ...
  2856. if v == nil {
  2857. v28v2 = nil
  2858. } else {
  2859. v28v2 = make(map[string]int, len(v))
  2860. } // reset map
  2861. var v28v3, v28v4 typMapMapStringInt
  2862. v28v3 = typMapMapStringInt(v28v1)
  2863. v28v4 = typMapMapStringInt(v28v2)
  2864. bs28 = testMarshalErr(v28v3, h, t, "enc-map-v28-custom")
  2865. testUnmarshalErr(v28v4, bs28, h, t, "dec-map-v28-p-len")
  2866. testDeepEqualErr(v28v3, v28v4, t, "equal-map-v28-p-len")
  2867. }
  2868. for _, v := range []map[string]int8{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2869. // fmt.Printf(">>>> running mammoth map v29: %v\n", v)
  2870. var v29v1, v29v2 map[string]int8
  2871. v29v1 = v
  2872. bs29 := testMarshalErr(v29v1, h, t, "enc-map-v29")
  2873. if v == nil {
  2874. v29v2 = nil
  2875. } else {
  2876. v29v2 = make(map[string]int8, len(v))
  2877. } // reset map
  2878. testUnmarshalErr(v29v2, bs29, h, t, "dec-map-v29")
  2879. testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29")
  2880. if v == nil {
  2881. v29v2 = nil
  2882. } else {
  2883. v29v2 = make(map[string]int8, len(v))
  2884. } // reset map
  2885. testUnmarshalErr(reflect.ValueOf(v29v2), bs29, h, t, "dec-map-v29-noaddr") // decode into non-addressable map value
  2886. testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-noaddr")
  2887. if v == nil {
  2888. v29v2 = nil
  2889. } else {
  2890. v29v2 = make(map[string]int8, len(v))
  2891. } // reset map
  2892. testUnmarshalErr(&v29v2, bs29, h, t, "dec-map-v29-p-len")
  2893. testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-p-len")
  2894. bs29 = testMarshalErr(&v29v1, h, t, "enc-map-v29-p")
  2895. v29v2 = nil
  2896. testUnmarshalErr(&v29v2, bs29, h, t, "dec-map-v29-p-nil")
  2897. testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-p-nil")
  2898. // ...
  2899. if v == nil {
  2900. v29v2 = nil
  2901. } else {
  2902. v29v2 = make(map[string]int8, len(v))
  2903. } // reset map
  2904. var v29v3, v29v4 typMapMapStringInt8
  2905. v29v3 = typMapMapStringInt8(v29v1)
  2906. v29v4 = typMapMapStringInt8(v29v2)
  2907. bs29 = testMarshalErr(v29v3, h, t, "enc-map-v29-custom")
  2908. testUnmarshalErr(v29v4, bs29, h, t, "dec-map-v29-p-len")
  2909. testDeepEqualErr(v29v3, v29v4, t, "equal-map-v29-p-len")
  2910. }
  2911. for _, v := range []map[string]int16{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2912. // fmt.Printf(">>>> running mammoth map v30: %v\n", v)
  2913. var v30v1, v30v2 map[string]int16
  2914. v30v1 = v
  2915. bs30 := testMarshalErr(v30v1, h, t, "enc-map-v30")
  2916. if v == nil {
  2917. v30v2 = nil
  2918. } else {
  2919. v30v2 = make(map[string]int16, len(v))
  2920. } // reset map
  2921. testUnmarshalErr(v30v2, bs30, h, t, "dec-map-v30")
  2922. testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30")
  2923. if v == nil {
  2924. v30v2 = nil
  2925. } else {
  2926. v30v2 = make(map[string]int16, len(v))
  2927. } // reset map
  2928. testUnmarshalErr(reflect.ValueOf(v30v2), bs30, h, t, "dec-map-v30-noaddr") // decode into non-addressable map value
  2929. testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-noaddr")
  2930. if v == nil {
  2931. v30v2 = nil
  2932. } else {
  2933. v30v2 = make(map[string]int16, len(v))
  2934. } // reset map
  2935. testUnmarshalErr(&v30v2, bs30, h, t, "dec-map-v30-p-len")
  2936. testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-p-len")
  2937. bs30 = testMarshalErr(&v30v1, h, t, "enc-map-v30-p")
  2938. v30v2 = nil
  2939. testUnmarshalErr(&v30v2, bs30, h, t, "dec-map-v30-p-nil")
  2940. testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-p-nil")
  2941. // ...
  2942. if v == nil {
  2943. v30v2 = nil
  2944. } else {
  2945. v30v2 = make(map[string]int16, len(v))
  2946. } // reset map
  2947. var v30v3, v30v4 typMapMapStringInt16
  2948. v30v3 = typMapMapStringInt16(v30v1)
  2949. v30v4 = typMapMapStringInt16(v30v2)
  2950. bs30 = testMarshalErr(v30v3, h, t, "enc-map-v30-custom")
  2951. testUnmarshalErr(v30v4, bs30, h, t, "dec-map-v30-p-len")
  2952. testDeepEqualErr(v30v3, v30v4, t, "equal-map-v30-p-len")
  2953. }
  2954. for _, v := range []map[string]int32{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2955. // fmt.Printf(">>>> running mammoth map v31: %v\n", v)
  2956. var v31v1, v31v2 map[string]int32
  2957. v31v1 = v
  2958. bs31 := testMarshalErr(v31v1, h, t, "enc-map-v31")
  2959. if v == nil {
  2960. v31v2 = nil
  2961. } else {
  2962. v31v2 = make(map[string]int32, len(v))
  2963. } // reset map
  2964. testUnmarshalErr(v31v2, bs31, h, t, "dec-map-v31")
  2965. testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31")
  2966. if v == nil {
  2967. v31v2 = nil
  2968. } else {
  2969. v31v2 = make(map[string]int32, len(v))
  2970. } // reset map
  2971. testUnmarshalErr(reflect.ValueOf(v31v2), bs31, h, t, "dec-map-v31-noaddr") // decode into non-addressable map value
  2972. testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-noaddr")
  2973. if v == nil {
  2974. v31v2 = nil
  2975. } else {
  2976. v31v2 = make(map[string]int32, len(v))
  2977. } // reset map
  2978. testUnmarshalErr(&v31v2, bs31, h, t, "dec-map-v31-p-len")
  2979. testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-p-len")
  2980. bs31 = testMarshalErr(&v31v1, h, t, "enc-map-v31-p")
  2981. v31v2 = nil
  2982. testUnmarshalErr(&v31v2, bs31, h, t, "dec-map-v31-p-nil")
  2983. testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-p-nil")
  2984. // ...
  2985. if v == nil {
  2986. v31v2 = nil
  2987. } else {
  2988. v31v2 = make(map[string]int32, len(v))
  2989. } // reset map
  2990. var v31v3, v31v4 typMapMapStringInt32
  2991. v31v3 = typMapMapStringInt32(v31v1)
  2992. v31v4 = typMapMapStringInt32(v31v2)
  2993. bs31 = testMarshalErr(v31v3, h, t, "enc-map-v31-custom")
  2994. testUnmarshalErr(v31v4, bs31, h, t, "dec-map-v31-p-len")
  2995. testDeepEqualErr(v31v3, v31v4, t, "equal-map-v31-p-len")
  2996. }
  2997. for _, v := range []map[string]int64{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2998. // fmt.Printf(">>>> running mammoth map v32: %v\n", v)
  2999. var v32v1, v32v2 map[string]int64
  3000. v32v1 = v
  3001. bs32 := testMarshalErr(v32v1, h, t, "enc-map-v32")
  3002. if v == nil {
  3003. v32v2 = nil
  3004. } else {
  3005. v32v2 = make(map[string]int64, len(v))
  3006. } // reset map
  3007. testUnmarshalErr(v32v2, bs32, h, t, "dec-map-v32")
  3008. testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32")
  3009. if v == nil {
  3010. v32v2 = nil
  3011. } else {
  3012. v32v2 = make(map[string]int64, len(v))
  3013. } // reset map
  3014. testUnmarshalErr(reflect.ValueOf(v32v2), bs32, h, t, "dec-map-v32-noaddr") // decode into non-addressable map value
  3015. testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-noaddr")
  3016. if v == nil {
  3017. v32v2 = nil
  3018. } else {
  3019. v32v2 = make(map[string]int64, len(v))
  3020. } // reset map
  3021. testUnmarshalErr(&v32v2, bs32, h, t, "dec-map-v32-p-len")
  3022. testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-p-len")
  3023. bs32 = testMarshalErr(&v32v1, h, t, "enc-map-v32-p")
  3024. v32v2 = nil
  3025. testUnmarshalErr(&v32v2, bs32, h, t, "dec-map-v32-p-nil")
  3026. testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-p-nil")
  3027. // ...
  3028. if v == nil {
  3029. v32v2 = nil
  3030. } else {
  3031. v32v2 = make(map[string]int64, len(v))
  3032. } // reset map
  3033. var v32v3, v32v4 typMapMapStringInt64
  3034. v32v3 = typMapMapStringInt64(v32v1)
  3035. v32v4 = typMapMapStringInt64(v32v2)
  3036. bs32 = testMarshalErr(v32v3, h, t, "enc-map-v32-custom")
  3037. testUnmarshalErr(v32v4, bs32, h, t, "dec-map-v32-p-len")
  3038. testDeepEqualErr(v32v3, v32v4, t, "equal-map-v32-p-len")
  3039. }
  3040. for _, v := range []map[string]float32{nil, {}, {"some-string-2": 0, "some-string": 22.2}} {
  3041. // fmt.Printf(">>>> running mammoth map v33: %v\n", v)
  3042. var v33v1, v33v2 map[string]float32
  3043. v33v1 = v
  3044. bs33 := testMarshalErr(v33v1, h, t, "enc-map-v33")
  3045. if v == nil {
  3046. v33v2 = nil
  3047. } else {
  3048. v33v2 = make(map[string]float32, len(v))
  3049. } // reset map
  3050. testUnmarshalErr(v33v2, bs33, h, t, "dec-map-v33")
  3051. testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33")
  3052. if v == nil {
  3053. v33v2 = nil
  3054. } else {
  3055. v33v2 = make(map[string]float32, len(v))
  3056. } // reset map
  3057. testUnmarshalErr(reflect.ValueOf(v33v2), bs33, h, t, "dec-map-v33-noaddr") // decode into non-addressable map value
  3058. testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-noaddr")
  3059. if v == nil {
  3060. v33v2 = nil
  3061. } else {
  3062. v33v2 = make(map[string]float32, len(v))
  3063. } // reset map
  3064. testUnmarshalErr(&v33v2, bs33, h, t, "dec-map-v33-p-len")
  3065. testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-p-len")
  3066. bs33 = testMarshalErr(&v33v1, h, t, "enc-map-v33-p")
  3067. v33v2 = nil
  3068. testUnmarshalErr(&v33v2, bs33, h, t, "dec-map-v33-p-nil")
  3069. testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-p-nil")
  3070. // ...
  3071. if v == nil {
  3072. v33v2 = nil
  3073. } else {
  3074. v33v2 = make(map[string]float32, len(v))
  3075. } // reset map
  3076. var v33v3, v33v4 typMapMapStringFloat32
  3077. v33v3 = typMapMapStringFloat32(v33v1)
  3078. v33v4 = typMapMapStringFloat32(v33v2)
  3079. bs33 = testMarshalErr(v33v3, h, t, "enc-map-v33-custom")
  3080. testUnmarshalErr(v33v4, bs33, h, t, "dec-map-v33-p-len")
  3081. testDeepEqualErr(v33v3, v33v4, t, "equal-map-v33-p-len")
  3082. }
  3083. for _, v := range []map[string]float64{nil, {}, {"some-string-2": 0, "some-string": 11.1}} {
  3084. // fmt.Printf(">>>> running mammoth map v34: %v\n", v)
  3085. var v34v1, v34v2 map[string]float64
  3086. v34v1 = v
  3087. bs34 := testMarshalErr(v34v1, h, t, "enc-map-v34")
  3088. if v == nil {
  3089. v34v2 = nil
  3090. } else {
  3091. v34v2 = make(map[string]float64, len(v))
  3092. } // reset map
  3093. testUnmarshalErr(v34v2, bs34, h, t, "dec-map-v34")
  3094. testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34")
  3095. if v == nil {
  3096. v34v2 = nil
  3097. } else {
  3098. v34v2 = make(map[string]float64, len(v))
  3099. } // reset map
  3100. testUnmarshalErr(reflect.ValueOf(v34v2), bs34, h, t, "dec-map-v34-noaddr") // decode into non-addressable map value
  3101. testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-noaddr")
  3102. if v == nil {
  3103. v34v2 = nil
  3104. } else {
  3105. v34v2 = make(map[string]float64, len(v))
  3106. } // reset map
  3107. testUnmarshalErr(&v34v2, bs34, h, t, "dec-map-v34-p-len")
  3108. testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-p-len")
  3109. bs34 = testMarshalErr(&v34v1, h, t, "enc-map-v34-p")
  3110. v34v2 = nil
  3111. testUnmarshalErr(&v34v2, bs34, h, t, "dec-map-v34-p-nil")
  3112. testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-p-nil")
  3113. // ...
  3114. if v == nil {
  3115. v34v2 = nil
  3116. } else {
  3117. v34v2 = make(map[string]float64, len(v))
  3118. } // reset map
  3119. var v34v3, v34v4 typMapMapStringFloat64
  3120. v34v3 = typMapMapStringFloat64(v34v1)
  3121. v34v4 = typMapMapStringFloat64(v34v2)
  3122. bs34 = testMarshalErr(v34v3, h, t, "enc-map-v34-custom")
  3123. testUnmarshalErr(v34v4, bs34, h, t, "dec-map-v34-p-len")
  3124. testDeepEqualErr(v34v3, v34v4, t, "equal-map-v34-p-len")
  3125. }
  3126. for _, v := range []map[string]bool{nil, {}, {"some-string-2": false, "some-string": true}} {
  3127. // fmt.Printf(">>>> running mammoth map v35: %v\n", v)
  3128. var v35v1, v35v2 map[string]bool
  3129. v35v1 = v
  3130. bs35 := testMarshalErr(v35v1, h, t, "enc-map-v35")
  3131. if v == nil {
  3132. v35v2 = nil
  3133. } else {
  3134. v35v2 = make(map[string]bool, len(v))
  3135. } // reset map
  3136. testUnmarshalErr(v35v2, bs35, h, t, "dec-map-v35")
  3137. testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35")
  3138. if v == nil {
  3139. v35v2 = nil
  3140. } else {
  3141. v35v2 = make(map[string]bool, len(v))
  3142. } // reset map
  3143. testUnmarshalErr(reflect.ValueOf(v35v2), bs35, h, t, "dec-map-v35-noaddr") // decode into non-addressable map value
  3144. testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-noaddr")
  3145. if v == nil {
  3146. v35v2 = nil
  3147. } else {
  3148. v35v2 = make(map[string]bool, len(v))
  3149. } // reset map
  3150. testUnmarshalErr(&v35v2, bs35, h, t, "dec-map-v35-p-len")
  3151. testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-p-len")
  3152. bs35 = testMarshalErr(&v35v1, h, t, "enc-map-v35-p")
  3153. v35v2 = nil
  3154. testUnmarshalErr(&v35v2, bs35, h, t, "dec-map-v35-p-nil")
  3155. testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-p-nil")
  3156. // ...
  3157. if v == nil {
  3158. v35v2 = nil
  3159. } else {
  3160. v35v2 = make(map[string]bool, len(v))
  3161. } // reset map
  3162. var v35v3, v35v4 typMapMapStringBool
  3163. v35v3 = typMapMapStringBool(v35v1)
  3164. v35v4 = typMapMapStringBool(v35v2)
  3165. bs35 = testMarshalErr(v35v3, h, t, "enc-map-v35-custom")
  3166. testUnmarshalErr(v35v4, bs35, h, t, "dec-map-v35-p-len")
  3167. testDeepEqualErr(v35v3, v35v4, t, "equal-map-v35-p-len")
  3168. }
  3169. for _, v := range []map[float32]interface{}{nil, {}, {22.2: nil, 11.1: "string-is-an-interface-2"}} {
  3170. // fmt.Printf(">>>> running mammoth map v38: %v\n", v)
  3171. var v38v1, v38v2 map[float32]interface{}
  3172. v38v1 = v
  3173. bs38 := testMarshalErr(v38v1, h, t, "enc-map-v38")
  3174. if v == nil {
  3175. v38v2 = nil
  3176. } else {
  3177. v38v2 = make(map[float32]interface{}, len(v))
  3178. } // reset map
  3179. testUnmarshalErr(v38v2, bs38, h, t, "dec-map-v38")
  3180. testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38")
  3181. if v == nil {
  3182. v38v2 = nil
  3183. } else {
  3184. v38v2 = make(map[float32]interface{}, len(v))
  3185. } // reset map
  3186. testUnmarshalErr(reflect.ValueOf(v38v2), bs38, h, t, "dec-map-v38-noaddr") // decode into non-addressable map value
  3187. testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-noaddr")
  3188. if v == nil {
  3189. v38v2 = nil
  3190. } else {
  3191. v38v2 = make(map[float32]interface{}, len(v))
  3192. } // reset map
  3193. testUnmarshalErr(&v38v2, bs38, h, t, "dec-map-v38-p-len")
  3194. testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-p-len")
  3195. bs38 = testMarshalErr(&v38v1, h, t, "enc-map-v38-p")
  3196. v38v2 = nil
  3197. testUnmarshalErr(&v38v2, bs38, h, t, "dec-map-v38-p-nil")
  3198. testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-p-nil")
  3199. // ...
  3200. if v == nil {
  3201. v38v2 = nil
  3202. } else {
  3203. v38v2 = make(map[float32]interface{}, len(v))
  3204. } // reset map
  3205. var v38v3, v38v4 typMapMapFloat32Intf
  3206. v38v3 = typMapMapFloat32Intf(v38v1)
  3207. v38v4 = typMapMapFloat32Intf(v38v2)
  3208. bs38 = testMarshalErr(v38v3, h, t, "enc-map-v38-custom")
  3209. testUnmarshalErr(v38v4, bs38, h, t, "dec-map-v38-p-len")
  3210. testDeepEqualErr(v38v3, v38v4, t, "equal-map-v38-p-len")
  3211. }
  3212. for _, v := range []map[float32]string{nil, {}, {22.2: "", 11.1: "some-string-2"}} {
  3213. // fmt.Printf(">>>> running mammoth map v39: %v\n", v)
  3214. var v39v1, v39v2 map[float32]string
  3215. v39v1 = v
  3216. bs39 := testMarshalErr(v39v1, h, t, "enc-map-v39")
  3217. if v == nil {
  3218. v39v2 = nil
  3219. } else {
  3220. v39v2 = make(map[float32]string, len(v))
  3221. } // reset map
  3222. testUnmarshalErr(v39v2, bs39, h, t, "dec-map-v39")
  3223. testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39")
  3224. if v == nil {
  3225. v39v2 = nil
  3226. } else {
  3227. v39v2 = make(map[float32]string, len(v))
  3228. } // reset map
  3229. testUnmarshalErr(reflect.ValueOf(v39v2), bs39, h, t, "dec-map-v39-noaddr") // decode into non-addressable map value
  3230. testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-noaddr")
  3231. if v == nil {
  3232. v39v2 = nil
  3233. } else {
  3234. v39v2 = make(map[float32]string, len(v))
  3235. } // reset map
  3236. testUnmarshalErr(&v39v2, bs39, h, t, "dec-map-v39-p-len")
  3237. testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-p-len")
  3238. bs39 = testMarshalErr(&v39v1, h, t, "enc-map-v39-p")
  3239. v39v2 = nil
  3240. testUnmarshalErr(&v39v2, bs39, h, t, "dec-map-v39-p-nil")
  3241. testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-p-nil")
  3242. // ...
  3243. if v == nil {
  3244. v39v2 = nil
  3245. } else {
  3246. v39v2 = make(map[float32]string, len(v))
  3247. } // reset map
  3248. var v39v3, v39v4 typMapMapFloat32String
  3249. v39v3 = typMapMapFloat32String(v39v1)
  3250. v39v4 = typMapMapFloat32String(v39v2)
  3251. bs39 = testMarshalErr(v39v3, h, t, "enc-map-v39-custom")
  3252. testUnmarshalErr(v39v4, bs39, h, t, "dec-map-v39-p-len")
  3253. testDeepEqualErr(v39v3, v39v4, t, "equal-map-v39-p-len")
  3254. }
  3255. for _, v := range []map[float32]uint{nil, {}, {22.2: 0, 11.1: 44}} {
  3256. // fmt.Printf(">>>> running mammoth map v40: %v\n", v)
  3257. var v40v1, v40v2 map[float32]uint
  3258. v40v1 = v
  3259. bs40 := testMarshalErr(v40v1, h, t, "enc-map-v40")
  3260. if v == nil {
  3261. v40v2 = nil
  3262. } else {
  3263. v40v2 = make(map[float32]uint, len(v))
  3264. } // reset map
  3265. testUnmarshalErr(v40v2, bs40, h, t, "dec-map-v40")
  3266. testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40")
  3267. if v == nil {
  3268. v40v2 = nil
  3269. } else {
  3270. v40v2 = make(map[float32]uint, len(v))
  3271. } // reset map
  3272. testUnmarshalErr(reflect.ValueOf(v40v2), bs40, h, t, "dec-map-v40-noaddr") // decode into non-addressable map value
  3273. testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-noaddr")
  3274. if v == nil {
  3275. v40v2 = nil
  3276. } else {
  3277. v40v2 = make(map[float32]uint, len(v))
  3278. } // reset map
  3279. testUnmarshalErr(&v40v2, bs40, h, t, "dec-map-v40-p-len")
  3280. testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-p-len")
  3281. bs40 = testMarshalErr(&v40v1, h, t, "enc-map-v40-p")
  3282. v40v2 = nil
  3283. testUnmarshalErr(&v40v2, bs40, h, t, "dec-map-v40-p-nil")
  3284. testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-p-nil")
  3285. // ...
  3286. if v == nil {
  3287. v40v2 = nil
  3288. } else {
  3289. v40v2 = make(map[float32]uint, len(v))
  3290. } // reset map
  3291. var v40v3, v40v4 typMapMapFloat32Uint
  3292. v40v3 = typMapMapFloat32Uint(v40v1)
  3293. v40v4 = typMapMapFloat32Uint(v40v2)
  3294. bs40 = testMarshalErr(v40v3, h, t, "enc-map-v40-custom")
  3295. testUnmarshalErr(v40v4, bs40, h, t, "dec-map-v40-p-len")
  3296. testDeepEqualErr(v40v3, v40v4, t, "equal-map-v40-p-len")
  3297. }
  3298. for _, v := range []map[float32]uint8{nil, {}, {22.2: 0, 11.1: 33}} {
  3299. // fmt.Printf(">>>> running mammoth map v41: %v\n", v)
  3300. var v41v1, v41v2 map[float32]uint8
  3301. v41v1 = v
  3302. bs41 := testMarshalErr(v41v1, h, t, "enc-map-v41")
  3303. if v == nil {
  3304. v41v2 = nil
  3305. } else {
  3306. v41v2 = make(map[float32]uint8, len(v))
  3307. } // reset map
  3308. testUnmarshalErr(v41v2, bs41, h, t, "dec-map-v41")
  3309. testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41")
  3310. if v == nil {
  3311. v41v2 = nil
  3312. } else {
  3313. v41v2 = make(map[float32]uint8, len(v))
  3314. } // reset map
  3315. testUnmarshalErr(reflect.ValueOf(v41v2), bs41, h, t, "dec-map-v41-noaddr") // decode into non-addressable map value
  3316. testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-noaddr")
  3317. if v == nil {
  3318. v41v2 = nil
  3319. } else {
  3320. v41v2 = make(map[float32]uint8, len(v))
  3321. } // reset map
  3322. testUnmarshalErr(&v41v2, bs41, h, t, "dec-map-v41-p-len")
  3323. testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-p-len")
  3324. bs41 = testMarshalErr(&v41v1, h, t, "enc-map-v41-p")
  3325. v41v2 = nil
  3326. testUnmarshalErr(&v41v2, bs41, h, t, "dec-map-v41-p-nil")
  3327. testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-p-nil")
  3328. // ...
  3329. if v == nil {
  3330. v41v2 = nil
  3331. } else {
  3332. v41v2 = make(map[float32]uint8, len(v))
  3333. } // reset map
  3334. var v41v3, v41v4 typMapMapFloat32Uint8
  3335. v41v3 = typMapMapFloat32Uint8(v41v1)
  3336. v41v4 = typMapMapFloat32Uint8(v41v2)
  3337. bs41 = testMarshalErr(v41v3, h, t, "enc-map-v41-custom")
  3338. testUnmarshalErr(v41v4, bs41, h, t, "dec-map-v41-p-len")
  3339. testDeepEqualErr(v41v3, v41v4, t, "equal-map-v41-p-len")
  3340. }
  3341. for _, v := range []map[float32]uint16{nil, {}, {22.2: 0, 11.1: 44}} {
  3342. // fmt.Printf(">>>> running mammoth map v42: %v\n", v)
  3343. var v42v1, v42v2 map[float32]uint16
  3344. v42v1 = v
  3345. bs42 := testMarshalErr(v42v1, h, t, "enc-map-v42")
  3346. if v == nil {
  3347. v42v2 = nil
  3348. } else {
  3349. v42v2 = make(map[float32]uint16, len(v))
  3350. } // reset map
  3351. testUnmarshalErr(v42v2, bs42, h, t, "dec-map-v42")
  3352. testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42")
  3353. if v == nil {
  3354. v42v2 = nil
  3355. } else {
  3356. v42v2 = make(map[float32]uint16, len(v))
  3357. } // reset map
  3358. testUnmarshalErr(reflect.ValueOf(v42v2), bs42, h, t, "dec-map-v42-noaddr") // decode into non-addressable map value
  3359. testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-noaddr")
  3360. if v == nil {
  3361. v42v2 = nil
  3362. } else {
  3363. v42v2 = make(map[float32]uint16, len(v))
  3364. } // reset map
  3365. testUnmarshalErr(&v42v2, bs42, h, t, "dec-map-v42-p-len")
  3366. testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-p-len")
  3367. bs42 = testMarshalErr(&v42v1, h, t, "enc-map-v42-p")
  3368. v42v2 = nil
  3369. testUnmarshalErr(&v42v2, bs42, h, t, "dec-map-v42-p-nil")
  3370. testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-p-nil")
  3371. // ...
  3372. if v == nil {
  3373. v42v2 = nil
  3374. } else {
  3375. v42v2 = make(map[float32]uint16, len(v))
  3376. } // reset map
  3377. var v42v3, v42v4 typMapMapFloat32Uint16
  3378. v42v3 = typMapMapFloat32Uint16(v42v1)
  3379. v42v4 = typMapMapFloat32Uint16(v42v2)
  3380. bs42 = testMarshalErr(v42v3, h, t, "enc-map-v42-custom")
  3381. testUnmarshalErr(v42v4, bs42, h, t, "dec-map-v42-p-len")
  3382. testDeepEqualErr(v42v3, v42v4, t, "equal-map-v42-p-len")
  3383. }
  3384. for _, v := range []map[float32]uint32{nil, {}, {22.2: 0, 11.1: 33}} {
  3385. // fmt.Printf(">>>> running mammoth map v43: %v\n", v)
  3386. var v43v1, v43v2 map[float32]uint32
  3387. v43v1 = v
  3388. bs43 := testMarshalErr(v43v1, h, t, "enc-map-v43")
  3389. if v == nil {
  3390. v43v2 = nil
  3391. } else {
  3392. v43v2 = make(map[float32]uint32, len(v))
  3393. } // reset map
  3394. testUnmarshalErr(v43v2, bs43, h, t, "dec-map-v43")
  3395. testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43")
  3396. if v == nil {
  3397. v43v2 = nil
  3398. } else {
  3399. v43v2 = make(map[float32]uint32, len(v))
  3400. } // reset map
  3401. testUnmarshalErr(reflect.ValueOf(v43v2), bs43, h, t, "dec-map-v43-noaddr") // decode into non-addressable map value
  3402. testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-noaddr")
  3403. if v == nil {
  3404. v43v2 = nil
  3405. } else {
  3406. v43v2 = make(map[float32]uint32, len(v))
  3407. } // reset map
  3408. testUnmarshalErr(&v43v2, bs43, h, t, "dec-map-v43-p-len")
  3409. testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-p-len")
  3410. bs43 = testMarshalErr(&v43v1, h, t, "enc-map-v43-p")
  3411. v43v2 = nil
  3412. testUnmarshalErr(&v43v2, bs43, h, t, "dec-map-v43-p-nil")
  3413. testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-p-nil")
  3414. // ...
  3415. if v == nil {
  3416. v43v2 = nil
  3417. } else {
  3418. v43v2 = make(map[float32]uint32, len(v))
  3419. } // reset map
  3420. var v43v3, v43v4 typMapMapFloat32Uint32
  3421. v43v3 = typMapMapFloat32Uint32(v43v1)
  3422. v43v4 = typMapMapFloat32Uint32(v43v2)
  3423. bs43 = testMarshalErr(v43v3, h, t, "enc-map-v43-custom")
  3424. testUnmarshalErr(v43v4, bs43, h, t, "dec-map-v43-p-len")
  3425. testDeepEqualErr(v43v3, v43v4, t, "equal-map-v43-p-len")
  3426. }
  3427. for _, v := range []map[float32]uint64{nil, {}, {22.2: 0, 11.1: 44}} {
  3428. // fmt.Printf(">>>> running mammoth map v44: %v\n", v)
  3429. var v44v1, v44v2 map[float32]uint64
  3430. v44v1 = v
  3431. bs44 := testMarshalErr(v44v1, h, t, "enc-map-v44")
  3432. if v == nil {
  3433. v44v2 = nil
  3434. } else {
  3435. v44v2 = make(map[float32]uint64, len(v))
  3436. } // reset map
  3437. testUnmarshalErr(v44v2, bs44, h, t, "dec-map-v44")
  3438. testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44")
  3439. if v == nil {
  3440. v44v2 = nil
  3441. } else {
  3442. v44v2 = make(map[float32]uint64, len(v))
  3443. } // reset map
  3444. testUnmarshalErr(reflect.ValueOf(v44v2), bs44, h, t, "dec-map-v44-noaddr") // decode into non-addressable map value
  3445. testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-noaddr")
  3446. if v == nil {
  3447. v44v2 = nil
  3448. } else {
  3449. v44v2 = make(map[float32]uint64, len(v))
  3450. } // reset map
  3451. testUnmarshalErr(&v44v2, bs44, h, t, "dec-map-v44-p-len")
  3452. testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-p-len")
  3453. bs44 = testMarshalErr(&v44v1, h, t, "enc-map-v44-p")
  3454. v44v2 = nil
  3455. testUnmarshalErr(&v44v2, bs44, h, t, "dec-map-v44-p-nil")
  3456. testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-p-nil")
  3457. // ...
  3458. if v == nil {
  3459. v44v2 = nil
  3460. } else {
  3461. v44v2 = make(map[float32]uint64, len(v))
  3462. } // reset map
  3463. var v44v3, v44v4 typMapMapFloat32Uint64
  3464. v44v3 = typMapMapFloat32Uint64(v44v1)
  3465. v44v4 = typMapMapFloat32Uint64(v44v2)
  3466. bs44 = testMarshalErr(v44v3, h, t, "enc-map-v44-custom")
  3467. testUnmarshalErr(v44v4, bs44, h, t, "dec-map-v44-p-len")
  3468. testDeepEqualErr(v44v3, v44v4, t, "equal-map-v44-p-len")
  3469. }
  3470. for _, v := range []map[float32]uintptr{nil, {}, {22.2: 0, 11.1: 33}} {
  3471. // fmt.Printf(">>>> running mammoth map v45: %v\n", v)
  3472. var v45v1, v45v2 map[float32]uintptr
  3473. v45v1 = v
  3474. bs45 := testMarshalErr(v45v1, h, t, "enc-map-v45")
  3475. if v == nil {
  3476. v45v2 = nil
  3477. } else {
  3478. v45v2 = make(map[float32]uintptr, len(v))
  3479. } // reset map
  3480. testUnmarshalErr(v45v2, bs45, h, t, "dec-map-v45")
  3481. testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45")
  3482. if v == nil {
  3483. v45v2 = nil
  3484. } else {
  3485. v45v2 = make(map[float32]uintptr, len(v))
  3486. } // reset map
  3487. testUnmarshalErr(reflect.ValueOf(v45v2), bs45, h, t, "dec-map-v45-noaddr") // decode into non-addressable map value
  3488. testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-noaddr")
  3489. if v == nil {
  3490. v45v2 = nil
  3491. } else {
  3492. v45v2 = make(map[float32]uintptr, len(v))
  3493. } // reset map
  3494. testUnmarshalErr(&v45v2, bs45, h, t, "dec-map-v45-p-len")
  3495. testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-p-len")
  3496. bs45 = testMarshalErr(&v45v1, h, t, "enc-map-v45-p")
  3497. v45v2 = nil
  3498. testUnmarshalErr(&v45v2, bs45, h, t, "dec-map-v45-p-nil")
  3499. testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-p-nil")
  3500. // ...
  3501. if v == nil {
  3502. v45v2 = nil
  3503. } else {
  3504. v45v2 = make(map[float32]uintptr, len(v))
  3505. } // reset map
  3506. var v45v3, v45v4 typMapMapFloat32Uintptr
  3507. v45v3 = typMapMapFloat32Uintptr(v45v1)
  3508. v45v4 = typMapMapFloat32Uintptr(v45v2)
  3509. bs45 = testMarshalErr(v45v3, h, t, "enc-map-v45-custom")
  3510. testUnmarshalErr(v45v4, bs45, h, t, "dec-map-v45-p-len")
  3511. testDeepEqualErr(v45v3, v45v4, t, "equal-map-v45-p-len")
  3512. }
  3513. for _, v := range []map[float32]int{nil, {}, {22.2: 0, 11.1: 44}} {
  3514. // fmt.Printf(">>>> running mammoth map v46: %v\n", v)
  3515. var v46v1, v46v2 map[float32]int
  3516. v46v1 = v
  3517. bs46 := testMarshalErr(v46v1, h, t, "enc-map-v46")
  3518. if v == nil {
  3519. v46v2 = nil
  3520. } else {
  3521. v46v2 = make(map[float32]int, len(v))
  3522. } // reset map
  3523. testUnmarshalErr(v46v2, bs46, h, t, "dec-map-v46")
  3524. testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46")
  3525. if v == nil {
  3526. v46v2 = nil
  3527. } else {
  3528. v46v2 = make(map[float32]int, len(v))
  3529. } // reset map
  3530. testUnmarshalErr(reflect.ValueOf(v46v2), bs46, h, t, "dec-map-v46-noaddr") // decode into non-addressable map value
  3531. testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-noaddr")
  3532. if v == nil {
  3533. v46v2 = nil
  3534. } else {
  3535. v46v2 = make(map[float32]int, len(v))
  3536. } // reset map
  3537. testUnmarshalErr(&v46v2, bs46, h, t, "dec-map-v46-p-len")
  3538. testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-p-len")
  3539. bs46 = testMarshalErr(&v46v1, h, t, "enc-map-v46-p")
  3540. v46v2 = nil
  3541. testUnmarshalErr(&v46v2, bs46, h, t, "dec-map-v46-p-nil")
  3542. testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-p-nil")
  3543. // ...
  3544. if v == nil {
  3545. v46v2 = nil
  3546. } else {
  3547. v46v2 = make(map[float32]int, len(v))
  3548. } // reset map
  3549. var v46v3, v46v4 typMapMapFloat32Int
  3550. v46v3 = typMapMapFloat32Int(v46v1)
  3551. v46v4 = typMapMapFloat32Int(v46v2)
  3552. bs46 = testMarshalErr(v46v3, h, t, "enc-map-v46-custom")
  3553. testUnmarshalErr(v46v4, bs46, h, t, "dec-map-v46-p-len")
  3554. testDeepEqualErr(v46v3, v46v4, t, "equal-map-v46-p-len")
  3555. }
  3556. for _, v := range []map[float32]int8{nil, {}, {22.2: 0, 11.1: 33}} {
  3557. // fmt.Printf(">>>> running mammoth map v47: %v\n", v)
  3558. var v47v1, v47v2 map[float32]int8
  3559. v47v1 = v
  3560. bs47 := testMarshalErr(v47v1, h, t, "enc-map-v47")
  3561. if v == nil {
  3562. v47v2 = nil
  3563. } else {
  3564. v47v2 = make(map[float32]int8, len(v))
  3565. } // reset map
  3566. testUnmarshalErr(v47v2, bs47, h, t, "dec-map-v47")
  3567. testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47")
  3568. if v == nil {
  3569. v47v2 = nil
  3570. } else {
  3571. v47v2 = make(map[float32]int8, len(v))
  3572. } // reset map
  3573. testUnmarshalErr(reflect.ValueOf(v47v2), bs47, h, t, "dec-map-v47-noaddr") // decode into non-addressable map value
  3574. testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-noaddr")
  3575. if v == nil {
  3576. v47v2 = nil
  3577. } else {
  3578. v47v2 = make(map[float32]int8, len(v))
  3579. } // reset map
  3580. testUnmarshalErr(&v47v2, bs47, h, t, "dec-map-v47-p-len")
  3581. testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-p-len")
  3582. bs47 = testMarshalErr(&v47v1, h, t, "enc-map-v47-p")
  3583. v47v2 = nil
  3584. testUnmarshalErr(&v47v2, bs47, h, t, "dec-map-v47-p-nil")
  3585. testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-p-nil")
  3586. // ...
  3587. if v == nil {
  3588. v47v2 = nil
  3589. } else {
  3590. v47v2 = make(map[float32]int8, len(v))
  3591. } // reset map
  3592. var v47v3, v47v4 typMapMapFloat32Int8
  3593. v47v3 = typMapMapFloat32Int8(v47v1)
  3594. v47v4 = typMapMapFloat32Int8(v47v2)
  3595. bs47 = testMarshalErr(v47v3, h, t, "enc-map-v47-custom")
  3596. testUnmarshalErr(v47v4, bs47, h, t, "dec-map-v47-p-len")
  3597. testDeepEqualErr(v47v3, v47v4, t, "equal-map-v47-p-len")
  3598. }
  3599. for _, v := range []map[float32]int16{nil, {}, {22.2: 0, 11.1: 44}} {
  3600. // fmt.Printf(">>>> running mammoth map v48: %v\n", v)
  3601. var v48v1, v48v2 map[float32]int16
  3602. v48v1 = v
  3603. bs48 := testMarshalErr(v48v1, h, t, "enc-map-v48")
  3604. if v == nil {
  3605. v48v2 = nil
  3606. } else {
  3607. v48v2 = make(map[float32]int16, len(v))
  3608. } // reset map
  3609. testUnmarshalErr(v48v2, bs48, h, t, "dec-map-v48")
  3610. testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48")
  3611. if v == nil {
  3612. v48v2 = nil
  3613. } else {
  3614. v48v2 = make(map[float32]int16, len(v))
  3615. } // reset map
  3616. testUnmarshalErr(reflect.ValueOf(v48v2), bs48, h, t, "dec-map-v48-noaddr") // decode into non-addressable map value
  3617. testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-noaddr")
  3618. if v == nil {
  3619. v48v2 = nil
  3620. } else {
  3621. v48v2 = make(map[float32]int16, len(v))
  3622. } // reset map
  3623. testUnmarshalErr(&v48v2, bs48, h, t, "dec-map-v48-p-len")
  3624. testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-p-len")
  3625. bs48 = testMarshalErr(&v48v1, h, t, "enc-map-v48-p")
  3626. v48v2 = nil
  3627. testUnmarshalErr(&v48v2, bs48, h, t, "dec-map-v48-p-nil")
  3628. testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-p-nil")
  3629. // ...
  3630. if v == nil {
  3631. v48v2 = nil
  3632. } else {
  3633. v48v2 = make(map[float32]int16, len(v))
  3634. } // reset map
  3635. var v48v3, v48v4 typMapMapFloat32Int16
  3636. v48v3 = typMapMapFloat32Int16(v48v1)
  3637. v48v4 = typMapMapFloat32Int16(v48v2)
  3638. bs48 = testMarshalErr(v48v3, h, t, "enc-map-v48-custom")
  3639. testUnmarshalErr(v48v4, bs48, h, t, "dec-map-v48-p-len")
  3640. testDeepEqualErr(v48v3, v48v4, t, "equal-map-v48-p-len")
  3641. }
  3642. for _, v := range []map[float32]int32{nil, {}, {22.2: 0, 11.1: 33}} {
  3643. // fmt.Printf(">>>> running mammoth map v49: %v\n", v)
  3644. var v49v1, v49v2 map[float32]int32
  3645. v49v1 = v
  3646. bs49 := testMarshalErr(v49v1, h, t, "enc-map-v49")
  3647. if v == nil {
  3648. v49v2 = nil
  3649. } else {
  3650. v49v2 = make(map[float32]int32, len(v))
  3651. } // reset map
  3652. testUnmarshalErr(v49v2, bs49, h, t, "dec-map-v49")
  3653. testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49")
  3654. if v == nil {
  3655. v49v2 = nil
  3656. } else {
  3657. v49v2 = make(map[float32]int32, len(v))
  3658. } // reset map
  3659. testUnmarshalErr(reflect.ValueOf(v49v2), bs49, h, t, "dec-map-v49-noaddr") // decode into non-addressable map value
  3660. testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-noaddr")
  3661. if v == nil {
  3662. v49v2 = nil
  3663. } else {
  3664. v49v2 = make(map[float32]int32, len(v))
  3665. } // reset map
  3666. testUnmarshalErr(&v49v2, bs49, h, t, "dec-map-v49-p-len")
  3667. testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-p-len")
  3668. bs49 = testMarshalErr(&v49v1, h, t, "enc-map-v49-p")
  3669. v49v2 = nil
  3670. testUnmarshalErr(&v49v2, bs49, h, t, "dec-map-v49-p-nil")
  3671. testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-p-nil")
  3672. // ...
  3673. if v == nil {
  3674. v49v2 = nil
  3675. } else {
  3676. v49v2 = make(map[float32]int32, len(v))
  3677. } // reset map
  3678. var v49v3, v49v4 typMapMapFloat32Int32
  3679. v49v3 = typMapMapFloat32Int32(v49v1)
  3680. v49v4 = typMapMapFloat32Int32(v49v2)
  3681. bs49 = testMarshalErr(v49v3, h, t, "enc-map-v49-custom")
  3682. testUnmarshalErr(v49v4, bs49, h, t, "dec-map-v49-p-len")
  3683. testDeepEqualErr(v49v3, v49v4, t, "equal-map-v49-p-len")
  3684. }
  3685. for _, v := range []map[float32]int64{nil, {}, {22.2: 0, 11.1: 44}} {
  3686. // fmt.Printf(">>>> running mammoth map v50: %v\n", v)
  3687. var v50v1, v50v2 map[float32]int64
  3688. v50v1 = v
  3689. bs50 := testMarshalErr(v50v1, h, t, "enc-map-v50")
  3690. if v == nil {
  3691. v50v2 = nil
  3692. } else {
  3693. v50v2 = make(map[float32]int64, len(v))
  3694. } // reset map
  3695. testUnmarshalErr(v50v2, bs50, h, t, "dec-map-v50")
  3696. testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50")
  3697. if v == nil {
  3698. v50v2 = nil
  3699. } else {
  3700. v50v2 = make(map[float32]int64, len(v))
  3701. } // reset map
  3702. testUnmarshalErr(reflect.ValueOf(v50v2), bs50, h, t, "dec-map-v50-noaddr") // decode into non-addressable map value
  3703. testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-noaddr")
  3704. if v == nil {
  3705. v50v2 = nil
  3706. } else {
  3707. v50v2 = make(map[float32]int64, len(v))
  3708. } // reset map
  3709. testUnmarshalErr(&v50v2, bs50, h, t, "dec-map-v50-p-len")
  3710. testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-p-len")
  3711. bs50 = testMarshalErr(&v50v1, h, t, "enc-map-v50-p")
  3712. v50v2 = nil
  3713. testUnmarshalErr(&v50v2, bs50, h, t, "dec-map-v50-p-nil")
  3714. testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-p-nil")
  3715. // ...
  3716. if v == nil {
  3717. v50v2 = nil
  3718. } else {
  3719. v50v2 = make(map[float32]int64, len(v))
  3720. } // reset map
  3721. var v50v3, v50v4 typMapMapFloat32Int64
  3722. v50v3 = typMapMapFloat32Int64(v50v1)
  3723. v50v4 = typMapMapFloat32Int64(v50v2)
  3724. bs50 = testMarshalErr(v50v3, h, t, "enc-map-v50-custom")
  3725. testUnmarshalErr(v50v4, bs50, h, t, "dec-map-v50-p-len")
  3726. testDeepEqualErr(v50v3, v50v4, t, "equal-map-v50-p-len")
  3727. }
  3728. for _, v := range []map[float32]float32{nil, {}, {22.2: 0, 11.1: 22.2}} {
  3729. // fmt.Printf(">>>> running mammoth map v51: %v\n", v)
  3730. var v51v1, v51v2 map[float32]float32
  3731. v51v1 = v
  3732. bs51 := testMarshalErr(v51v1, h, t, "enc-map-v51")
  3733. if v == nil {
  3734. v51v2 = nil
  3735. } else {
  3736. v51v2 = make(map[float32]float32, len(v))
  3737. } // reset map
  3738. testUnmarshalErr(v51v2, bs51, h, t, "dec-map-v51")
  3739. testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51")
  3740. if v == nil {
  3741. v51v2 = nil
  3742. } else {
  3743. v51v2 = make(map[float32]float32, len(v))
  3744. } // reset map
  3745. testUnmarshalErr(reflect.ValueOf(v51v2), bs51, h, t, "dec-map-v51-noaddr") // decode into non-addressable map value
  3746. testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-noaddr")
  3747. if v == nil {
  3748. v51v2 = nil
  3749. } else {
  3750. v51v2 = make(map[float32]float32, len(v))
  3751. } // reset map
  3752. testUnmarshalErr(&v51v2, bs51, h, t, "dec-map-v51-p-len")
  3753. testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-p-len")
  3754. bs51 = testMarshalErr(&v51v1, h, t, "enc-map-v51-p")
  3755. v51v2 = nil
  3756. testUnmarshalErr(&v51v2, bs51, h, t, "dec-map-v51-p-nil")
  3757. testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-p-nil")
  3758. // ...
  3759. if v == nil {
  3760. v51v2 = nil
  3761. } else {
  3762. v51v2 = make(map[float32]float32, len(v))
  3763. } // reset map
  3764. var v51v3, v51v4 typMapMapFloat32Float32
  3765. v51v3 = typMapMapFloat32Float32(v51v1)
  3766. v51v4 = typMapMapFloat32Float32(v51v2)
  3767. bs51 = testMarshalErr(v51v3, h, t, "enc-map-v51-custom")
  3768. testUnmarshalErr(v51v4, bs51, h, t, "dec-map-v51-p-len")
  3769. testDeepEqualErr(v51v3, v51v4, t, "equal-map-v51-p-len")
  3770. }
  3771. for _, v := range []map[float32]float64{nil, {}, {11.1: 0, 22.2: 11.1}} {
  3772. // fmt.Printf(">>>> running mammoth map v52: %v\n", v)
  3773. var v52v1, v52v2 map[float32]float64
  3774. v52v1 = v
  3775. bs52 := testMarshalErr(v52v1, h, t, "enc-map-v52")
  3776. if v == nil {
  3777. v52v2 = nil
  3778. } else {
  3779. v52v2 = make(map[float32]float64, len(v))
  3780. } // reset map
  3781. testUnmarshalErr(v52v2, bs52, h, t, "dec-map-v52")
  3782. testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52")
  3783. if v == nil {
  3784. v52v2 = nil
  3785. } else {
  3786. v52v2 = make(map[float32]float64, len(v))
  3787. } // reset map
  3788. testUnmarshalErr(reflect.ValueOf(v52v2), bs52, h, t, "dec-map-v52-noaddr") // decode into non-addressable map value
  3789. testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-noaddr")
  3790. if v == nil {
  3791. v52v2 = nil
  3792. } else {
  3793. v52v2 = make(map[float32]float64, len(v))
  3794. } // reset map
  3795. testUnmarshalErr(&v52v2, bs52, h, t, "dec-map-v52-p-len")
  3796. testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-p-len")
  3797. bs52 = testMarshalErr(&v52v1, h, t, "enc-map-v52-p")
  3798. v52v2 = nil
  3799. testUnmarshalErr(&v52v2, bs52, h, t, "dec-map-v52-p-nil")
  3800. testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-p-nil")
  3801. // ...
  3802. if v == nil {
  3803. v52v2 = nil
  3804. } else {
  3805. v52v2 = make(map[float32]float64, len(v))
  3806. } // reset map
  3807. var v52v3, v52v4 typMapMapFloat32Float64
  3808. v52v3 = typMapMapFloat32Float64(v52v1)
  3809. v52v4 = typMapMapFloat32Float64(v52v2)
  3810. bs52 = testMarshalErr(v52v3, h, t, "enc-map-v52-custom")
  3811. testUnmarshalErr(v52v4, bs52, h, t, "dec-map-v52-p-len")
  3812. testDeepEqualErr(v52v3, v52v4, t, "equal-map-v52-p-len")
  3813. }
  3814. for _, v := range []map[float32]bool{nil, {}, {22.2: false, 11.1: true}} {
  3815. // fmt.Printf(">>>> running mammoth map v53: %v\n", v)
  3816. var v53v1, v53v2 map[float32]bool
  3817. v53v1 = v
  3818. bs53 := testMarshalErr(v53v1, h, t, "enc-map-v53")
  3819. if v == nil {
  3820. v53v2 = nil
  3821. } else {
  3822. v53v2 = make(map[float32]bool, len(v))
  3823. } // reset map
  3824. testUnmarshalErr(v53v2, bs53, h, t, "dec-map-v53")
  3825. testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53")
  3826. if v == nil {
  3827. v53v2 = nil
  3828. } else {
  3829. v53v2 = make(map[float32]bool, len(v))
  3830. } // reset map
  3831. testUnmarshalErr(reflect.ValueOf(v53v2), bs53, h, t, "dec-map-v53-noaddr") // decode into non-addressable map value
  3832. testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-noaddr")
  3833. if v == nil {
  3834. v53v2 = nil
  3835. } else {
  3836. v53v2 = make(map[float32]bool, len(v))
  3837. } // reset map
  3838. testUnmarshalErr(&v53v2, bs53, h, t, "dec-map-v53-p-len")
  3839. testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-p-len")
  3840. bs53 = testMarshalErr(&v53v1, h, t, "enc-map-v53-p")
  3841. v53v2 = nil
  3842. testUnmarshalErr(&v53v2, bs53, h, t, "dec-map-v53-p-nil")
  3843. testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-p-nil")
  3844. // ...
  3845. if v == nil {
  3846. v53v2 = nil
  3847. } else {
  3848. v53v2 = make(map[float32]bool, len(v))
  3849. } // reset map
  3850. var v53v3, v53v4 typMapMapFloat32Bool
  3851. v53v3 = typMapMapFloat32Bool(v53v1)
  3852. v53v4 = typMapMapFloat32Bool(v53v2)
  3853. bs53 = testMarshalErr(v53v3, h, t, "enc-map-v53-custom")
  3854. testUnmarshalErr(v53v4, bs53, h, t, "dec-map-v53-p-len")
  3855. testDeepEqualErr(v53v3, v53v4, t, "equal-map-v53-p-len")
  3856. }
  3857. for _, v := range []map[float64]interface{}{nil, {}, {22.2: nil, 11.1: "string-is-an-interface"}} {
  3858. // fmt.Printf(">>>> running mammoth map v56: %v\n", v)
  3859. var v56v1, v56v2 map[float64]interface{}
  3860. v56v1 = v
  3861. bs56 := testMarshalErr(v56v1, h, t, "enc-map-v56")
  3862. if v == nil {
  3863. v56v2 = nil
  3864. } else {
  3865. v56v2 = make(map[float64]interface{}, len(v))
  3866. } // reset map
  3867. testUnmarshalErr(v56v2, bs56, h, t, "dec-map-v56")
  3868. testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56")
  3869. if v == nil {
  3870. v56v2 = nil
  3871. } else {
  3872. v56v2 = make(map[float64]interface{}, len(v))
  3873. } // reset map
  3874. testUnmarshalErr(reflect.ValueOf(v56v2), bs56, h, t, "dec-map-v56-noaddr") // decode into non-addressable map value
  3875. testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-noaddr")
  3876. if v == nil {
  3877. v56v2 = nil
  3878. } else {
  3879. v56v2 = make(map[float64]interface{}, len(v))
  3880. } // reset map
  3881. testUnmarshalErr(&v56v2, bs56, h, t, "dec-map-v56-p-len")
  3882. testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-p-len")
  3883. bs56 = testMarshalErr(&v56v1, h, t, "enc-map-v56-p")
  3884. v56v2 = nil
  3885. testUnmarshalErr(&v56v2, bs56, h, t, "dec-map-v56-p-nil")
  3886. testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-p-nil")
  3887. // ...
  3888. if v == nil {
  3889. v56v2 = nil
  3890. } else {
  3891. v56v2 = make(map[float64]interface{}, len(v))
  3892. } // reset map
  3893. var v56v3, v56v4 typMapMapFloat64Intf
  3894. v56v3 = typMapMapFloat64Intf(v56v1)
  3895. v56v4 = typMapMapFloat64Intf(v56v2)
  3896. bs56 = testMarshalErr(v56v3, h, t, "enc-map-v56-custom")
  3897. testUnmarshalErr(v56v4, bs56, h, t, "dec-map-v56-p-len")
  3898. testDeepEqualErr(v56v3, v56v4, t, "equal-map-v56-p-len")
  3899. }
  3900. for _, v := range []map[float64]string{nil, {}, {22.2: "", 11.1: "some-string"}} {
  3901. // fmt.Printf(">>>> running mammoth map v57: %v\n", v)
  3902. var v57v1, v57v2 map[float64]string
  3903. v57v1 = v
  3904. bs57 := testMarshalErr(v57v1, h, t, "enc-map-v57")
  3905. if v == nil {
  3906. v57v2 = nil
  3907. } else {
  3908. v57v2 = make(map[float64]string, len(v))
  3909. } // reset map
  3910. testUnmarshalErr(v57v2, bs57, h, t, "dec-map-v57")
  3911. testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57")
  3912. if v == nil {
  3913. v57v2 = nil
  3914. } else {
  3915. v57v2 = make(map[float64]string, len(v))
  3916. } // reset map
  3917. testUnmarshalErr(reflect.ValueOf(v57v2), bs57, h, t, "dec-map-v57-noaddr") // decode into non-addressable map value
  3918. testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-noaddr")
  3919. if v == nil {
  3920. v57v2 = nil
  3921. } else {
  3922. v57v2 = make(map[float64]string, len(v))
  3923. } // reset map
  3924. testUnmarshalErr(&v57v2, bs57, h, t, "dec-map-v57-p-len")
  3925. testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-p-len")
  3926. bs57 = testMarshalErr(&v57v1, h, t, "enc-map-v57-p")
  3927. v57v2 = nil
  3928. testUnmarshalErr(&v57v2, bs57, h, t, "dec-map-v57-p-nil")
  3929. testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-p-nil")
  3930. // ...
  3931. if v == nil {
  3932. v57v2 = nil
  3933. } else {
  3934. v57v2 = make(map[float64]string, len(v))
  3935. } // reset map
  3936. var v57v3, v57v4 typMapMapFloat64String
  3937. v57v3 = typMapMapFloat64String(v57v1)
  3938. v57v4 = typMapMapFloat64String(v57v2)
  3939. bs57 = testMarshalErr(v57v3, h, t, "enc-map-v57-custom")
  3940. testUnmarshalErr(v57v4, bs57, h, t, "dec-map-v57-p-len")
  3941. testDeepEqualErr(v57v3, v57v4, t, "equal-map-v57-p-len")
  3942. }
  3943. for _, v := range []map[float64]uint{nil, {}, {22.2: 0, 11.1: 33}} {
  3944. // fmt.Printf(">>>> running mammoth map v58: %v\n", v)
  3945. var v58v1, v58v2 map[float64]uint
  3946. v58v1 = v
  3947. bs58 := testMarshalErr(v58v1, h, t, "enc-map-v58")
  3948. if v == nil {
  3949. v58v2 = nil
  3950. } else {
  3951. v58v2 = make(map[float64]uint, len(v))
  3952. } // reset map
  3953. testUnmarshalErr(v58v2, bs58, h, t, "dec-map-v58")
  3954. testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58")
  3955. if v == nil {
  3956. v58v2 = nil
  3957. } else {
  3958. v58v2 = make(map[float64]uint, len(v))
  3959. } // reset map
  3960. testUnmarshalErr(reflect.ValueOf(v58v2), bs58, h, t, "dec-map-v58-noaddr") // decode into non-addressable map value
  3961. testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-noaddr")
  3962. if v == nil {
  3963. v58v2 = nil
  3964. } else {
  3965. v58v2 = make(map[float64]uint, len(v))
  3966. } // reset map
  3967. testUnmarshalErr(&v58v2, bs58, h, t, "dec-map-v58-p-len")
  3968. testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-p-len")
  3969. bs58 = testMarshalErr(&v58v1, h, t, "enc-map-v58-p")
  3970. v58v2 = nil
  3971. testUnmarshalErr(&v58v2, bs58, h, t, "dec-map-v58-p-nil")
  3972. testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-p-nil")
  3973. // ...
  3974. if v == nil {
  3975. v58v2 = nil
  3976. } else {
  3977. v58v2 = make(map[float64]uint, len(v))
  3978. } // reset map
  3979. var v58v3, v58v4 typMapMapFloat64Uint
  3980. v58v3 = typMapMapFloat64Uint(v58v1)
  3981. v58v4 = typMapMapFloat64Uint(v58v2)
  3982. bs58 = testMarshalErr(v58v3, h, t, "enc-map-v58-custom")
  3983. testUnmarshalErr(v58v4, bs58, h, t, "dec-map-v58-p-len")
  3984. testDeepEqualErr(v58v3, v58v4, t, "equal-map-v58-p-len")
  3985. }
  3986. for _, v := range []map[float64]uint8{nil, {}, {22.2: 0, 11.1: 44}} {
  3987. // fmt.Printf(">>>> running mammoth map v59: %v\n", v)
  3988. var v59v1, v59v2 map[float64]uint8
  3989. v59v1 = v
  3990. bs59 := testMarshalErr(v59v1, h, t, "enc-map-v59")
  3991. if v == nil {
  3992. v59v2 = nil
  3993. } else {
  3994. v59v2 = make(map[float64]uint8, len(v))
  3995. } // reset map
  3996. testUnmarshalErr(v59v2, bs59, h, t, "dec-map-v59")
  3997. testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59")
  3998. if v == nil {
  3999. v59v2 = nil
  4000. } else {
  4001. v59v2 = make(map[float64]uint8, len(v))
  4002. } // reset map
  4003. testUnmarshalErr(reflect.ValueOf(v59v2), bs59, h, t, "dec-map-v59-noaddr") // decode into non-addressable map value
  4004. testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-noaddr")
  4005. if v == nil {
  4006. v59v2 = nil
  4007. } else {
  4008. v59v2 = make(map[float64]uint8, len(v))
  4009. } // reset map
  4010. testUnmarshalErr(&v59v2, bs59, h, t, "dec-map-v59-p-len")
  4011. testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-p-len")
  4012. bs59 = testMarshalErr(&v59v1, h, t, "enc-map-v59-p")
  4013. v59v2 = nil
  4014. testUnmarshalErr(&v59v2, bs59, h, t, "dec-map-v59-p-nil")
  4015. testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-p-nil")
  4016. // ...
  4017. if v == nil {
  4018. v59v2 = nil
  4019. } else {
  4020. v59v2 = make(map[float64]uint8, len(v))
  4021. } // reset map
  4022. var v59v3, v59v4 typMapMapFloat64Uint8
  4023. v59v3 = typMapMapFloat64Uint8(v59v1)
  4024. v59v4 = typMapMapFloat64Uint8(v59v2)
  4025. bs59 = testMarshalErr(v59v3, h, t, "enc-map-v59-custom")
  4026. testUnmarshalErr(v59v4, bs59, h, t, "dec-map-v59-p-len")
  4027. testDeepEqualErr(v59v3, v59v4, t, "equal-map-v59-p-len")
  4028. }
  4029. for _, v := range []map[float64]uint16{nil, {}, {22.2: 0, 11.1: 33}} {
  4030. // fmt.Printf(">>>> running mammoth map v60: %v\n", v)
  4031. var v60v1, v60v2 map[float64]uint16
  4032. v60v1 = v
  4033. bs60 := testMarshalErr(v60v1, h, t, "enc-map-v60")
  4034. if v == nil {
  4035. v60v2 = nil
  4036. } else {
  4037. v60v2 = make(map[float64]uint16, len(v))
  4038. } // reset map
  4039. testUnmarshalErr(v60v2, bs60, h, t, "dec-map-v60")
  4040. testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60")
  4041. if v == nil {
  4042. v60v2 = nil
  4043. } else {
  4044. v60v2 = make(map[float64]uint16, len(v))
  4045. } // reset map
  4046. testUnmarshalErr(reflect.ValueOf(v60v2), bs60, h, t, "dec-map-v60-noaddr") // decode into non-addressable map value
  4047. testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-noaddr")
  4048. if v == nil {
  4049. v60v2 = nil
  4050. } else {
  4051. v60v2 = make(map[float64]uint16, len(v))
  4052. } // reset map
  4053. testUnmarshalErr(&v60v2, bs60, h, t, "dec-map-v60-p-len")
  4054. testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-p-len")
  4055. bs60 = testMarshalErr(&v60v1, h, t, "enc-map-v60-p")
  4056. v60v2 = nil
  4057. testUnmarshalErr(&v60v2, bs60, h, t, "dec-map-v60-p-nil")
  4058. testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-p-nil")
  4059. // ...
  4060. if v == nil {
  4061. v60v2 = nil
  4062. } else {
  4063. v60v2 = make(map[float64]uint16, len(v))
  4064. } // reset map
  4065. var v60v3, v60v4 typMapMapFloat64Uint16
  4066. v60v3 = typMapMapFloat64Uint16(v60v1)
  4067. v60v4 = typMapMapFloat64Uint16(v60v2)
  4068. bs60 = testMarshalErr(v60v3, h, t, "enc-map-v60-custom")
  4069. testUnmarshalErr(v60v4, bs60, h, t, "dec-map-v60-p-len")
  4070. testDeepEqualErr(v60v3, v60v4, t, "equal-map-v60-p-len")
  4071. }
  4072. for _, v := range []map[float64]uint32{nil, {}, {22.2: 0, 11.1: 44}} {
  4073. // fmt.Printf(">>>> running mammoth map v61: %v\n", v)
  4074. var v61v1, v61v2 map[float64]uint32
  4075. v61v1 = v
  4076. bs61 := testMarshalErr(v61v1, h, t, "enc-map-v61")
  4077. if v == nil {
  4078. v61v2 = nil
  4079. } else {
  4080. v61v2 = make(map[float64]uint32, len(v))
  4081. } // reset map
  4082. testUnmarshalErr(v61v2, bs61, h, t, "dec-map-v61")
  4083. testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61")
  4084. if v == nil {
  4085. v61v2 = nil
  4086. } else {
  4087. v61v2 = make(map[float64]uint32, len(v))
  4088. } // reset map
  4089. testUnmarshalErr(reflect.ValueOf(v61v2), bs61, h, t, "dec-map-v61-noaddr") // decode into non-addressable map value
  4090. testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-noaddr")
  4091. if v == nil {
  4092. v61v2 = nil
  4093. } else {
  4094. v61v2 = make(map[float64]uint32, len(v))
  4095. } // reset map
  4096. testUnmarshalErr(&v61v2, bs61, h, t, "dec-map-v61-p-len")
  4097. testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-p-len")
  4098. bs61 = testMarshalErr(&v61v1, h, t, "enc-map-v61-p")
  4099. v61v2 = nil
  4100. testUnmarshalErr(&v61v2, bs61, h, t, "dec-map-v61-p-nil")
  4101. testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-p-nil")
  4102. // ...
  4103. if v == nil {
  4104. v61v2 = nil
  4105. } else {
  4106. v61v2 = make(map[float64]uint32, len(v))
  4107. } // reset map
  4108. var v61v3, v61v4 typMapMapFloat64Uint32
  4109. v61v3 = typMapMapFloat64Uint32(v61v1)
  4110. v61v4 = typMapMapFloat64Uint32(v61v2)
  4111. bs61 = testMarshalErr(v61v3, h, t, "enc-map-v61-custom")
  4112. testUnmarshalErr(v61v4, bs61, h, t, "dec-map-v61-p-len")
  4113. testDeepEqualErr(v61v3, v61v4, t, "equal-map-v61-p-len")
  4114. }
  4115. for _, v := range []map[float64]uint64{nil, {}, {22.2: 0, 11.1: 33}} {
  4116. // fmt.Printf(">>>> running mammoth map v62: %v\n", v)
  4117. var v62v1, v62v2 map[float64]uint64
  4118. v62v1 = v
  4119. bs62 := testMarshalErr(v62v1, h, t, "enc-map-v62")
  4120. if v == nil {
  4121. v62v2 = nil
  4122. } else {
  4123. v62v2 = make(map[float64]uint64, len(v))
  4124. } // reset map
  4125. testUnmarshalErr(v62v2, bs62, h, t, "dec-map-v62")
  4126. testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62")
  4127. if v == nil {
  4128. v62v2 = nil
  4129. } else {
  4130. v62v2 = make(map[float64]uint64, len(v))
  4131. } // reset map
  4132. testUnmarshalErr(reflect.ValueOf(v62v2), bs62, h, t, "dec-map-v62-noaddr") // decode into non-addressable map value
  4133. testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-noaddr")
  4134. if v == nil {
  4135. v62v2 = nil
  4136. } else {
  4137. v62v2 = make(map[float64]uint64, len(v))
  4138. } // reset map
  4139. testUnmarshalErr(&v62v2, bs62, h, t, "dec-map-v62-p-len")
  4140. testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-p-len")
  4141. bs62 = testMarshalErr(&v62v1, h, t, "enc-map-v62-p")
  4142. v62v2 = nil
  4143. testUnmarshalErr(&v62v2, bs62, h, t, "dec-map-v62-p-nil")
  4144. testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-p-nil")
  4145. // ...
  4146. if v == nil {
  4147. v62v2 = nil
  4148. } else {
  4149. v62v2 = make(map[float64]uint64, len(v))
  4150. } // reset map
  4151. var v62v3, v62v4 typMapMapFloat64Uint64
  4152. v62v3 = typMapMapFloat64Uint64(v62v1)
  4153. v62v4 = typMapMapFloat64Uint64(v62v2)
  4154. bs62 = testMarshalErr(v62v3, h, t, "enc-map-v62-custom")
  4155. testUnmarshalErr(v62v4, bs62, h, t, "dec-map-v62-p-len")
  4156. testDeepEqualErr(v62v3, v62v4, t, "equal-map-v62-p-len")
  4157. }
  4158. for _, v := range []map[float64]uintptr{nil, {}, {22.2: 0, 11.1: 44}} {
  4159. // fmt.Printf(">>>> running mammoth map v63: %v\n", v)
  4160. var v63v1, v63v2 map[float64]uintptr
  4161. v63v1 = v
  4162. bs63 := testMarshalErr(v63v1, h, t, "enc-map-v63")
  4163. if v == nil {
  4164. v63v2 = nil
  4165. } else {
  4166. v63v2 = make(map[float64]uintptr, len(v))
  4167. } // reset map
  4168. testUnmarshalErr(v63v2, bs63, h, t, "dec-map-v63")
  4169. testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63")
  4170. if v == nil {
  4171. v63v2 = nil
  4172. } else {
  4173. v63v2 = make(map[float64]uintptr, len(v))
  4174. } // reset map
  4175. testUnmarshalErr(reflect.ValueOf(v63v2), bs63, h, t, "dec-map-v63-noaddr") // decode into non-addressable map value
  4176. testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-noaddr")
  4177. if v == nil {
  4178. v63v2 = nil
  4179. } else {
  4180. v63v2 = make(map[float64]uintptr, len(v))
  4181. } // reset map
  4182. testUnmarshalErr(&v63v2, bs63, h, t, "dec-map-v63-p-len")
  4183. testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-p-len")
  4184. bs63 = testMarshalErr(&v63v1, h, t, "enc-map-v63-p")
  4185. v63v2 = nil
  4186. testUnmarshalErr(&v63v2, bs63, h, t, "dec-map-v63-p-nil")
  4187. testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-p-nil")
  4188. // ...
  4189. if v == nil {
  4190. v63v2 = nil
  4191. } else {
  4192. v63v2 = make(map[float64]uintptr, len(v))
  4193. } // reset map
  4194. var v63v3, v63v4 typMapMapFloat64Uintptr
  4195. v63v3 = typMapMapFloat64Uintptr(v63v1)
  4196. v63v4 = typMapMapFloat64Uintptr(v63v2)
  4197. bs63 = testMarshalErr(v63v3, h, t, "enc-map-v63-custom")
  4198. testUnmarshalErr(v63v4, bs63, h, t, "dec-map-v63-p-len")
  4199. testDeepEqualErr(v63v3, v63v4, t, "equal-map-v63-p-len")
  4200. }
  4201. for _, v := range []map[float64]int{nil, {}, {22.2: 0, 11.1: 33}} {
  4202. // fmt.Printf(">>>> running mammoth map v64: %v\n", v)
  4203. var v64v1, v64v2 map[float64]int
  4204. v64v1 = v
  4205. bs64 := testMarshalErr(v64v1, h, t, "enc-map-v64")
  4206. if v == nil {
  4207. v64v2 = nil
  4208. } else {
  4209. v64v2 = make(map[float64]int, len(v))
  4210. } // reset map
  4211. testUnmarshalErr(v64v2, bs64, h, t, "dec-map-v64")
  4212. testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64")
  4213. if v == nil {
  4214. v64v2 = nil
  4215. } else {
  4216. v64v2 = make(map[float64]int, len(v))
  4217. } // reset map
  4218. testUnmarshalErr(reflect.ValueOf(v64v2), bs64, h, t, "dec-map-v64-noaddr") // decode into non-addressable map value
  4219. testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-noaddr")
  4220. if v == nil {
  4221. v64v2 = nil
  4222. } else {
  4223. v64v2 = make(map[float64]int, len(v))
  4224. } // reset map
  4225. testUnmarshalErr(&v64v2, bs64, h, t, "dec-map-v64-p-len")
  4226. testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-p-len")
  4227. bs64 = testMarshalErr(&v64v1, h, t, "enc-map-v64-p")
  4228. v64v2 = nil
  4229. testUnmarshalErr(&v64v2, bs64, h, t, "dec-map-v64-p-nil")
  4230. testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-p-nil")
  4231. // ...
  4232. if v == nil {
  4233. v64v2 = nil
  4234. } else {
  4235. v64v2 = make(map[float64]int, len(v))
  4236. } // reset map
  4237. var v64v3, v64v4 typMapMapFloat64Int
  4238. v64v3 = typMapMapFloat64Int(v64v1)
  4239. v64v4 = typMapMapFloat64Int(v64v2)
  4240. bs64 = testMarshalErr(v64v3, h, t, "enc-map-v64-custom")
  4241. testUnmarshalErr(v64v4, bs64, h, t, "dec-map-v64-p-len")
  4242. testDeepEqualErr(v64v3, v64v4, t, "equal-map-v64-p-len")
  4243. }
  4244. for _, v := range []map[float64]int8{nil, {}, {22.2: 0, 11.1: 44}} {
  4245. // fmt.Printf(">>>> running mammoth map v65: %v\n", v)
  4246. var v65v1, v65v2 map[float64]int8
  4247. v65v1 = v
  4248. bs65 := testMarshalErr(v65v1, h, t, "enc-map-v65")
  4249. if v == nil {
  4250. v65v2 = nil
  4251. } else {
  4252. v65v2 = make(map[float64]int8, len(v))
  4253. } // reset map
  4254. testUnmarshalErr(v65v2, bs65, h, t, "dec-map-v65")
  4255. testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65")
  4256. if v == nil {
  4257. v65v2 = nil
  4258. } else {
  4259. v65v2 = make(map[float64]int8, len(v))
  4260. } // reset map
  4261. testUnmarshalErr(reflect.ValueOf(v65v2), bs65, h, t, "dec-map-v65-noaddr") // decode into non-addressable map value
  4262. testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-noaddr")
  4263. if v == nil {
  4264. v65v2 = nil
  4265. } else {
  4266. v65v2 = make(map[float64]int8, len(v))
  4267. } // reset map
  4268. testUnmarshalErr(&v65v2, bs65, h, t, "dec-map-v65-p-len")
  4269. testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-p-len")
  4270. bs65 = testMarshalErr(&v65v1, h, t, "enc-map-v65-p")
  4271. v65v2 = nil
  4272. testUnmarshalErr(&v65v2, bs65, h, t, "dec-map-v65-p-nil")
  4273. testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-p-nil")
  4274. // ...
  4275. if v == nil {
  4276. v65v2 = nil
  4277. } else {
  4278. v65v2 = make(map[float64]int8, len(v))
  4279. } // reset map
  4280. var v65v3, v65v4 typMapMapFloat64Int8
  4281. v65v3 = typMapMapFloat64Int8(v65v1)
  4282. v65v4 = typMapMapFloat64Int8(v65v2)
  4283. bs65 = testMarshalErr(v65v3, h, t, "enc-map-v65-custom")
  4284. testUnmarshalErr(v65v4, bs65, h, t, "dec-map-v65-p-len")
  4285. testDeepEqualErr(v65v3, v65v4, t, "equal-map-v65-p-len")
  4286. }
  4287. for _, v := range []map[float64]int16{nil, {}, {22.2: 0, 11.1: 33}} {
  4288. // fmt.Printf(">>>> running mammoth map v66: %v\n", v)
  4289. var v66v1, v66v2 map[float64]int16
  4290. v66v1 = v
  4291. bs66 := testMarshalErr(v66v1, h, t, "enc-map-v66")
  4292. if v == nil {
  4293. v66v2 = nil
  4294. } else {
  4295. v66v2 = make(map[float64]int16, len(v))
  4296. } // reset map
  4297. testUnmarshalErr(v66v2, bs66, h, t, "dec-map-v66")
  4298. testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66")
  4299. if v == nil {
  4300. v66v2 = nil
  4301. } else {
  4302. v66v2 = make(map[float64]int16, len(v))
  4303. } // reset map
  4304. testUnmarshalErr(reflect.ValueOf(v66v2), bs66, h, t, "dec-map-v66-noaddr") // decode into non-addressable map value
  4305. testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-noaddr")
  4306. if v == nil {
  4307. v66v2 = nil
  4308. } else {
  4309. v66v2 = make(map[float64]int16, len(v))
  4310. } // reset map
  4311. testUnmarshalErr(&v66v2, bs66, h, t, "dec-map-v66-p-len")
  4312. testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-p-len")
  4313. bs66 = testMarshalErr(&v66v1, h, t, "enc-map-v66-p")
  4314. v66v2 = nil
  4315. testUnmarshalErr(&v66v2, bs66, h, t, "dec-map-v66-p-nil")
  4316. testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-p-nil")
  4317. // ...
  4318. if v == nil {
  4319. v66v2 = nil
  4320. } else {
  4321. v66v2 = make(map[float64]int16, len(v))
  4322. } // reset map
  4323. var v66v3, v66v4 typMapMapFloat64Int16
  4324. v66v3 = typMapMapFloat64Int16(v66v1)
  4325. v66v4 = typMapMapFloat64Int16(v66v2)
  4326. bs66 = testMarshalErr(v66v3, h, t, "enc-map-v66-custom")
  4327. testUnmarshalErr(v66v4, bs66, h, t, "dec-map-v66-p-len")
  4328. testDeepEqualErr(v66v3, v66v4, t, "equal-map-v66-p-len")
  4329. }
  4330. for _, v := range []map[float64]int32{nil, {}, {22.2: 0, 11.1: 44}} {
  4331. // fmt.Printf(">>>> running mammoth map v67: %v\n", v)
  4332. var v67v1, v67v2 map[float64]int32
  4333. v67v1 = v
  4334. bs67 := testMarshalErr(v67v1, h, t, "enc-map-v67")
  4335. if v == nil {
  4336. v67v2 = nil
  4337. } else {
  4338. v67v2 = make(map[float64]int32, len(v))
  4339. } // reset map
  4340. testUnmarshalErr(v67v2, bs67, h, t, "dec-map-v67")
  4341. testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67")
  4342. if v == nil {
  4343. v67v2 = nil
  4344. } else {
  4345. v67v2 = make(map[float64]int32, len(v))
  4346. } // reset map
  4347. testUnmarshalErr(reflect.ValueOf(v67v2), bs67, h, t, "dec-map-v67-noaddr") // decode into non-addressable map value
  4348. testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-noaddr")
  4349. if v == nil {
  4350. v67v2 = nil
  4351. } else {
  4352. v67v2 = make(map[float64]int32, len(v))
  4353. } // reset map
  4354. testUnmarshalErr(&v67v2, bs67, h, t, "dec-map-v67-p-len")
  4355. testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-p-len")
  4356. bs67 = testMarshalErr(&v67v1, h, t, "enc-map-v67-p")
  4357. v67v2 = nil
  4358. testUnmarshalErr(&v67v2, bs67, h, t, "dec-map-v67-p-nil")
  4359. testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-p-nil")
  4360. // ...
  4361. if v == nil {
  4362. v67v2 = nil
  4363. } else {
  4364. v67v2 = make(map[float64]int32, len(v))
  4365. } // reset map
  4366. var v67v3, v67v4 typMapMapFloat64Int32
  4367. v67v3 = typMapMapFloat64Int32(v67v1)
  4368. v67v4 = typMapMapFloat64Int32(v67v2)
  4369. bs67 = testMarshalErr(v67v3, h, t, "enc-map-v67-custom")
  4370. testUnmarshalErr(v67v4, bs67, h, t, "dec-map-v67-p-len")
  4371. testDeepEqualErr(v67v3, v67v4, t, "equal-map-v67-p-len")
  4372. }
  4373. for _, v := range []map[float64]int64{nil, {}, {22.2: 0, 11.1: 33}} {
  4374. // fmt.Printf(">>>> running mammoth map v68: %v\n", v)
  4375. var v68v1, v68v2 map[float64]int64
  4376. v68v1 = v
  4377. bs68 := testMarshalErr(v68v1, h, t, "enc-map-v68")
  4378. if v == nil {
  4379. v68v2 = nil
  4380. } else {
  4381. v68v2 = make(map[float64]int64, len(v))
  4382. } // reset map
  4383. testUnmarshalErr(v68v2, bs68, h, t, "dec-map-v68")
  4384. testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68")
  4385. if v == nil {
  4386. v68v2 = nil
  4387. } else {
  4388. v68v2 = make(map[float64]int64, len(v))
  4389. } // reset map
  4390. testUnmarshalErr(reflect.ValueOf(v68v2), bs68, h, t, "dec-map-v68-noaddr") // decode into non-addressable map value
  4391. testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-noaddr")
  4392. if v == nil {
  4393. v68v2 = nil
  4394. } else {
  4395. v68v2 = make(map[float64]int64, len(v))
  4396. } // reset map
  4397. testUnmarshalErr(&v68v2, bs68, h, t, "dec-map-v68-p-len")
  4398. testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-p-len")
  4399. bs68 = testMarshalErr(&v68v1, h, t, "enc-map-v68-p")
  4400. v68v2 = nil
  4401. testUnmarshalErr(&v68v2, bs68, h, t, "dec-map-v68-p-nil")
  4402. testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-p-nil")
  4403. // ...
  4404. if v == nil {
  4405. v68v2 = nil
  4406. } else {
  4407. v68v2 = make(map[float64]int64, len(v))
  4408. } // reset map
  4409. var v68v3, v68v4 typMapMapFloat64Int64
  4410. v68v3 = typMapMapFloat64Int64(v68v1)
  4411. v68v4 = typMapMapFloat64Int64(v68v2)
  4412. bs68 = testMarshalErr(v68v3, h, t, "enc-map-v68-custom")
  4413. testUnmarshalErr(v68v4, bs68, h, t, "dec-map-v68-p-len")
  4414. testDeepEqualErr(v68v3, v68v4, t, "equal-map-v68-p-len")
  4415. }
  4416. for _, v := range []map[float64]float32{nil, {}, {22.2: 0, 11.1: 22.2}} {
  4417. // fmt.Printf(">>>> running mammoth map v69: %v\n", v)
  4418. var v69v1, v69v2 map[float64]float32
  4419. v69v1 = v
  4420. bs69 := testMarshalErr(v69v1, h, t, "enc-map-v69")
  4421. if v == nil {
  4422. v69v2 = nil
  4423. } else {
  4424. v69v2 = make(map[float64]float32, len(v))
  4425. } // reset map
  4426. testUnmarshalErr(v69v2, bs69, h, t, "dec-map-v69")
  4427. testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69")
  4428. if v == nil {
  4429. v69v2 = nil
  4430. } else {
  4431. v69v2 = make(map[float64]float32, len(v))
  4432. } // reset map
  4433. testUnmarshalErr(reflect.ValueOf(v69v2), bs69, h, t, "dec-map-v69-noaddr") // decode into non-addressable map value
  4434. testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-noaddr")
  4435. if v == nil {
  4436. v69v2 = nil
  4437. } else {
  4438. v69v2 = make(map[float64]float32, len(v))
  4439. } // reset map
  4440. testUnmarshalErr(&v69v2, bs69, h, t, "dec-map-v69-p-len")
  4441. testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-p-len")
  4442. bs69 = testMarshalErr(&v69v1, h, t, "enc-map-v69-p")
  4443. v69v2 = nil
  4444. testUnmarshalErr(&v69v2, bs69, h, t, "dec-map-v69-p-nil")
  4445. testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-p-nil")
  4446. // ...
  4447. if v == nil {
  4448. v69v2 = nil
  4449. } else {
  4450. v69v2 = make(map[float64]float32, len(v))
  4451. } // reset map
  4452. var v69v3, v69v4 typMapMapFloat64Float32
  4453. v69v3 = typMapMapFloat64Float32(v69v1)
  4454. v69v4 = typMapMapFloat64Float32(v69v2)
  4455. bs69 = testMarshalErr(v69v3, h, t, "enc-map-v69-custom")
  4456. testUnmarshalErr(v69v4, bs69, h, t, "dec-map-v69-p-len")
  4457. testDeepEqualErr(v69v3, v69v4, t, "equal-map-v69-p-len")
  4458. }
  4459. for _, v := range []map[float64]float64{nil, {}, {11.1: 0, 22.2: 11.1}} {
  4460. // fmt.Printf(">>>> running mammoth map v70: %v\n", v)
  4461. var v70v1, v70v2 map[float64]float64
  4462. v70v1 = v
  4463. bs70 := testMarshalErr(v70v1, h, t, "enc-map-v70")
  4464. if v == nil {
  4465. v70v2 = nil
  4466. } else {
  4467. v70v2 = make(map[float64]float64, len(v))
  4468. } // reset map
  4469. testUnmarshalErr(v70v2, bs70, h, t, "dec-map-v70")
  4470. testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70")
  4471. if v == nil {
  4472. v70v2 = nil
  4473. } else {
  4474. v70v2 = make(map[float64]float64, len(v))
  4475. } // reset map
  4476. testUnmarshalErr(reflect.ValueOf(v70v2), bs70, h, t, "dec-map-v70-noaddr") // decode into non-addressable map value
  4477. testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-noaddr")
  4478. if v == nil {
  4479. v70v2 = nil
  4480. } else {
  4481. v70v2 = make(map[float64]float64, len(v))
  4482. } // reset map
  4483. testUnmarshalErr(&v70v2, bs70, h, t, "dec-map-v70-p-len")
  4484. testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-p-len")
  4485. bs70 = testMarshalErr(&v70v1, h, t, "enc-map-v70-p")
  4486. v70v2 = nil
  4487. testUnmarshalErr(&v70v2, bs70, h, t, "dec-map-v70-p-nil")
  4488. testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-p-nil")
  4489. // ...
  4490. if v == nil {
  4491. v70v2 = nil
  4492. } else {
  4493. v70v2 = make(map[float64]float64, len(v))
  4494. } // reset map
  4495. var v70v3, v70v4 typMapMapFloat64Float64
  4496. v70v3 = typMapMapFloat64Float64(v70v1)
  4497. v70v4 = typMapMapFloat64Float64(v70v2)
  4498. bs70 = testMarshalErr(v70v3, h, t, "enc-map-v70-custom")
  4499. testUnmarshalErr(v70v4, bs70, h, t, "dec-map-v70-p-len")
  4500. testDeepEqualErr(v70v3, v70v4, t, "equal-map-v70-p-len")
  4501. }
  4502. for _, v := range []map[float64]bool{nil, {}, {22.2: false, 11.1: true}} {
  4503. // fmt.Printf(">>>> running mammoth map v71: %v\n", v)
  4504. var v71v1, v71v2 map[float64]bool
  4505. v71v1 = v
  4506. bs71 := testMarshalErr(v71v1, h, t, "enc-map-v71")
  4507. if v == nil {
  4508. v71v2 = nil
  4509. } else {
  4510. v71v2 = make(map[float64]bool, len(v))
  4511. } // reset map
  4512. testUnmarshalErr(v71v2, bs71, h, t, "dec-map-v71")
  4513. testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71")
  4514. if v == nil {
  4515. v71v2 = nil
  4516. } else {
  4517. v71v2 = make(map[float64]bool, len(v))
  4518. } // reset map
  4519. testUnmarshalErr(reflect.ValueOf(v71v2), bs71, h, t, "dec-map-v71-noaddr") // decode into non-addressable map value
  4520. testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-noaddr")
  4521. if v == nil {
  4522. v71v2 = nil
  4523. } else {
  4524. v71v2 = make(map[float64]bool, len(v))
  4525. } // reset map
  4526. testUnmarshalErr(&v71v2, bs71, h, t, "dec-map-v71-p-len")
  4527. testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-p-len")
  4528. bs71 = testMarshalErr(&v71v1, h, t, "enc-map-v71-p")
  4529. v71v2 = nil
  4530. testUnmarshalErr(&v71v2, bs71, h, t, "dec-map-v71-p-nil")
  4531. testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-p-nil")
  4532. // ...
  4533. if v == nil {
  4534. v71v2 = nil
  4535. } else {
  4536. v71v2 = make(map[float64]bool, len(v))
  4537. } // reset map
  4538. var v71v3, v71v4 typMapMapFloat64Bool
  4539. v71v3 = typMapMapFloat64Bool(v71v1)
  4540. v71v4 = typMapMapFloat64Bool(v71v2)
  4541. bs71 = testMarshalErr(v71v3, h, t, "enc-map-v71-custom")
  4542. testUnmarshalErr(v71v4, bs71, h, t, "dec-map-v71-p-len")
  4543. testDeepEqualErr(v71v3, v71v4, t, "equal-map-v71-p-len")
  4544. }
  4545. for _, v := range []map[uint]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  4546. // fmt.Printf(">>>> running mammoth map v74: %v\n", v)
  4547. var v74v1, v74v2 map[uint]interface{}
  4548. v74v1 = v
  4549. bs74 := testMarshalErr(v74v1, h, t, "enc-map-v74")
  4550. if v == nil {
  4551. v74v2 = nil
  4552. } else {
  4553. v74v2 = make(map[uint]interface{}, len(v))
  4554. } // reset map
  4555. testUnmarshalErr(v74v2, bs74, h, t, "dec-map-v74")
  4556. testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74")
  4557. if v == nil {
  4558. v74v2 = nil
  4559. } else {
  4560. v74v2 = make(map[uint]interface{}, len(v))
  4561. } // reset map
  4562. testUnmarshalErr(reflect.ValueOf(v74v2), bs74, h, t, "dec-map-v74-noaddr") // decode into non-addressable map value
  4563. testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-noaddr")
  4564. if v == nil {
  4565. v74v2 = nil
  4566. } else {
  4567. v74v2 = make(map[uint]interface{}, len(v))
  4568. } // reset map
  4569. testUnmarshalErr(&v74v2, bs74, h, t, "dec-map-v74-p-len")
  4570. testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-p-len")
  4571. bs74 = testMarshalErr(&v74v1, h, t, "enc-map-v74-p")
  4572. v74v2 = nil
  4573. testUnmarshalErr(&v74v2, bs74, h, t, "dec-map-v74-p-nil")
  4574. testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-p-nil")
  4575. // ...
  4576. if v == nil {
  4577. v74v2 = nil
  4578. } else {
  4579. v74v2 = make(map[uint]interface{}, len(v))
  4580. } // reset map
  4581. var v74v3, v74v4 typMapMapUintIntf
  4582. v74v3 = typMapMapUintIntf(v74v1)
  4583. v74v4 = typMapMapUintIntf(v74v2)
  4584. bs74 = testMarshalErr(v74v3, h, t, "enc-map-v74-custom")
  4585. testUnmarshalErr(v74v4, bs74, h, t, "dec-map-v74-p-len")
  4586. testDeepEqualErr(v74v3, v74v4, t, "equal-map-v74-p-len")
  4587. }
  4588. for _, v := range []map[uint]string{nil, {}, {44: "", 33: "some-string-2"}} {
  4589. // fmt.Printf(">>>> running mammoth map v75: %v\n", v)
  4590. var v75v1, v75v2 map[uint]string
  4591. v75v1 = v
  4592. bs75 := testMarshalErr(v75v1, h, t, "enc-map-v75")
  4593. if v == nil {
  4594. v75v2 = nil
  4595. } else {
  4596. v75v2 = make(map[uint]string, len(v))
  4597. } // reset map
  4598. testUnmarshalErr(v75v2, bs75, h, t, "dec-map-v75")
  4599. testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75")
  4600. if v == nil {
  4601. v75v2 = nil
  4602. } else {
  4603. v75v2 = make(map[uint]string, len(v))
  4604. } // reset map
  4605. testUnmarshalErr(reflect.ValueOf(v75v2), bs75, h, t, "dec-map-v75-noaddr") // decode into non-addressable map value
  4606. testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-noaddr")
  4607. if v == nil {
  4608. v75v2 = nil
  4609. } else {
  4610. v75v2 = make(map[uint]string, len(v))
  4611. } // reset map
  4612. testUnmarshalErr(&v75v2, bs75, h, t, "dec-map-v75-p-len")
  4613. testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-p-len")
  4614. bs75 = testMarshalErr(&v75v1, h, t, "enc-map-v75-p")
  4615. v75v2 = nil
  4616. testUnmarshalErr(&v75v2, bs75, h, t, "dec-map-v75-p-nil")
  4617. testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-p-nil")
  4618. // ...
  4619. if v == nil {
  4620. v75v2 = nil
  4621. } else {
  4622. v75v2 = make(map[uint]string, len(v))
  4623. } // reset map
  4624. var v75v3, v75v4 typMapMapUintString
  4625. v75v3 = typMapMapUintString(v75v1)
  4626. v75v4 = typMapMapUintString(v75v2)
  4627. bs75 = testMarshalErr(v75v3, h, t, "enc-map-v75-custom")
  4628. testUnmarshalErr(v75v4, bs75, h, t, "dec-map-v75-p-len")
  4629. testDeepEqualErr(v75v3, v75v4, t, "equal-map-v75-p-len")
  4630. }
  4631. for _, v := range []map[uint]uint{nil, {}, {44: 0, 33: 44}} {
  4632. // fmt.Printf(">>>> running mammoth map v76: %v\n", v)
  4633. var v76v1, v76v2 map[uint]uint
  4634. v76v1 = v
  4635. bs76 := testMarshalErr(v76v1, h, t, "enc-map-v76")
  4636. if v == nil {
  4637. v76v2 = nil
  4638. } else {
  4639. v76v2 = make(map[uint]uint, len(v))
  4640. } // reset map
  4641. testUnmarshalErr(v76v2, bs76, h, t, "dec-map-v76")
  4642. testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76")
  4643. if v == nil {
  4644. v76v2 = nil
  4645. } else {
  4646. v76v2 = make(map[uint]uint, len(v))
  4647. } // reset map
  4648. testUnmarshalErr(reflect.ValueOf(v76v2), bs76, h, t, "dec-map-v76-noaddr") // decode into non-addressable map value
  4649. testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-noaddr")
  4650. if v == nil {
  4651. v76v2 = nil
  4652. } else {
  4653. v76v2 = make(map[uint]uint, len(v))
  4654. } // reset map
  4655. testUnmarshalErr(&v76v2, bs76, h, t, "dec-map-v76-p-len")
  4656. testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-p-len")
  4657. bs76 = testMarshalErr(&v76v1, h, t, "enc-map-v76-p")
  4658. v76v2 = nil
  4659. testUnmarshalErr(&v76v2, bs76, h, t, "dec-map-v76-p-nil")
  4660. testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-p-nil")
  4661. // ...
  4662. if v == nil {
  4663. v76v2 = nil
  4664. } else {
  4665. v76v2 = make(map[uint]uint, len(v))
  4666. } // reset map
  4667. var v76v3, v76v4 typMapMapUintUint
  4668. v76v3 = typMapMapUintUint(v76v1)
  4669. v76v4 = typMapMapUintUint(v76v2)
  4670. bs76 = testMarshalErr(v76v3, h, t, "enc-map-v76-custom")
  4671. testUnmarshalErr(v76v4, bs76, h, t, "dec-map-v76-p-len")
  4672. testDeepEqualErr(v76v3, v76v4, t, "equal-map-v76-p-len")
  4673. }
  4674. for _, v := range []map[uint]uint8{nil, {}, {33: 0, 44: 33}} {
  4675. // fmt.Printf(">>>> running mammoth map v77: %v\n", v)
  4676. var v77v1, v77v2 map[uint]uint8
  4677. v77v1 = v
  4678. bs77 := testMarshalErr(v77v1, h, t, "enc-map-v77")
  4679. if v == nil {
  4680. v77v2 = nil
  4681. } else {
  4682. v77v2 = make(map[uint]uint8, len(v))
  4683. } // reset map
  4684. testUnmarshalErr(v77v2, bs77, h, t, "dec-map-v77")
  4685. testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77")
  4686. if v == nil {
  4687. v77v2 = nil
  4688. } else {
  4689. v77v2 = make(map[uint]uint8, len(v))
  4690. } // reset map
  4691. testUnmarshalErr(reflect.ValueOf(v77v2), bs77, h, t, "dec-map-v77-noaddr") // decode into non-addressable map value
  4692. testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-noaddr")
  4693. if v == nil {
  4694. v77v2 = nil
  4695. } else {
  4696. v77v2 = make(map[uint]uint8, len(v))
  4697. } // reset map
  4698. testUnmarshalErr(&v77v2, bs77, h, t, "dec-map-v77-p-len")
  4699. testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-p-len")
  4700. bs77 = testMarshalErr(&v77v1, h, t, "enc-map-v77-p")
  4701. v77v2 = nil
  4702. testUnmarshalErr(&v77v2, bs77, h, t, "dec-map-v77-p-nil")
  4703. testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-p-nil")
  4704. // ...
  4705. if v == nil {
  4706. v77v2 = nil
  4707. } else {
  4708. v77v2 = make(map[uint]uint8, len(v))
  4709. } // reset map
  4710. var v77v3, v77v4 typMapMapUintUint8
  4711. v77v3 = typMapMapUintUint8(v77v1)
  4712. v77v4 = typMapMapUintUint8(v77v2)
  4713. bs77 = testMarshalErr(v77v3, h, t, "enc-map-v77-custom")
  4714. testUnmarshalErr(v77v4, bs77, h, t, "dec-map-v77-p-len")
  4715. testDeepEqualErr(v77v3, v77v4, t, "equal-map-v77-p-len")
  4716. }
  4717. for _, v := range []map[uint]uint16{nil, {}, {44: 0, 33: 44}} {
  4718. // fmt.Printf(">>>> running mammoth map v78: %v\n", v)
  4719. var v78v1, v78v2 map[uint]uint16
  4720. v78v1 = v
  4721. bs78 := testMarshalErr(v78v1, h, t, "enc-map-v78")
  4722. if v == nil {
  4723. v78v2 = nil
  4724. } else {
  4725. v78v2 = make(map[uint]uint16, len(v))
  4726. } // reset map
  4727. testUnmarshalErr(v78v2, bs78, h, t, "dec-map-v78")
  4728. testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78")
  4729. if v == nil {
  4730. v78v2 = nil
  4731. } else {
  4732. v78v2 = make(map[uint]uint16, len(v))
  4733. } // reset map
  4734. testUnmarshalErr(reflect.ValueOf(v78v2), bs78, h, t, "dec-map-v78-noaddr") // decode into non-addressable map value
  4735. testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-noaddr")
  4736. if v == nil {
  4737. v78v2 = nil
  4738. } else {
  4739. v78v2 = make(map[uint]uint16, len(v))
  4740. } // reset map
  4741. testUnmarshalErr(&v78v2, bs78, h, t, "dec-map-v78-p-len")
  4742. testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-p-len")
  4743. bs78 = testMarshalErr(&v78v1, h, t, "enc-map-v78-p")
  4744. v78v2 = nil
  4745. testUnmarshalErr(&v78v2, bs78, h, t, "dec-map-v78-p-nil")
  4746. testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-p-nil")
  4747. // ...
  4748. if v == nil {
  4749. v78v2 = nil
  4750. } else {
  4751. v78v2 = make(map[uint]uint16, len(v))
  4752. } // reset map
  4753. var v78v3, v78v4 typMapMapUintUint16
  4754. v78v3 = typMapMapUintUint16(v78v1)
  4755. v78v4 = typMapMapUintUint16(v78v2)
  4756. bs78 = testMarshalErr(v78v3, h, t, "enc-map-v78-custom")
  4757. testUnmarshalErr(v78v4, bs78, h, t, "dec-map-v78-p-len")
  4758. testDeepEqualErr(v78v3, v78v4, t, "equal-map-v78-p-len")
  4759. }
  4760. for _, v := range []map[uint]uint32{nil, {}, {33: 0, 44: 33}} {
  4761. // fmt.Printf(">>>> running mammoth map v79: %v\n", v)
  4762. var v79v1, v79v2 map[uint]uint32
  4763. v79v1 = v
  4764. bs79 := testMarshalErr(v79v1, h, t, "enc-map-v79")
  4765. if v == nil {
  4766. v79v2 = nil
  4767. } else {
  4768. v79v2 = make(map[uint]uint32, len(v))
  4769. } // reset map
  4770. testUnmarshalErr(v79v2, bs79, h, t, "dec-map-v79")
  4771. testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79")
  4772. if v == nil {
  4773. v79v2 = nil
  4774. } else {
  4775. v79v2 = make(map[uint]uint32, len(v))
  4776. } // reset map
  4777. testUnmarshalErr(reflect.ValueOf(v79v2), bs79, h, t, "dec-map-v79-noaddr") // decode into non-addressable map value
  4778. testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-noaddr")
  4779. if v == nil {
  4780. v79v2 = nil
  4781. } else {
  4782. v79v2 = make(map[uint]uint32, len(v))
  4783. } // reset map
  4784. testUnmarshalErr(&v79v2, bs79, h, t, "dec-map-v79-p-len")
  4785. testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-p-len")
  4786. bs79 = testMarshalErr(&v79v1, h, t, "enc-map-v79-p")
  4787. v79v2 = nil
  4788. testUnmarshalErr(&v79v2, bs79, h, t, "dec-map-v79-p-nil")
  4789. testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-p-nil")
  4790. // ...
  4791. if v == nil {
  4792. v79v2 = nil
  4793. } else {
  4794. v79v2 = make(map[uint]uint32, len(v))
  4795. } // reset map
  4796. var v79v3, v79v4 typMapMapUintUint32
  4797. v79v3 = typMapMapUintUint32(v79v1)
  4798. v79v4 = typMapMapUintUint32(v79v2)
  4799. bs79 = testMarshalErr(v79v3, h, t, "enc-map-v79-custom")
  4800. testUnmarshalErr(v79v4, bs79, h, t, "dec-map-v79-p-len")
  4801. testDeepEqualErr(v79v3, v79v4, t, "equal-map-v79-p-len")
  4802. }
  4803. for _, v := range []map[uint]uint64{nil, {}, {44: 0, 33: 44}} {
  4804. // fmt.Printf(">>>> running mammoth map v80: %v\n", v)
  4805. var v80v1, v80v2 map[uint]uint64
  4806. v80v1 = v
  4807. bs80 := testMarshalErr(v80v1, h, t, "enc-map-v80")
  4808. if v == nil {
  4809. v80v2 = nil
  4810. } else {
  4811. v80v2 = make(map[uint]uint64, len(v))
  4812. } // reset map
  4813. testUnmarshalErr(v80v2, bs80, h, t, "dec-map-v80")
  4814. testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80")
  4815. if v == nil {
  4816. v80v2 = nil
  4817. } else {
  4818. v80v2 = make(map[uint]uint64, len(v))
  4819. } // reset map
  4820. testUnmarshalErr(reflect.ValueOf(v80v2), bs80, h, t, "dec-map-v80-noaddr") // decode into non-addressable map value
  4821. testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-noaddr")
  4822. if v == nil {
  4823. v80v2 = nil
  4824. } else {
  4825. v80v2 = make(map[uint]uint64, len(v))
  4826. } // reset map
  4827. testUnmarshalErr(&v80v2, bs80, h, t, "dec-map-v80-p-len")
  4828. testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-p-len")
  4829. bs80 = testMarshalErr(&v80v1, h, t, "enc-map-v80-p")
  4830. v80v2 = nil
  4831. testUnmarshalErr(&v80v2, bs80, h, t, "dec-map-v80-p-nil")
  4832. testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-p-nil")
  4833. // ...
  4834. if v == nil {
  4835. v80v2 = nil
  4836. } else {
  4837. v80v2 = make(map[uint]uint64, len(v))
  4838. } // reset map
  4839. var v80v3, v80v4 typMapMapUintUint64
  4840. v80v3 = typMapMapUintUint64(v80v1)
  4841. v80v4 = typMapMapUintUint64(v80v2)
  4842. bs80 = testMarshalErr(v80v3, h, t, "enc-map-v80-custom")
  4843. testUnmarshalErr(v80v4, bs80, h, t, "dec-map-v80-p-len")
  4844. testDeepEqualErr(v80v3, v80v4, t, "equal-map-v80-p-len")
  4845. }
  4846. for _, v := range []map[uint]uintptr{nil, {}, {33: 0, 44: 33}} {
  4847. // fmt.Printf(">>>> running mammoth map v81: %v\n", v)
  4848. var v81v1, v81v2 map[uint]uintptr
  4849. v81v1 = v
  4850. bs81 := testMarshalErr(v81v1, h, t, "enc-map-v81")
  4851. if v == nil {
  4852. v81v2 = nil
  4853. } else {
  4854. v81v2 = make(map[uint]uintptr, len(v))
  4855. } // reset map
  4856. testUnmarshalErr(v81v2, bs81, h, t, "dec-map-v81")
  4857. testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81")
  4858. if v == nil {
  4859. v81v2 = nil
  4860. } else {
  4861. v81v2 = make(map[uint]uintptr, len(v))
  4862. } // reset map
  4863. testUnmarshalErr(reflect.ValueOf(v81v2), bs81, h, t, "dec-map-v81-noaddr") // decode into non-addressable map value
  4864. testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-noaddr")
  4865. if v == nil {
  4866. v81v2 = nil
  4867. } else {
  4868. v81v2 = make(map[uint]uintptr, len(v))
  4869. } // reset map
  4870. testUnmarshalErr(&v81v2, bs81, h, t, "dec-map-v81-p-len")
  4871. testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-p-len")
  4872. bs81 = testMarshalErr(&v81v1, h, t, "enc-map-v81-p")
  4873. v81v2 = nil
  4874. testUnmarshalErr(&v81v2, bs81, h, t, "dec-map-v81-p-nil")
  4875. testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-p-nil")
  4876. // ...
  4877. if v == nil {
  4878. v81v2 = nil
  4879. } else {
  4880. v81v2 = make(map[uint]uintptr, len(v))
  4881. } // reset map
  4882. var v81v3, v81v4 typMapMapUintUintptr
  4883. v81v3 = typMapMapUintUintptr(v81v1)
  4884. v81v4 = typMapMapUintUintptr(v81v2)
  4885. bs81 = testMarshalErr(v81v3, h, t, "enc-map-v81-custom")
  4886. testUnmarshalErr(v81v4, bs81, h, t, "dec-map-v81-p-len")
  4887. testDeepEqualErr(v81v3, v81v4, t, "equal-map-v81-p-len")
  4888. }
  4889. for _, v := range []map[uint]int{nil, {}, {44: 0, 33: 44}} {
  4890. // fmt.Printf(">>>> running mammoth map v82: %v\n", v)
  4891. var v82v1, v82v2 map[uint]int
  4892. v82v1 = v
  4893. bs82 := testMarshalErr(v82v1, h, t, "enc-map-v82")
  4894. if v == nil {
  4895. v82v2 = nil
  4896. } else {
  4897. v82v2 = make(map[uint]int, len(v))
  4898. } // reset map
  4899. testUnmarshalErr(v82v2, bs82, h, t, "dec-map-v82")
  4900. testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82")
  4901. if v == nil {
  4902. v82v2 = nil
  4903. } else {
  4904. v82v2 = make(map[uint]int, len(v))
  4905. } // reset map
  4906. testUnmarshalErr(reflect.ValueOf(v82v2), bs82, h, t, "dec-map-v82-noaddr") // decode into non-addressable map value
  4907. testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-noaddr")
  4908. if v == nil {
  4909. v82v2 = nil
  4910. } else {
  4911. v82v2 = make(map[uint]int, len(v))
  4912. } // reset map
  4913. testUnmarshalErr(&v82v2, bs82, h, t, "dec-map-v82-p-len")
  4914. testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-p-len")
  4915. bs82 = testMarshalErr(&v82v1, h, t, "enc-map-v82-p")
  4916. v82v2 = nil
  4917. testUnmarshalErr(&v82v2, bs82, h, t, "dec-map-v82-p-nil")
  4918. testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-p-nil")
  4919. // ...
  4920. if v == nil {
  4921. v82v2 = nil
  4922. } else {
  4923. v82v2 = make(map[uint]int, len(v))
  4924. } // reset map
  4925. var v82v3, v82v4 typMapMapUintInt
  4926. v82v3 = typMapMapUintInt(v82v1)
  4927. v82v4 = typMapMapUintInt(v82v2)
  4928. bs82 = testMarshalErr(v82v3, h, t, "enc-map-v82-custom")
  4929. testUnmarshalErr(v82v4, bs82, h, t, "dec-map-v82-p-len")
  4930. testDeepEqualErr(v82v3, v82v4, t, "equal-map-v82-p-len")
  4931. }
  4932. for _, v := range []map[uint]int8{nil, {}, {33: 0, 44: 33}} {
  4933. // fmt.Printf(">>>> running mammoth map v83: %v\n", v)
  4934. var v83v1, v83v2 map[uint]int8
  4935. v83v1 = v
  4936. bs83 := testMarshalErr(v83v1, h, t, "enc-map-v83")
  4937. if v == nil {
  4938. v83v2 = nil
  4939. } else {
  4940. v83v2 = make(map[uint]int8, len(v))
  4941. } // reset map
  4942. testUnmarshalErr(v83v2, bs83, h, t, "dec-map-v83")
  4943. testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83")
  4944. if v == nil {
  4945. v83v2 = nil
  4946. } else {
  4947. v83v2 = make(map[uint]int8, len(v))
  4948. } // reset map
  4949. testUnmarshalErr(reflect.ValueOf(v83v2), bs83, h, t, "dec-map-v83-noaddr") // decode into non-addressable map value
  4950. testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-noaddr")
  4951. if v == nil {
  4952. v83v2 = nil
  4953. } else {
  4954. v83v2 = make(map[uint]int8, len(v))
  4955. } // reset map
  4956. testUnmarshalErr(&v83v2, bs83, h, t, "dec-map-v83-p-len")
  4957. testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-p-len")
  4958. bs83 = testMarshalErr(&v83v1, h, t, "enc-map-v83-p")
  4959. v83v2 = nil
  4960. testUnmarshalErr(&v83v2, bs83, h, t, "dec-map-v83-p-nil")
  4961. testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-p-nil")
  4962. // ...
  4963. if v == nil {
  4964. v83v2 = nil
  4965. } else {
  4966. v83v2 = make(map[uint]int8, len(v))
  4967. } // reset map
  4968. var v83v3, v83v4 typMapMapUintInt8
  4969. v83v3 = typMapMapUintInt8(v83v1)
  4970. v83v4 = typMapMapUintInt8(v83v2)
  4971. bs83 = testMarshalErr(v83v3, h, t, "enc-map-v83-custom")
  4972. testUnmarshalErr(v83v4, bs83, h, t, "dec-map-v83-p-len")
  4973. testDeepEqualErr(v83v3, v83v4, t, "equal-map-v83-p-len")
  4974. }
  4975. for _, v := range []map[uint]int16{nil, {}, {44: 0, 33: 44}} {
  4976. // fmt.Printf(">>>> running mammoth map v84: %v\n", v)
  4977. var v84v1, v84v2 map[uint]int16
  4978. v84v1 = v
  4979. bs84 := testMarshalErr(v84v1, h, t, "enc-map-v84")
  4980. if v == nil {
  4981. v84v2 = nil
  4982. } else {
  4983. v84v2 = make(map[uint]int16, len(v))
  4984. } // reset map
  4985. testUnmarshalErr(v84v2, bs84, h, t, "dec-map-v84")
  4986. testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84")
  4987. if v == nil {
  4988. v84v2 = nil
  4989. } else {
  4990. v84v2 = make(map[uint]int16, len(v))
  4991. } // reset map
  4992. testUnmarshalErr(reflect.ValueOf(v84v2), bs84, h, t, "dec-map-v84-noaddr") // decode into non-addressable map value
  4993. testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-noaddr")
  4994. if v == nil {
  4995. v84v2 = nil
  4996. } else {
  4997. v84v2 = make(map[uint]int16, len(v))
  4998. } // reset map
  4999. testUnmarshalErr(&v84v2, bs84, h, t, "dec-map-v84-p-len")
  5000. testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-p-len")
  5001. bs84 = testMarshalErr(&v84v1, h, t, "enc-map-v84-p")
  5002. v84v2 = nil
  5003. testUnmarshalErr(&v84v2, bs84, h, t, "dec-map-v84-p-nil")
  5004. testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-p-nil")
  5005. // ...
  5006. if v == nil {
  5007. v84v2 = nil
  5008. } else {
  5009. v84v2 = make(map[uint]int16, len(v))
  5010. } // reset map
  5011. var v84v3, v84v4 typMapMapUintInt16
  5012. v84v3 = typMapMapUintInt16(v84v1)
  5013. v84v4 = typMapMapUintInt16(v84v2)
  5014. bs84 = testMarshalErr(v84v3, h, t, "enc-map-v84-custom")
  5015. testUnmarshalErr(v84v4, bs84, h, t, "dec-map-v84-p-len")
  5016. testDeepEqualErr(v84v3, v84v4, t, "equal-map-v84-p-len")
  5017. }
  5018. for _, v := range []map[uint]int32{nil, {}, {33: 0, 44: 33}} {
  5019. // fmt.Printf(">>>> running mammoth map v85: %v\n", v)
  5020. var v85v1, v85v2 map[uint]int32
  5021. v85v1 = v
  5022. bs85 := testMarshalErr(v85v1, h, t, "enc-map-v85")
  5023. if v == nil {
  5024. v85v2 = nil
  5025. } else {
  5026. v85v2 = make(map[uint]int32, len(v))
  5027. } // reset map
  5028. testUnmarshalErr(v85v2, bs85, h, t, "dec-map-v85")
  5029. testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85")
  5030. if v == nil {
  5031. v85v2 = nil
  5032. } else {
  5033. v85v2 = make(map[uint]int32, len(v))
  5034. } // reset map
  5035. testUnmarshalErr(reflect.ValueOf(v85v2), bs85, h, t, "dec-map-v85-noaddr") // decode into non-addressable map value
  5036. testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-noaddr")
  5037. if v == nil {
  5038. v85v2 = nil
  5039. } else {
  5040. v85v2 = make(map[uint]int32, len(v))
  5041. } // reset map
  5042. testUnmarshalErr(&v85v2, bs85, h, t, "dec-map-v85-p-len")
  5043. testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-p-len")
  5044. bs85 = testMarshalErr(&v85v1, h, t, "enc-map-v85-p")
  5045. v85v2 = nil
  5046. testUnmarshalErr(&v85v2, bs85, h, t, "dec-map-v85-p-nil")
  5047. testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-p-nil")
  5048. // ...
  5049. if v == nil {
  5050. v85v2 = nil
  5051. } else {
  5052. v85v2 = make(map[uint]int32, len(v))
  5053. } // reset map
  5054. var v85v3, v85v4 typMapMapUintInt32
  5055. v85v3 = typMapMapUintInt32(v85v1)
  5056. v85v4 = typMapMapUintInt32(v85v2)
  5057. bs85 = testMarshalErr(v85v3, h, t, "enc-map-v85-custom")
  5058. testUnmarshalErr(v85v4, bs85, h, t, "dec-map-v85-p-len")
  5059. testDeepEqualErr(v85v3, v85v4, t, "equal-map-v85-p-len")
  5060. }
  5061. for _, v := range []map[uint]int64{nil, {}, {44: 0, 33: 44}} {
  5062. // fmt.Printf(">>>> running mammoth map v86: %v\n", v)
  5063. var v86v1, v86v2 map[uint]int64
  5064. v86v1 = v
  5065. bs86 := testMarshalErr(v86v1, h, t, "enc-map-v86")
  5066. if v == nil {
  5067. v86v2 = nil
  5068. } else {
  5069. v86v2 = make(map[uint]int64, len(v))
  5070. } // reset map
  5071. testUnmarshalErr(v86v2, bs86, h, t, "dec-map-v86")
  5072. testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86")
  5073. if v == nil {
  5074. v86v2 = nil
  5075. } else {
  5076. v86v2 = make(map[uint]int64, len(v))
  5077. } // reset map
  5078. testUnmarshalErr(reflect.ValueOf(v86v2), bs86, h, t, "dec-map-v86-noaddr") // decode into non-addressable map value
  5079. testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-noaddr")
  5080. if v == nil {
  5081. v86v2 = nil
  5082. } else {
  5083. v86v2 = make(map[uint]int64, len(v))
  5084. } // reset map
  5085. testUnmarshalErr(&v86v2, bs86, h, t, "dec-map-v86-p-len")
  5086. testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-p-len")
  5087. bs86 = testMarshalErr(&v86v1, h, t, "enc-map-v86-p")
  5088. v86v2 = nil
  5089. testUnmarshalErr(&v86v2, bs86, h, t, "dec-map-v86-p-nil")
  5090. testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-p-nil")
  5091. // ...
  5092. if v == nil {
  5093. v86v2 = nil
  5094. } else {
  5095. v86v2 = make(map[uint]int64, len(v))
  5096. } // reset map
  5097. var v86v3, v86v4 typMapMapUintInt64
  5098. v86v3 = typMapMapUintInt64(v86v1)
  5099. v86v4 = typMapMapUintInt64(v86v2)
  5100. bs86 = testMarshalErr(v86v3, h, t, "enc-map-v86-custom")
  5101. testUnmarshalErr(v86v4, bs86, h, t, "dec-map-v86-p-len")
  5102. testDeepEqualErr(v86v3, v86v4, t, "equal-map-v86-p-len")
  5103. }
  5104. for _, v := range []map[uint]float32{nil, {}, {33: 0, 44: 22.2}} {
  5105. // fmt.Printf(">>>> running mammoth map v87: %v\n", v)
  5106. var v87v1, v87v2 map[uint]float32
  5107. v87v1 = v
  5108. bs87 := testMarshalErr(v87v1, h, t, "enc-map-v87")
  5109. if v == nil {
  5110. v87v2 = nil
  5111. } else {
  5112. v87v2 = make(map[uint]float32, len(v))
  5113. } // reset map
  5114. testUnmarshalErr(v87v2, bs87, h, t, "dec-map-v87")
  5115. testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87")
  5116. if v == nil {
  5117. v87v2 = nil
  5118. } else {
  5119. v87v2 = make(map[uint]float32, len(v))
  5120. } // reset map
  5121. testUnmarshalErr(reflect.ValueOf(v87v2), bs87, h, t, "dec-map-v87-noaddr") // decode into non-addressable map value
  5122. testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-noaddr")
  5123. if v == nil {
  5124. v87v2 = nil
  5125. } else {
  5126. v87v2 = make(map[uint]float32, len(v))
  5127. } // reset map
  5128. testUnmarshalErr(&v87v2, bs87, h, t, "dec-map-v87-p-len")
  5129. testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-p-len")
  5130. bs87 = testMarshalErr(&v87v1, h, t, "enc-map-v87-p")
  5131. v87v2 = nil
  5132. testUnmarshalErr(&v87v2, bs87, h, t, "dec-map-v87-p-nil")
  5133. testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-p-nil")
  5134. // ...
  5135. if v == nil {
  5136. v87v2 = nil
  5137. } else {
  5138. v87v2 = make(map[uint]float32, len(v))
  5139. } // reset map
  5140. var v87v3, v87v4 typMapMapUintFloat32
  5141. v87v3 = typMapMapUintFloat32(v87v1)
  5142. v87v4 = typMapMapUintFloat32(v87v2)
  5143. bs87 = testMarshalErr(v87v3, h, t, "enc-map-v87-custom")
  5144. testUnmarshalErr(v87v4, bs87, h, t, "dec-map-v87-p-len")
  5145. testDeepEqualErr(v87v3, v87v4, t, "equal-map-v87-p-len")
  5146. }
  5147. for _, v := range []map[uint]float64{nil, {}, {33: 0, 44: 11.1}} {
  5148. // fmt.Printf(">>>> running mammoth map v88: %v\n", v)
  5149. var v88v1, v88v2 map[uint]float64
  5150. v88v1 = v
  5151. bs88 := testMarshalErr(v88v1, h, t, "enc-map-v88")
  5152. if v == nil {
  5153. v88v2 = nil
  5154. } else {
  5155. v88v2 = make(map[uint]float64, len(v))
  5156. } // reset map
  5157. testUnmarshalErr(v88v2, bs88, h, t, "dec-map-v88")
  5158. testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88")
  5159. if v == nil {
  5160. v88v2 = nil
  5161. } else {
  5162. v88v2 = make(map[uint]float64, len(v))
  5163. } // reset map
  5164. testUnmarshalErr(reflect.ValueOf(v88v2), bs88, h, t, "dec-map-v88-noaddr") // decode into non-addressable map value
  5165. testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-noaddr")
  5166. if v == nil {
  5167. v88v2 = nil
  5168. } else {
  5169. v88v2 = make(map[uint]float64, len(v))
  5170. } // reset map
  5171. testUnmarshalErr(&v88v2, bs88, h, t, "dec-map-v88-p-len")
  5172. testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-p-len")
  5173. bs88 = testMarshalErr(&v88v1, h, t, "enc-map-v88-p")
  5174. v88v2 = nil
  5175. testUnmarshalErr(&v88v2, bs88, h, t, "dec-map-v88-p-nil")
  5176. testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-p-nil")
  5177. // ...
  5178. if v == nil {
  5179. v88v2 = nil
  5180. } else {
  5181. v88v2 = make(map[uint]float64, len(v))
  5182. } // reset map
  5183. var v88v3, v88v4 typMapMapUintFloat64
  5184. v88v3 = typMapMapUintFloat64(v88v1)
  5185. v88v4 = typMapMapUintFloat64(v88v2)
  5186. bs88 = testMarshalErr(v88v3, h, t, "enc-map-v88-custom")
  5187. testUnmarshalErr(v88v4, bs88, h, t, "dec-map-v88-p-len")
  5188. testDeepEqualErr(v88v3, v88v4, t, "equal-map-v88-p-len")
  5189. }
  5190. for _, v := range []map[uint]bool{nil, {}, {33: false, 44: true}} {
  5191. // fmt.Printf(">>>> running mammoth map v89: %v\n", v)
  5192. var v89v1, v89v2 map[uint]bool
  5193. v89v1 = v
  5194. bs89 := testMarshalErr(v89v1, h, t, "enc-map-v89")
  5195. if v == nil {
  5196. v89v2 = nil
  5197. } else {
  5198. v89v2 = make(map[uint]bool, len(v))
  5199. } // reset map
  5200. testUnmarshalErr(v89v2, bs89, h, t, "dec-map-v89")
  5201. testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89")
  5202. if v == nil {
  5203. v89v2 = nil
  5204. } else {
  5205. v89v2 = make(map[uint]bool, len(v))
  5206. } // reset map
  5207. testUnmarshalErr(reflect.ValueOf(v89v2), bs89, h, t, "dec-map-v89-noaddr") // decode into non-addressable map value
  5208. testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-noaddr")
  5209. if v == nil {
  5210. v89v2 = nil
  5211. } else {
  5212. v89v2 = make(map[uint]bool, len(v))
  5213. } // reset map
  5214. testUnmarshalErr(&v89v2, bs89, h, t, "dec-map-v89-p-len")
  5215. testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-p-len")
  5216. bs89 = testMarshalErr(&v89v1, h, t, "enc-map-v89-p")
  5217. v89v2 = nil
  5218. testUnmarshalErr(&v89v2, bs89, h, t, "dec-map-v89-p-nil")
  5219. testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-p-nil")
  5220. // ...
  5221. if v == nil {
  5222. v89v2 = nil
  5223. } else {
  5224. v89v2 = make(map[uint]bool, len(v))
  5225. } // reset map
  5226. var v89v3, v89v4 typMapMapUintBool
  5227. v89v3 = typMapMapUintBool(v89v1)
  5228. v89v4 = typMapMapUintBool(v89v2)
  5229. bs89 = testMarshalErr(v89v3, h, t, "enc-map-v89-custom")
  5230. testUnmarshalErr(v89v4, bs89, h, t, "dec-map-v89-p-len")
  5231. testDeepEqualErr(v89v3, v89v4, t, "equal-map-v89-p-len")
  5232. }
  5233. for _, v := range []map[uint8]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  5234. // fmt.Printf(">>>> running mammoth map v91: %v\n", v)
  5235. var v91v1, v91v2 map[uint8]interface{}
  5236. v91v1 = v
  5237. bs91 := testMarshalErr(v91v1, h, t, "enc-map-v91")
  5238. if v == nil {
  5239. v91v2 = nil
  5240. } else {
  5241. v91v2 = make(map[uint8]interface{}, len(v))
  5242. } // reset map
  5243. testUnmarshalErr(v91v2, bs91, h, t, "dec-map-v91")
  5244. testDeepEqualErr(v91v1, v91v2, t, "equal-map-v91")
  5245. if v == nil {
  5246. v91v2 = nil
  5247. } else {
  5248. v91v2 = make(map[uint8]interface{}, len(v))
  5249. } // reset map
  5250. testUnmarshalErr(reflect.ValueOf(v91v2), bs91, h, t, "dec-map-v91-noaddr") // decode into non-addressable map value
  5251. testDeepEqualErr(v91v1, v91v2, t, "equal-map-v91-noaddr")
  5252. if v == nil {
  5253. v91v2 = nil
  5254. } else {
  5255. v91v2 = make(map[uint8]interface{}, len(v))
  5256. } // reset map
  5257. testUnmarshalErr(&v91v2, bs91, h, t, "dec-map-v91-p-len")
  5258. testDeepEqualErr(v91v1, v91v2, t, "equal-map-v91-p-len")
  5259. bs91 = testMarshalErr(&v91v1, h, t, "enc-map-v91-p")
  5260. v91v2 = nil
  5261. testUnmarshalErr(&v91v2, bs91, h, t, "dec-map-v91-p-nil")
  5262. testDeepEqualErr(v91v1, v91v2, t, "equal-map-v91-p-nil")
  5263. // ...
  5264. if v == nil {
  5265. v91v2 = nil
  5266. } else {
  5267. v91v2 = make(map[uint8]interface{}, len(v))
  5268. } // reset map
  5269. var v91v3, v91v4 typMapMapUint8Intf
  5270. v91v3 = typMapMapUint8Intf(v91v1)
  5271. v91v4 = typMapMapUint8Intf(v91v2)
  5272. bs91 = testMarshalErr(v91v3, h, t, "enc-map-v91-custom")
  5273. testUnmarshalErr(v91v4, bs91, h, t, "dec-map-v91-p-len")
  5274. testDeepEqualErr(v91v3, v91v4, t, "equal-map-v91-p-len")
  5275. }
  5276. for _, v := range []map[uint8]string{nil, {}, {33: "", 44: "some-string"}} {
  5277. // fmt.Printf(">>>> running mammoth map v92: %v\n", v)
  5278. var v92v1, v92v2 map[uint8]string
  5279. v92v1 = v
  5280. bs92 := testMarshalErr(v92v1, h, t, "enc-map-v92")
  5281. if v == nil {
  5282. v92v2 = nil
  5283. } else {
  5284. v92v2 = make(map[uint8]string, len(v))
  5285. } // reset map
  5286. testUnmarshalErr(v92v2, bs92, h, t, "dec-map-v92")
  5287. testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92")
  5288. if v == nil {
  5289. v92v2 = nil
  5290. } else {
  5291. v92v2 = make(map[uint8]string, len(v))
  5292. } // reset map
  5293. testUnmarshalErr(reflect.ValueOf(v92v2), bs92, h, t, "dec-map-v92-noaddr") // decode into non-addressable map value
  5294. testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-noaddr")
  5295. if v == nil {
  5296. v92v2 = nil
  5297. } else {
  5298. v92v2 = make(map[uint8]string, len(v))
  5299. } // reset map
  5300. testUnmarshalErr(&v92v2, bs92, h, t, "dec-map-v92-p-len")
  5301. testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-p-len")
  5302. bs92 = testMarshalErr(&v92v1, h, t, "enc-map-v92-p")
  5303. v92v2 = nil
  5304. testUnmarshalErr(&v92v2, bs92, h, t, "dec-map-v92-p-nil")
  5305. testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-p-nil")
  5306. // ...
  5307. if v == nil {
  5308. v92v2 = nil
  5309. } else {
  5310. v92v2 = make(map[uint8]string, len(v))
  5311. } // reset map
  5312. var v92v3, v92v4 typMapMapUint8String
  5313. v92v3 = typMapMapUint8String(v92v1)
  5314. v92v4 = typMapMapUint8String(v92v2)
  5315. bs92 = testMarshalErr(v92v3, h, t, "enc-map-v92-custom")
  5316. testUnmarshalErr(v92v4, bs92, h, t, "dec-map-v92-p-len")
  5317. testDeepEqualErr(v92v3, v92v4, t, "equal-map-v92-p-len")
  5318. }
  5319. for _, v := range []map[uint8]uint{nil, {}, {33: 0, 44: 33}} {
  5320. // fmt.Printf(">>>> running mammoth map v93: %v\n", v)
  5321. var v93v1, v93v2 map[uint8]uint
  5322. v93v1 = v
  5323. bs93 := testMarshalErr(v93v1, h, t, "enc-map-v93")
  5324. if v == nil {
  5325. v93v2 = nil
  5326. } else {
  5327. v93v2 = make(map[uint8]uint, len(v))
  5328. } // reset map
  5329. testUnmarshalErr(v93v2, bs93, h, t, "dec-map-v93")
  5330. testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93")
  5331. if v == nil {
  5332. v93v2 = nil
  5333. } else {
  5334. v93v2 = make(map[uint8]uint, len(v))
  5335. } // reset map
  5336. testUnmarshalErr(reflect.ValueOf(v93v2), bs93, h, t, "dec-map-v93-noaddr") // decode into non-addressable map value
  5337. testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-noaddr")
  5338. if v == nil {
  5339. v93v2 = nil
  5340. } else {
  5341. v93v2 = make(map[uint8]uint, len(v))
  5342. } // reset map
  5343. testUnmarshalErr(&v93v2, bs93, h, t, "dec-map-v93-p-len")
  5344. testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-p-len")
  5345. bs93 = testMarshalErr(&v93v1, h, t, "enc-map-v93-p")
  5346. v93v2 = nil
  5347. testUnmarshalErr(&v93v2, bs93, h, t, "dec-map-v93-p-nil")
  5348. testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-p-nil")
  5349. // ...
  5350. if v == nil {
  5351. v93v2 = nil
  5352. } else {
  5353. v93v2 = make(map[uint8]uint, len(v))
  5354. } // reset map
  5355. var v93v3, v93v4 typMapMapUint8Uint
  5356. v93v3 = typMapMapUint8Uint(v93v1)
  5357. v93v4 = typMapMapUint8Uint(v93v2)
  5358. bs93 = testMarshalErr(v93v3, h, t, "enc-map-v93-custom")
  5359. testUnmarshalErr(v93v4, bs93, h, t, "dec-map-v93-p-len")
  5360. testDeepEqualErr(v93v3, v93v4, t, "equal-map-v93-p-len")
  5361. }
  5362. for _, v := range []map[uint8]uint8{nil, {}, {44: 0, 33: 44}} {
  5363. // fmt.Printf(">>>> running mammoth map v94: %v\n", v)
  5364. var v94v1, v94v2 map[uint8]uint8
  5365. v94v1 = v
  5366. bs94 := testMarshalErr(v94v1, h, t, "enc-map-v94")
  5367. if v == nil {
  5368. v94v2 = nil
  5369. } else {
  5370. v94v2 = make(map[uint8]uint8, len(v))
  5371. } // reset map
  5372. testUnmarshalErr(v94v2, bs94, h, t, "dec-map-v94")
  5373. testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94")
  5374. if v == nil {
  5375. v94v2 = nil
  5376. } else {
  5377. v94v2 = make(map[uint8]uint8, len(v))
  5378. } // reset map
  5379. testUnmarshalErr(reflect.ValueOf(v94v2), bs94, h, t, "dec-map-v94-noaddr") // decode into non-addressable map value
  5380. testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-noaddr")
  5381. if v == nil {
  5382. v94v2 = nil
  5383. } else {
  5384. v94v2 = make(map[uint8]uint8, len(v))
  5385. } // reset map
  5386. testUnmarshalErr(&v94v2, bs94, h, t, "dec-map-v94-p-len")
  5387. testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-p-len")
  5388. bs94 = testMarshalErr(&v94v1, h, t, "enc-map-v94-p")
  5389. v94v2 = nil
  5390. testUnmarshalErr(&v94v2, bs94, h, t, "dec-map-v94-p-nil")
  5391. testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-p-nil")
  5392. // ...
  5393. if v == nil {
  5394. v94v2 = nil
  5395. } else {
  5396. v94v2 = make(map[uint8]uint8, len(v))
  5397. } // reset map
  5398. var v94v3, v94v4 typMapMapUint8Uint8
  5399. v94v3 = typMapMapUint8Uint8(v94v1)
  5400. v94v4 = typMapMapUint8Uint8(v94v2)
  5401. bs94 = testMarshalErr(v94v3, h, t, "enc-map-v94-custom")
  5402. testUnmarshalErr(v94v4, bs94, h, t, "dec-map-v94-p-len")
  5403. testDeepEqualErr(v94v3, v94v4, t, "equal-map-v94-p-len")
  5404. }
  5405. for _, v := range []map[uint8]uint16{nil, {}, {33: 0, 44: 33}} {
  5406. // fmt.Printf(">>>> running mammoth map v95: %v\n", v)
  5407. var v95v1, v95v2 map[uint8]uint16
  5408. v95v1 = v
  5409. bs95 := testMarshalErr(v95v1, h, t, "enc-map-v95")
  5410. if v == nil {
  5411. v95v2 = nil
  5412. } else {
  5413. v95v2 = make(map[uint8]uint16, len(v))
  5414. } // reset map
  5415. testUnmarshalErr(v95v2, bs95, h, t, "dec-map-v95")
  5416. testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95")
  5417. if v == nil {
  5418. v95v2 = nil
  5419. } else {
  5420. v95v2 = make(map[uint8]uint16, len(v))
  5421. } // reset map
  5422. testUnmarshalErr(reflect.ValueOf(v95v2), bs95, h, t, "dec-map-v95-noaddr") // decode into non-addressable map value
  5423. testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-noaddr")
  5424. if v == nil {
  5425. v95v2 = nil
  5426. } else {
  5427. v95v2 = make(map[uint8]uint16, len(v))
  5428. } // reset map
  5429. testUnmarshalErr(&v95v2, bs95, h, t, "dec-map-v95-p-len")
  5430. testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-p-len")
  5431. bs95 = testMarshalErr(&v95v1, h, t, "enc-map-v95-p")
  5432. v95v2 = nil
  5433. testUnmarshalErr(&v95v2, bs95, h, t, "dec-map-v95-p-nil")
  5434. testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-p-nil")
  5435. // ...
  5436. if v == nil {
  5437. v95v2 = nil
  5438. } else {
  5439. v95v2 = make(map[uint8]uint16, len(v))
  5440. } // reset map
  5441. var v95v3, v95v4 typMapMapUint8Uint16
  5442. v95v3 = typMapMapUint8Uint16(v95v1)
  5443. v95v4 = typMapMapUint8Uint16(v95v2)
  5444. bs95 = testMarshalErr(v95v3, h, t, "enc-map-v95-custom")
  5445. testUnmarshalErr(v95v4, bs95, h, t, "dec-map-v95-p-len")
  5446. testDeepEqualErr(v95v3, v95v4, t, "equal-map-v95-p-len")
  5447. }
  5448. for _, v := range []map[uint8]uint32{nil, {}, {44: 0, 33: 44}} {
  5449. // fmt.Printf(">>>> running mammoth map v96: %v\n", v)
  5450. var v96v1, v96v2 map[uint8]uint32
  5451. v96v1 = v
  5452. bs96 := testMarshalErr(v96v1, h, t, "enc-map-v96")
  5453. if v == nil {
  5454. v96v2 = nil
  5455. } else {
  5456. v96v2 = make(map[uint8]uint32, len(v))
  5457. } // reset map
  5458. testUnmarshalErr(v96v2, bs96, h, t, "dec-map-v96")
  5459. testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96")
  5460. if v == nil {
  5461. v96v2 = nil
  5462. } else {
  5463. v96v2 = make(map[uint8]uint32, len(v))
  5464. } // reset map
  5465. testUnmarshalErr(reflect.ValueOf(v96v2), bs96, h, t, "dec-map-v96-noaddr") // decode into non-addressable map value
  5466. testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-noaddr")
  5467. if v == nil {
  5468. v96v2 = nil
  5469. } else {
  5470. v96v2 = make(map[uint8]uint32, len(v))
  5471. } // reset map
  5472. testUnmarshalErr(&v96v2, bs96, h, t, "dec-map-v96-p-len")
  5473. testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-p-len")
  5474. bs96 = testMarshalErr(&v96v1, h, t, "enc-map-v96-p")
  5475. v96v2 = nil
  5476. testUnmarshalErr(&v96v2, bs96, h, t, "dec-map-v96-p-nil")
  5477. testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-p-nil")
  5478. // ...
  5479. if v == nil {
  5480. v96v2 = nil
  5481. } else {
  5482. v96v2 = make(map[uint8]uint32, len(v))
  5483. } // reset map
  5484. var v96v3, v96v4 typMapMapUint8Uint32
  5485. v96v3 = typMapMapUint8Uint32(v96v1)
  5486. v96v4 = typMapMapUint8Uint32(v96v2)
  5487. bs96 = testMarshalErr(v96v3, h, t, "enc-map-v96-custom")
  5488. testUnmarshalErr(v96v4, bs96, h, t, "dec-map-v96-p-len")
  5489. testDeepEqualErr(v96v3, v96v4, t, "equal-map-v96-p-len")
  5490. }
  5491. for _, v := range []map[uint8]uint64{nil, {}, {33: 0, 44: 33}} {
  5492. // fmt.Printf(">>>> running mammoth map v97: %v\n", v)
  5493. var v97v1, v97v2 map[uint8]uint64
  5494. v97v1 = v
  5495. bs97 := testMarshalErr(v97v1, h, t, "enc-map-v97")
  5496. if v == nil {
  5497. v97v2 = nil
  5498. } else {
  5499. v97v2 = make(map[uint8]uint64, len(v))
  5500. } // reset map
  5501. testUnmarshalErr(v97v2, bs97, h, t, "dec-map-v97")
  5502. testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97")
  5503. if v == nil {
  5504. v97v2 = nil
  5505. } else {
  5506. v97v2 = make(map[uint8]uint64, len(v))
  5507. } // reset map
  5508. testUnmarshalErr(reflect.ValueOf(v97v2), bs97, h, t, "dec-map-v97-noaddr") // decode into non-addressable map value
  5509. testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-noaddr")
  5510. if v == nil {
  5511. v97v2 = nil
  5512. } else {
  5513. v97v2 = make(map[uint8]uint64, len(v))
  5514. } // reset map
  5515. testUnmarshalErr(&v97v2, bs97, h, t, "dec-map-v97-p-len")
  5516. testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-p-len")
  5517. bs97 = testMarshalErr(&v97v1, h, t, "enc-map-v97-p")
  5518. v97v2 = nil
  5519. testUnmarshalErr(&v97v2, bs97, h, t, "dec-map-v97-p-nil")
  5520. testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-p-nil")
  5521. // ...
  5522. if v == nil {
  5523. v97v2 = nil
  5524. } else {
  5525. v97v2 = make(map[uint8]uint64, len(v))
  5526. } // reset map
  5527. var v97v3, v97v4 typMapMapUint8Uint64
  5528. v97v3 = typMapMapUint8Uint64(v97v1)
  5529. v97v4 = typMapMapUint8Uint64(v97v2)
  5530. bs97 = testMarshalErr(v97v3, h, t, "enc-map-v97-custom")
  5531. testUnmarshalErr(v97v4, bs97, h, t, "dec-map-v97-p-len")
  5532. testDeepEqualErr(v97v3, v97v4, t, "equal-map-v97-p-len")
  5533. }
  5534. for _, v := range []map[uint8]uintptr{nil, {}, {44: 0, 33: 44}} {
  5535. // fmt.Printf(">>>> running mammoth map v98: %v\n", v)
  5536. var v98v1, v98v2 map[uint8]uintptr
  5537. v98v1 = v
  5538. bs98 := testMarshalErr(v98v1, h, t, "enc-map-v98")
  5539. if v == nil {
  5540. v98v2 = nil
  5541. } else {
  5542. v98v2 = make(map[uint8]uintptr, len(v))
  5543. } // reset map
  5544. testUnmarshalErr(v98v2, bs98, h, t, "dec-map-v98")
  5545. testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98")
  5546. if v == nil {
  5547. v98v2 = nil
  5548. } else {
  5549. v98v2 = make(map[uint8]uintptr, len(v))
  5550. } // reset map
  5551. testUnmarshalErr(reflect.ValueOf(v98v2), bs98, h, t, "dec-map-v98-noaddr") // decode into non-addressable map value
  5552. testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-noaddr")
  5553. if v == nil {
  5554. v98v2 = nil
  5555. } else {
  5556. v98v2 = make(map[uint8]uintptr, len(v))
  5557. } // reset map
  5558. testUnmarshalErr(&v98v2, bs98, h, t, "dec-map-v98-p-len")
  5559. testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-p-len")
  5560. bs98 = testMarshalErr(&v98v1, h, t, "enc-map-v98-p")
  5561. v98v2 = nil
  5562. testUnmarshalErr(&v98v2, bs98, h, t, "dec-map-v98-p-nil")
  5563. testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-p-nil")
  5564. // ...
  5565. if v == nil {
  5566. v98v2 = nil
  5567. } else {
  5568. v98v2 = make(map[uint8]uintptr, len(v))
  5569. } // reset map
  5570. var v98v3, v98v4 typMapMapUint8Uintptr
  5571. v98v3 = typMapMapUint8Uintptr(v98v1)
  5572. v98v4 = typMapMapUint8Uintptr(v98v2)
  5573. bs98 = testMarshalErr(v98v3, h, t, "enc-map-v98-custom")
  5574. testUnmarshalErr(v98v4, bs98, h, t, "dec-map-v98-p-len")
  5575. testDeepEqualErr(v98v3, v98v4, t, "equal-map-v98-p-len")
  5576. }
  5577. for _, v := range []map[uint8]int{nil, {}, {33: 0, 44: 33}} {
  5578. // fmt.Printf(">>>> running mammoth map v99: %v\n", v)
  5579. var v99v1, v99v2 map[uint8]int
  5580. v99v1 = v
  5581. bs99 := testMarshalErr(v99v1, h, t, "enc-map-v99")
  5582. if v == nil {
  5583. v99v2 = nil
  5584. } else {
  5585. v99v2 = make(map[uint8]int, len(v))
  5586. } // reset map
  5587. testUnmarshalErr(v99v2, bs99, h, t, "dec-map-v99")
  5588. testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99")
  5589. if v == nil {
  5590. v99v2 = nil
  5591. } else {
  5592. v99v2 = make(map[uint8]int, len(v))
  5593. } // reset map
  5594. testUnmarshalErr(reflect.ValueOf(v99v2), bs99, h, t, "dec-map-v99-noaddr") // decode into non-addressable map value
  5595. testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-noaddr")
  5596. if v == nil {
  5597. v99v2 = nil
  5598. } else {
  5599. v99v2 = make(map[uint8]int, len(v))
  5600. } // reset map
  5601. testUnmarshalErr(&v99v2, bs99, h, t, "dec-map-v99-p-len")
  5602. testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-p-len")
  5603. bs99 = testMarshalErr(&v99v1, h, t, "enc-map-v99-p")
  5604. v99v2 = nil
  5605. testUnmarshalErr(&v99v2, bs99, h, t, "dec-map-v99-p-nil")
  5606. testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-p-nil")
  5607. // ...
  5608. if v == nil {
  5609. v99v2 = nil
  5610. } else {
  5611. v99v2 = make(map[uint8]int, len(v))
  5612. } // reset map
  5613. var v99v3, v99v4 typMapMapUint8Int
  5614. v99v3 = typMapMapUint8Int(v99v1)
  5615. v99v4 = typMapMapUint8Int(v99v2)
  5616. bs99 = testMarshalErr(v99v3, h, t, "enc-map-v99-custom")
  5617. testUnmarshalErr(v99v4, bs99, h, t, "dec-map-v99-p-len")
  5618. testDeepEqualErr(v99v3, v99v4, t, "equal-map-v99-p-len")
  5619. }
  5620. for _, v := range []map[uint8]int8{nil, {}, {44: 0, 33: 44}} {
  5621. // fmt.Printf(">>>> running mammoth map v100: %v\n", v)
  5622. var v100v1, v100v2 map[uint8]int8
  5623. v100v1 = v
  5624. bs100 := testMarshalErr(v100v1, h, t, "enc-map-v100")
  5625. if v == nil {
  5626. v100v2 = nil
  5627. } else {
  5628. v100v2 = make(map[uint8]int8, len(v))
  5629. } // reset map
  5630. testUnmarshalErr(v100v2, bs100, h, t, "dec-map-v100")
  5631. testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100")
  5632. if v == nil {
  5633. v100v2 = nil
  5634. } else {
  5635. v100v2 = make(map[uint8]int8, len(v))
  5636. } // reset map
  5637. testUnmarshalErr(reflect.ValueOf(v100v2), bs100, h, t, "dec-map-v100-noaddr") // decode into non-addressable map value
  5638. testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-noaddr")
  5639. if v == nil {
  5640. v100v2 = nil
  5641. } else {
  5642. v100v2 = make(map[uint8]int8, len(v))
  5643. } // reset map
  5644. testUnmarshalErr(&v100v2, bs100, h, t, "dec-map-v100-p-len")
  5645. testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-p-len")
  5646. bs100 = testMarshalErr(&v100v1, h, t, "enc-map-v100-p")
  5647. v100v2 = nil
  5648. testUnmarshalErr(&v100v2, bs100, h, t, "dec-map-v100-p-nil")
  5649. testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-p-nil")
  5650. // ...
  5651. if v == nil {
  5652. v100v2 = nil
  5653. } else {
  5654. v100v2 = make(map[uint8]int8, len(v))
  5655. } // reset map
  5656. var v100v3, v100v4 typMapMapUint8Int8
  5657. v100v3 = typMapMapUint8Int8(v100v1)
  5658. v100v4 = typMapMapUint8Int8(v100v2)
  5659. bs100 = testMarshalErr(v100v3, h, t, "enc-map-v100-custom")
  5660. testUnmarshalErr(v100v4, bs100, h, t, "dec-map-v100-p-len")
  5661. testDeepEqualErr(v100v3, v100v4, t, "equal-map-v100-p-len")
  5662. }
  5663. for _, v := range []map[uint8]int16{nil, {}, {33: 0, 44: 33}} {
  5664. // fmt.Printf(">>>> running mammoth map v101: %v\n", v)
  5665. var v101v1, v101v2 map[uint8]int16
  5666. v101v1 = v
  5667. bs101 := testMarshalErr(v101v1, h, t, "enc-map-v101")
  5668. if v == nil {
  5669. v101v2 = nil
  5670. } else {
  5671. v101v2 = make(map[uint8]int16, len(v))
  5672. } // reset map
  5673. testUnmarshalErr(v101v2, bs101, h, t, "dec-map-v101")
  5674. testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101")
  5675. if v == nil {
  5676. v101v2 = nil
  5677. } else {
  5678. v101v2 = make(map[uint8]int16, len(v))
  5679. } // reset map
  5680. testUnmarshalErr(reflect.ValueOf(v101v2), bs101, h, t, "dec-map-v101-noaddr") // decode into non-addressable map value
  5681. testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-noaddr")
  5682. if v == nil {
  5683. v101v2 = nil
  5684. } else {
  5685. v101v2 = make(map[uint8]int16, len(v))
  5686. } // reset map
  5687. testUnmarshalErr(&v101v2, bs101, h, t, "dec-map-v101-p-len")
  5688. testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-p-len")
  5689. bs101 = testMarshalErr(&v101v1, h, t, "enc-map-v101-p")
  5690. v101v2 = nil
  5691. testUnmarshalErr(&v101v2, bs101, h, t, "dec-map-v101-p-nil")
  5692. testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-p-nil")
  5693. // ...
  5694. if v == nil {
  5695. v101v2 = nil
  5696. } else {
  5697. v101v2 = make(map[uint8]int16, len(v))
  5698. } // reset map
  5699. var v101v3, v101v4 typMapMapUint8Int16
  5700. v101v3 = typMapMapUint8Int16(v101v1)
  5701. v101v4 = typMapMapUint8Int16(v101v2)
  5702. bs101 = testMarshalErr(v101v3, h, t, "enc-map-v101-custom")
  5703. testUnmarshalErr(v101v4, bs101, h, t, "dec-map-v101-p-len")
  5704. testDeepEqualErr(v101v3, v101v4, t, "equal-map-v101-p-len")
  5705. }
  5706. for _, v := range []map[uint8]int32{nil, {}, {44: 0, 33: 44}} {
  5707. // fmt.Printf(">>>> running mammoth map v102: %v\n", v)
  5708. var v102v1, v102v2 map[uint8]int32
  5709. v102v1 = v
  5710. bs102 := testMarshalErr(v102v1, h, t, "enc-map-v102")
  5711. if v == nil {
  5712. v102v2 = nil
  5713. } else {
  5714. v102v2 = make(map[uint8]int32, len(v))
  5715. } // reset map
  5716. testUnmarshalErr(v102v2, bs102, h, t, "dec-map-v102")
  5717. testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102")
  5718. if v == nil {
  5719. v102v2 = nil
  5720. } else {
  5721. v102v2 = make(map[uint8]int32, len(v))
  5722. } // reset map
  5723. testUnmarshalErr(reflect.ValueOf(v102v2), bs102, h, t, "dec-map-v102-noaddr") // decode into non-addressable map value
  5724. testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-noaddr")
  5725. if v == nil {
  5726. v102v2 = nil
  5727. } else {
  5728. v102v2 = make(map[uint8]int32, len(v))
  5729. } // reset map
  5730. testUnmarshalErr(&v102v2, bs102, h, t, "dec-map-v102-p-len")
  5731. testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-p-len")
  5732. bs102 = testMarshalErr(&v102v1, h, t, "enc-map-v102-p")
  5733. v102v2 = nil
  5734. testUnmarshalErr(&v102v2, bs102, h, t, "dec-map-v102-p-nil")
  5735. testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-p-nil")
  5736. // ...
  5737. if v == nil {
  5738. v102v2 = nil
  5739. } else {
  5740. v102v2 = make(map[uint8]int32, len(v))
  5741. } // reset map
  5742. var v102v3, v102v4 typMapMapUint8Int32
  5743. v102v3 = typMapMapUint8Int32(v102v1)
  5744. v102v4 = typMapMapUint8Int32(v102v2)
  5745. bs102 = testMarshalErr(v102v3, h, t, "enc-map-v102-custom")
  5746. testUnmarshalErr(v102v4, bs102, h, t, "dec-map-v102-p-len")
  5747. testDeepEqualErr(v102v3, v102v4, t, "equal-map-v102-p-len")
  5748. }
  5749. for _, v := range []map[uint8]int64{nil, {}, {33: 0, 44: 33}} {
  5750. // fmt.Printf(">>>> running mammoth map v103: %v\n", v)
  5751. var v103v1, v103v2 map[uint8]int64
  5752. v103v1 = v
  5753. bs103 := testMarshalErr(v103v1, h, t, "enc-map-v103")
  5754. if v == nil {
  5755. v103v2 = nil
  5756. } else {
  5757. v103v2 = make(map[uint8]int64, len(v))
  5758. } // reset map
  5759. testUnmarshalErr(v103v2, bs103, h, t, "dec-map-v103")
  5760. testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103")
  5761. if v == nil {
  5762. v103v2 = nil
  5763. } else {
  5764. v103v2 = make(map[uint8]int64, len(v))
  5765. } // reset map
  5766. testUnmarshalErr(reflect.ValueOf(v103v2), bs103, h, t, "dec-map-v103-noaddr") // decode into non-addressable map value
  5767. testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-noaddr")
  5768. if v == nil {
  5769. v103v2 = nil
  5770. } else {
  5771. v103v2 = make(map[uint8]int64, len(v))
  5772. } // reset map
  5773. testUnmarshalErr(&v103v2, bs103, h, t, "dec-map-v103-p-len")
  5774. testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-p-len")
  5775. bs103 = testMarshalErr(&v103v1, h, t, "enc-map-v103-p")
  5776. v103v2 = nil
  5777. testUnmarshalErr(&v103v2, bs103, h, t, "dec-map-v103-p-nil")
  5778. testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-p-nil")
  5779. // ...
  5780. if v == nil {
  5781. v103v2 = nil
  5782. } else {
  5783. v103v2 = make(map[uint8]int64, len(v))
  5784. } // reset map
  5785. var v103v3, v103v4 typMapMapUint8Int64
  5786. v103v3 = typMapMapUint8Int64(v103v1)
  5787. v103v4 = typMapMapUint8Int64(v103v2)
  5788. bs103 = testMarshalErr(v103v3, h, t, "enc-map-v103-custom")
  5789. testUnmarshalErr(v103v4, bs103, h, t, "dec-map-v103-p-len")
  5790. testDeepEqualErr(v103v3, v103v4, t, "equal-map-v103-p-len")
  5791. }
  5792. for _, v := range []map[uint8]float32{nil, {}, {44: 0, 33: 22.2}} {
  5793. // fmt.Printf(">>>> running mammoth map v104: %v\n", v)
  5794. var v104v1, v104v2 map[uint8]float32
  5795. v104v1 = v
  5796. bs104 := testMarshalErr(v104v1, h, t, "enc-map-v104")
  5797. if v == nil {
  5798. v104v2 = nil
  5799. } else {
  5800. v104v2 = make(map[uint8]float32, len(v))
  5801. } // reset map
  5802. testUnmarshalErr(v104v2, bs104, h, t, "dec-map-v104")
  5803. testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104")
  5804. if v == nil {
  5805. v104v2 = nil
  5806. } else {
  5807. v104v2 = make(map[uint8]float32, len(v))
  5808. } // reset map
  5809. testUnmarshalErr(reflect.ValueOf(v104v2), bs104, h, t, "dec-map-v104-noaddr") // decode into non-addressable map value
  5810. testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-noaddr")
  5811. if v == nil {
  5812. v104v2 = nil
  5813. } else {
  5814. v104v2 = make(map[uint8]float32, len(v))
  5815. } // reset map
  5816. testUnmarshalErr(&v104v2, bs104, h, t, "dec-map-v104-p-len")
  5817. testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-p-len")
  5818. bs104 = testMarshalErr(&v104v1, h, t, "enc-map-v104-p")
  5819. v104v2 = nil
  5820. testUnmarshalErr(&v104v2, bs104, h, t, "dec-map-v104-p-nil")
  5821. testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-p-nil")
  5822. // ...
  5823. if v == nil {
  5824. v104v2 = nil
  5825. } else {
  5826. v104v2 = make(map[uint8]float32, len(v))
  5827. } // reset map
  5828. var v104v3, v104v4 typMapMapUint8Float32
  5829. v104v3 = typMapMapUint8Float32(v104v1)
  5830. v104v4 = typMapMapUint8Float32(v104v2)
  5831. bs104 = testMarshalErr(v104v3, h, t, "enc-map-v104-custom")
  5832. testUnmarshalErr(v104v4, bs104, h, t, "dec-map-v104-p-len")
  5833. testDeepEqualErr(v104v3, v104v4, t, "equal-map-v104-p-len")
  5834. }
  5835. for _, v := range []map[uint8]float64{nil, {}, {44: 0, 33: 11.1}} {
  5836. // fmt.Printf(">>>> running mammoth map v105: %v\n", v)
  5837. var v105v1, v105v2 map[uint8]float64
  5838. v105v1 = v
  5839. bs105 := testMarshalErr(v105v1, h, t, "enc-map-v105")
  5840. if v == nil {
  5841. v105v2 = nil
  5842. } else {
  5843. v105v2 = make(map[uint8]float64, len(v))
  5844. } // reset map
  5845. testUnmarshalErr(v105v2, bs105, h, t, "dec-map-v105")
  5846. testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105")
  5847. if v == nil {
  5848. v105v2 = nil
  5849. } else {
  5850. v105v2 = make(map[uint8]float64, len(v))
  5851. } // reset map
  5852. testUnmarshalErr(reflect.ValueOf(v105v2), bs105, h, t, "dec-map-v105-noaddr") // decode into non-addressable map value
  5853. testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-noaddr")
  5854. if v == nil {
  5855. v105v2 = nil
  5856. } else {
  5857. v105v2 = make(map[uint8]float64, len(v))
  5858. } // reset map
  5859. testUnmarshalErr(&v105v2, bs105, h, t, "dec-map-v105-p-len")
  5860. testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-p-len")
  5861. bs105 = testMarshalErr(&v105v1, h, t, "enc-map-v105-p")
  5862. v105v2 = nil
  5863. testUnmarshalErr(&v105v2, bs105, h, t, "dec-map-v105-p-nil")
  5864. testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-p-nil")
  5865. // ...
  5866. if v == nil {
  5867. v105v2 = nil
  5868. } else {
  5869. v105v2 = make(map[uint8]float64, len(v))
  5870. } // reset map
  5871. var v105v3, v105v4 typMapMapUint8Float64
  5872. v105v3 = typMapMapUint8Float64(v105v1)
  5873. v105v4 = typMapMapUint8Float64(v105v2)
  5874. bs105 = testMarshalErr(v105v3, h, t, "enc-map-v105-custom")
  5875. testUnmarshalErr(v105v4, bs105, h, t, "dec-map-v105-p-len")
  5876. testDeepEqualErr(v105v3, v105v4, t, "equal-map-v105-p-len")
  5877. }
  5878. for _, v := range []map[uint8]bool{nil, {}, {44: false, 33: true}} {
  5879. // fmt.Printf(">>>> running mammoth map v106: %v\n", v)
  5880. var v106v1, v106v2 map[uint8]bool
  5881. v106v1 = v
  5882. bs106 := testMarshalErr(v106v1, h, t, "enc-map-v106")
  5883. if v == nil {
  5884. v106v2 = nil
  5885. } else {
  5886. v106v2 = make(map[uint8]bool, len(v))
  5887. } // reset map
  5888. testUnmarshalErr(v106v2, bs106, h, t, "dec-map-v106")
  5889. testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106")
  5890. if v == nil {
  5891. v106v2 = nil
  5892. } else {
  5893. v106v2 = make(map[uint8]bool, len(v))
  5894. } // reset map
  5895. testUnmarshalErr(reflect.ValueOf(v106v2), bs106, h, t, "dec-map-v106-noaddr") // decode into non-addressable map value
  5896. testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-noaddr")
  5897. if v == nil {
  5898. v106v2 = nil
  5899. } else {
  5900. v106v2 = make(map[uint8]bool, len(v))
  5901. } // reset map
  5902. testUnmarshalErr(&v106v2, bs106, h, t, "dec-map-v106-p-len")
  5903. testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-p-len")
  5904. bs106 = testMarshalErr(&v106v1, h, t, "enc-map-v106-p")
  5905. v106v2 = nil
  5906. testUnmarshalErr(&v106v2, bs106, h, t, "dec-map-v106-p-nil")
  5907. testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-p-nil")
  5908. // ...
  5909. if v == nil {
  5910. v106v2 = nil
  5911. } else {
  5912. v106v2 = make(map[uint8]bool, len(v))
  5913. } // reset map
  5914. var v106v3, v106v4 typMapMapUint8Bool
  5915. v106v3 = typMapMapUint8Bool(v106v1)
  5916. v106v4 = typMapMapUint8Bool(v106v2)
  5917. bs106 = testMarshalErr(v106v3, h, t, "enc-map-v106-custom")
  5918. testUnmarshalErr(v106v4, bs106, h, t, "dec-map-v106-p-len")
  5919. testDeepEqualErr(v106v3, v106v4, t, "equal-map-v106-p-len")
  5920. }
  5921. for _, v := range []map[uint16]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  5922. // fmt.Printf(">>>> running mammoth map v109: %v\n", v)
  5923. var v109v1, v109v2 map[uint16]interface{}
  5924. v109v1 = v
  5925. bs109 := testMarshalErr(v109v1, h, t, "enc-map-v109")
  5926. if v == nil {
  5927. v109v2 = nil
  5928. } else {
  5929. v109v2 = make(map[uint16]interface{}, len(v))
  5930. } // reset map
  5931. testUnmarshalErr(v109v2, bs109, h, t, "dec-map-v109")
  5932. testDeepEqualErr(v109v1, v109v2, t, "equal-map-v109")
  5933. if v == nil {
  5934. v109v2 = nil
  5935. } else {
  5936. v109v2 = make(map[uint16]interface{}, len(v))
  5937. } // reset map
  5938. testUnmarshalErr(reflect.ValueOf(v109v2), bs109, h, t, "dec-map-v109-noaddr") // decode into non-addressable map value
  5939. testDeepEqualErr(v109v1, v109v2, t, "equal-map-v109-noaddr")
  5940. if v == nil {
  5941. v109v2 = nil
  5942. } else {
  5943. v109v2 = make(map[uint16]interface{}, len(v))
  5944. } // reset map
  5945. testUnmarshalErr(&v109v2, bs109, h, t, "dec-map-v109-p-len")
  5946. testDeepEqualErr(v109v1, v109v2, t, "equal-map-v109-p-len")
  5947. bs109 = testMarshalErr(&v109v1, h, t, "enc-map-v109-p")
  5948. v109v2 = nil
  5949. testUnmarshalErr(&v109v2, bs109, h, t, "dec-map-v109-p-nil")
  5950. testDeepEqualErr(v109v1, v109v2, t, "equal-map-v109-p-nil")
  5951. // ...
  5952. if v == nil {
  5953. v109v2 = nil
  5954. } else {
  5955. v109v2 = make(map[uint16]interface{}, len(v))
  5956. } // reset map
  5957. var v109v3, v109v4 typMapMapUint16Intf
  5958. v109v3 = typMapMapUint16Intf(v109v1)
  5959. v109v4 = typMapMapUint16Intf(v109v2)
  5960. bs109 = testMarshalErr(v109v3, h, t, "enc-map-v109-custom")
  5961. testUnmarshalErr(v109v4, bs109, h, t, "dec-map-v109-p-len")
  5962. testDeepEqualErr(v109v3, v109v4, t, "equal-map-v109-p-len")
  5963. }
  5964. for _, v := range []map[uint16]string{nil, {}, {44: "", 33: "some-string-2"}} {
  5965. // fmt.Printf(">>>> running mammoth map v110: %v\n", v)
  5966. var v110v1, v110v2 map[uint16]string
  5967. v110v1 = v
  5968. bs110 := testMarshalErr(v110v1, h, t, "enc-map-v110")
  5969. if v == nil {
  5970. v110v2 = nil
  5971. } else {
  5972. v110v2 = make(map[uint16]string, len(v))
  5973. } // reset map
  5974. testUnmarshalErr(v110v2, bs110, h, t, "dec-map-v110")
  5975. testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110")
  5976. if v == nil {
  5977. v110v2 = nil
  5978. } else {
  5979. v110v2 = make(map[uint16]string, len(v))
  5980. } // reset map
  5981. testUnmarshalErr(reflect.ValueOf(v110v2), bs110, h, t, "dec-map-v110-noaddr") // decode into non-addressable map value
  5982. testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-noaddr")
  5983. if v == nil {
  5984. v110v2 = nil
  5985. } else {
  5986. v110v2 = make(map[uint16]string, len(v))
  5987. } // reset map
  5988. testUnmarshalErr(&v110v2, bs110, h, t, "dec-map-v110-p-len")
  5989. testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-p-len")
  5990. bs110 = testMarshalErr(&v110v1, h, t, "enc-map-v110-p")
  5991. v110v2 = nil
  5992. testUnmarshalErr(&v110v2, bs110, h, t, "dec-map-v110-p-nil")
  5993. testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-p-nil")
  5994. // ...
  5995. if v == nil {
  5996. v110v2 = nil
  5997. } else {
  5998. v110v2 = make(map[uint16]string, len(v))
  5999. } // reset map
  6000. var v110v3, v110v4 typMapMapUint16String
  6001. v110v3 = typMapMapUint16String(v110v1)
  6002. v110v4 = typMapMapUint16String(v110v2)
  6003. bs110 = testMarshalErr(v110v3, h, t, "enc-map-v110-custom")
  6004. testUnmarshalErr(v110v4, bs110, h, t, "dec-map-v110-p-len")
  6005. testDeepEqualErr(v110v3, v110v4, t, "equal-map-v110-p-len")
  6006. }
  6007. for _, v := range []map[uint16]uint{nil, {}, {44: 0, 33: 44}} {
  6008. // fmt.Printf(">>>> running mammoth map v111: %v\n", v)
  6009. var v111v1, v111v2 map[uint16]uint
  6010. v111v1 = v
  6011. bs111 := testMarshalErr(v111v1, h, t, "enc-map-v111")
  6012. if v == nil {
  6013. v111v2 = nil
  6014. } else {
  6015. v111v2 = make(map[uint16]uint, len(v))
  6016. } // reset map
  6017. testUnmarshalErr(v111v2, bs111, h, t, "dec-map-v111")
  6018. testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111")
  6019. if v == nil {
  6020. v111v2 = nil
  6021. } else {
  6022. v111v2 = make(map[uint16]uint, len(v))
  6023. } // reset map
  6024. testUnmarshalErr(reflect.ValueOf(v111v2), bs111, h, t, "dec-map-v111-noaddr") // decode into non-addressable map value
  6025. testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-noaddr")
  6026. if v == nil {
  6027. v111v2 = nil
  6028. } else {
  6029. v111v2 = make(map[uint16]uint, len(v))
  6030. } // reset map
  6031. testUnmarshalErr(&v111v2, bs111, h, t, "dec-map-v111-p-len")
  6032. testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-p-len")
  6033. bs111 = testMarshalErr(&v111v1, h, t, "enc-map-v111-p")
  6034. v111v2 = nil
  6035. testUnmarshalErr(&v111v2, bs111, h, t, "dec-map-v111-p-nil")
  6036. testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-p-nil")
  6037. // ...
  6038. if v == nil {
  6039. v111v2 = nil
  6040. } else {
  6041. v111v2 = make(map[uint16]uint, len(v))
  6042. } // reset map
  6043. var v111v3, v111v4 typMapMapUint16Uint
  6044. v111v3 = typMapMapUint16Uint(v111v1)
  6045. v111v4 = typMapMapUint16Uint(v111v2)
  6046. bs111 = testMarshalErr(v111v3, h, t, "enc-map-v111-custom")
  6047. testUnmarshalErr(v111v4, bs111, h, t, "dec-map-v111-p-len")
  6048. testDeepEqualErr(v111v3, v111v4, t, "equal-map-v111-p-len")
  6049. }
  6050. for _, v := range []map[uint16]uint8{nil, {}, {33: 0, 44: 33}} {
  6051. // fmt.Printf(">>>> running mammoth map v112: %v\n", v)
  6052. var v112v1, v112v2 map[uint16]uint8
  6053. v112v1 = v
  6054. bs112 := testMarshalErr(v112v1, h, t, "enc-map-v112")
  6055. if v == nil {
  6056. v112v2 = nil
  6057. } else {
  6058. v112v2 = make(map[uint16]uint8, len(v))
  6059. } // reset map
  6060. testUnmarshalErr(v112v2, bs112, h, t, "dec-map-v112")
  6061. testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112")
  6062. if v == nil {
  6063. v112v2 = nil
  6064. } else {
  6065. v112v2 = make(map[uint16]uint8, len(v))
  6066. } // reset map
  6067. testUnmarshalErr(reflect.ValueOf(v112v2), bs112, h, t, "dec-map-v112-noaddr") // decode into non-addressable map value
  6068. testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-noaddr")
  6069. if v == nil {
  6070. v112v2 = nil
  6071. } else {
  6072. v112v2 = make(map[uint16]uint8, len(v))
  6073. } // reset map
  6074. testUnmarshalErr(&v112v2, bs112, h, t, "dec-map-v112-p-len")
  6075. testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-p-len")
  6076. bs112 = testMarshalErr(&v112v1, h, t, "enc-map-v112-p")
  6077. v112v2 = nil
  6078. testUnmarshalErr(&v112v2, bs112, h, t, "dec-map-v112-p-nil")
  6079. testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-p-nil")
  6080. // ...
  6081. if v == nil {
  6082. v112v2 = nil
  6083. } else {
  6084. v112v2 = make(map[uint16]uint8, len(v))
  6085. } // reset map
  6086. var v112v3, v112v4 typMapMapUint16Uint8
  6087. v112v3 = typMapMapUint16Uint8(v112v1)
  6088. v112v4 = typMapMapUint16Uint8(v112v2)
  6089. bs112 = testMarshalErr(v112v3, h, t, "enc-map-v112-custom")
  6090. testUnmarshalErr(v112v4, bs112, h, t, "dec-map-v112-p-len")
  6091. testDeepEqualErr(v112v3, v112v4, t, "equal-map-v112-p-len")
  6092. }
  6093. for _, v := range []map[uint16]uint16{nil, {}, {44: 0, 33: 44}} {
  6094. // fmt.Printf(">>>> running mammoth map v113: %v\n", v)
  6095. var v113v1, v113v2 map[uint16]uint16
  6096. v113v1 = v
  6097. bs113 := testMarshalErr(v113v1, h, t, "enc-map-v113")
  6098. if v == nil {
  6099. v113v2 = nil
  6100. } else {
  6101. v113v2 = make(map[uint16]uint16, len(v))
  6102. } // reset map
  6103. testUnmarshalErr(v113v2, bs113, h, t, "dec-map-v113")
  6104. testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113")
  6105. if v == nil {
  6106. v113v2 = nil
  6107. } else {
  6108. v113v2 = make(map[uint16]uint16, len(v))
  6109. } // reset map
  6110. testUnmarshalErr(reflect.ValueOf(v113v2), bs113, h, t, "dec-map-v113-noaddr") // decode into non-addressable map value
  6111. testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-noaddr")
  6112. if v == nil {
  6113. v113v2 = nil
  6114. } else {
  6115. v113v2 = make(map[uint16]uint16, len(v))
  6116. } // reset map
  6117. testUnmarshalErr(&v113v2, bs113, h, t, "dec-map-v113-p-len")
  6118. testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-p-len")
  6119. bs113 = testMarshalErr(&v113v1, h, t, "enc-map-v113-p")
  6120. v113v2 = nil
  6121. testUnmarshalErr(&v113v2, bs113, h, t, "dec-map-v113-p-nil")
  6122. testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-p-nil")
  6123. // ...
  6124. if v == nil {
  6125. v113v2 = nil
  6126. } else {
  6127. v113v2 = make(map[uint16]uint16, len(v))
  6128. } // reset map
  6129. var v113v3, v113v4 typMapMapUint16Uint16
  6130. v113v3 = typMapMapUint16Uint16(v113v1)
  6131. v113v4 = typMapMapUint16Uint16(v113v2)
  6132. bs113 = testMarshalErr(v113v3, h, t, "enc-map-v113-custom")
  6133. testUnmarshalErr(v113v4, bs113, h, t, "dec-map-v113-p-len")
  6134. testDeepEqualErr(v113v3, v113v4, t, "equal-map-v113-p-len")
  6135. }
  6136. for _, v := range []map[uint16]uint32{nil, {}, {33: 0, 44: 33}} {
  6137. // fmt.Printf(">>>> running mammoth map v114: %v\n", v)
  6138. var v114v1, v114v2 map[uint16]uint32
  6139. v114v1 = v
  6140. bs114 := testMarshalErr(v114v1, h, t, "enc-map-v114")
  6141. if v == nil {
  6142. v114v2 = nil
  6143. } else {
  6144. v114v2 = make(map[uint16]uint32, len(v))
  6145. } // reset map
  6146. testUnmarshalErr(v114v2, bs114, h, t, "dec-map-v114")
  6147. testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114")
  6148. if v == nil {
  6149. v114v2 = nil
  6150. } else {
  6151. v114v2 = make(map[uint16]uint32, len(v))
  6152. } // reset map
  6153. testUnmarshalErr(reflect.ValueOf(v114v2), bs114, h, t, "dec-map-v114-noaddr") // decode into non-addressable map value
  6154. testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-noaddr")
  6155. if v == nil {
  6156. v114v2 = nil
  6157. } else {
  6158. v114v2 = make(map[uint16]uint32, len(v))
  6159. } // reset map
  6160. testUnmarshalErr(&v114v2, bs114, h, t, "dec-map-v114-p-len")
  6161. testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-p-len")
  6162. bs114 = testMarshalErr(&v114v1, h, t, "enc-map-v114-p")
  6163. v114v2 = nil
  6164. testUnmarshalErr(&v114v2, bs114, h, t, "dec-map-v114-p-nil")
  6165. testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-p-nil")
  6166. // ...
  6167. if v == nil {
  6168. v114v2 = nil
  6169. } else {
  6170. v114v2 = make(map[uint16]uint32, len(v))
  6171. } // reset map
  6172. var v114v3, v114v4 typMapMapUint16Uint32
  6173. v114v3 = typMapMapUint16Uint32(v114v1)
  6174. v114v4 = typMapMapUint16Uint32(v114v2)
  6175. bs114 = testMarshalErr(v114v3, h, t, "enc-map-v114-custom")
  6176. testUnmarshalErr(v114v4, bs114, h, t, "dec-map-v114-p-len")
  6177. testDeepEqualErr(v114v3, v114v4, t, "equal-map-v114-p-len")
  6178. }
  6179. for _, v := range []map[uint16]uint64{nil, {}, {44: 0, 33: 44}} {
  6180. // fmt.Printf(">>>> running mammoth map v115: %v\n", v)
  6181. var v115v1, v115v2 map[uint16]uint64
  6182. v115v1 = v
  6183. bs115 := testMarshalErr(v115v1, h, t, "enc-map-v115")
  6184. if v == nil {
  6185. v115v2 = nil
  6186. } else {
  6187. v115v2 = make(map[uint16]uint64, len(v))
  6188. } // reset map
  6189. testUnmarshalErr(v115v2, bs115, h, t, "dec-map-v115")
  6190. testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115")
  6191. if v == nil {
  6192. v115v2 = nil
  6193. } else {
  6194. v115v2 = make(map[uint16]uint64, len(v))
  6195. } // reset map
  6196. testUnmarshalErr(reflect.ValueOf(v115v2), bs115, h, t, "dec-map-v115-noaddr") // decode into non-addressable map value
  6197. testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-noaddr")
  6198. if v == nil {
  6199. v115v2 = nil
  6200. } else {
  6201. v115v2 = make(map[uint16]uint64, len(v))
  6202. } // reset map
  6203. testUnmarshalErr(&v115v2, bs115, h, t, "dec-map-v115-p-len")
  6204. testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-p-len")
  6205. bs115 = testMarshalErr(&v115v1, h, t, "enc-map-v115-p")
  6206. v115v2 = nil
  6207. testUnmarshalErr(&v115v2, bs115, h, t, "dec-map-v115-p-nil")
  6208. testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-p-nil")
  6209. // ...
  6210. if v == nil {
  6211. v115v2 = nil
  6212. } else {
  6213. v115v2 = make(map[uint16]uint64, len(v))
  6214. } // reset map
  6215. var v115v3, v115v4 typMapMapUint16Uint64
  6216. v115v3 = typMapMapUint16Uint64(v115v1)
  6217. v115v4 = typMapMapUint16Uint64(v115v2)
  6218. bs115 = testMarshalErr(v115v3, h, t, "enc-map-v115-custom")
  6219. testUnmarshalErr(v115v4, bs115, h, t, "dec-map-v115-p-len")
  6220. testDeepEqualErr(v115v3, v115v4, t, "equal-map-v115-p-len")
  6221. }
  6222. for _, v := range []map[uint16]uintptr{nil, {}, {33: 0, 44: 33}} {
  6223. // fmt.Printf(">>>> running mammoth map v116: %v\n", v)
  6224. var v116v1, v116v2 map[uint16]uintptr
  6225. v116v1 = v
  6226. bs116 := testMarshalErr(v116v1, h, t, "enc-map-v116")
  6227. if v == nil {
  6228. v116v2 = nil
  6229. } else {
  6230. v116v2 = make(map[uint16]uintptr, len(v))
  6231. } // reset map
  6232. testUnmarshalErr(v116v2, bs116, h, t, "dec-map-v116")
  6233. testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116")
  6234. if v == nil {
  6235. v116v2 = nil
  6236. } else {
  6237. v116v2 = make(map[uint16]uintptr, len(v))
  6238. } // reset map
  6239. testUnmarshalErr(reflect.ValueOf(v116v2), bs116, h, t, "dec-map-v116-noaddr") // decode into non-addressable map value
  6240. testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-noaddr")
  6241. if v == nil {
  6242. v116v2 = nil
  6243. } else {
  6244. v116v2 = make(map[uint16]uintptr, len(v))
  6245. } // reset map
  6246. testUnmarshalErr(&v116v2, bs116, h, t, "dec-map-v116-p-len")
  6247. testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-p-len")
  6248. bs116 = testMarshalErr(&v116v1, h, t, "enc-map-v116-p")
  6249. v116v2 = nil
  6250. testUnmarshalErr(&v116v2, bs116, h, t, "dec-map-v116-p-nil")
  6251. testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-p-nil")
  6252. // ...
  6253. if v == nil {
  6254. v116v2 = nil
  6255. } else {
  6256. v116v2 = make(map[uint16]uintptr, len(v))
  6257. } // reset map
  6258. var v116v3, v116v4 typMapMapUint16Uintptr
  6259. v116v3 = typMapMapUint16Uintptr(v116v1)
  6260. v116v4 = typMapMapUint16Uintptr(v116v2)
  6261. bs116 = testMarshalErr(v116v3, h, t, "enc-map-v116-custom")
  6262. testUnmarshalErr(v116v4, bs116, h, t, "dec-map-v116-p-len")
  6263. testDeepEqualErr(v116v3, v116v4, t, "equal-map-v116-p-len")
  6264. }
  6265. for _, v := range []map[uint16]int{nil, {}, {44: 0, 33: 44}} {
  6266. // fmt.Printf(">>>> running mammoth map v117: %v\n", v)
  6267. var v117v1, v117v2 map[uint16]int
  6268. v117v1 = v
  6269. bs117 := testMarshalErr(v117v1, h, t, "enc-map-v117")
  6270. if v == nil {
  6271. v117v2 = nil
  6272. } else {
  6273. v117v2 = make(map[uint16]int, len(v))
  6274. } // reset map
  6275. testUnmarshalErr(v117v2, bs117, h, t, "dec-map-v117")
  6276. testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117")
  6277. if v == nil {
  6278. v117v2 = nil
  6279. } else {
  6280. v117v2 = make(map[uint16]int, len(v))
  6281. } // reset map
  6282. testUnmarshalErr(reflect.ValueOf(v117v2), bs117, h, t, "dec-map-v117-noaddr") // decode into non-addressable map value
  6283. testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-noaddr")
  6284. if v == nil {
  6285. v117v2 = nil
  6286. } else {
  6287. v117v2 = make(map[uint16]int, len(v))
  6288. } // reset map
  6289. testUnmarshalErr(&v117v2, bs117, h, t, "dec-map-v117-p-len")
  6290. testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-p-len")
  6291. bs117 = testMarshalErr(&v117v1, h, t, "enc-map-v117-p")
  6292. v117v2 = nil
  6293. testUnmarshalErr(&v117v2, bs117, h, t, "dec-map-v117-p-nil")
  6294. testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-p-nil")
  6295. // ...
  6296. if v == nil {
  6297. v117v2 = nil
  6298. } else {
  6299. v117v2 = make(map[uint16]int, len(v))
  6300. } // reset map
  6301. var v117v3, v117v4 typMapMapUint16Int
  6302. v117v3 = typMapMapUint16Int(v117v1)
  6303. v117v4 = typMapMapUint16Int(v117v2)
  6304. bs117 = testMarshalErr(v117v3, h, t, "enc-map-v117-custom")
  6305. testUnmarshalErr(v117v4, bs117, h, t, "dec-map-v117-p-len")
  6306. testDeepEqualErr(v117v3, v117v4, t, "equal-map-v117-p-len")
  6307. }
  6308. for _, v := range []map[uint16]int8{nil, {}, {33: 0, 44: 33}} {
  6309. // fmt.Printf(">>>> running mammoth map v118: %v\n", v)
  6310. var v118v1, v118v2 map[uint16]int8
  6311. v118v1 = v
  6312. bs118 := testMarshalErr(v118v1, h, t, "enc-map-v118")
  6313. if v == nil {
  6314. v118v2 = nil
  6315. } else {
  6316. v118v2 = make(map[uint16]int8, len(v))
  6317. } // reset map
  6318. testUnmarshalErr(v118v2, bs118, h, t, "dec-map-v118")
  6319. testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118")
  6320. if v == nil {
  6321. v118v2 = nil
  6322. } else {
  6323. v118v2 = make(map[uint16]int8, len(v))
  6324. } // reset map
  6325. testUnmarshalErr(reflect.ValueOf(v118v2), bs118, h, t, "dec-map-v118-noaddr") // decode into non-addressable map value
  6326. testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-noaddr")
  6327. if v == nil {
  6328. v118v2 = nil
  6329. } else {
  6330. v118v2 = make(map[uint16]int8, len(v))
  6331. } // reset map
  6332. testUnmarshalErr(&v118v2, bs118, h, t, "dec-map-v118-p-len")
  6333. testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-p-len")
  6334. bs118 = testMarshalErr(&v118v1, h, t, "enc-map-v118-p")
  6335. v118v2 = nil
  6336. testUnmarshalErr(&v118v2, bs118, h, t, "dec-map-v118-p-nil")
  6337. testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-p-nil")
  6338. // ...
  6339. if v == nil {
  6340. v118v2 = nil
  6341. } else {
  6342. v118v2 = make(map[uint16]int8, len(v))
  6343. } // reset map
  6344. var v118v3, v118v4 typMapMapUint16Int8
  6345. v118v3 = typMapMapUint16Int8(v118v1)
  6346. v118v4 = typMapMapUint16Int8(v118v2)
  6347. bs118 = testMarshalErr(v118v3, h, t, "enc-map-v118-custom")
  6348. testUnmarshalErr(v118v4, bs118, h, t, "dec-map-v118-p-len")
  6349. testDeepEqualErr(v118v3, v118v4, t, "equal-map-v118-p-len")
  6350. }
  6351. for _, v := range []map[uint16]int16{nil, {}, {44: 0, 33: 44}} {
  6352. // fmt.Printf(">>>> running mammoth map v119: %v\n", v)
  6353. var v119v1, v119v2 map[uint16]int16
  6354. v119v1 = v
  6355. bs119 := testMarshalErr(v119v1, h, t, "enc-map-v119")
  6356. if v == nil {
  6357. v119v2 = nil
  6358. } else {
  6359. v119v2 = make(map[uint16]int16, len(v))
  6360. } // reset map
  6361. testUnmarshalErr(v119v2, bs119, h, t, "dec-map-v119")
  6362. testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119")
  6363. if v == nil {
  6364. v119v2 = nil
  6365. } else {
  6366. v119v2 = make(map[uint16]int16, len(v))
  6367. } // reset map
  6368. testUnmarshalErr(reflect.ValueOf(v119v2), bs119, h, t, "dec-map-v119-noaddr") // decode into non-addressable map value
  6369. testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-noaddr")
  6370. if v == nil {
  6371. v119v2 = nil
  6372. } else {
  6373. v119v2 = make(map[uint16]int16, len(v))
  6374. } // reset map
  6375. testUnmarshalErr(&v119v2, bs119, h, t, "dec-map-v119-p-len")
  6376. testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-p-len")
  6377. bs119 = testMarshalErr(&v119v1, h, t, "enc-map-v119-p")
  6378. v119v2 = nil
  6379. testUnmarshalErr(&v119v2, bs119, h, t, "dec-map-v119-p-nil")
  6380. testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-p-nil")
  6381. // ...
  6382. if v == nil {
  6383. v119v2 = nil
  6384. } else {
  6385. v119v2 = make(map[uint16]int16, len(v))
  6386. } // reset map
  6387. var v119v3, v119v4 typMapMapUint16Int16
  6388. v119v3 = typMapMapUint16Int16(v119v1)
  6389. v119v4 = typMapMapUint16Int16(v119v2)
  6390. bs119 = testMarshalErr(v119v3, h, t, "enc-map-v119-custom")
  6391. testUnmarshalErr(v119v4, bs119, h, t, "dec-map-v119-p-len")
  6392. testDeepEqualErr(v119v3, v119v4, t, "equal-map-v119-p-len")
  6393. }
  6394. for _, v := range []map[uint16]int32{nil, {}, {33: 0, 44: 33}} {
  6395. // fmt.Printf(">>>> running mammoth map v120: %v\n", v)
  6396. var v120v1, v120v2 map[uint16]int32
  6397. v120v1 = v
  6398. bs120 := testMarshalErr(v120v1, h, t, "enc-map-v120")
  6399. if v == nil {
  6400. v120v2 = nil
  6401. } else {
  6402. v120v2 = make(map[uint16]int32, len(v))
  6403. } // reset map
  6404. testUnmarshalErr(v120v2, bs120, h, t, "dec-map-v120")
  6405. testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120")
  6406. if v == nil {
  6407. v120v2 = nil
  6408. } else {
  6409. v120v2 = make(map[uint16]int32, len(v))
  6410. } // reset map
  6411. testUnmarshalErr(reflect.ValueOf(v120v2), bs120, h, t, "dec-map-v120-noaddr") // decode into non-addressable map value
  6412. testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-noaddr")
  6413. if v == nil {
  6414. v120v2 = nil
  6415. } else {
  6416. v120v2 = make(map[uint16]int32, len(v))
  6417. } // reset map
  6418. testUnmarshalErr(&v120v2, bs120, h, t, "dec-map-v120-p-len")
  6419. testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-p-len")
  6420. bs120 = testMarshalErr(&v120v1, h, t, "enc-map-v120-p")
  6421. v120v2 = nil
  6422. testUnmarshalErr(&v120v2, bs120, h, t, "dec-map-v120-p-nil")
  6423. testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-p-nil")
  6424. // ...
  6425. if v == nil {
  6426. v120v2 = nil
  6427. } else {
  6428. v120v2 = make(map[uint16]int32, len(v))
  6429. } // reset map
  6430. var v120v3, v120v4 typMapMapUint16Int32
  6431. v120v3 = typMapMapUint16Int32(v120v1)
  6432. v120v4 = typMapMapUint16Int32(v120v2)
  6433. bs120 = testMarshalErr(v120v3, h, t, "enc-map-v120-custom")
  6434. testUnmarshalErr(v120v4, bs120, h, t, "dec-map-v120-p-len")
  6435. testDeepEqualErr(v120v3, v120v4, t, "equal-map-v120-p-len")
  6436. }
  6437. for _, v := range []map[uint16]int64{nil, {}, {44: 0, 33: 44}} {
  6438. // fmt.Printf(">>>> running mammoth map v121: %v\n", v)
  6439. var v121v1, v121v2 map[uint16]int64
  6440. v121v1 = v
  6441. bs121 := testMarshalErr(v121v1, h, t, "enc-map-v121")
  6442. if v == nil {
  6443. v121v2 = nil
  6444. } else {
  6445. v121v2 = make(map[uint16]int64, len(v))
  6446. } // reset map
  6447. testUnmarshalErr(v121v2, bs121, h, t, "dec-map-v121")
  6448. testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121")
  6449. if v == nil {
  6450. v121v2 = nil
  6451. } else {
  6452. v121v2 = make(map[uint16]int64, len(v))
  6453. } // reset map
  6454. testUnmarshalErr(reflect.ValueOf(v121v2), bs121, h, t, "dec-map-v121-noaddr") // decode into non-addressable map value
  6455. testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-noaddr")
  6456. if v == nil {
  6457. v121v2 = nil
  6458. } else {
  6459. v121v2 = make(map[uint16]int64, len(v))
  6460. } // reset map
  6461. testUnmarshalErr(&v121v2, bs121, h, t, "dec-map-v121-p-len")
  6462. testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-p-len")
  6463. bs121 = testMarshalErr(&v121v1, h, t, "enc-map-v121-p")
  6464. v121v2 = nil
  6465. testUnmarshalErr(&v121v2, bs121, h, t, "dec-map-v121-p-nil")
  6466. testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-p-nil")
  6467. // ...
  6468. if v == nil {
  6469. v121v2 = nil
  6470. } else {
  6471. v121v2 = make(map[uint16]int64, len(v))
  6472. } // reset map
  6473. var v121v3, v121v4 typMapMapUint16Int64
  6474. v121v3 = typMapMapUint16Int64(v121v1)
  6475. v121v4 = typMapMapUint16Int64(v121v2)
  6476. bs121 = testMarshalErr(v121v3, h, t, "enc-map-v121-custom")
  6477. testUnmarshalErr(v121v4, bs121, h, t, "dec-map-v121-p-len")
  6478. testDeepEqualErr(v121v3, v121v4, t, "equal-map-v121-p-len")
  6479. }
  6480. for _, v := range []map[uint16]float32{nil, {}, {33: 0, 44: 22.2}} {
  6481. // fmt.Printf(">>>> running mammoth map v122: %v\n", v)
  6482. var v122v1, v122v2 map[uint16]float32
  6483. v122v1 = v
  6484. bs122 := testMarshalErr(v122v1, h, t, "enc-map-v122")
  6485. if v == nil {
  6486. v122v2 = nil
  6487. } else {
  6488. v122v2 = make(map[uint16]float32, len(v))
  6489. } // reset map
  6490. testUnmarshalErr(v122v2, bs122, h, t, "dec-map-v122")
  6491. testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122")
  6492. if v == nil {
  6493. v122v2 = nil
  6494. } else {
  6495. v122v2 = make(map[uint16]float32, len(v))
  6496. } // reset map
  6497. testUnmarshalErr(reflect.ValueOf(v122v2), bs122, h, t, "dec-map-v122-noaddr") // decode into non-addressable map value
  6498. testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-noaddr")
  6499. if v == nil {
  6500. v122v2 = nil
  6501. } else {
  6502. v122v2 = make(map[uint16]float32, len(v))
  6503. } // reset map
  6504. testUnmarshalErr(&v122v2, bs122, h, t, "dec-map-v122-p-len")
  6505. testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-p-len")
  6506. bs122 = testMarshalErr(&v122v1, h, t, "enc-map-v122-p")
  6507. v122v2 = nil
  6508. testUnmarshalErr(&v122v2, bs122, h, t, "dec-map-v122-p-nil")
  6509. testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-p-nil")
  6510. // ...
  6511. if v == nil {
  6512. v122v2 = nil
  6513. } else {
  6514. v122v2 = make(map[uint16]float32, len(v))
  6515. } // reset map
  6516. var v122v3, v122v4 typMapMapUint16Float32
  6517. v122v3 = typMapMapUint16Float32(v122v1)
  6518. v122v4 = typMapMapUint16Float32(v122v2)
  6519. bs122 = testMarshalErr(v122v3, h, t, "enc-map-v122-custom")
  6520. testUnmarshalErr(v122v4, bs122, h, t, "dec-map-v122-p-len")
  6521. testDeepEqualErr(v122v3, v122v4, t, "equal-map-v122-p-len")
  6522. }
  6523. for _, v := range []map[uint16]float64{nil, {}, {33: 0, 44: 11.1}} {
  6524. // fmt.Printf(">>>> running mammoth map v123: %v\n", v)
  6525. var v123v1, v123v2 map[uint16]float64
  6526. v123v1 = v
  6527. bs123 := testMarshalErr(v123v1, h, t, "enc-map-v123")
  6528. if v == nil {
  6529. v123v2 = nil
  6530. } else {
  6531. v123v2 = make(map[uint16]float64, len(v))
  6532. } // reset map
  6533. testUnmarshalErr(v123v2, bs123, h, t, "dec-map-v123")
  6534. testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123")
  6535. if v == nil {
  6536. v123v2 = nil
  6537. } else {
  6538. v123v2 = make(map[uint16]float64, len(v))
  6539. } // reset map
  6540. testUnmarshalErr(reflect.ValueOf(v123v2), bs123, h, t, "dec-map-v123-noaddr") // decode into non-addressable map value
  6541. testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-noaddr")
  6542. if v == nil {
  6543. v123v2 = nil
  6544. } else {
  6545. v123v2 = make(map[uint16]float64, len(v))
  6546. } // reset map
  6547. testUnmarshalErr(&v123v2, bs123, h, t, "dec-map-v123-p-len")
  6548. testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-p-len")
  6549. bs123 = testMarshalErr(&v123v1, h, t, "enc-map-v123-p")
  6550. v123v2 = nil
  6551. testUnmarshalErr(&v123v2, bs123, h, t, "dec-map-v123-p-nil")
  6552. testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-p-nil")
  6553. // ...
  6554. if v == nil {
  6555. v123v2 = nil
  6556. } else {
  6557. v123v2 = make(map[uint16]float64, len(v))
  6558. } // reset map
  6559. var v123v3, v123v4 typMapMapUint16Float64
  6560. v123v3 = typMapMapUint16Float64(v123v1)
  6561. v123v4 = typMapMapUint16Float64(v123v2)
  6562. bs123 = testMarshalErr(v123v3, h, t, "enc-map-v123-custom")
  6563. testUnmarshalErr(v123v4, bs123, h, t, "dec-map-v123-p-len")
  6564. testDeepEqualErr(v123v3, v123v4, t, "equal-map-v123-p-len")
  6565. }
  6566. for _, v := range []map[uint16]bool{nil, {}, {33: false, 44: true}} {
  6567. // fmt.Printf(">>>> running mammoth map v124: %v\n", v)
  6568. var v124v1, v124v2 map[uint16]bool
  6569. v124v1 = v
  6570. bs124 := testMarshalErr(v124v1, h, t, "enc-map-v124")
  6571. if v == nil {
  6572. v124v2 = nil
  6573. } else {
  6574. v124v2 = make(map[uint16]bool, len(v))
  6575. } // reset map
  6576. testUnmarshalErr(v124v2, bs124, h, t, "dec-map-v124")
  6577. testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124")
  6578. if v == nil {
  6579. v124v2 = nil
  6580. } else {
  6581. v124v2 = make(map[uint16]bool, len(v))
  6582. } // reset map
  6583. testUnmarshalErr(reflect.ValueOf(v124v2), bs124, h, t, "dec-map-v124-noaddr") // decode into non-addressable map value
  6584. testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-noaddr")
  6585. if v == nil {
  6586. v124v2 = nil
  6587. } else {
  6588. v124v2 = make(map[uint16]bool, len(v))
  6589. } // reset map
  6590. testUnmarshalErr(&v124v2, bs124, h, t, "dec-map-v124-p-len")
  6591. testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-p-len")
  6592. bs124 = testMarshalErr(&v124v1, h, t, "enc-map-v124-p")
  6593. v124v2 = nil
  6594. testUnmarshalErr(&v124v2, bs124, h, t, "dec-map-v124-p-nil")
  6595. testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-p-nil")
  6596. // ...
  6597. if v == nil {
  6598. v124v2 = nil
  6599. } else {
  6600. v124v2 = make(map[uint16]bool, len(v))
  6601. } // reset map
  6602. var v124v3, v124v4 typMapMapUint16Bool
  6603. v124v3 = typMapMapUint16Bool(v124v1)
  6604. v124v4 = typMapMapUint16Bool(v124v2)
  6605. bs124 = testMarshalErr(v124v3, h, t, "enc-map-v124-custom")
  6606. testUnmarshalErr(v124v4, bs124, h, t, "dec-map-v124-p-len")
  6607. testDeepEqualErr(v124v3, v124v4, t, "equal-map-v124-p-len")
  6608. }
  6609. for _, v := range []map[uint32]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  6610. // fmt.Printf(">>>> running mammoth map v127: %v\n", v)
  6611. var v127v1, v127v2 map[uint32]interface{}
  6612. v127v1 = v
  6613. bs127 := testMarshalErr(v127v1, h, t, "enc-map-v127")
  6614. if v == nil {
  6615. v127v2 = nil
  6616. } else {
  6617. v127v2 = make(map[uint32]interface{}, len(v))
  6618. } // reset map
  6619. testUnmarshalErr(v127v2, bs127, h, t, "dec-map-v127")
  6620. testDeepEqualErr(v127v1, v127v2, t, "equal-map-v127")
  6621. if v == nil {
  6622. v127v2 = nil
  6623. } else {
  6624. v127v2 = make(map[uint32]interface{}, len(v))
  6625. } // reset map
  6626. testUnmarshalErr(reflect.ValueOf(v127v2), bs127, h, t, "dec-map-v127-noaddr") // decode into non-addressable map value
  6627. testDeepEqualErr(v127v1, v127v2, t, "equal-map-v127-noaddr")
  6628. if v == nil {
  6629. v127v2 = nil
  6630. } else {
  6631. v127v2 = make(map[uint32]interface{}, len(v))
  6632. } // reset map
  6633. testUnmarshalErr(&v127v2, bs127, h, t, "dec-map-v127-p-len")
  6634. testDeepEqualErr(v127v1, v127v2, t, "equal-map-v127-p-len")
  6635. bs127 = testMarshalErr(&v127v1, h, t, "enc-map-v127-p")
  6636. v127v2 = nil
  6637. testUnmarshalErr(&v127v2, bs127, h, t, "dec-map-v127-p-nil")
  6638. testDeepEqualErr(v127v1, v127v2, t, "equal-map-v127-p-nil")
  6639. // ...
  6640. if v == nil {
  6641. v127v2 = nil
  6642. } else {
  6643. v127v2 = make(map[uint32]interface{}, len(v))
  6644. } // reset map
  6645. var v127v3, v127v4 typMapMapUint32Intf
  6646. v127v3 = typMapMapUint32Intf(v127v1)
  6647. v127v4 = typMapMapUint32Intf(v127v2)
  6648. bs127 = testMarshalErr(v127v3, h, t, "enc-map-v127-custom")
  6649. testUnmarshalErr(v127v4, bs127, h, t, "dec-map-v127-p-len")
  6650. testDeepEqualErr(v127v3, v127v4, t, "equal-map-v127-p-len")
  6651. }
  6652. for _, v := range []map[uint32]string{nil, {}, {33: "", 44: "some-string"}} {
  6653. // fmt.Printf(">>>> running mammoth map v128: %v\n", v)
  6654. var v128v1, v128v2 map[uint32]string
  6655. v128v1 = v
  6656. bs128 := testMarshalErr(v128v1, h, t, "enc-map-v128")
  6657. if v == nil {
  6658. v128v2 = nil
  6659. } else {
  6660. v128v2 = make(map[uint32]string, len(v))
  6661. } // reset map
  6662. testUnmarshalErr(v128v2, bs128, h, t, "dec-map-v128")
  6663. testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128")
  6664. if v == nil {
  6665. v128v2 = nil
  6666. } else {
  6667. v128v2 = make(map[uint32]string, len(v))
  6668. } // reset map
  6669. testUnmarshalErr(reflect.ValueOf(v128v2), bs128, h, t, "dec-map-v128-noaddr") // decode into non-addressable map value
  6670. testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-noaddr")
  6671. if v == nil {
  6672. v128v2 = nil
  6673. } else {
  6674. v128v2 = make(map[uint32]string, len(v))
  6675. } // reset map
  6676. testUnmarshalErr(&v128v2, bs128, h, t, "dec-map-v128-p-len")
  6677. testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-p-len")
  6678. bs128 = testMarshalErr(&v128v1, h, t, "enc-map-v128-p")
  6679. v128v2 = nil
  6680. testUnmarshalErr(&v128v2, bs128, h, t, "dec-map-v128-p-nil")
  6681. testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-p-nil")
  6682. // ...
  6683. if v == nil {
  6684. v128v2 = nil
  6685. } else {
  6686. v128v2 = make(map[uint32]string, len(v))
  6687. } // reset map
  6688. var v128v3, v128v4 typMapMapUint32String
  6689. v128v3 = typMapMapUint32String(v128v1)
  6690. v128v4 = typMapMapUint32String(v128v2)
  6691. bs128 = testMarshalErr(v128v3, h, t, "enc-map-v128-custom")
  6692. testUnmarshalErr(v128v4, bs128, h, t, "dec-map-v128-p-len")
  6693. testDeepEqualErr(v128v3, v128v4, t, "equal-map-v128-p-len")
  6694. }
  6695. for _, v := range []map[uint32]uint{nil, {}, {33: 0, 44: 33}} {
  6696. // fmt.Printf(">>>> running mammoth map v129: %v\n", v)
  6697. var v129v1, v129v2 map[uint32]uint
  6698. v129v1 = v
  6699. bs129 := testMarshalErr(v129v1, h, t, "enc-map-v129")
  6700. if v == nil {
  6701. v129v2 = nil
  6702. } else {
  6703. v129v2 = make(map[uint32]uint, len(v))
  6704. } // reset map
  6705. testUnmarshalErr(v129v2, bs129, h, t, "dec-map-v129")
  6706. testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129")
  6707. if v == nil {
  6708. v129v2 = nil
  6709. } else {
  6710. v129v2 = make(map[uint32]uint, len(v))
  6711. } // reset map
  6712. testUnmarshalErr(reflect.ValueOf(v129v2), bs129, h, t, "dec-map-v129-noaddr") // decode into non-addressable map value
  6713. testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-noaddr")
  6714. if v == nil {
  6715. v129v2 = nil
  6716. } else {
  6717. v129v2 = make(map[uint32]uint, len(v))
  6718. } // reset map
  6719. testUnmarshalErr(&v129v2, bs129, h, t, "dec-map-v129-p-len")
  6720. testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-p-len")
  6721. bs129 = testMarshalErr(&v129v1, h, t, "enc-map-v129-p")
  6722. v129v2 = nil
  6723. testUnmarshalErr(&v129v2, bs129, h, t, "dec-map-v129-p-nil")
  6724. testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-p-nil")
  6725. // ...
  6726. if v == nil {
  6727. v129v2 = nil
  6728. } else {
  6729. v129v2 = make(map[uint32]uint, len(v))
  6730. } // reset map
  6731. var v129v3, v129v4 typMapMapUint32Uint
  6732. v129v3 = typMapMapUint32Uint(v129v1)
  6733. v129v4 = typMapMapUint32Uint(v129v2)
  6734. bs129 = testMarshalErr(v129v3, h, t, "enc-map-v129-custom")
  6735. testUnmarshalErr(v129v4, bs129, h, t, "dec-map-v129-p-len")
  6736. testDeepEqualErr(v129v3, v129v4, t, "equal-map-v129-p-len")
  6737. }
  6738. for _, v := range []map[uint32]uint8{nil, {}, {44: 0, 33: 44}} {
  6739. // fmt.Printf(">>>> running mammoth map v130: %v\n", v)
  6740. var v130v1, v130v2 map[uint32]uint8
  6741. v130v1 = v
  6742. bs130 := testMarshalErr(v130v1, h, t, "enc-map-v130")
  6743. if v == nil {
  6744. v130v2 = nil
  6745. } else {
  6746. v130v2 = make(map[uint32]uint8, len(v))
  6747. } // reset map
  6748. testUnmarshalErr(v130v2, bs130, h, t, "dec-map-v130")
  6749. testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130")
  6750. if v == nil {
  6751. v130v2 = nil
  6752. } else {
  6753. v130v2 = make(map[uint32]uint8, len(v))
  6754. } // reset map
  6755. testUnmarshalErr(reflect.ValueOf(v130v2), bs130, h, t, "dec-map-v130-noaddr") // decode into non-addressable map value
  6756. testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-noaddr")
  6757. if v == nil {
  6758. v130v2 = nil
  6759. } else {
  6760. v130v2 = make(map[uint32]uint8, len(v))
  6761. } // reset map
  6762. testUnmarshalErr(&v130v2, bs130, h, t, "dec-map-v130-p-len")
  6763. testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-p-len")
  6764. bs130 = testMarshalErr(&v130v1, h, t, "enc-map-v130-p")
  6765. v130v2 = nil
  6766. testUnmarshalErr(&v130v2, bs130, h, t, "dec-map-v130-p-nil")
  6767. testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-p-nil")
  6768. // ...
  6769. if v == nil {
  6770. v130v2 = nil
  6771. } else {
  6772. v130v2 = make(map[uint32]uint8, len(v))
  6773. } // reset map
  6774. var v130v3, v130v4 typMapMapUint32Uint8
  6775. v130v3 = typMapMapUint32Uint8(v130v1)
  6776. v130v4 = typMapMapUint32Uint8(v130v2)
  6777. bs130 = testMarshalErr(v130v3, h, t, "enc-map-v130-custom")
  6778. testUnmarshalErr(v130v4, bs130, h, t, "dec-map-v130-p-len")
  6779. testDeepEqualErr(v130v3, v130v4, t, "equal-map-v130-p-len")
  6780. }
  6781. for _, v := range []map[uint32]uint16{nil, {}, {33: 0, 44: 33}} {
  6782. // fmt.Printf(">>>> running mammoth map v131: %v\n", v)
  6783. var v131v1, v131v2 map[uint32]uint16
  6784. v131v1 = v
  6785. bs131 := testMarshalErr(v131v1, h, t, "enc-map-v131")
  6786. if v == nil {
  6787. v131v2 = nil
  6788. } else {
  6789. v131v2 = make(map[uint32]uint16, len(v))
  6790. } // reset map
  6791. testUnmarshalErr(v131v2, bs131, h, t, "dec-map-v131")
  6792. testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131")
  6793. if v == nil {
  6794. v131v2 = nil
  6795. } else {
  6796. v131v2 = make(map[uint32]uint16, len(v))
  6797. } // reset map
  6798. testUnmarshalErr(reflect.ValueOf(v131v2), bs131, h, t, "dec-map-v131-noaddr") // decode into non-addressable map value
  6799. testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-noaddr")
  6800. if v == nil {
  6801. v131v2 = nil
  6802. } else {
  6803. v131v2 = make(map[uint32]uint16, len(v))
  6804. } // reset map
  6805. testUnmarshalErr(&v131v2, bs131, h, t, "dec-map-v131-p-len")
  6806. testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-p-len")
  6807. bs131 = testMarshalErr(&v131v1, h, t, "enc-map-v131-p")
  6808. v131v2 = nil
  6809. testUnmarshalErr(&v131v2, bs131, h, t, "dec-map-v131-p-nil")
  6810. testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-p-nil")
  6811. // ...
  6812. if v == nil {
  6813. v131v2 = nil
  6814. } else {
  6815. v131v2 = make(map[uint32]uint16, len(v))
  6816. } // reset map
  6817. var v131v3, v131v4 typMapMapUint32Uint16
  6818. v131v3 = typMapMapUint32Uint16(v131v1)
  6819. v131v4 = typMapMapUint32Uint16(v131v2)
  6820. bs131 = testMarshalErr(v131v3, h, t, "enc-map-v131-custom")
  6821. testUnmarshalErr(v131v4, bs131, h, t, "dec-map-v131-p-len")
  6822. testDeepEqualErr(v131v3, v131v4, t, "equal-map-v131-p-len")
  6823. }
  6824. for _, v := range []map[uint32]uint32{nil, {}, {44: 0, 33: 44}} {
  6825. // fmt.Printf(">>>> running mammoth map v132: %v\n", v)
  6826. var v132v1, v132v2 map[uint32]uint32
  6827. v132v1 = v
  6828. bs132 := testMarshalErr(v132v1, h, t, "enc-map-v132")
  6829. if v == nil {
  6830. v132v2 = nil
  6831. } else {
  6832. v132v2 = make(map[uint32]uint32, len(v))
  6833. } // reset map
  6834. testUnmarshalErr(v132v2, bs132, h, t, "dec-map-v132")
  6835. testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132")
  6836. if v == nil {
  6837. v132v2 = nil
  6838. } else {
  6839. v132v2 = make(map[uint32]uint32, len(v))
  6840. } // reset map
  6841. testUnmarshalErr(reflect.ValueOf(v132v2), bs132, h, t, "dec-map-v132-noaddr") // decode into non-addressable map value
  6842. testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-noaddr")
  6843. if v == nil {
  6844. v132v2 = nil
  6845. } else {
  6846. v132v2 = make(map[uint32]uint32, len(v))
  6847. } // reset map
  6848. testUnmarshalErr(&v132v2, bs132, h, t, "dec-map-v132-p-len")
  6849. testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-p-len")
  6850. bs132 = testMarshalErr(&v132v1, h, t, "enc-map-v132-p")
  6851. v132v2 = nil
  6852. testUnmarshalErr(&v132v2, bs132, h, t, "dec-map-v132-p-nil")
  6853. testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-p-nil")
  6854. // ...
  6855. if v == nil {
  6856. v132v2 = nil
  6857. } else {
  6858. v132v2 = make(map[uint32]uint32, len(v))
  6859. } // reset map
  6860. var v132v3, v132v4 typMapMapUint32Uint32
  6861. v132v3 = typMapMapUint32Uint32(v132v1)
  6862. v132v4 = typMapMapUint32Uint32(v132v2)
  6863. bs132 = testMarshalErr(v132v3, h, t, "enc-map-v132-custom")
  6864. testUnmarshalErr(v132v4, bs132, h, t, "dec-map-v132-p-len")
  6865. testDeepEqualErr(v132v3, v132v4, t, "equal-map-v132-p-len")
  6866. }
  6867. for _, v := range []map[uint32]uint64{nil, {}, {33: 0, 44: 33}} {
  6868. // fmt.Printf(">>>> running mammoth map v133: %v\n", v)
  6869. var v133v1, v133v2 map[uint32]uint64
  6870. v133v1 = v
  6871. bs133 := testMarshalErr(v133v1, h, t, "enc-map-v133")
  6872. if v == nil {
  6873. v133v2 = nil
  6874. } else {
  6875. v133v2 = make(map[uint32]uint64, len(v))
  6876. } // reset map
  6877. testUnmarshalErr(v133v2, bs133, h, t, "dec-map-v133")
  6878. testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133")
  6879. if v == nil {
  6880. v133v2 = nil
  6881. } else {
  6882. v133v2 = make(map[uint32]uint64, len(v))
  6883. } // reset map
  6884. testUnmarshalErr(reflect.ValueOf(v133v2), bs133, h, t, "dec-map-v133-noaddr") // decode into non-addressable map value
  6885. testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-noaddr")
  6886. if v == nil {
  6887. v133v2 = nil
  6888. } else {
  6889. v133v2 = make(map[uint32]uint64, len(v))
  6890. } // reset map
  6891. testUnmarshalErr(&v133v2, bs133, h, t, "dec-map-v133-p-len")
  6892. testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-p-len")
  6893. bs133 = testMarshalErr(&v133v1, h, t, "enc-map-v133-p")
  6894. v133v2 = nil
  6895. testUnmarshalErr(&v133v2, bs133, h, t, "dec-map-v133-p-nil")
  6896. testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-p-nil")
  6897. // ...
  6898. if v == nil {
  6899. v133v2 = nil
  6900. } else {
  6901. v133v2 = make(map[uint32]uint64, len(v))
  6902. } // reset map
  6903. var v133v3, v133v4 typMapMapUint32Uint64
  6904. v133v3 = typMapMapUint32Uint64(v133v1)
  6905. v133v4 = typMapMapUint32Uint64(v133v2)
  6906. bs133 = testMarshalErr(v133v3, h, t, "enc-map-v133-custom")
  6907. testUnmarshalErr(v133v4, bs133, h, t, "dec-map-v133-p-len")
  6908. testDeepEqualErr(v133v3, v133v4, t, "equal-map-v133-p-len")
  6909. }
  6910. for _, v := range []map[uint32]uintptr{nil, {}, {44: 0, 33: 44}} {
  6911. // fmt.Printf(">>>> running mammoth map v134: %v\n", v)
  6912. var v134v1, v134v2 map[uint32]uintptr
  6913. v134v1 = v
  6914. bs134 := testMarshalErr(v134v1, h, t, "enc-map-v134")
  6915. if v == nil {
  6916. v134v2 = nil
  6917. } else {
  6918. v134v2 = make(map[uint32]uintptr, len(v))
  6919. } // reset map
  6920. testUnmarshalErr(v134v2, bs134, h, t, "dec-map-v134")
  6921. testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134")
  6922. if v == nil {
  6923. v134v2 = nil
  6924. } else {
  6925. v134v2 = make(map[uint32]uintptr, len(v))
  6926. } // reset map
  6927. testUnmarshalErr(reflect.ValueOf(v134v2), bs134, h, t, "dec-map-v134-noaddr") // decode into non-addressable map value
  6928. testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-noaddr")
  6929. if v == nil {
  6930. v134v2 = nil
  6931. } else {
  6932. v134v2 = make(map[uint32]uintptr, len(v))
  6933. } // reset map
  6934. testUnmarshalErr(&v134v2, bs134, h, t, "dec-map-v134-p-len")
  6935. testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-p-len")
  6936. bs134 = testMarshalErr(&v134v1, h, t, "enc-map-v134-p")
  6937. v134v2 = nil
  6938. testUnmarshalErr(&v134v2, bs134, h, t, "dec-map-v134-p-nil")
  6939. testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-p-nil")
  6940. // ...
  6941. if v == nil {
  6942. v134v2 = nil
  6943. } else {
  6944. v134v2 = make(map[uint32]uintptr, len(v))
  6945. } // reset map
  6946. var v134v3, v134v4 typMapMapUint32Uintptr
  6947. v134v3 = typMapMapUint32Uintptr(v134v1)
  6948. v134v4 = typMapMapUint32Uintptr(v134v2)
  6949. bs134 = testMarshalErr(v134v3, h, t, "enc-map-v134-custom")
  6950. testUnmarshalErr(v134v4, bs134, h, t, "dec-map-v134-p-len")
  6951. testDeepEqualErr(v134v3, v134v4, t, "equal-map-v134-p-len")
  6952. }
  6953. for _, v := range []map[uint32]int{nil, {}, {33: 0, 44: 33}} {
  6954. // fmt.Printf(">>>> running mammoth map v135: %v\n", v)
  6955. var v135v1, v135v2 map[uint32]int
  6956. v135v1 = v
  6957. bs135 := testMarshalErr(v135v1, h, t, "enc-map-v135")
  6958. if v == nil {
  6959. v135v2 = nil
  6960. } else {
  6961. v135v2 = make(map[uint32]int, len(v))
  6962. } // reset map
  6963. testUnmarshalErr(v135v2, bs135, h, t, "dec-map-v135")
  6964. testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135")
  6965. if v == nil {
  6966. v135v2 = nil
  6967. } else {
  6968. v135v2 = make(map[uint32]int, len(v))
  6969. } // reset map
  6970. testUnmarshalErr(reflect.ValueOf(v135v2), bs135, h, t, "dec-map-v135-noaddr") // decode into non-addressable map value
  6971. testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-noaddr")
  6972. if v == nil {
  6973. v135v2 = nil
  6974. } else {
  6975. v135v2 = make(map[uint32]int, len(v))
  6976. } // reset map
  6977. testUnmarshalErr(&v135v2, bs135, h, t, "dec-map-v135-p-len")
  6978. testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-p-len")
  6979. bs135 = testMarshalErr(&v135v1, h, t, "enc-map-v135-p")
  6980. v135v2 = nil
  6981. testUnmarshalErr(&v135v2, bs135, h, t, "dec-map-v135-p-nil")
  6982. testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-p-nil")
  6983. // ...
  6984. if v == nil {
  6985. v135v2 = nil
  6986. } else {
  6987. v135v2 = make(map[uint32]int, len(v))
  6988. } // reset map
  6989. var v135v3, v135v4 typMapMapUint32Int
  6990. v135v3 = typMapMapUint32Int(v135v1)
  6991. v135v4 = typMapMapUint32Int(v135v2)
  6992. bs135 = testMarshalErr(v135v3, h, t, "enc-map-v135-custom")
  6993. testUnmarshalErr(v135v4, bs135, h, t, "dec-map-v135-p-len")
  6994. testDeepEqualErr(v135v3, v135v4, t, "equal-map-v135-p-len")
  6995. }
  6996. for _, v := range []map[uint32]int8{nil, {}, {44: 0, 33: 44}} {
  6997. // fmt.Printf(">>>> running mammoth map v136: %v\n", v)
  6998. var v136v1, v136v2 map[uint32]int8
  6999. v136v1 = v
  7000. bs136 := testMarshalErr(v136v1, h, t, "enc-map-v136")
  7001. if v == nil {
  7002. v136v2 = nil
  7003. } else {
  7004. v136v2 = make(map[uint32]int8, len(v))
  7005. } // reset map
  7006. testUnmarshalErr(v136v2, bs136, h, t, "dec-map-v136")
  7007. testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136")
  7008. if v == nil {
  7009. v136v2 = nil
  7010. } else {
  7011. v136v2 = make(map[uint32]int8, len(v))
  7012. } // reset map
  7013. testUnmarshalErr(reflect.ValueOf(v136v2), bs136, h, t, "dec-map-v136-noaddr") // decode into non-addressable map value
  7014. testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-noaddr")
  7015. if v == nil {
  7016. v136v2 = nil
  7017. } else {
  7018. v136v2 = make(map[uint32]int8, len(v))
  7019. } // reset map
  7020. testUnmarshalErr(&v136v2, bs136, h, t, "dec-map-v136-p-len")
  7021. testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-p-len")
  7022. bs136 = testMarshalErr(&v136v1, h, t, "enc-map-v136-p")
  7023. v136v2 = nil
  7024. testUnmarshalErr(&v136v2, bs136, h, t, "dec-map-v136-p-nil")
  7025. testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-p-nil")
  7026. // ...
  7027. if v == nil {
  7028. v136v2 = nil
  7029. } else {
  7030. v136v2 = make(map[uint32]int8, len(v))
  7031. } // reset map
  7032. var v136v3, v136v4 typMapMapUint32Int8
  7033. v136v3 = typMapMapUint32Int8(v136v1)
  7034. v136v4 = typMapMapUint32Int8(v136v2)
  7035. bs136 = testMarshalErr(v136v3, h, t, "enc-map-v136-custom")
  7036. testUnmarshalErr(v136v4, bs136, h, t, "dec-map-v136-p-len")
  7037. testDeepEqualErr(v136v3, v136v4, t, "equal-map-v136-p-len")
  7038. }
  7039. for _, v := range []map[uint32]int16{nil, {}, {33: 0, 44: 33}} {
  7040. // fmt.Printf(">>>> running mammoth map v137: %v\n", v)
  7041. var v137v1, v137v2 map[uint32]int16
  7042. v137v1 = v
  7043. bs137 := testMarshalErr(v137v1, h, t, "enc-map-v137")
  7044. if v == nil {
  7045. v137v2 = nil
  7046. } else {
  7047. v137v2 = make(map[uint32]int16, len(v))
  7048. } // reset map
  7049. testUnmarshalErr(v137v2, bs137, h, t, "dec-map-v137")
  7050. testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137")
  7051. if v == nil {
  7052. v137v2 = nil
  7053. } else {
  7054. v137v2 = make(map[uint32]int16, len(v))
  7055. } // reset map
  7056. testUnmarshalErr(reflect.ValueOf(v137v2), bs137, h, t, "dec-map-v137-noaddr") // decode into non-addressable map value
  7057. testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-noaddr")
  7058. if v == nil {
  7059. v137v2 = nil
  7060. } else {
  7061. v137v2 = make(map[uint32]int16, len(v))
  7062. } // reset map
  7063. testUnmarshalErr(&v137v2, bs137, h, t, "dec-map-v137-p-len")
  7064. testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-p-len")
  7065. bs137 = testMarshalErr(&v137v1, h, t, "enc-map-v137-p")
  7066. v137v2 = nil
  7067. testUnmarshalErr(&v137v2, bs137, h, t, "dec-map-v137-p-nil")
  7068. testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-p-nil")
  7069. // ...
  7070. if v == nil {
  7071. v137v2 = nil
  7072. } else {
  7073. v137v2 = make(map[uint32]int16, len(v))
  7074. } // reset map
  7075. var v137v3, v137v4 typMapMapUint32Int16
  7076. v137v3 = typMapMapUint32Int16(v137v1)
  7077. v137v4 = typMapMapUint32Int16(v137v2)
  7078. bs137 = testMarshalErr(v137v3, h, t, "enc-map-v137-custom")
  7079. testUnmarshalErr(v137v4, bs137, h, t, "dec-map-v137-p-len")
  7080. testDeepEqualErr(v137v3, v137v4, t, "equal-map-v137-p-len")
  7081. }
  7082. for _, v := range []map[uint32]int32{nil, {}, {44: 0, 33: 44}} {
  7083. // fmt.Printf(">>>> running mammoth map v138: %v\n", v)
  7084. var v138v1, v138v2 map[uint32]int32
  7085. v138v1 = v
  7086. bs138 := testMarshalErr(v138v1, h, t, "enc-map-v138")
  7087. if v == nil {
  7088. v138v2 = nil
  7089. } else {
  7090. v138v2 = make(map[uint32]int32, len(v))
  7091. } // reset map
  7092. testUnmarshalErr(v138v2, bs138, h, t, "dec-map-v138")
  7093. testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138")
  7094. if v == nil {
  7095. v138v2 = nil
  7096. } else {
  7097. v138v2 = make(map[uint32]int32, len(v))
  7098. } // reset map
  7099. testUnmarshalErr(reflect.ValueOf(v138v2), bs138, h, t, "dec-map-v138-noaddr") // decode into non-addressable map value
  7100. testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-noaddr")
  7101. if v == nil {
  7102. v138v2 = nil
  7103. } else {
  7104. v138v2 = make(map[uint32]int32, len(v))
  7105. } // reset map
  7106. testUnmarshalErr(&v138v2, bs138, h, t, "dec-map-v138-p-len")
  7107. testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-p-len")
  7108. bs138 = testMarshalErr(&v138v1, h, t, "enc-map-v138-p")
  7109. v138v2 = nil
  7110. testUnmarshalErr(&v138v2, bs138, h, t, "dec-map-v138-p-nil")
  7111. testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-p-nil")
  7112. // ...
  7113. if v == nil {
  7114. v138v2 = nil
  7115. } else {
  7116. v138v2 = make(map[uint32]int32, len(v))
  7117. } // reset map
  7118. var v138v3, v138v4 typMapMapUint32Int32
  7119. v138v3 = typMapMapUint32Int32(v138v1)
  7120. v138v4 = typMapMapUint32Int32(v138v2)
  7121. bs138 = testMarshalErr(v138v3, h, t, "enc-map-v138-custom")
  7122. testUnmarshalErr(v138v4, bs138, h, t, "dec-map-v138-p-len")
  7123. testDeepEqualErr(v138v3, v138v4, t, "equal-map-v138-p-len")
  7124. }
  7125. for _, v := range []map[uint32]int64{nil, {}, {33: 0, 44: 33}} {
  7126. // fmt.Printf(">>>> running mammoth map v139: %v\n", v)
  7127. var v139v1, v139v2 map[uint32]int64
  7128. v139v1 = v
  7129. bs139 := testMarshalErr(v139v1, h, t, "enc-map-v139")
  7130. if v == nil {
  7131. v139v2 = nil
  7132. } else {
  7133. v139v2 = make(map[uint32]int64, len(v))
  7134. } // reset map
  7135. testUnmarshalErr(v139v2, bs139, h, t, "dec-map-v139")
  7136. testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139")
  7137. if v == nil {
  7138. v139v2 = nil
  7139. } else {
  7140. v139v2 = make(map[uint32]int64, len(v))
  7141. } // reset map
  7142. testUnmarshalErr(reflect.ValueOf(v139v2), bs139, h, t, "dec-map-v139-noaddr") // decode into non-addressable map value
  7143. testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-noaddr")
  7144. if v == nil {
  7145. v139v2 = nil
  7146. } else {
  7147. v139v2 = make(map[uint32]int64, len(v))
  7148. } // reset map
  7149. testUnmarshalErr(&v139v2, bs139, h, t, "dec-map-v139-p-len")
  7150. testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-p-len")
  7151. bs139 = testMarshalErr(&v139v1, h, t, "enc-map-v139-p")
  7152. v139v2 = nil
  7153. testUnmarshalErr(&v139v2, bs139, h, t, "dec-map-v139-p-nil")
  7154. testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-p-nil")
  7155. // ...
  7156. if v == nil {
  7157. v139v2 = nil
  7158. } else {
  7159. v139v2 = make(map[uint32]int64, len(v))
  7160. } // reset map
  7161. var v139v3, v139v4 typMapMapUint32Int64
  7162. v139v3 = typMapMapUint32Int64(v139v1)
  7163. v139v4 = typMapMapUint32Int64(v139v2)
  7164. bs139 = testMarshalErr(v139v3, h, t, "enc-map-v139-custom")
  7165. testUnmarshalErr(v139v4, bs139, h, t, "dec-map-v139-p-len")
  7166. testDeepEqualErr(v139v3, v139v4, t, "equal-map-v139-p-len")
  7167. }
  7168. for _, v := range []map[uint32]float32{nil, {}, {44: 0, 33: 22.2}} {
  7169. // fmt.Printf(">>>> running mammoth map v140: %v\n", v)
  7170. var v140v1, v140v2 map[uint32]float32
  7171. v140v1 = v
  7172. bs140 := testMarshalErr(v140v1, h, t, "enc-map-v140")
  7173. if v == nil {
  7174. v140v2 = nil
  7175. } else {
  7176. v140v2 = make(map[uint32]float32, len(v))
  7177. } // reset map
  7178. testUnmarshalErr(v140v2, bs140, h, t, "dec-map-v140")
  7179. testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140")
  7180. if v == nil {
  7181. v140v2 = nil
  7182. } else {
  7183. v140v2 = make(map[uint32]float32, len(v))
  7184. } // reset map
  7185. testUnmarshalErr(reflect.ValueOf(v140v2), bs140, h, t, "dec-map-v140-noaddr") // decode into non-addressable map value
  7186. testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-noaddr")
  7187. if v == nil {
  7188. v140v2 = nil
  7189. } else {
  7190. v140v2 = make(map[uint32]float32, len(v))
  7191. } // reset map
  7192. testUnmarshalErr(&v140v2, bs140, h, t, "dec-map-v140-p-len")
  7193. testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-p-len")
  7194. bs140 = testMarshalErr(&v140v1, h, t, "enc-map-v140-p")
  7195. v140v2 = nil
  7196. testUnmarshalErr(&v140v2, bs140, h, t, "dec-map-v140-p-nil")
  7197. testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-p-nil")
  7198. // ...
  7199. if v == nil {
  7200. v140v2 = nil
  7201. } else {
  7202. v140v2 = make(map[uint32]float32, len(v))
  7203. } // reset map
  7204. var v140v3, v140v4 typMapMapUint32Float32
  7205. v140v3 = typMapMapUint32Float32(v140v1)
  7206. v140v4 = typMapMapUint32Float32(v140v2)
  7207. bs140 = testMarshalErr(v140v3, h, t, "enc-map-v140-custom")
  7208. testUnmarshalErr(v140v4, bs140, h, t, "dec-map-v140-p-len")
  7209. testDeepEqualErr(v140v3, v140v4, t, "equal-map-v140-p-len")
  7210. }
  7211. for _, v := range []map[uint32]float64{nil, {}, {44: 0, 33: 11.1}} {
  7212. // fmt.Printf(">>>> running mammoth map v141: %v\n", v)
  7213. var v141v1, v141v2 map[uint32]float64
  7214. v141v1 = v
  7215. bs141 := testMarshalErr(v141v1, h, t, "enc-map-v141")
  7216. if v == nil {
  7217. v141v2 = nil
  7218. } else {
  7219. v141v2 = make(map[uint32]float64, len(v))
  7220. } // reset map
  7221. testUnmarshalErr(v141v2, bs141, h, t, "dec-map-v141")
  7222. testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141")
  7223. if v == nil {
  7224. v141v2 = nil
  7225. } else {
  7226. v141v2 = make(map[uint32]float64, len(v))
  7227. } // reset map
  7228. testUnmarshalErr(reflect.ValueOf(v141v2), bs141, h, t, "dec-map-v141-noaddr") // decode into non-addressable map value
  7229. testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-noaddr")
  7230. if v == nil {
  7231. v141v2 = nil
  7232. } else {
  7233. v141v2 = make(map[uint32]float64, len(v))
  7234. } // reset map
  7235. testUnmarshalErr(&v141v2, bs141, h, t, "dec-map-v141-p-len")
  7236. testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-p-len")
  7237. bs141 = testMarshalErr(&v141v1, h, t, "enc-map-v141-p")
  7238. v141v2 = nil
  7239. testUnmarshalErr(&v141v2, bs141, h, t, "dec-map-v141-p-nil")
  7240. testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-p-nil")
  7241. // ...
  7242. if v == nil {
  7243. v141v2 = nil
  7244. } else {
  7245. v141v2 = make(map[uint32]float64, len(v))
  7246. } // reset map
  7247. var v141v3, v141v4 typMapMapUint32Float64
  7248. v141v3 = typMapMapUint32Float64(v141v1)
  7249. v141v4 = typMapMapUint32Float64(v141v2)
  7250. bs141 = testMarshalErr(v141v3, h, t, "enc-map-v141-custom")
  7251. testUnmarshalErr(v141v4, bs141, h, t, "dec-map-v141-p-len")
  7252. testDeepEqualErr(v141v3, v141v4, t, "equal-map-v141-p-len")
  7253. }
  7254. for _, v := range []map[uint32]bool{nil, {}, {44: false, 33: true}} {
  7255. // fmt.Printf(">>>> running mammoth map v142: %v\n", v)
  7256. var v142v1, v142v2 map[uint32]bool
  7257. v142v1 = v
  7258. bs142 := testMarshalErr(v142v1, h, t, "enc-map-v142")
  7259. if v == nil {
  7260. v142v2 = nil
  7261. } else {
  7262. v142v2 = make(map[uint32]bool, len(v))
  7263. } // reset map
  7264. testUnmarshalErr(v142v2, bs142, h, t, "dec-map-v142")
  7265. testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142")
  7266. if v == nil {
  7267. v142v2 = nil
  7268. } else {
  7269. v142v2 = make(map[uint32]bool, len(v))
  7270. } // reset map
  7271. testUnmarshalErr(reflect.ValueOf(v142v2), bs142, h, t, "dec-map-v142-noaddr") // decode into non-addressable map value
  7272. testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-noaddr")
  7273. if v == nil {
  7274. v142v2 = nil
  7275. } else {
  7276. v142v2 = make(map[uint32]bool, len(v))
  7277. } // reset map
  7278. testUnmarshalErr(&v142v2, bs142, h, t, "dec-map-v142-p-len")
  7279. testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-p-len")
  7280. bs142 = testMarshalErr(&v142v1, h, t, "enc-map-v142-p")
  7281. v142v2 = nil
  7282. testUnmarshalErr(&v142v2, bs142, h, t, "dec-map-v142-p-nil")
  7283. testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-p-nil")
  7284. // ...
  7285. if v == nil {
  7286. v142v2 = nil
  7287. } else {
  7288. v142v2 = make(map[uint32]bool, len(v))
  7289. } // reset map
  7290. var v142v3, v142v4 typMapMapUint32Bool
  7291. v142v3 = typMapMapUint32Bool(v142v1)
  7292. v142v4 = typMapMapUint32Bool(v142v2)
  7293. bs142 = testMarshalErr(v142v3, h, t, "enc-map-v142-custom")
  7294. testUnmarshalErr(v142v4, bs142, h, t, "dec-map-v142-p-len")
  7295. testDeepEqualErr(v142v3, v142v4, t, "equal-map-v142-p-len")
  7296. }
  7297. for _, v := range []map[uint64]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  7298. // fmt.Printf(">>>> running mammoth map v145: %v\n", v)
  7299. var v145v1, v145v2 map[uint64]interface{}
  7300. v145v1 = v
  7301. bs145 := testMarshalErr(v145v1, h, t, "enc-map-v145")
  7302. if v == nil {
  7303. v145v2 = nil
  7304. } else {
  7305. v145v2 = make(map[uint64]interface{}, len(v))
  7306. } // reset map
  7307. testUnmarshalErr(v145v2, bs145, h, t, "dec-map-v145")
  7308. testDeepEqualErr(v145v1, v145v2, t, "equal-map-v145")
  7309. if v == nil {
  7310. v145v2 = nil
  7311. } else {
  7312. v145v2 = make(map[uint64]interface{}, len(v))
  7313. } // reset map
  7314. testUnmarshalErr(reflect.ValueOf(v145v2), bs145, h, t, "dec-map-v145-noaddr") // decode into non-addressable map value
  7315. testDeepEqualErr(v145v1, v145v2, t, "equal-map-v145-noaddr")
  7316. if v == nil {
  7317. v145v2 = nil
  7318. } else {
  7319. v145v2 = make(map[uint64]interface{}, len(v))
  7320. } // reset map
  7321. testUnmarshalErr(&v145v2, bs145, h, t, "dec-map-v145-p-len")
  7322. testDeepEqualErr(v145v1, v145v2, t, "equal-map-v145-p-len")
  7323. bs145 = testMarshalErr(&v145v1, h, t, "enc-map-v145-p")
  7324. v145v2 = nil
  7325. testUnmarshalErr(&v145v2, bs145, h, t, "dec-map-v145-p-nil")
  7326. testDeepEqualErr(v145v1, v145v2, t, "equal-map-v145-p-nil")
  7327. // ...
  7328. if v == nil {
  7329. v145v2 = nil
  7330. } else {
  7331. v145v2 = make(map[uint64]interface{}, len(v))
  7332. } // reset map
  7333. var v145v3, v145v4 typMapMapUint64Intf
  7334. v145v3 = typMapMapUint64Intf(v145v1)
  7335. v145v4 = typMapMapUint64Intf(v145v2)
  7336. bs145 = testMarshalErr(v145v3, h, t, "enc-map-v145-custom")
  7337. testUnmarshalErr(v145v4, bs145, h, t, "dec-map-v145-p-len")
  7338. testDeepEqualErr(v145v3, v145v4, t, "equal-map-v145-p-len")
  7339. }
  7340. for _, v := range []map[uint64]string{nil, {}, {44: "", 33: "some-string-2"}} {
  7341. // fmt.Printf(">>>> running mammoth map v146: %v\n", v)
  7342. var v146v1, v146v2 map[uint64]string
  7343. v146v1 = v
  7344. bs146 := testMarshalErr(v146v1, h, t, "enc-map-v146")
  7345. if v == nil {
  7346. v146v2 = nil
  7347. } else {
  7348. v146v2 = make(map[uint64]string, len(v))
  7349. } // reset map
  7350. testUnmarshalErr(v146v2, bs146, h, t, "dec-map-v146")
  7351. testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146")
  7352. if v == nil {
  7353. v146v2 = nil
  7354. } else {
  7355. v146v2 = make(map[uint64]string, len(v))
  7356. } // reset map
  7357. testUnmarshalErr(reflect.ValueOf(v146v2), bs146, h, t, "dec-map-v146-noaddr") // decode into non-addressable map value
  7358. testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-noaddr")
  7359. if v == nil {
  7360. v146v2 = nil
  7361. } else {
  7362. v146v2 = make(map[uint64]string, len(v))
  7363. } // reset map
  7364. testUnmarshalErr(&v146v2, bs146, h, t, "dec-map-v146-p-len")
  7365. testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-p-len")
  7366. bs146 = testMarshalErr(&v146v1, h, t, "enc-map-v146-p")
  7367. v146v2 = nil
  7368. testUnmarshalErr(&v146v2, bs146, h, t, "dec-map-v146-p-nil")
  7369. testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-p-nil")
  7370. // ...
  7371. if v == nil {
  7372. v146v2 = nil
  7373. } else {
  7374. v146v2 = make(map[uint64]string, len(v))
  7375. } // reset map
  7376. var v146v3, v146v4 typMapMapUint64String
  7377. v146v3 = typMapMapUint64String(v146v1)
  7378. v146v4 = typMapMapUint64String(v146v2)
  7379. bs146 = testMarshalErr(v146v3, h, t, "enc-map-v146-custom")
  7380. testUnmarshalErr(v146v4, bs146, h, t, "dec-map-v146-p-len")
  7381. testDeepEqualErr(v146v3, v146v4, t, "equal-map-v146-p-len")
  7382. }
  7383. for _, v := range []map[uint64]uint{nil, {}, {44: 0, 33: 44}} {
  7384. // fmt.Printf(">>>> running mammoth map v147: %v\n", v)
  7385. var v147v1, v147v2 map[uint64]uint
  7386. v147v1 = v
  7387. bs147 := testMarshalErr(v147v1, h, t, "enc-map-v147")
  7388. if v == nil {
  7389. v147v2 = nil
  7390. } else {
  7391. v147v2 = make(map[uint64]uint, len(v))
  7392. } // reset map
  7393. testUnmarshalErr(v147v2, bs147, h, t, "dec-map-v147")
  7394. testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147")
  7395. if v == nil {
  7396. v147v2 = nil
  7397. } else {
  7398. v147v2 = make(map[uint64]uint, len(v))
  7399. } // reset map
  7400. testUnmarshalErr(reflect.ValueOf(v147v2), bs147, h, t, "dec-map-v147-noaddr") // decode into non-addressable map value
  7401. testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-noaddr")
  7402. if v == nil {
  7403. v147v2 = nil
  7404. } else {
  7405. v147v2 = make(map[uint64]uint, len(v))
  7406. } // reset map
  7407. testUnmarshalErr(&v147v2, bs147, h, t, "dec-map-v147-p-len")
  7408. testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-p-len")
  7409. bs147 = testMarshalErr(&v147v1, h, t, "enc-map-v147-p")
  7410. v147v2 = nil
  7411. testUnmarshalErr(&v147v2, bs147, h, t, "dec-map-v147-p-nil")
  7412. testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-p-nil")
  7413. // ...
  7414. if v == nil {
  7415. v147v2 = nil
  7416. } else {
  7417. v147v2 = make(map[uint64]uint, len(v))
  7418. } // reset map
  7419. var v147v3, v147v4 typMapMapUint64Uint
  7420. v147v3 = typMapMapUint64Uint(v147v1)
  7421. v147v4 = typMapMapUint64Uint(v147v2)
  7422. bs147 = testMarshalErr(v147v3, h, t, "enc-map-v147-custom")
  7423. testUnmarshalErr(v147v4, bs147, h, t, "dec-map-v147-p-len")
  7424. testDeepEqualErr(v147v3, v147v4, t, "equal-map-v147-p-len")
  7425. }
  7426. for _, v := range []map[uint64]uint8{nil, {}, {33: 0, 44: 33}} {
  7427. // fmt.Printf(">>>> running mammoth map v148: %v\n", v)
  7428. var v148v1, v148v2 map[uint64]uint8
  7429. v148v1 = v
  7430. bs148 := testMarshalErr(v148v1, h, t, "enc-map-v148")
  7431. if v == nil {
  7432. v148v2 = nil
  7433. } else {
  7434. v148v2 = make(map[uint64]uint8, len(v))
  7435. } // reset map
  7436. testUnmarshalErr(v148v2, bs148, h, t, "dec-map-v148")
  7437. testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148")
  7438. if v == nil {
  7439. v148v2 = nil
  7440. } else {
  7441. v148v2 = make(map[uint64]uint8, len(v))
  7442. } // reset map
  7443. testUnmarshalErr(reflect.ValueOf(v148v2), bs148, h, t, "dec-map-v148-noaddr") // decode into non-addressable map value
  7444. testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-noaddr")
  7445. if v == nil {
  7446. v148v2 = nil
  7447. } else {
  7448. v148v2 = make(map[uint64]uint8, len(v))
  7449. } // reset map
  7450. testUnmarshalErr(&v148v2, bs148, h, t, "dec-map-v148-p-len")
  7451. testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-p-len")
  7452. bs148 = testMarshalErr(&v148v1, h, t, "enc-map-v148-p")
  7453. v148v2 = nil
  7454. testUnmarshalErr(&v148v2, bs148, h, t, "dec-map-v148-p-nil")
  7455. testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-p-nil")
  7456. // ...
  7457. if v == nil {
  7458. v148v2 = nil
  7459. } else {
  7460. v148v2 = make(map[uint64]uint8, len(v))
  7461. } // reset map
  7462. var v148v3, v148v4 typMapMapUint64Uint8
  7463. v148v3 = typMapMapUint64Uint8(v148v1)
  7464. v148v4 = typMapMapUint64Uint8(v148v2)
  7465. bs148 = testMarshalErr(v148v3, h, t, "enc-map-v148-custom")
  7466. testUnmarshalErr(v148v4, bs148, h, t, "dec-map-v148-p-len")
  7467. testDeepEqualErr(v148v3, v148v4, t, "equal-map-v148-p-len")
  7468. }
  7469. for _, v := range []map[uint64]uint16{nil, {}, {44: 0, 33: 44}} {
  7470. // fmt.Printf(">>>> running mammoth map v149: %v\n", v)
  7471. var v149v1, v149v2 map[uint64]uint16
  7472. v149v1 = v
  7473. bs149 := testMarshalErr(v149v1, h, t, "enc-map-v149")
  7474. if v == nil {
  7475. v149v2 = nil
  7476. } else {
  7477. v149v2 = make(map[uint64]uint16, len(v))
  7478. } // reset map
  7479. testUnmarshalErr(v149v2, bs149, h, t, "dec-map-v149")
  7480. testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149")
  7481. if v == nil {
  7482. v149v2 = nil
  7483. } else {
  7484. v149v2 = make(map[uint64]uint16, len(v))
  7485. } // reset map
  7486. testUnmarshalErr(reflect.ValueOf(v149v2), bs149, h, t, "dec-map-v149-noaddr") // decode into non-addressable map value
  7487. testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-noaddr")
  7488. if v == nil {
  7489. v149v2 = nil
  7490. } else {
  7491. v149v2 = make(map[uint64]uint16, len(v))
  7492. } // reset map
  7493. testUnmarshalErr(&v149v2, bs149, h, t, "dec-map-v149-p-len")
  7494. testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-p-len")
  7495. bs149 = testMarshalErr(&v149v1, h, t, "enc-map-v149-p")
  7496. v149v2 = nil
  7497. testUnmarshalErr(&v149v2, bs149, h, t, "dec-map-v149-p-nil")
  7498. testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-p-nil")
  7499. // ...
  7500. if v == nil {
  7501. v149v2 = nil
  7502. } else {
  7503. v149v2 = make(map[uint64]uint16, len(v))
  7504. } // reset map
  7505. var v149v3, v149v4 typMapMapUint64Uint16
  7506. v149v3 = typMapMapUint64Uint16(v149v1)
  7507. v149v4 = typMapMapUint64Uint16(v149v2)
  7508. bs149 = testMarshalErr(v149v3, h, t, "enc-map-v149-custom")
  7509. testUnmarshalErr(v149v4, bs149, h, t, "dec-map-v149-p-len")
  7510. testDeepEqualErr(v149v3, v149v4, t, "equal-map-v149-p-len")
  7511. }
  7512. for _, v := range []map[uint64]uint32{nil, {}, {33: 0, 44: 33}} {
  7513. // fmt.Printf(">>>> running mammoth map v150: %v\n", v)
  7514. var v150v1, v150v2 map[uint64]uint32
  7515. v150v1 = v
  7516. bs150 := testMarshalErr(v150v1, h, t, "enc-map-v150")
  7517. if v == nil {
  7518. v150v2 = nil
  7519. } else {
  7520. v150v2 = make(map[uint64]uint32, len(v))
  7521. } // reset map
  7522. testUnmarshalErr(v150v2, bs150, h, t, "dec-map-v150")
  7523. testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150")
  7524. if v == nil {
  7525. v150v2 = nil
  7526. } else {
  7527. v150v2 = make(map[uint64]uint32, len(v))
  7528. } // reset map
  7529. testUnmarshalErr(reflect.ValueOf(v150v2), bs150, h, t, "dec-map-v150-noaddr") // decode into non-addressable map value
  7530. testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-noaddr")
  7531. if v == nil {
  7532. v150v2 = nil
  7533. } else {
  7534. v150v2 = make(map[uint64]uint32, len(v))
  7535. } // reset map
  7536. testUnmarshalErr(&v150v2, bs150, h, t, "dec-map-v150-p-len")
  7537. testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-p-len")
  7538. bs150 = testMarshalErr(&v150v1, h, t, "enc-map-v150-p")
  7539. v150v2 = nil
  7540. testUnmarshalErr(&v150v2, bs150, h, t, "dec-map-v150-p-nil")
  7541. testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-p-nil")
  7542. // ...
  7543. if v == nil {
  7544. v150v2 = nil
  7545. } else {
  7546. v150v2 = make(map[uint64]uint32, len(v))
  7547. } // reset map
  7548. var v150v3, v150v4 typMapMapUint64Uint32
  7549. v150v3 = typMapMapUint64Uint32(v150v1)
  7550. v150v4 = typMapMapUint64Uint32(v150v2)
  7551. bs150 = testMarshalErr(v150v3, h, t, "enc-map-v150-custom")
  7552. testUnmarshalErr(v150v4, bs150, h, t, "dec-map-v150-p-len")
  7553. testDeepEqualErr(v150v3, v150v4, t, "equal-map-v150-p-len")
  7554. }
  7555. for _, v := range []map[uint64]uint64{nil, {}, {44: 0, 33: 44}} {
  7556. // fmt.Printf(">>>> running mammoth map v151: %v\n", v)
  7557. var v151v1, v151v2 map[uint64]uint64
  7558. v151v1 = v
  7559. bs151 := testMarshalErr(v151v1, h, t, "enc-map-v151")
  7560. if v == nil {
  7561. v151v2 = nil
  7562. } else {
  7563. v151v2 = make(map[uint64]uint64, len(v))
  7564. } // reset map
  7565. testUnmarshalErr(v151v2, bs151, h, t, "dec-map-v151")
  7566. testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151")
  7567. if v == nil {
  7568. v151v2 = nil
  7569. } else {
  7570. v151v2 = make(map[uint64]uint64, len(v))
  7571. } // reset map
  7572. testUnmarshalErr(reflect.ValueOf(v151v2), bs151, h, t, "dec-map-v151-noaddr") // decode into non-addressable map value
  7573. testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-noaddr")
  7574. if v == nil {
  7575. v151v2 = nil
  7576. } else {
  7577. v151v2 = make(map[uint64]uint64, len(v))
  7578. } // reset map
  7579. testUnmarshalErr(&v151v2, bs151, h, t, "dec-map-v151-p-len")
  7580. testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-p-len")
  7581. bs151 = testMarshalErr(&v151v1, h, t, "enc-map-v151-p")
  7582. v151v2 = nil
  7583. testUnmarshalErr(&v151v2, bs151, h, t, "dec-map-v151-p-nil")
  7584. testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-p-nil")
  7585. // ...
  7586. if v == nil {
  7587. v151v2 = nil
  7588. } else {
  7589. v151v2 = make(map[uint64]uint64, len(v))
  7590. } // reset map
  7591. var v151v3, v151v4 typMapMapUint64Uint64
  7592. v151v3 = typMapMapUint64Uint64(v151v1)
  7593. v151v4 = typMapMapUint64Uint64(v151v2)
  7594. bs151 = testMarshalErr(v151v3, h, t, "enc-map-v151-custom")
  7595. testUnmarshalErr(v151v4, bs151, h, t, "dec-map-v151-p-len")
  7596. testDeepEqualErr(v151v3, v151v4, t, "equal-map-v151-p-len")
  7597. }
  7598. for _, v := range []map[uint64]uintptr{nil, {}, {33: 0, 44: 33}} {
  7599. // fmt.Printf(">>>> running mammoth map v152: %v\n", v)
  7600. var v152v1, v152v2 map[uint64]uintptr
  7601. v152v1 = v
  7602. bs152 := testMarshalErr(v152v1, h, t, "enc-map-v152")
  7603. if v == nil {
  7604. v152v2 = nil
  7605. } else {
  7606. v152v2 = make(map[uint64]uintptr, len(v))
  7607. } // reset map
  7608. testUnmarshalErr(v152v2, bs152, h, t, "dec-map-v152")
  7609. testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152")
  7610. if v == nil {
  7611. v152v2 = nil
  7612. } else {
  7613. v152v2 = make(map[uint64]uintptr, len(v))
  7614. } // reset map
  7615. testUnmarshalErr(reflect.ValueOf(v152v2), bs152, h, t, "dec-map-v152-noaddr") // decode into non-addressable map value
  7616. testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-noaddr")
  7617. if v == nil {
  7618. v152v2 = nil
  7619. } else {
  7620. v152v2 = make(map[uint64]uintptr, len(v))
  7621. } // reset map
  7622. testUnmarshalErr(&v152v2, bs152, h, t, "dec-map-v152-p-len")
  7623. testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-p-len")
  7624. bs152 = testMarshalErr(&v152v1, h, t, "enc-map-v152-p")
  7625. v152v2 = nil
  7626. testUnmarshalErr(&v152v2, bs152, h, t, "dec-map-v152-p-nil")
  7627. testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-p-nil")
  7628. // ...
  7629. if v == nil {
  7630. v152v2 = nil
  7631. } else {
  7632. v152v2 = make(map[uint64]uintptr, len(v))
  7633. } // reset map
  7634. var v152v3, v152v4 typMapMapUint64Uintptr
  7635. v152v3 = typMapMapUint64Uintptr(v152v1)
  7636. v152v4 = typMapMapUint64Uintptr(v152v2)
  7637. bs152 = testMarshalErr(v152v3, h, t, "enc-map-v152-custom")
  7638. testUnmarshalErr(v152v4, bs152, h, t, "dec-map-v152-p-len")
  7639. testDeepEqualErr(v152v3, v152v4, t, "equal-map-v152-p-len")
  7640. }
  7641. for _, v := range []map[uint64]int{nil, {}, {44: 0, 33: 44}} {
  7642. // fmt.Printf(">>>> running mammoth map v153: %v\n", v)
  7643. var v153v1, v153v2 map[uint64]int
  7644. v153v1 = v
  7645. bs153 := testMarshalErr(v153v1, h, t, "enc-map-v153")
  7646. if v == nil {
  7647. v153v2 = nil
  7648. } else {
  7649. v153v2 = make(map[uint64]int, len(v))
  7650. } // reset map
  7651. testUnmarshalErr(v153v2, bs153, h, t, "dec-map-v153")
  7652. testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153")
  7653. if v == nil {
  7654. v153v2 = nil
  7655. } else {
  7656. v153v2 = make(map[uint64]int, len(v))
  7657. } // reset map
  7658. testUnmarshalErr(reflect.ValueOf(v153v2), bs153, h, t, "dec-map-v153-noaddr") // decode into non-addressable map value
  7659. testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-noaddr")
  7660. if v == nil {
  7661. v153v2 = nil
  7662. } else {
  7663. v153v2 = make(map[uint64]int, len(v))
  7664. } // reset map
  7665. testUnmarshalErr(&v153v2, bs153, h, t, "dec-map-v153-p-len")
  7666. testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-p-len")
  7667. bs153 = testMarshalErr(&v153v1, h, t, "enc-map-v153-p")
  7668. v153v2 = nil
  7669. testUnmarshalErr(&v153v2, bs153, h, t, "dec-map-v153-p-nil")
  7670. testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-p-nil")
  7671. // ...
  7672. if v == nil {
  7673. v153v2 = nil
  7674. } else {
  7675. v153v2 = make(map[uint64]int, len(v))
  7676. } // reset map
  7677. var v153v3, v153v4 typMapMapUint64Int
  7678. v153v3 = typMapMapUint64Int(v153v1)
  7679. v153v4 = typMapMapUint64Int(v153v2)
  7680. bs153 = testMarshalErr(v153v3, h, t, "enc-map-v153-custom")
  7681. testUnmarshalErr(v153v4, bs153, h, t, "dec-map-v153-p-len")
  7682. testDeepEqualErr(v153v3, v153v4, t, "equal-map-v153-p-len")
  7683. }
  7684. for _, v := range []map[uint64]int8{nil, {}, {33: 0, 44: 33}} {
  7685. // fmt.Printf(">>>> running mammoth map v154: %v\n", v)
  7686. var v154v1, v154v2 map[uint64]int8
  7687. v154v1 = v
  7688. bs154 := testMarshalErr(v154v1, h, t, "enc-map-v154")
  7689. if v == nil {
  7690. v154v2 = nil
  7691. } else {
  7692. v154v2 = make(map[uint64]int8, len(v))
  7693. } // reset map
  7694. testUnmarshalErr(v154v2, bs154, h, t, "dec-map-v154")
  7695. testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154")
  7696. if v == nil {
  7697. v154v2 = nil
  7698. } else {
  7699. v154v2 = make(map[uint64]int8, len(v))
  7700. } // reset map
  7701. testUnmarshalErr(reflect.ValueOf(v154v2), bs154, h, t, "dec-map-v154-noaddr") // decode into non-addressable map value
  7702. testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-noaddr")
  7703. if v == nil {
  7704. v154v2 = nil
  7705. } else {
  7706. v154v2 = make(map[uint64]int8, len(v))
  7707. } // reset map
  7708. testUnmarshalErr(&v154v2, bs154, h, t, "dec-map-v154-p-len")
  7709. testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-p-len")
  7710. bs154 = testMarshalErr(&v154v1, h, t, "enc-map-v154-p")
  7711. v154v2 = nil
  7712. testUnmarshalErr(&v154v2, bs154, h, t, "dec-map-v154-p-nil")
  7713. testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-p-nil")
  7714. // ...
  7715. if v == nil {
  7716. v154v2 = nil
  7717. } else {
  7718. v154v2 = make(map[uint64]int8, len(v))
  7719. } // reset map
  7720. var v154v3, v154v4 typMapMapUint64Int8
  7721. v154v3 = typMapMapUint64Int8(v154v1)
  7722. v154v4 = typMapMapUint64Int8(v154v2)
  7723. bs154 = testMarshalErr(v154v3, h, t, "enc-map-v154-custom")
  7724. testUnmarshalErr(v154v4, bs154, h, t, "dec-map-v154-p-len")
  7725. testDeepEqualErr(v154v3, v154v4, t, "equal-map-v154-p-len")
  7726. }
  7727. for _, v := range []map[uint64]int16{nil, {}, {44: 0, 33: 44}} {
  7728. // fmt.Printf(">>>> running mammoth map v155: %v\n", v)
  7729. var v155v1, v155v2 map[uint64]int16
  7730. v155v1 = v
  7731. bs155 := testMarshalErr(v155v1, h, t, "enc-map-v155")
  7732. if v == nil {
  7733. v155v2 = nil
  7734. } else {
  7735. v155v2 = make(map[uint64]int16, len(v))
  7736. } // reset map
  7737. testUnmarshalErr(v155v2, bs155, h, t, "dec-map-v155")
  7738. testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155")
  7739. if v == nil {
  7740. v155v2 = nil
  7741. } else {
  7742. v155v2 = make(map[uint64]int16, len(v))
  7743. } // reset map
  7744. testUnmarshalErr(reflect.ValueOf(v155v2), bs155, h, t, "dec-map-v155-noaddr") // decode into non-addressable map value
  7745. testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-noaddr")
  7746. if v == nil {
  7747. v155v2 = nil
  7748. } else {
  7749. v155v2 = make(map[uint64]int16, len(v))
  7750. } // reset map
  7751. testUnmarshalErr(&v155v2, bs155, h, t, "dec-map-v155-p-len")
  7752. testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-p-len")
  7753. bs155 = testMarshalErr(&v155v1, h, t, "enc-map-v155-p")
  7754. v155v2 = nil
  7755. testUnmarshalErr(&v155v2, bs155, h, t, "dec-map-v155-p-nil")
  7756. testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-p-nil")
  7757. // ...
  7758. if v == nil {
  7759. v155v2 = nil
  7760. } else {
  7761. v155v2 = make(map[uint64]int16, len(v))
  7762. } // reset map
  7763. var v155v3, v155v4 typMapMapUint64Int16
  7764. v155v3 = typMapMapUint64Int16(v155v1)
  7765. v155v4 = typMapMapUint64Int16(v155v2)
  7766. bs155 = testMarshalErr(v155v3, h, t, "enc-map-v155-custom")
  7767. testUnmarshalErr(v155v4, bs155, h, t, "dec-map-v155-p-len")
  7768. testDeepEqualErr(v155v3, v155v4, t, "equal-map-v155-p-len")
  7769. }
  7770. for _, v := range []map[uint64]int32{nil, {}, {33: 0, 44: 33}} {
  7771. // fmt.Printf(">>>> running mammoth map v156: %v\n", v)
  7772. var v156v1, v156v2 map[uint64]int32
  7773. v156v1 = v
  7774. bs156 := testMarshalErr(v156v1, h, t, "enc-map-v156")
  7775. if v == nil {
  7776. v156v2 = nil
  7777. } else {
  7778. v156v2 = make(map[uint64]int32, len(v))
  7779. } // reset map
  7780. testUnmarshalErr(v156v2, bs156, h, t, "dec-map-v156")
  7781. testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156")
  7782. if v == nil {
  7783. v156v2 = nil
  7784. } else {
  7785. v156v2 = make(map[uint64]int32, len(v))
  7786. } // reset map
  7787. testUnmarshalErr(reflect.ValueOf(v156v2), bs156, h, t, "dec-map-v156-noaddr") // decode into non-addressable map value
  7788. testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-noaddr")
  7789. if v == nil {
  7790. v156v2 = nil
  7791. } else {
  7792. v156v2 = make(map[uint64]int32, len(v))
  7793. } // reset map
  7794. testUnmarshalErr(&v156v2, bs156, h, t, "dec-map-v156-p-len")
  7795. testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-p-len")
  7796. bs156 = testMarshalErr(&v156v1, h, t, "enc-map-v156-p")
  7797. v156v2 = nil
  7798. testUnmarshalErr(&v156v2, bs156, h, t, "dec-map-v156-p-nil")
  7799. testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-p-nil")
  7800. // ...
  7801. if v == nil {
  7802. v156v2 = nil
  7803. } else {
  7804. v156v2 = make(map[uint64]int32, len(v))
  7805. } // reset map
  7806. var v156v3, v156v4 typMapMapUint64Int32
  7807. v156v3 = typMapMapUint64Int32(v156v1)
  7808. v156v4 = typMapMapUint64Int32(v156v2)
  7809. bs156 = testMarshalErr(v156v3, h, t, "enc-map-v156-custom")
  7810. testUnmarshalErr(v156v4, bs156, h, t, "dec-map-v156-p-len")
  7811. testDeepEqualErr(v156v3, v156v4, t, "equal-map-v156-p-len")
  7812. }
  7813. for _, v := range []map[uint64]int64{nil, {}, {44: 0, 33: 44}} {
  7814. // fmt.Printf(">>>> running mammoth map v157: %v\n", v)
  7815. var v157v1, v157v2 map[uint64]int64
  7816. v157v1 = v
  7817. bs157 := testMarshalErr(v157v1, h, t, "enc-map-v157")
  7818. if v == nil {
  7819. v157v2 = nil
  7820. } else {
  7821. v157v2 = make(map[uint64]int64, len(v))
  7822. } // reset map
  7823. testUnmarshalErr(v157v2, bs157, h, t, "dec-map-v157")
  7824. testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157")
  7825. if v == nil {
  7826. v157v2 = nil
  7827. } else {
  7828. v157v2 = make(map[uint64]int64, len(v))
  7829. } // reset map
  7830. testUnmarshalErr(reflect.ValueOf(v157v2), bs157, h, t, "dec-map-v157-noaddr") // decode into non-addressable map value
  7831. testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-noaddr")
  7832. if v == nil {
  7833. v157v2 = nil
  7834. } else {
  7835. v157v2 = make(map[uint64]int64, len(v))
  7836. } // reset map
  7837. testUnmarshalErr(&v157v2, bs157, h, t, "dec-map-v157-p-len")
  7838. testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-p-len")
  7839. bs157 = testMarshalErr(&v157v1, h, t, "enc-map-v157-p")
  7840. v157v2 = nil
  7841. testUnmarshalErr(&v157v2, bs157, h, t, "dec-map-v157-p-nil")
  7842. testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-p-nil")
  7843. // ...
  7844. if v == nil {
  7845. v157v2 = nil
  7846. } else {
  7847. v157v2 = make(map[uint64]int64, len(v))
  7848. } // reset map
  7849. var v157v3, v157v4 typMapMapUint64Int64
  7850. v157v3 = typMapMapUint64Int64(v157v1)
  7851. v157v4 = typMapMapUint64Int64(v157v2)
  7852. bs157 = testMarshalErr(v157v3, h, t, "enc-map-v157-custom")
  7853. testUnmarshalErr(v157v4, bs157, h, t, "dec-map-v157-p-len")
  7854. testDeepEqualErr(v157v3, v157v4, t, "equal-map-v157-p-len")
  7855. }
  7856. for _, v := range []map[uint64]float32{nil, {}, {33: 0, 44: 22.2}} {
  7857. // fmt.Printf(">>>> running mammoth map v158: %v\n", v)
  7858. var v158v1, v158v2 map[uint64]float32
  7859. v158v1 = v
  7860. bs158 := testMarshalErr(v158v1, h, t, "enc-map-v158")
  7861. if v == nil {
  7862. v158v2 = nil
  7863. } else {
  7864. v158v2 = make(map[uint64]float32, len(v))
  7865. } // reset map
  7866. testUnmarshalErr(v158v2, bs158, h, t, "dec-map-v158")
  7867. testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158")
  7868. if v == nil {
  7869. v158v2 = nil
  7870. } else {
  7871. v158v2 = make(map[uint64]float32, len(v))
  7872. } // reset map
  7873. testUnmarshalErr(reflect.ValueOf(v158v2), bs158, h, t, "dec-map-v158-noaddr") // decode into non-addressable map value
  7874. testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-noaddr")
  7875. if v == nil {
  7876. v158v2 = nil
  7877. } else {
  7878. v158v2 = make(map[uint64]float32, len(v))
  7879. } // reset map
  7880. testUnmarshalErr(&v158v2, bs158, h, t, "dec-map-v158-p-len")
  7881. testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-p-len")
  7882. bs158 = testMarshalErr(&v158v1, h, t, "enc-map-v158-p")
  7883. v158v2 = nil
  7884. testUnmarshalErr(&v158v2, bs158, h, t, "dec-map-v158-p-nil")
  7885. testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-p-nil")
  7886. // ...
  7887. if v == nil {
  7888. v158v2 = nil
  7889. } else {
  7890. v158v2 = make(map[uint64]float32, len(v))
  7891. } // reset map
  7892. var v158v3, v158v4 typMapMapUint64Float32
  7893. v158v3 = typMapMapUint64Float32(v158v1)
  7894. v158v4 = typMapMapUint64Float32(v158v2)
  7895. bs158 = testMarshalErr(v158v3, h, t, "enc-map-v158-custom")
  7896. testUnmarshalErr(v158v4, bs158, h, t, "dec-map-v158-p-len")
  7897. testDeepEqualErr(v158v3, v158v4, t, "equal-map-v158-p-len")
  7898. }
  7899. for _, v := range []map[uint64]float64{nil, {}, {33: 0, 44: 11.1}} {
  7900. // fmt.Printf(">>>> running mammoth map v159: %v\n", v)
  7901. var v159v1, v159v2 map[uint64]float64
  7902. v159v1 = v
  7903. bs159 := testMarshalErr(v159v1, h, t, "enc-map-v159")
  7904. if v == nil {
  7905. v159v2 = nil
  7906. } else {
  7907. v159v2 = make(map[uint64]float64, len(v))
  7908. } // reset map
  7909. testUnmarshalErr(v159v2, bs159, h, t, "dec-map-v159")
  7910. testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159")
  7911. if v == nil {
  7912. v159v2 = nil
  7913. } else {
  7914. v159v2 = make(map[uint64]float64, len(v))
  7915. } // reset map
  7916. testUnmarshalErr(reflect.ValueOf(v159v2), bs159, h, t, "dec-map-v159-noaddr") // decode into non-addressable map value
  7917. testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-noaddr")
  7918. if v == nil {
  7919. v159v2 = nil
  7920. } else {
  7921. v159v2 = make(map[uint64]float64, len(v))
  7922. } // reset map
  7923. testUnmarshalErr(&v159v2, bs159, h, t, "dec-map-v159-p-len")
  7924. testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-p-len")
  7925. bs159 = testMarshalErr(&v159v1, h, t, "enc-map-v159-p")
  7926. v159v2 = nil
  7927. testUnmarshalErr(&v159v2, bs159, h, t, "dec-map-v159-p-nil")
  7928. testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-p-nil")
  7929. // ...
  7930. if v == nil {
  7931. v159v2 = nil
  7932. } else {
  7933. v159v2 = make(map[uint64]float64, len(v))
  7934. } // reset map
  7935. var v159v3, v159v4 typMapMapUint64Float64
  7936. v159v3 = typMapMapUint64Float64(v159v1)
  7937. v159v4 = typMapMapUint64Float64(v159v2)
  7938. bs159 = testMarshalErr(v159v3, h, t, "enc-map-v159-custom")
  7939. testUnmarshalErr(v159v4, bs159, h, t, "dec-map-v159-p-len")
  7940. testDeepEqualErr(v159v3, v159v4, t, "equal-map-v159-p-len")
  7941. }
  7942. for _, v := range []map[uint64]bool{nil, {}, {33: false, 44: true}} {
  7943. // fmt.Printf(">>>> running mammoth map v160: %v\n", v)
  7944. var v160v1, v160v2 map[uint64]bool
  7945. v160v1 = v
  7946. bs160 := testMarshalErr(v160v1, h, t, "enc-map-v160")
  7947. if v == nil {
  7948. v160v2 = nil
  7949. } else {
  7950. v160v2 = make(map[uint64]bool, len(v))
  7951. } // reset map
  7952. testUnmarshalErr(v160v2, bs160, h, t, "dec-map-v160")
  7953. testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160")
  7954. if v == nil {
  7955. v160v2 = nil
  7956. } else {
  7957. v160v2 = make(map[uint64]bool, len(v))
  7958. } // reset map
  7959. testUnmarshalErr(reflect.ValueOf(v160v2), bs160, h, t, "dec-map-v160-noaddr") // decode into non-addressable map value
  7960. testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-noaddr")
  7961. if v == nil {
  7962. v160v2 = nil
  7963. } else {
  7964. v160v2 = make(map[uint64]bool, len(v))
  7965. } // reset map
  7966. testUnmarshalErr(&v160v2, bs160, h, t, "dec-map-v160-p-len")
  7967. testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-p-len")
  7968. bs160 = testMarshalErr(&v160v1, h, t, "enc-map-v160-p")
  7969. v160v2 = nil
  7970. testUnmarshalErr(&v160v2, bs160, h, t, "dec-map-v160-p-nil")
  7971. testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-p-nil")
  7972. // ...
  7973. if v == nil {
  7974. v160v2 = nil
  7975. } else {
  7976. v160v2 = make(map[uint64]bool, len(v))
  7977. } // reset map
  7978. var v160v3, v160v4 typMapMapUint64Bool
  7979. v160v3 = typMapMapUint64Bool(v160v1)
  7980. v160v4 = typMapMapUint64Bool(v160v2)
  7981. bs160 = testMarshalErr(v160v3, h, t, "enc-map-v160-custom")
  7982. testUnmarshalErr(v160v4, bs160, h, t, "dec-map-v160-p-len")
  7983. testDeepEqualErr(v160v3, v160v4, t, "equal-map-v160-p-len")
  7984. }
  7985. for _, v := range []map[uintptr]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  7986. // fmt.Printf(">>>> running mammoth map v163: %v\n", v)
  7987. var v163v1, v163v2 map[uintptr]interface{}
  7988. v163v1 = v
  7989. bs163 := testMarshalErr(v163v1, h, t, "enc-map-v163")
  7990. if v == nil {
  7991. v163v2 = nil
  7992. } else {
  7993. v163v2 = make(map[uintptr]interface{}, len(v))
  7994. } // reset map
  7995. testUnmarshalErr(v163v2, bs163, h, t, "dec-map-v163")
  7996. testDeepEqualErr(v163v1, v163v2, t, "equal-map-v163")
  7997. if v == nil {
  7998. v163v2 = nil
  7999. } else {
  8000. v163v2 = make(map[uintptr]interface{}, len(v))
  8001. } // reset map
  8002. testUnmarshalErr(reflect.ValueOf(v163v2), bs163, h, t, "dec-map-v163-noaddr") // decode into non-addressable map value
  8003. testDeepEqualErr(v163v1, v163v2, t, "equal-map-v163-noaddr")
  8004. if v == nil {
  8005. v163v2 = nil
  8006. } else {
  8007. v163v2 = make(map[uintptr]interface{}, len(v))
  8008. } // reset map
  8009. testUnmarshalErr(&v163v2, bs163, h, t, "dec-map-v163-p-len")
  8010. testDeepEqualErr(v163v1, v163v2, t, "equal-map-v163-p-len")
  8011. bs163 = testMarshalErr(&v163v1, h, t, "enc-map-v163-p")
  8012. v163v2 = nil
  8013. testUnmarshalErr(&v163v2, bs163, h, t, "dec-map-v163-p-nil")
  8014. testDeepEqualErr(v163v1, v163v2, t, "equal-map-v163-p-nil")
  8015. // ...
  8016. if v == nil {
  8017. v163v2 = nil
  8018. } else {
  8019. v163v2 = make(map[uintptr]interface{}, len(v))
  8020. } // reset map
  8021. var v163v3, v163v4 typMapMapUintptrIntf
  8022. v163v3 = typMapMapUintptrIntf(v163v1)
  8023. v163v4 = typMapMapUintptrIntf(v163v2)
  8024. bs163 = testMarshalErr(v163v3, h, t, "enc-map-v163-custom")
  8025. testUnmarshalErr(v163v4, bs163, h, t, "dec-map-v163-p-len")
  8026. testDeepEqualErr(v163v3, v163v4, t, "equal-map-v163-p-len")
  8027. }
  8028. for _, v := range []map[uintptr]string{nil, {}, {33: "", 44: "some-string"}} {
  8029. // fmt.Printf(">>>> running mammoth map v164: %v\n", v)
  8030. var v164v1, v164v2 map[uintptr]string
  8031. v164v1 = v
  8032. bs164 := testMarshalErr(v164v1, h, t, "enc-map-v164")
  8033. if v == nil {
  8034. v164v2 = nil
  8035. } else {
  8036. v164v2 = make(map[uintptr]string, len(v))
  8037. } // reset map
  8038. testUnmarshalErr(v164v2, bs164, h, t, "dec-map-v164")
  8039. testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164")
  8040. if v == nil {
  8041. v164v2 = nil
  8042. } else {
  8043. v164v2 = make(map[uintptr]string, len(v))
  8044. } // reset map
  8045. testUnmarshalErr(reflect.ValueOf(v164v2), bs164, h, t, "dec-map-v164-noaddr") // decode into non-addressable map value
  8046. testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-noaddr")
  8047. if v == nil {
  8048. v164v2 = nil
  8049. } else {
  8050. v164v2 = make(map[uintptr]string, len(v))
  8051. } // reset map
  8052. testUnmarshalErr(&v164v2, bs164, h, t, "dec-map-v164-p-len")
  8053. testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-p-len")
  8054. bs164 = testMarshalErr(&v164v1, h, t, "enc-map-v164-p")
  8055. v164v2 = nil
  8056. testUnmarshalErr(&v164v2, bs164, h, t, "dec-map-v164-p-nil")
  8057. testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-p-nil")
  8058. // ...
  8059. if v == nil {
  8060. v164v2 = nil
  8061. } else {
  8062. v164v2 = make(map[uintptr]string, len(v))
  8063. } // reset map
  8064. var v164v3, v164v4 typMapMapUintptrString
  8065. v164v3 = typMapMapUintptrString(v164v1)
  8066. v164v4 = typMapMapUintptrString(v164v2)
  8067. bs164 = testMarshalErr(v164v3, h, t, "enc-map-v164-custom")
  8068. testUnmarshalErr(v164v4, bs164, h, t, "dec-map-v164-p-len")
  8069. testDeepEqualErr(v164v3, v164v4, t, "equal-map-v164-p-len")
  8070. }
  8071. for _, v := range []map[uintptr]uint{nil, {}, {33: 0, 44: 33}} {
  8072. // fmt.Printf(">>>> running mammoth map v165: %v\n", v)
  8073. var v165v1, v165v2 map[uintptr]uint
  8074. v165v1 = v
  8075. bs165 := testMarshalErr(v165v1, h, t, "enc-map-v165")
  8076. if v == nil {
  8077. v165v2 = nil
  8078. } else {
  8079. v165v2 = make(map[uintptr]uint, len(v))
  8080. } // reset map
  8081. testUnmarshalErr(v165v2, bs165, h, t, "dec-map-v165")
  8082. testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165")
  8083. if v == nil {
  8084. v165v2 = nil
  8085. } else {
  8086. v165v2 = make(map[uintptr]uint, len(v))
  8087. } // reset map
  8088. testUnmarshalErr(reflect.ValueOf(v165v2), bs165, h, t, "dec-map-v165-noaddr") // decode into non-addressable map value
  8089. testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-noaddr")
  8090. if v == nil {
  8091. v165v2 = nil
  8092. } else {
  8093. v165v2 = make(map[uintptr]uint, len(v))
  8094. } // reset map
  8095. testUnmarshalErr(&v165v2, bs165, h, t, "dec-map-v165-p-len")
  8096. testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-p-len")
  8097. bs165 = testMarshalErr(&v165v1, h, t, "enc-map-v165-p")
  8098. v165v2 = nil
  8099. testUnmarshalErr(&v165v2, bs165, h, t, "dec-map-v165-p-nil")
  8100. testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-p-nil")
  8101. // ...
  8102. if v == nil {
  8103. v165v2 = nil
  8104. } else {
  8105. v165v2 = make(map[uintptr]uint, len(v))
  8106. } // reset map
  8107. var v165v3, v165v4 typMapMapUintptrUint
  8108. v165v3 = typMapMapUintptrUint(v165v1)
  8109. v165v4 = typMapMapUintptrUint(v165v2)
  8110. bs165 = testMarshalErr(v165v3, h, t, "enc-map-v165-custom")
  8111. testUnmarshalErr(v165v4, bs165, h, t, "dec-map-v165-p-len")
  8112. testDeepEqualErr(v165v3, v165v4, t, "equal-map-v165-p-len")
  8113. }
  8114. for _, v := range []map[uintptr]uint8{nil, {}, {44: 0, 33: 44}} {
  8115. // fmt.Printf(">>>> running mammoth map v166: %v\n", v)
  8116. var v166v1, v166v2 map[uintptr]uint8
  8117. v166v1 = v
  8118. bs166 := testMarshalErr(v166v1, h, t, "enc-map-v166")
  8119. if v == nil {
  8120. v166v2 = nil
  8121. } else {
  8122. v166v2 = make(map[uintptr]uint8, len(v))
  8123. } // reset map
  8124. testUnmarshalErr(v166v2, bs166, h, t, "dec-map-v166")
  8125. testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166")
  8126. if v == nil {
  8127. v166v2 = nil
  8128. } else {
  8129. v166v2 = make(map[uintptr]uint8, len(v))
  8130. } // reset map
  8131. testUnmarshalErr(reflect.ValueOf(v166v2), bs166, h, t, "dec-map-v166-noaddr") // decode into non-addressable map value
  8132. testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-noaddr")
  8133. if v == nil {
  8134. v166v2 = nil
  8135. } else {
  8136. v166v2 = make(map[uintptr]uint8, len(v))
  8137. } // reset map
  8138. testUnmarshalErr(&v166v2, bs166, h, t, "dec-map-v166-p-len")
  8139. testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-p-len")
  8140. bs166 = testMarshalErr(&v166v1, h, t, "enc-map-v166-p")
  8141. v166v2 = nil
  8142. testUnmarshalErr(&v166v2, bs166, h, t, "dec-map-v166-p-nil")
  8143. testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-p-nil")
  8144. // ...
  8145. if v == nil {
  8146. v166v2 = nil
  8147. } else {
  8148. v166v2 = make(map[uintptr]uint8, len(v))
  8149. } // reset map
  8150. var v166v3, v166v4 typMapMapUintptrUint8
  8151. v166v3 = typMapMapUintptrUint8(v166v1)
  8152. v166v4 = typMapMapUintptrUint8(v166v2)
  8153. bs166 = testMarshalErr(v166v3, h, t, "enc-map-v166-custom")
  8154. testUnmarshalErr(v166v4, bs166, h, t, "dec-map-v166-p-len")
  8155. testDeepEqualErr(v166v3, v166v4, t, "equal-map-v166-p-len")
  8156. }
  8157. for _, v := range []map[uintptr]uint16{nil, {}, {33: 0, 44: 33}} {
  8158. // fmt.Printf(">>>> running mammoth map v167: %v\n", v)
  8159. var v167v1, v167v2 map[uintptr]uint16
  8160. v167v1 = v
  8161. bs167 := testMarshalErr(v167v1, h, t, "enc-map-v167")
  8162. if v == nil {
  8163. v167v2 = nil
  8164. } else {
  8165. v167v2 = make(map[uintptr]uint16, len(v))
  8166. } // reset map
  8167. testUnmarshalErr(v167v2, bs167, h, t, "dec-map-v167")
  8168. testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167")
  8169. if v == nil {
  8170. v167v2 = nil
  8171. } else {
  8172. v167v2 = make(map[uintptr]uint16, len(v))
  8173. } // reset map
  8174. testUnmarshalErr(reflect.ValueOf(v167v2), bs167, h, t, "dec-map-v167-noaddr") // decode into non-addressable map value
  8175. testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-noaddr")
  8176. if v == nil {
  8177. v167v2 = nil
  8178. } else {
  8179. v167v2 = make(map[uintptr]uint16, len(v))
  8180. } // reset map
  8181. testUnmarshalErr(&v167v2, bs167, h, t, "dec-map-v167-p-len")
  8182. testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-p-len")
  8183. bs167 = testMarshalErr(&v167v1, h, t, "enc-map-v167-p")
  8184. v167v2 = nil
  8185. testUnmarshalErr(&v167v2, bs167, h, t, "dec-map-v167-p-nil")
  8186. testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-p-nil")
  8187. // ...
  8188. if v == nil {
  8189. v167v2 = nil
  8190. } else {
  8191. v167v2 = make(map[uintptr]uint16, len(v))
  8192. } // reset map
  8193. var v167v3, v167v4 typMapMapUintptrUint16
  8194. v167v3 = typMapMapUintptrUint16(v167v1)
  8195. v167v4 = typMapMapUintptrUint16(v167v2)
  8196. bs167 = testMarshalErr(v167v3, h, t, "enc-map-v167-custom")
  8197. testUnmarshalErr(v167v4, bs167, h, t, "dec-map-v167-p-len")
  8198. testDeepEqualErr(v167v3, v167v4, t, "equal-map-v167-p-len")
  8199. }
  8200. for _, v := range []map[uintptr]uint32{nil, {}, {44: 0, 33: 44}} {
  8201. // fmt.Printf(">>>> running mammoth map v168: %v\n", v)
  8202. var v168v1, v168v2 map[uintptr]uint32
  8203. v168v1 = v
  8204. bs168 := testMarshalErr(v168v1, h, t, "enc-map-v168")
  8205. if v == nil {
  8206. v168v2 = nil
  8207. } else {
  8208. v168v2 = make(map[uintptr]uint32, len(v))
  8209. } // reset map
  8210. testUnmarshalErr(v168v2, bs168, h, t, "dec-map-v168")
  8211. testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168")
  8212. if v == nil {
  8213. v168v2 = nil
  8214. } else {
  8215. v168v2 = make(map[uintptr]uint32, len(v))
  8216. } // reset map
  8217. testUnmarshalErr(reflect.ValueOf(v168v2), bs168, h, t, "dec-map-v168-noaddr") // decode into non-addressable map value
  8218. testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-noaddr")
  8219. if v == nil {
  8220. v168v2 = nil
  8221. } else {
  8222. v168v2 = make(map[uintptr]uint32, len(v))
  8223. } // reset map
  8224. testUnmarshalErr(&v168v2, bs168, h, t, "dec-map-v168-p-len")
  8225. testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-p-len")
  8226. bs168 = testMarshalErr(&v168v1, h, t, "enc-map-v168-p")
  8227. v168v2 = nil
  8228. testUnmarshalErr(&v168v2, bs168, h, t, "dec-map-v168-p-nil")
  8229. testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-p-nil")
  8230. // ...
  8231. if v == nil {
  8232. v168v2 = nil
  8233. } else {
  8234. v168v2 = make(map[uintptr]uint32, len(v))
  8235. } // reset map
  8236. var v168v3, v168v4 typMapMapUintptrUint32
  8237. v168v3 = typMapMapUintptrUint32(v168v1)
  8238. v168v4 = typMapMapUintptrUint32(v168v2)
  8239. bs168 = testMarshalErr(v168v3, h, t, "enc-map-v168-custom")
  8240. testUnmarshalErr(v168v4, bs168, h, t, "dec-map-v168-p-len")
  8241. testDeepEqualErr(v168v3, v168v4, t, "equal-map-v168-p-len")
  8242. }
  8243. for _, v := range []map[uintptr]uint64{nil, {}, {33: 0, 44: 33}} {
  8244. // fmt.Printf(">>>> running mammoth map v169: %v\n", v)
  8245. var v169v1, v169v2 map[uintptr]uint64
  8246. v169v1 = v
  8247. bs169 := testMarshalErr(v169v1, h, t, "enc-map-v169")
  8248. if v == nil {
  8249. v169v2 = nil
  8250. } else {
  8251. v169v2 = make(map[uintptr]uint64, len(v))
  8252. } // reset map
  8253. testUnmarshalErr(v169v2, bs169, h, t, "dec-map-v169")
  8254. testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169")
  8255. if v == nil {
  8256. v169v2 = nil
  8257. } else {
  8258. v169v2 = make(map[uintptr]uint64, len(v))
  8259. } // reset map
  8260. testUnmarshalErr(reflect.ValueOf(v169v2), bs169, h, t, "dec-map-v169-noaddr") // decode into non-addressable map value
  8261. testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-noaddr")
  8262. if v == nil {
  8263. v169v2 = nil
  8264. } else {
  8265. v169v2 = make(map[uintptr]uint64, len(v))
  8266. } // reset map
  8267. testUnmarshalErr(&v169v2, bs169, h, t, "dec-map-v169-p-len")
  8268. testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-p-len")
  8269. bs169 = testMarshalErr(&v169v1, h, t, "enc-map-v169-p")
  8270. v169v2 = nil
  8271. testUnmarshalErr(&v169v2, bs169, h, t, "dec-map-v169-p-nil")
  8272. testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-p-nil")
  8273. // ...
  8274. if v == nil {
  8275. v169v2 = nil
  8276. } else {
  8277. v169v2 = make(map[uintptr]uint64, len(v))
  8278. } // reset map
  8279. var v169v3, v169v4 typMapMapUintptrUint64
  8280. v169v3 = typMapMapUintptrUint64(v169v1)
  8281. v169v4 = typMapMapUintptrUint64(v169v2)
  8282. bs169 = testMarshalErr(v169v3, h, t, "enc-map-v169-custom")
  8283. testUnmarshalErr(v169v4, bs169, h, t, "dec-map-v169-p-len")
  8284. testDeepEqualErr(v169v3, v169v4, t, "equal-map-v169-p-len")
  8285. }
  8286. for _, v := range []map[uintptr]uintptr{nil, {}, {44: 0, 33: 44}} {
  8287. // fmt.Printf(">>>> running mammoth map v170: %v\n", v)
  8288. var v170v1, v170v2 map[uintptr]uintptr
  8289. v170v1 = v
  8290. bs170 := testMarshalErr(v170v1, h, t, "enc-map-v170")
  8291. if v == nil {
  8292. v170v2 = nil
  8293. } else {
  8294. v170v2 = make(map[uintptr]uintptr, len(v))
  8295. } // reset map
  8296. testUnmarshalErr(v170v2, bs170, h, t, "dec-map-v170")
  8297. testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170")
  8298. if v == nil {
  8299. v170v2 = nil
  8300. } else {
  8301. v170v2 = make(map[uintptr]uintptr, len(v))
  8302. } // reset map
  8303. testUnmarshalErr(reflect.ValueOf(v170v2), bs170, h, t, "dec-map-v170-noaddr") // decode into non-addressable map value
  8304. testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-noaddr")
  8305. if v == nil {
  8306. v170v2 = nil
  8307. } else {
  8308. v170v2 = make(map[uintptr]uintptr, len(v))
  8309. } // reset map
  8310. testUnmarshalErr(&v170v2, bs170, h, t, "dec-map-v170-p-len")
  8311. testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-p-len")
  8312. bs170 = testMarshalErr(&v170v1, h, t, "enc-map-v170-p")
  8313. v170v2 = nil
  8314. testUnmarshalErr(&v170v2, bs170, h, t, "dec-map-v170-p-nil")
  8315. testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-p-nil")
  8316. // ...
  8317. if v == nil {
  8318. v170v2 = nil
  8319. } else {
  8320. v170v2 = make(map[uintptr]uintptr, len(v))
  8321. } // reset map
  8322. var v170v3, v170v4 typMapMapUintptrUintptr
  8323. v170v3 = typMapMapUintptrUintptr(v170v1)
  8324. v170v4 = typMapMapUintptrUintptr(v170v2)
  8325. bs170 = testMarshalErr(v170v3, h, t, "enc-map-v170-custom")
  8326. testUnmarshalErr(v170v4, bs170, h, t, "dec-map-v170-p-len")
  8327. testDeepEqualErr(v170v3, v170v4, t, "equal-map-v170-p-len")
  8328. }
  8329. for _, v := range []map[uintptr]int{nil, {}, {33: 0, 44: 33}} {
  8330. // fmt.Printf(">>>> running mammoth map v171: %v\n", v)
  8331. var v171v1, v171v2 map[uintptr]int
  8332. v171v1 = v
  8333. bs171 := testMarshalErr(v171v1, h, t, "enc-map-v171")
  8334. if v == nil {
  8335. v171v2 = nil
  8336. } else {
  8337. v171v2 = make(map[uintptr]int, len(v))
  8338. } // reset map
  8339. testUnmarshalErr(v171v2, bs171, h, t, "dec-map-v171")
  8340. testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171")
  8341. if v == nil {
  8342. v171v2 = nil
  8343. } else {
  8344. v171v2 = make(map[uintptr]int, len(v))
  8345. } // reset map
  8346. testUnmarshalErr(reflect.ValueOf(v171v2), bs171, h, t, "dec-map-v171-noaddr") // decode into non-addressable map value
  8347. testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-noaddr")
  8348. if v == nil {
  8349. v171v2 = nil
  8350. } else {
  8351. v171v2 = make(map[uintptr]int, len(v))
  8352. } // reset map
  8353. testUnmarshalErr(&v171v2, bs171, h, t, "dec-map-v171-p-len")
  8354. testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-p-len")
  8355. bs171 = testMarshalErr(&v171v1, h, t, "enc-map-v171-p")
  8356. v171v2 = nil
  8357. testUnmarshalErr(&v171v2, bs171, h, t, "dec-map-v171-p-nil")
  8358. testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-p-nil")
  8359. // ...
  8360. if v == nil {
  8361. v171v2 = nil
  8362. } else {
  8363. v171v2 = make(map[uintptr]int, len(v))
  8364. } // reset map
  8365. var v171v3, v171v4 typMapMapUintptrInt
  8366. v171v3 = typMapMapUintptrInt(v171v1)
  8367. v171v4 = typMapMapUintptrInt(v171v2)
  8368. bs171 = testMarshalErr(v171v3, h, t, "enc-map-v171-custom")
  8369. testUnmarshalErr(v171v4, bs171, h, t, "dec-map-v171-p-len")
  8370. testDeepEqualErr(v171v3, v171v4, t, "equal-map-v171-p-len")
  8371. }
  8372. for _, v := range []map[uintptr]int8{nil, {}, {44: 0, 33: 44}} {
  8373. // fmt.Printf(">>>> running mammoth map v172: %v\n", v)
  8374. var v172v1, v172v2 map[uintptr]int8
  8375. v172v1 = v
  8376. bs172 := testMarshalErr(v172v1, h, t, "enc-map-v172")
  8377. if v == nil {
  8378. v172v2 = nil
  8379. } else {
  8380. v172v2 = make(map[uintptr]int8, len(v))
  8381. } // reset map
  8382. testUnmarshalErr(v172v2, bs172, h, t, "dec-map-v172")
  8383. testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172")
  8384. if v == nil {
  8385. v172v2 = nil
  8386. } else {
  8387. v172v2 = make(map[uintptr]int8, len(v))
  8388. } // reset map
  8389. testUnmarshalErr(reflect.ValueOf(v172v2), bs172, h, t, "dec-map-v172-noaddr") // decode into non-addressable map value
  8390. testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-noaddr")
  8391. if v == nil {
  8392. v172v2 = nil
  8393. } else {
  8394. v172v2 = make(map[uintptr]int8, len(v))
  8395. } // reset map
  8396. testUnmarshalErr(&v172v2, bs172, h, t, "dec-map-v172-p-len")
  8397. testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-p-len")
  8398. bs172 = testMarshalErr(&v172v1, h, t, "enc-map-v172-p")
  8399. v172v2 = nil
  8400. testUnmarshalErr(&v172v2, bs172, h, t, "dec-map-v172-p-nil")
  8401. testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-p-nil")
  8402. // ...
  8403. if v == nil {
  8404. v172v2 = nil
  8405. } else {
  8406. v172v2 = make(map[uintptr]int8, len(v))
  8407. } // reset map
  8408. var v172v3, v172v4 typMapMapUintptrInt8
  8409. v172v3 = typMapMapUintptrInt8(v172v1)
  8410. v172v4 = typMapMapUintptrInt8(v172v2)
  8411. bs172 = testMarshalErr(v172v3, h, t, "enc-map-v172-custom")
  8412. testUnmarshalErr(v172v4, bs172, h, t, "dec-map-v172-p-len")
  8413. testDeepEqualErr(v172v3, v172v4, t, "equal-map-v172-p-len")
  8414. }
  8415. for _, v := range []map[uintptr]int16{nil, {}, {33: 0, 44: 33}} {
  8416. // fmt.Printf(">>>> running mammoth map v173: %v\n", v)
  8417. var v173v1, v173v2 map[uintptr]int16
  8418. v173v1 = v
  8419. bs173 := testMarshalErr(v173v1, h, t, "enc-map-v173")
  8420. if v == nil {
  8421. v173v2 = nil
  8422. } else {
  8423. v173v2 = make(map[uintptr]int16, len(v))
  8424. } // reset map
  8425. testUnmarshalErr(v173v2, bs173, h, t, "dec-map-v173")
  8426. testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173")
  8427. if v == nil {
  8428. v173v2 = nil
  8429. } else {
  8430. v173v2 = make(map[uintptr]int16, len(v))
  8431. } // reset map
  8432. testUnmarshalErr(reflect.ValueOf(v173v2), bs173, h, t, "dec-map-v173-noaddr") // decode into non-addressable map value
  8433. testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-noaddr")
  8434. if v == nil {
  8435. v173v2 = nil
  8436. } else {
  8437. v173v2 = make(map[uintptr]int16, len(v))
  8438. } // reset map
  8439. testUnmarshalErr(&v173v2, bs173, h, t, "dec-map-v173-p-len")
  8440. testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-p-len")
  8441. bs173 = testMarshalErr(&v173v1, h, t, "enc-map-v173-p")
  8442. v173v2 = nil
  8443. testUnmarshalErr(&v173v2, bs173, h, t, "dec-map-v173-p-nil")
  8444. testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-p-nil")
  8445. // ...
  8446. if v == nil {
  8447. v173v2 = nil
  8448. } else {
  8449. v173v2 = make(map[uintptr]int16, len(v))
  8450. } // reset map
  8451. var v173v3, v173v4 typMapMapUintptrInt16
  8452. v173v3 = typMapMapUintptrInt16(v173v1)
  8453. v173v4 = typMapMapUintptrInt16(v173v2)
  8454. bs173 = testMarshalErr(v173v3, h, t, "enc-map-v173-custom")
  8455. testUnmarshalErr(v173v4, bs173, h, t, "dec-map-v173-p-len")
  8456. testDeepEqualErr(v173v3, v173v4, t, "equal-map-v173-p-len")
  8457. }
  8458. for _, v := range []map[uintptr]int32{nil, {}, {44: 0, 33: 44}} {
  8459. // fmt.Printf(">>>> running mammoth map v174: %v\n", v)
  8460. var v174v1, v174v2 map[uintptr]int32
  8461. v174v1 = v
  8462. bs174 := testMarshalErr(v174v1, h, t, "enc-map-v174")
  8463. if v == nil {
  8464. v174v2 = nil
  8465. } else {
  8466. v174v2 = make(map[uintptr]int32, len(v))
  8467. } // reset map
  8468. testUnmarshalErr(v174v2, bs174, h, t, "dec-map-v174")
  8469. testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174")
  8470. if v == nil {
  8471. v174v2 = nil
  8472. } else {
  8473. v174v2 = make(map[uintptr]int32, len(v))
  8474. } // reset map
  8475. testUnmarshalErr(reflect.ValueOf(v174v2), bs174, h, t, "dec-map-v174-noaddr") // decode into non-addressable map value
  8476. testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-noaddr")
  8477. if v == nil {
  8478. v174v2 = nil
  8479. } else {
  8480. v174v2 = make(map[uintptr]int32, len(v))
  8481. } // reset map
  8482. testUnmarshalErr(&v174v2, bs174, h, t, "dec-map-v174-p-len")
  8483. testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-p-len")
  8484. bs174 = testMarshalErr(&v174v1, h, t, "enc-map-v174-p")
  8485. v174v2 = nil
  8486. testUnmarshalErr(&v174v2, bs174, h, t, "dec-map-v174-p-nil")
  8487. testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-p-nil")
  8488. // ...
  8489. if v == nil {
  8490. v174v2 = nil
  8491. } else {
  8492. v174v2 = make(map[uintptr]int32, len(v))
  8493. } // reset map
  8494. var v174v3, v174v4 typMapMapUintptrInt32
  8495. v174v3 = typMapMapUintptrInt32(v174v1)
  8496. v174v4 = typMapMapUintptrInt32(v174v2)
  8497. bs174 = testMarshalErr(v174v3, h, t, "enc-map-v174-custom")
  8498. testUnmarshalErr(v174v4, bs174, h, t, "dec-map-v174-p-len")
  8499. testDeepEqualErr(v174v3, v174v4, t, "equal-map-v174-p-len")
  8500. }
  8501. for _, v := range []map[uintptr]int64{nil, {}, {33: 0, 44: 33}} {
  8502. // fmt.Printf(">>>> running mammoth map v175: %v\n", v)
  8503. var v175v1, v175v2 map[uintptr]int64
  8504. v175v1 = v
  8505. bs175 := testMarshalErr(v175v1, h, t, "enc-map-v175")
  8506. if v == nil {
  8507. v175v2 = nil
  8508. } else {
  8509. v175v2 = make(map[uintptr]int64, len(v))
  8510. } // reset map
  8511. testUnmarshalErr(v175v2, bs175, h, t, "dec-map-v175")
  8512. testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175")
  8513. if v == nil {
  8514. v175v2 = nil
  8515. } else {
  8516. v175v2 = make(map[uintptr]int64, len(v))
  8517. } // reset map
  8518. testUnmarshalErr(reflect.ValueOf(v175v2), bs175, h, t, "dec-map-v175-noaddr") // decode into non-addressable map value
  8519. testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-noaddr")
  8520. if v == nil {
  8521. v175v2 = nil
  8522. } else {
  8523. v175v2 = make(map[uintptr]int64, len(v))
  8524. } // reset map
  8525. testUnmarshalErr(&v175v2, bs175, h, t, "dec-map-v175-p-len")
  8526. testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-p-len")
  8527. bs175 = testMarshalErr(&v175v1, h, t, "enc-map-v175-p")
  8528. v175v2 = nil
  8529. testUnmarshalErr(&v175v2, bs175, h, t, "dec-map-v175-p-nil")
  8530. testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-p-nil")
  8531. // ...
  8532. if v == nil {
  8533. v175v2 = nil
  8534. } else {
  8535. v175v2 = make(map[uintptr]int64, len(v))
  8536. } // reset map
  8537. var v175v3, v175v4 typMapMapUintptrInt64
  8538. v175v3 = typMapMapUintptrInt64(v175v1)
  8539. v175v4 = typMapMapUintptrInt64(v175v2)
  8540. bs175 = testMarshalErr(v175v3, h, t, "enc-map-v175-custom")
  8541. testUnmarshalErr(v175v4, bs175, h, t, "dec-map-v175-p-len")
  8542. testDeepEqualErr(v175v3, v175v4, t, "equal-map-v175-p-len")
  8543. }
  8544. for _, v := range []map[uintptr]float32{nil, {}, {44: 0, 33: 22.2}} {
  8545. // fmt.Printf(">>>> running mammoth map v176: %v\n", v)
  8546. var v176v1, v176v2 map[uintptr]float32
  8547. v176v1 = v
  8548. bs176 := testMarshalErr(v176v1, h, t, "enc-map-v176")
  8549. if v == nil {
  8550. v176v2 = nil
  8551. } else {
  8552. v176v2 = make(map[uintptr]float32, len(v))
  8553. } // reset map
  8554. testUnmarshalErr(v176v2, bs176, h, t, "dec-map-v176")
  8555. testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176")
  8556. if v == nil {
  8557. v176v2 = nil
  8558. } else {
  8559. v176v2 = make(map[uintptr]float32, len(v))
  8560. } // reset map
  8561. testUnmarshalErr(reflect.ValueOf(v176v2), bs176, h, t, "dec-map-v176-noaddr") // decode into non-addressable map value
  8562. testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-noaddr")
  8563. if v == nil {
  8564. v176v2 = nil
  8565. } else {
  8566. v176v2 = make(map[uintptr]float32, len(v))
  8567. } // reset map
  8568. testUnmarshalErr(&v176v2, bs176, h, t, "dec-map-v176-p-len")
  8569. testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-p-len")
  8570. bs176 = testMarshalErr(&v176v1, h, t, "enc-map-v176-p")
  8571. v176v2 = nil
  8572. testUnmarshalErr(&v176v2, bs176, h, t, "dec-map-v176-p-nil")
  8573. testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-p-nil")
  8574. // ...
  8575. if v == nil {
  8576. v176v2 = nil
  8577. } else {
  8578. v176v2 = make(map[uintptr]float32, len(v))
  8579. } // reset map
  8580. var v176v3, v176v4 typMapMapUintptrFloat32
  8581. v176v3 = typMapMapUintptrFloat32(v176v1)
  8582. v176v4 = typMapMapUintptrFloat32(v176v2)
  8583. bs176 = testMarshalErr(v176v3, h, t, "enc-map-v176-custom")
  8584. testUnmarshalErr(v176v4, bs176, h, t, "dec-map-v176-p-len")
  8585. testDeepEqualErr(v176v3, v176v4, t, "equal-map-v176-p-len")
  8586. }
  8587. for _, v := range []map[uintptr]float64{nil, {}, {44: 0, 33: 11.1}} {
  8588. // fmt.Printf(">>>> running mammoth map v177: %v\n", v)
  8589. var v177v1, v177v2 map[uintptr]float64
  8590. v177v1 = v
  8591. bs177 := testMarshalErr(v177v1, h, t, "enc-map-v177")
  8592. if v == nil {
  8593. v177v2 = nil
  8594. } else {
  8595. v177v2 = make(map[uintptr]float64, len(v))
  8596. } // reset map
  8597. testUnmarshalErr(v177v2, bs177, h, t, "dec-map-v177")
  8598. testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177")
  8599. if v == nil {
  8600. v177v2 = nil
  8601. } else {
  8602. v177v2 = make(map[uintptr]float64, len(v))
  8603. } // reset map
  8604. testUnmarshalErr(reflect.ValueOf(v177v2), bs177, h, t, "dec-map-v177-noaddr") // decode into non-addressable map value
  8605. testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-noaddr")
  8606. if v == nil {
  8607. v177v2 = nil
  8608. } else {
  8609. v177v2 = make(map[uintptr]float64, len(v))
  8610. } // reset map
  8611. testUnmarshalErr(&v177v2, bs177, h, t, "dec-map-v177-p-len")
  8612. testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-p-len")
  8613. bs177 = testMarshalErr(&v177v1, h, t, "enc-map-v177-p")
  8614. v177v2 = nil
  8615. testUnmarshalErr(&v177v2, bs177, h, t, "dec-map-v177-p-nil")
  8616. testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-p-nil")
  8617. // ...
  8618. if v == nil {
  8619. v177v2 = nil
  8620. } else {
  8621. v177v2 = make(map[uintptr]float64, len(v))
  8622. } // reset map
  8623. var v177v3, v177v4 typMapMapUintptrFloat64
  8624. v177v3 = typMapMapUintptrFloat64(v177v1)
  8625. v177v4 = typMapMapUintptrFloat64(v177v2)
  8626. bs177 = testMarshalErr(v177v3, h, t, "enc-map-v177-custom")
  8627. testUnmarshalErr(v177v4, bs177, h, t, "dec-map-v177-p-len")
  8628. testDeepEqualErr(v177v3, v177v4, t, "equal-map-v177-p-len")
  8629. }
  8630. for _, v := range []map[uintptr]bool{nil, {}, {44: false, 33: true}} {
  8631. // fmt.Printf(">>>> running mammoth map v178: %v\n", v)
  8632. var v178v1, v178v2 map[uintptr]bool
  8633. v178v1 = v
  8634. bs178 := testMarshalErr(v178v1, h, t, "enc-map-v178")
  8635. if v == nil {
  8636. v178v2 = nil
  8637. } else {
  8638. v178v2 = make(map[uintptr]bool, len(v))
  8639. } // reset map
  8640. testUnmarshalErr(v178v2, bs178, h, t, "dec-map-v178")
  8641. testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178")
  8642. if v == nil {
  8643. v178v2 = nil
  8644. } else {
  8645. v178v2 = make(map[uintptr]bool, len(v))
  8646. } // reset map
  8647. testUnmarshalErr(reflect.ValueOf(v178v2), bs178, h, t, "dec-map-v178-noaddr") // decode into non-addressable map value
  8648. testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-noaddr")
  8649. if v == nil {
  8650. v178v2 = nil
  8651. } else {
  8652. v178v2 = make(map[uintptr]bool, len(v))
  8653. } // reset map
  8654. testUnmarshalErr(&v178v2, bs178, h, t, "dec-map-v178-p-len")
  8655. testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-p-len")
  8656. bs178 = testMarshalErr(&v178v1, h, t, "enc-map-v178-p")
  8657. v178v2 = nil
  8658. testUnmarshalErr(&v178v2, bs178, h, t, "dec-map-v178-p-nil")
  8659. testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-p-nil")
  8660. // ...
  8661. if v == nil {
  8662. v178v2 = nil
  8663. } else {
  8664. v178v2 = make(map[uintptr]bool, len(v))
  8665. } // reset map
  8666. var v178v3, v178v4 typMapMapUintptrBool
  8667. v178v3 = typMapMapUintptrBool(v178v1)
  8668. v178v4 = typMapMapUintptrBool(v178v2)
  8669. bs178 = testMarshalErr(v178v3, h, t, "enc-map-v178-custom")
  8670. testUnmarshalErr(v178v4, bs178, h, t, "dec-map-v178-p-len")
  8671. testDeepEqualErr(v178v3, v178v4, t, "equal-map-v178-p-len")
  8672. }
  8673. for _, v := range []map[int]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  8674. // fmt.Printf(">>>> running mammoth map v181: %v\n", v)
  8675. var v181v1, v181v2 map[int]interface{}
  8676. v181v1 = v
  8677. bs181 := testMarshalErr(v181v1, h, t, "enc-map-v181")
  8678. if v == nil {
  8679. v181v2 = nil
  8680. } else {
  8681. v181v2 = make(map[int]interface{}, len(v))
  8682. } // reset map
  8683. testUnmarshalErr(v181v2, bs181, h, t, "dec-map-v181")
  8684. testDeepEqualErr(v181v1, v181v2, t, "equal-map-v181")
  8685. if v == nil {
  8686. v181v2 = nil
  8687. } else {
  8688. v181v2 = make(map[int]interface{}, len(v))
  8689. } // reset map
  8690. testUnmarshalErr(reflect.ValueOf(v181v2), bs181, h, t, "dec-map-v181-noaddr") // decode into non-addressable map value
  8691. testDeepEqualErr(v181v1, v181v2, t, "equal-map-v181-noaddr")
  8692. if v == nil {
  8693. v181v2 = nil
  8694. } else {
  8695. v181v2 = make(map[int]interface{}, len(v))
  8696. } // reset map
  8697. testUnmarshalErr(&v181v2, bs181, h, t, "dec-map-v181-p-len")
  8698. testDeepEqualErr(v181v1, v181v2, t, "equal-map-v181-p-len")
  8699. bs181 = testMarshalErr(&v181v1, h, t, "enc-map-v181-p")
  8700. v181v2 = nil
  8701. testUnmarshalErr(&v181v2, bs181, h, t, "dec-map-v181-p-nil")
  8702. testDeepEqualErr(v181v1, v181v2, t, "equal-map-v181-p-nil")
  8703. // ...
  8704. if v == nil {
  8705. v181v2 = nil
  8706. } else {
  8707. v181v2 = make(map[int]interface{}, len(v))
  8708. } // reset map
  8709. var v181v3, v181v4 typMapMapIntIntf
  8710. v181v3 = typMapMapIntIntf(v181v1)
  8711. v181v4 = typMapMapIntIntf(v181v2)
  8712. bs181 = testMarshalErr(v181v3, h, t, "enc-map-v181-custom")
  8713. testUnmarshalErr(v181v4, bs181, h, t, "dec-map-v181-p-len")
  8714. testDeepEqualErr(v181v3, v181v4, t, "equal-map-v181-p-len")
  8715. }
  8716. for _, v := range []map[int]string{nil, {}, {44: "", 33: "some-string-2"}} {
  8717. // fmt.Printf(">>>> running mammoth map v182: %v\n", v)
  8718. var v182v1, v182v2 map[int]string
  8719. v182v1 = v
  8720. bs182 := testMarshalErr(v182v1, h, t, "enc-map-v182")
  8721. if v == nil {
  8722. v182v2 = nil
  8723. } else {
  8724. v182v2 = make(map[int]string, len(v))
  8725. } // reset map
  8726. testUnmarshalErr(v182v2, bs182, h, t, "dec-map-v182")
  8727. testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182")
  8728. if v == nil {
  8729. v182v2 = nil
  8730. } else {
  8731. v182v2 = make(map[int]string, len(v))
  8732. } // reset map
  8733. testUnmarshalErr(reflect.ValueOf(v182v2), bs182, h, t, "dec-map-v182-noaddr") // decode into non-addressable map value
  8734. testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-noaddr")
  8735. if v == nil {
  8736. v182v2 = nil
  8737. } else {
  8738. v182v2 = make(map[int]string, len(v))
  8739. } // reset map
  8740. testUnmarshalErr(&v182v2, bs182, h, t, "dec-map-v182-p-len")
  8741. testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-p-len")
  8742. bs182 = testMarshalErr(&v182v1, h, t, "enc-map-v182-p")
  8743. v182v2 = nil
  8744. testUnmarshalErr(&v182v2, bs182, h, t, "dec-map-v182-p-nil")
  8745. testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-p-nil")
  8746. // ...
  8747. if v == nil {
  8748. v182v2 = nil
  8749. } else {
  8750. v182v2 = make(map[int]string, len(v))
  8751. } // reset map
  8752. var v182v3, v182v4 typMapMapIntString
  8753. v182v3 = typMapMapIntString(v182v1)
  8754. v182v4 = typMapMapIntString(v182v2)
  8755. bs182 = testMarshalErr(v182v3, h, t, "enc-map-v182-custom")
  8756. testUnmarshalErr(v182v4, bs182, h, t, "dec-map-v182-p-len")
  8757. testDeepEqualErr(v182v3, v182v4, t, "equal-map-v182-p-len")
  8758. }
  8759. for _, v := range []map[int]uint{nil, {}, {44: 0, 33: 44}} {
  8760. // fmt.Printf(">>>> running mammoth map v183: %v\n", v)
  8761. var v183v1, v183v2 map[int]uint
  8762. v183v1 = v
  8763. bs183 := testMarshalErr(v183v1, h, t, "enc-map-v183")
  8764. if v == nil {
  8765. v183v2 = nil
  8766. } else {
  8767. v183v2 = make(map[int]uint, len(v))
  8768. } // reset map
  8769. testUnmarshalErr(v183v2, bs183, h, t, "dec-map-v183")
  8770. testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183")
  8771. if v == nil {
  8772. v183v2 = nil
  8773. } else {
  8774. v183v2 = make(map[int]uint, len(v))
  8775. } // reset map
  8776. testUnmarshalErr(reflect.ValueOf(v183v2), bs183, h, t, "dec-map-v183-noaddr") // decode into non-addressable map value
  8777. testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-noaddr")
  8778. if v == nil {
  8779. v183v2 = nil
  8780. } else {
  8781. v183v2 = make(map[int]uint, len(v))
  8782. } // reset map
  8783. testUnmarshalErr(&v183v2, bs183, h, t, "dec-map-v183-p-len")
  8784. testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-p-len")
  8785. bs183 = testMarshalErr(&v183v1, h, t, "enc-map-v183-p")
  8786. v183v2 = nil
  8787. testUnmarshalErr(&v183v2, bs183, h, t, "dec-map-v183-p-nil")
  8788. testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-p-nil")
  8789. // ...
  8790. if v == nil {
  8791. v183v2 = nil
  8792. } else {
  8793. v183v2 = make(map[int]uint, len(v))
  8794. } // reset map
  8795. var v183v3, v183v4 typMapMapIntUint
  8796. v183v3 = typMapMapIntUint(v183v1)
  8797. v183v4 = typMapMapIntUint(v183v2)
  8798. bs183 = testMarshalErr(v183v3, h, t, "enc-map-v183-custom")
  8799. testUnmarshalErr(v183v4, bs183, h, t, "dec-map-v183-p-len")
  8800. testDeepEqualErr(v183v3, v183v4, t, "equal-map-v183-p-len")
  8801. }
  8802. for _, v := range []map[int]uint8{nil, {}, {33: 0, 44: 33}} {
  8803. // fmt.Printf(">>>> running mammoth map v184: %v\n", v)
  8804. var v184v1, v184v2 map[int]uint8
  8805. v184v1 = v
  8806. bs184 := testMarshalErr(v184v1, h, t, "enc-map-v184")
  8807. if v == nil {
  8808. v184v2 = nil
  8809. } else {
  8810. v184v2 = make(map[int]uint8, len(v))
  8811. } // reset map
  8812. testUnmarshalErr(v184v2, bs184, h, t, "dec-map-v184")
  8813. testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184")
  8814. if v == nil {
  8815. v184v2 = nil
  8816. } else {
  8817. v184v2 = make(map[int]uint8, len(v))
  8818. } // reset map
  8819. testUnmarshalErr(reflect.ValueOf(v184v2), bs184, h, t, "dec-map-v184-noaddr") // decode into non-addressable map value
  8820. testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-noaddr")
  8821. if v == nil {
  8822. v184v2 = nil
  8823. } else {
  8824. v184v2 = make(map[int]uint8, len(v))
  8825. } // reset map
  8826. testUnmarshalErr(&v184v2, bs184, h, t, "dec-map-v184-p-len")
  8827. testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-p-len")
  8828. bs184 = testMarshalErr(&v184v1, h, t, "enc-map-v184-p")
  8829. v184v2 = nil
  8830. testUnmarshalErr(&v184v2, bs184, h, t, "dec-map-v184-p-nil")
  8831. testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-p-nil")
  8832. // ...
  8833. if v == nil {
  8834. v184v2 = nil
  8835. } else {
  8836. v184v2 = make(map[int]uint8, len(v))
  8837. } // reset map
  8838. var v184v3, v184v4 typMapMapIntUint8
  8839. v184v3 = typMapMapIntUint8(v184v1)
  8840. v184v4 = typMapMapIntUint8(v184v2)
  8841. bs184 = testMarshalErr(v184v3, h, t, "enc-map-v184-custom")
  8842. testUnmarshalErr(v184v4, bs184, h, t, "dec-map-v184-p-len")
  8843. testDeepEqualErr(v184v3, v184v4, t, "equal-map-v184-p-len")
  8844. }
  8845. for _, v := range []map[int]uint16{nil, {}, {44: 0, 33: 44}} {
  8846. // fmt.Printf(">>>> running mammoth map v185: %v\n", v)
  8847. var v185v1, v185v2 map[int]uint16
  8848. v185v1 = v
  8849. bs185 := testMarshalErr(v185v1, h, t, "enc-map-v185")
  8850. if v == nil {
  8851. v185v2 = nil
  8852. } else {
  8853. v185v2 = make(map[int]uint16, len(v))
  8854. } // reset map
  8855. testUnmarshalErr(v185v2, bs185, h, t, "dec-map-v185")
  8856. testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185")
  8857. if v == nil {
  8858. v185v2 = nil
  8859. } else {
  8860. v185v2 = make(map[int]uint16, len(v))
  8861. } // reset map
  8862. testUnmarshalErr(reflect.ValueOf(v185v2), bs185, h, t, "dec-map-v185-noaddr") // decode into non-addressable map value
  8863. testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-noaddr")
  8864. if v == nil {
  8865. v185v2 = nil
  8866. } else {
  8867. v185v2 = make(map[int]uint16, len(v))
  8868. } // reset map
  8869. testUnmarshalErr(&v185v2, bs185, h, t, "dec-map-v185-p-len")
  8870. testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-p-len")
  8871. bs185 = testMarshalErr(&v185v1, h, t, "enc-map-v185-p")
  8872. v185v2 = nil
  8873. testUnmarshalErr(&v185v2, bs185, h, t, "dec-map-v185-p-nil")
  8874. testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-p-nil")
  8875. // ...
  8876. if v == nil {
  8877. v185v2 = nil
  8878. } else {
  8879. v185v2 = make(map[int]uint16, len(v))
  8880. } // reset map
  8881. var v185v3, v185v4 typMapMapIntUint16
  8882. v185v3 = typMapMapIntUint16(v185v1)
  8883. v185v4 = typMapMapIntUint16(v185v2)
  8884. bs185 = testMarshalErr(v185v3, h, t, "enc-map-v185-custom")
  8885. testUnmarshalErr(v185v4, bs185, h, t, "dec-map-v185-p-len")
  8886. testDeepEqualErr(v185v3, v185v4, t, "equal-map-v185-p-len")
  8887. }
  8888. for _, v := range []map[int]uint32{nil, {}, {33: 0, 44: 33}} {
  8889. // fmt.Printf(">>>> running mammoth map v186: %v\n", v)
  8890. var v186v1, v186v2 map[int]uint32
  8891. v186v1 = v
  8892. bs186 := testMarshalErr(v186v1, h, t, "enc-map-v186")
  8893. if v == nil {
  8894. v186v2 = nil
  8895. } else {
  8896. v186v2 = make(map[int]uint32, len(v))
  8897. } // reset map
  8898. testUnmarshalErr(v186v2, bs186, h, t, "dec-map-v186")
  8899. testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186")
  8900. if v == nil {
  8901. v186v2 = nil
  8902. } else {
  8903. v186v2 = make(map[int]uint32, len(v))
  8904. } // reset map
  8905. testUnmarshalErr(reflect.ValueOf(v186v2), bs186, h, t, "dec-map-v186-noaddr") // decode into non-addressable map value
  8906. testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-noaddr")
  8907. if v == nil {
  8908. v186v2 = nil
  8909. } else {
  8910. v186v2 = make(map[int]uint32, len(v))
  8911. } // reset map
  8912. testUnmarshalErr(&v186v2, bs186, h, t, "dec-map-v186-p-len")
  8913. testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-p-len")
  8914. bs186 = testMarshalErr(&v186v1, h, t, "enc-map-v186-p")
  8915. v186v2 = nil
  8916. testUnmarshalErr(&v186v2, bs186, h, t, "dec-map-v186-p-nil")
  8917. testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-p-nil")
  8918. // ...
  8919. if v == nil {
  8920. v186v2 = nil
  8921. } else {
  8922. v186v2 = make(map[int]uint32, len(v))
  8923. } // reset map
  8924. var v186v3, v186v4 typMapMapIntUint32
  8925. v186v3 = typMapMapIntUint32(v186v1)
  8926. v186v4 = typMapMapIntUint32(v186v2)
  8927. bs186 = testMarshalErr(v186v3, h, t, "enc-map-v186-custom")
  8928. testUnmarshalErr(v186v4, bs186, h, t, "dec-map-v186-p-len")
  8929. testDeepEqualErr(v186v3, v186v4, t, "equal-map-v186-p-len")
  8930. }
  8931. for _, v := range []map[int]uint64{nil, {}, {44: 0, 33: 44}} {
  8932. // fmt.Printf(">>>> running mammoth map v187: %v\n", v)
  8933. var v187v1, v187v2 map[int]uint64
  8934. v187v1 = v
  8935. bs187 := testMarshalErr(v187v1, h, t, "enc-map-v187")
  8936. if v == nil {
  8937. v187v2 = nil
  8938. } else {
  8939. v187v2 = make(map[int]uint64, len(v))
  8940. } // reset map
  8941. testUnmarshalErr(v187v2, bs187, h, t, "dec-map-v187")
  8942. testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187")
  8943. if v == nil {
  8944. v187v2 = nil
  8945. } else {
  8946. v187v2 = make(map[int]uint64, len(v))
  8947. } // reset map
  8948. testUnmarshalErr(reflect.ValueOf(v187v2), bs187, h, t, "dec-map-v187-noaddr") // decode into non-addressable map value
  8949. testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-noaddr")
  8950. if v == nil {
  8951. v187v2 = nil
  8952. } else {
  8953. v187v2 = make(map[int]uint64, len(v))
  8954. } // reset map
  8955. testUnmarshalErr(&v187v2, bs187, h, t, "dec-map-v187-p-len")
  8956. testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-p-len")
  8957. bs187 = testMarshalErr(&v187v1, h, t, "enc-map-v187-p")
  8958. v187v2 = nil
  8959. testUnmarshalErr(&v187v2, bs187, h, t, "dec-map-v187-p-nil")
  8960. testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-p-nil")
  8961. // ...
  8962. if v == nil {
  8963. v187v2 = nil
  8964. } else {
  8965. v187v2 = make(map[int]uint64, len(v))
  8966. } // reset map
  8967. var v187v3, v187v4 typMapMapIntUint64
  8968. v187v3 = typMapMapIntUint64(v187v1)
  8969. v187v4 = typMapMapIntUint64(v187v2)
  8970. bs187 = testMarshalErr(v187v3, h, t, "enc-map-v187-custom")
  8971. testUnmarshalErr(v187v4, bs187, h, t, "dec-map-v187-p-len")
  8972. testDeepEqualErr(v187v3, v187v4, t, "equal-map-v187-p-len")
  8973. }
  8974. for _, v := range []map[int]uintptr{nil, {}, {33: 0, 44: 33}} {
  8975. // fmt.Printf(">>>> running mammoth map v188: %v\n", v)
  8976. var v188v1, v188v2 map[int]uintptr
  8977. v188v1 = v
  8978. bs188 := testMarshalErr(v188v1, h, t, "enc-map-v188")
  8979. if v == nil {
  8980. v188v2 = nil
  8981. } else {
  8982. v188v2 = make(map[int]uintptr, len(v))
  8983. } // reset map
  8984. testUnmarshalErr(v188v2, bs188, h, t, "dec-map-v188")
  8985. testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188")
  8986. if v == nil {
  8987. v188v2 = nil
  8988. } else {
  8989. v188v2 = make(map[int]uintptr, len(v))
  8990. } // reset map
  8991. testUnmarshalErr(reflect.ValueOf(v188v2), bs188, h, t, "dec-map-v188-noaddr") // decode into non-addressable map value
  8992. testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-noaddr")
  8993. if v == nil {
  8994. v188v2 = nil
  8995. } else {
  8996. v188v2 = make(map[int]uintptr, len(v))
  8997. } // reset map
  8998. testUnmarshalErr(&v188v2, bs188, h, t, "dec-map-v188-p-len")
  8999. testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-p-len")
  9000. bs188 = testMarshalErr(&v188v1, h, t, "enc-map-v188-p")
  9001. v188v2 = nil
  9002. testUnmarshalErr(&v188v2, bs188, h, t, "dec-map-v188-p-nil")
  9003. testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-p-nil")
  9004. // ...
  9005. if v == nil {
  9006. v188v2 = nil
  9007. } else {
  9008. v188v2 = make(map[int]uintptr, len(v))
  9009. } // reset map
  9010. var v188v3, v188v4 typMapMapIntUintptr
  9011. v188v3 = typMapMapIntUintptr(v188v1)
  9012. v188v4 = typMapMapIntUintptr(v188v2)
  9013. bs188 = testMarshalErr(v188v3, h, t, "enc-map-v188-custom")
  9014. testUnmarshalErr(v188v4, bs188, h, t, "dec-map-v188-p-len")
  9015. testDeepEqualErr(v188v3, v188v4, t, "equal-map-v188-p-len")
  9016. }
  9017. for _, v := range []map[int]int{nil, {}, {44: 0, 33: 44}} {
  9018. // fmt.Printf(">>>> running mammoth map v189: %v\n", v)
  9019. var v189v1, v189v2 map[int]int
  9020. v189v1 = v
  9021. bs189 := testMarshalErr(v189v1, h, t, "enc-map-v189")
  9022. if v == nil {
  9023. v189v2 = nil
  9024. } else {
  9025. v189v2 = make(map[int]int, len(v))
  9026. } // reset map
  9027. testUnmarshalErr(v189v2, bs189, h, t, "dec-map-v189")
  9028. testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189")
  9029. if v == nil {
  9030. v189v2 = nil
  9031. } else {
  9032. v189v2 = make(map[int]int, len(v))
  9033. } // reset map
  9034. testUnmarshalErr(reflect.ValueOf(v189v2), bs189, h, t, "dec-map-v189-noaddr") // decode into non-addressable map value
  9035. testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-noaddr")
  9036. if v == nil {
  9037. v189v2 = nil
  9038. } else {
  9039. v189v2 = make(map[int]int, len(v))
  9040. } // reset map
  9041. testUnmarshalErr(&v189v2, bs189, h, t, "dec-map-v189-p-len")
  9042. testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-p-len")
  9043. bs189 = testMarshalErr(&v189v1, h, t, "enc-map-v189-p")
  9044. v189v2 = nil
  9045. testUnmarshalErr(&v189v2, bs189, h, t, "dec-map-v189-p-nil")
  9046. testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-p-nil")
  9047. // ...
  9048. if v == nil {
  9049. v189v2 = nil
  9050. } else {
  9051. v189v2 = make(map[int]int, len(v))
  9052. } // reset map
  9053. var v189v3, v189v4 typMapMapIntInt
  9054. v189v3 = typMapMapIntInt(v189v1)
  9055. v189v4 = typMapMapIntInt(v189v2)
  9056. bs189 = testMarshalErr(v189v3, h, t, "enc-map-v189-custom")
  9057. testUnmarshalErr(v189v4, bs189, h, t, "dec-map-v189-p-len")
  9058. testDeepEqualErr(v189v3, v189v4, t, "equal-map-v189-p-len")
  9059. }
  9060. for _, v := range []map[int]int8{nil, {}, {33: 0, 44: 33}} {
  9061. // fmt.Printf(">>>> running mammoth map v190: %v\n", v)
  9062. var v190v1, v190v2 map[int]int8
  9063. v190v1 = v
  9064. bs190 := testMarshalErr(v190v1, h, t, "enc-map-v190")
  9065. if v == nil {
  9066. v190v2 = nil
  9067. } else {
  9068. v190v2 = make(map[int]int8, len(v))
  9069. } // reset map
  9070. testUnmarshalErr(v190v2, bs190, h, t, "dec-map-v190")
  9071. testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190")
  9072. if v == nil {
  9073. v190v2 = nil
  9074. } else {
  9075. v190v2 = make(map[int]int8, len(v))
  9076. } // reset map
  9077. testUnmarshalErr(reflect.ValueOf(v190v2), bs190, h, t, "dec-map-v190-noaddr") // decode into non-addressable map value
  9078. testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-noaddr")
  9079. if v == nil {
  9080. v190v2 = nil
  9081. } else {
  9082. v190v2 = make(map[int]int8, len(v))
  9083. } // reset map
  9084. testUnmarshalErr(&v190v2, bs190, h, t, "dec-map-v190-p-len")
  9085. testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-p-len")
  9086. bs190 = testMarshalErr(&v190v1, h, t, "enc-map-v190-p")
  9087. v190v2 = nil
  9088. testUnmarshalErr(&v190v2, bs190, h, t, "dec-map-v190-p-nil")
  9089. testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-p-nil")
  9090. // ...
  9091. if v == nil {
  9092. v190v2 = nil
  9093. } else {
  9094. v190v2 = make(map[int]int8, len(v))
  9095. } // reset map
  9096. var v190v3, v190v4 typMapMapIntInt8
  9097. v190v3 = typMapMapIntInt8(v190v1)
  9098. v190v4 = typMapMapIntInt8(v190v2)
  9099. bs190 = testMarshalErr(v190v3, h, t, "enc-map-v190-custom")
  9100. testUnmarshalErr(v190v4, bs190, h, t, "dec-map-v190-p-len")
  9101. testDeepEqualErr(v190v3, v190v4, t, "equal-map-v190-p-len")
  9102. }
  9103. for _, v := range []map[int]int16{nil, {}, {44: 0, 33: 44}} {
  9104. // fmt.Printf(">>>> running mammoth map v191: %v\n", v)
  9105. var v191v1, v191v2 map[int]int16
  9106. v191v1 = v
  9107. bs191 := testMarshalErr(v191v1, h, t, "enc-map-v191")
  9108. if v == nil {
  9109. v191v2 = nil
  9110. } else {
  9111. v191v2 = make(map[int]int16, len(v))
  9112. } // reset map
  9113. testUnmarshalErr(v191v2, bs191, h, t, "dec-map-v191")
  9114. testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191")
  9115. if v == nil {
  9116. v191v2 = nil
  9117. } else {
  9118. v191v2 = make(map[int]int16, len(v))
  9119. } // reset map
  9120. testUnmarshalErr(reflect.ValueOf(v191v2), bs191, h, t, "dec-map-v191-noaddr") // decode into non-addressable map value
  9121. testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-noaddr")
  9122. if v == nil {
  9123. v191v2 = nil
  9124. } else {
  9125. v191v2 = make(map[int]int16, len(v))
  9126. } // reset map
  9127. testUnmarshalErr(&v191v2, bs191, h, t, "dec-map-v191-p-len")
  9128. testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-p-len")
  9129. bs191 = testMarshalErr(&v191v1, h, t, "enc-map-v191-p")
  9130. v191v2 = nil
  9131. testUnmarshalErr(&v191v2, bs191, h, t, "dec-map-v191-p-nil")
  9132. testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-p-nil")
  9133. // ...
  9134. if v == nil {
  9135. v191v2 = nil
  9136. } else {
  9137. v191v2 = make(map[int]int16, len(v))
  9138. } // reset map
  9139. var v191v3, v191v4 typMapMapIntInt16
  9140. v191v3 = typMapMapIntInt16(v191v1)
  9141. v191v4 = typMapMapIntInt16(v191v2)
  9142. bs191 = testMarshalErr(v191v3, h, t, "enc-map-v191-custom")
  9143. testUnmarshalErr(v191v4, bs191, h, t, "dec-map-v191-p-len")
  9144. testDeepEqualErr(v191v3, v191v4, t, "equal-map-v191-p-len")
  9145. }
  9146. for _, v := range []map[int]int32{nil, {}, {33: 0, 44: 33}} {
  9147. // fmt.Printf(">>>> running mammoth map v192: %v\n", v)
  9148. var v192v1, v192v2 map[int]int32
  9149. v192v1 = v
  9150. bs192 := testMarshalErr(v192v1, h, t, "enc-map-v192")
  9151. if v == nil {
  9152. v192v2 = nil
  9153. } else {
  9154. v192v2 = make(map[int]int32, len(v))
  9155. } // reset map
  9156. testUnmarshalErr(v192v2, bs192, h, t, "dec-map-v192")
  9157. testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192")
  9158. if v == nil {
  9159. v192v2 = nil
  9160. } else {
  9161. v192v2 = make(map[int]int32, len(v))
  9162. } // reset map
  9163. testUnmarshalErr(reflect.ValueOf(v192v2), bs192, h, t, "dec-map-v192-noaddr") // decode into non-addressable map value
  9164. testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-noaddr")
  9165. if v == nil {
  9166. v192v2 = nil
  9167. } else {
  9168. v192v2 = make(map[int]int32, len(v))
  9169. } // reset map
  9170. testUnmarshalErr(&v192v2, bs192, h, t, "dec-map-v192-p-len")
  9171. testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-p-len")
  9172. bs192 = testMarshalErr(&v192v1, h, t, "enc-map-v192-p")
  9173. v192v2 = nil
  9174. testUnmarshalErr(&v192v2, bs192, h, t, "dec-map-v192-p-nil")
  9175. testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-p-nil")
  9176. // ...
  9177. if v == nil {
  9178. v192v2 = nil
  9179. } else {
  9180. v192v2 = make(map[int]int32, len(v))
  9181. } // reset map
  9182. var v192v3, v192v4 typMapMapIntInt32
  9183. v192v3 = typMapMapIntInt32(v192v1)
  9184. v192v4 = typMapMapIntInt32(v192v2)
  9185. bs192 = testMarshalErr(v192v3, h, t, "enc-map-v192-custom")
  9186. testUnmarshalErr(v192v4, bs192, h, t, "dec-map-v192-p-len")
  9187. testDeepEqualErr(v192v3, v192v4, t, "equal-map-v192-p-len")
  9188. }
  9189. for _, v := range []map[int]int64{nil, {}, {44: 0, 33: 44}} {
  9190. // fmt.Printf(">>>> running mammoth map v193: %v\n", v)
  9191. var v193v1, v193v2 map[int]int64
  9192. v193v1 = v
  9193. bs193 := testMarshalErr(v193v1, h, t, "enc-map-v193")
  9194. if v == nil {
  9195. v193v2 = nil
  9196. } else {
  9197. v193v2 = make(map[int]int64, len(v))
  9198. } // reset map
  9199. testUnmarshalErr(v193v2, bs193, h, t, "dec-map-v193")
  9200. testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193")
  9201. if v == nil {
  9202. v193v2 = nil
  9203. } else {
  9204. v193v2 = make(map[int]int64, len(v))
  9205. } // reset map
  9206. testUnmarshalErr(reflect.ValueOf(v193v2), bs193, h, t, "dec-map-v193-noaddr") // decode into non-addressable map value
  9207. testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-noaddr")
  9208. if v == nil {
  9209. v193v2 = nil
  9210. } else {
  9211. v193v2 = make(map[int]int64, len(v))
  9212. } // reset map
  9213. testUnmarshalErr(&v193v2, bs193, h, t, "dec-map-v193-p-len")
  9214. testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-p-len")
  9215. bs193 = testMarshalErr(&v193v1, h, t, "enc-map-v193-p")
  9216. v193v2 = nil
  9217. testUnmarshalErr(&v193v2, bs193, h, t, "dec-map-v193-p-nil")
  9218. testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-p-nil")
  9219. // ...
  9220. if v == nil {
  9221. v193v2 = nil
  9222. } else {
  9223. v193v2 = make(map[int]int64, len(v))
  9224. } // reset map
  9225. var v193v3, v193v4 typMapMapIntInt64
  9226. v193v3 = typMapMapIntInt64(v193v1)
  9227. v193v4 = typMapMapIntInt64(v193v2)
  9228. bs193 = testMarshalErr(v193v3, h, t, "enc-map-v193-custom")
  9229. testUnmarshalErr(v193v4, bs193, h, t, "dec-map-v193-p-len")
  9230. testDeepEqualErr(v193v3, v193v4, t, "equal-map-v193-p-len")
  9231. }
  9232. for _, v := range []map[int]float32{nil, {}, {33: 0, 44: 22.2}} {
  9233. // fmt.Printf(">>>> running mammoth map v194: %v\n", v)
  9234. var v194v1, v194v2 map[int]float32
  9235. v194v1 = v
  9236. bs194 := testMarshalErr(v194v1, h, t, "enc-map-v194")
  9237. if v == nil {
  9238. v194v2 = nil
  9239. } else {
  9240. v194v2 = make(map[int]float32, len(v))
  9241. } // reset map
  9242. testUnmarshalErr(v194v2, bs194, h, t, "dec-map-v194")
  9243. testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194")
  9244. if v == nil {
  9245. v194v2 = nil
  9246. } else {
  9247. v194v2 = make(map[int]float32, len(v))
  9248. } // reset map
  9249. testUnmarshalErr(reflect.ValueOf(v194v2), bs194, h, t, "dec-map-v194-noaddr") // decode into non-addressable map value
  9250. testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-noaddr")
  9251. if v == nil {
  9252. v194v2 = nil
  9253. } else {
  9254. v194v2 = make(map[int]float32, len(v))
  9255. } // reset map
  9256. testUnmarshalErr(&v194v2, bs194, h, t, "dec-map-v194-p-len")
  9257. testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-p-len")
  9258. bs194 = testMarshalErr(&v194v1, h, t, "enc-map-v194-p")
  9259. v194v2 = nil
  9260. testUnmarshalErr(&v194v2, bs194, h, t, "dec-map-v194-p-nil")
  9261. testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-p-nil")
  9262. // ...
  9263. if v == nil {
  9264. v194v2 = nil
  9265. } else {
  9266. v194v2 = make(map[int]float32, len(v))
  9267. } // reset map
  9268. var v194v3, v194v4 typMapMapIntFloat32
  9269. v194v3 = typMapMapIntFloat32(v194v1)
  9270. v194v4 = typMapMapIntFloat32(v194v2)
  9271. bs194 = testMarshalErr(v194v3, h, t, "enc-map-v194-custom")
  9272. testUnmarshalErr(v194v4, bs194, h, t, "dec-map-v194-p-len")
  9273. testDeepEqualErr(v194v3, v194v4, t, "equal-map-v194-p-len")
  9274. }
  9275. for _, v := range []map[int]float64{nil, {}, {33: 0, 44: 11.1}} {
  9276. // fmt.Printf(">>>> running mammoth map v195: %v\n", v)
  9277. var v195v1, v195v2 map[int]float64
  9278. v195v1 = v
  9279. bs195 := testMarshalErr(v195v1, h, t, "enc-map-v195")
  9280. if v == nil {
  9281. v195v2 = nil
  9282. } else {
  9283. v195v2 = make(map[int]float64, len(v))
  9284. } // reset map
  9285. testUnmarshalErr(v195v2, bs195, h, t, "dec-map-v195")
  9286. testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195")
  9287. if v == nil {
  9288. v195v2 = nil
  9289. } else {
  9290. v195v2 = make(map[int]float64, len(v))
  9291. } // reset map
  9292. testUnmarshalErr(reflect.ValueOf(v195v2), bs195, h, t, "dec-map-v195-noaddr") // decode into non-addressable map value
  9293. testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-noaddr")
  9294. if v == nil {
  9295. v195v2 = nil
  9296. } else {
  9297. v195v2 = make(map[int]float64, len(v))
  9298. } // reset map
  9299. testUnmarshalErr(&v195v2, bs195, h, t, "dec-map-v195-p-len")
  9300. testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-p-len")
  9301. bs195 = testMarshalErr(&v195v1, h, t, "enc-map-v195-p")
  9302. v195v2 = nil
  9303. testUnmarshalErr(&v195v2, bs195, h, t, "dec-map-v195-p-nil")
  9304. testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-p-nil")
  9305. // ...
  9306. if v == nil {
  9307. v195v2 = nil
  9308. } else {
  9309. v195v2 = make(map[int]float64, len(v))
  9310. } // reset map
  9311. var v195v3, v195v4 typMapMapIntFloat64
  9312. v195v3 = typMapMapIntFloat64(v195v1)
  9313. v195v4 = typMapMapIntFloat64(v195v2)
  9314. bs195 = testMarshalErr(v195v3, h, t, "enc-map-v195-custom")
  9315. testUnmarshalErr(v195v4, bs195, h, t, "dec-map-v195-p-len")
  9316. testDeepEqualErr(v195v3, v195v4, t, "equal-map-v195-p-len")
  9317. }
  9318. for _, v := range []map[int]bool{nil, {}, {33: false, 44: true}} {
  9319. // fmt.Printf(">>>> running mammoth map v196: %v\n", v)
  9320. var v196v1, v196v2 map[int]bool
  9321. v196v1 = v
  9322. bs196 := testMarshalErr(v196v1, h, t, "enc-map-v196")
  9323. if v == nil {
  9324. v196v2 = nil
  9325. } else {
  9326. v196v2 = make(map[int]bool, len(v))
  9327. } // reset map
  9328. testUnmarshalErr(v196v2, bs196, h, t, "dec-map-v196")
  9329. testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196")
  9330. if v == nil {
  9331. v196v2 = nil
  9332. } else {
  9333. v196v2 = make(map[int]bool, len(v))
  9334. } // reset map
  9335. testUnmarshalErr(reflect.ValueOf(v196v2), bs196, h, t, "dec-map-v196-noaddr") // decode into non-addressable map value
  9336. testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-noaddr")
  9337. if v == nil {
  9338. v196v2 = nil
  9339. } else {
  9340. v196v2 = make(map[int]bool, len(v))
  9341. } // reset map
  9342. testUnmarshalErr(&v196v2, bs196, h, t, "dec-map-v196-p-len")
  9343. testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-p-len")
  9344. bs196 = testMarshalErr(&v196v1, h, t, "enc-map-v196-p")
  9345. v196v2 = nil
  9346. testUnmarshalErr(&v196v2, bs196, h, t, "dec-map-v196-p-nil")
  9347. testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-p-nil")
  9348. // ...
  9349. if v == nil {
  9350. v196v2 = nil
  9351. } else {
  9352. v196v2 = make(map[int]bool, len(v))
  9353. } // reset map
  9354. var v196v3, v196v4 typMapMapIntBool
  9355. v196v3 = typMapMapIntBool(v196v1)
  9356. v196v4 = typMapMapIntBool(v196v2)
  9357. bs196 = testMarshalErr(v196v3, h, t, "enc-map-v196-custom")
  9358. testUnmarshalErr(v196v4, bs196, h, t, "dec-map-v196-p-len")
  9359. testDeepEqualErr(v196v3, v196v4, t, "equal-map-v196-p-len")
  9360. }
  9361. for _, v := range []map[int8]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  9362. // fmt.Printf(">>>> running mammoth map v199: %v\n", v)
  9363. var v199v1, v199v2 map[int8]interface{}
  9364. v199v1 = v
  9365. bs199 := testMarshalErr(v199v1, h, t, "enc-map-v199")
  9366. if v == nil {
  9367. v199v2 = nil
  9368. } else {
  9369. v199v2 = make(map[int8]interface{}, len(v))
  9370. } // reset map
  9371. testUnmarshalErr(v199v2, bs199, h, t, "dec-map-v199")
  9372. testDeepEqualErr(v199v1, v199v2, t, "equal-map-v199")
  9373. if v == nil {
  9374. v199v2 = nil
  9375. } else {
  9376. v199v2 = make(map[int8]interface{}, len(v))
  9377. } // reset map
  9378. testUnmarshalErr(reflect.ValueOf(v199v2), bs199, h, t, "dec-map-v199-noaddr") // decode into non-addressable map value
  9379. testDeepEqualErr(v199v1, v199v2, t, "equal-map-v199-noaddr")
  9380. if v == nil {
  9381. v199v2 = nil
  9382. } else {
  9383. v199v2 = make(map[int8]interface{}, len(v))
  9384. } // reset map
  9385. testUnmarshalErr(&v199v2, bs199, h, t, "dec-map-v199-p-len")
  9386. testDeepEqualErr(v199v1, v199v2, t, "equal-map-v199-p-len")
  9387. bs199 = testMarshalErr(&v199v1, h, t, "enc-map-v199-p")
  9388. v199v2 = nil
  9389. testUnmarshalErr(&v199v2, bs199, h, t, "dec-map-v199-p-nil")
  9390. testDeepEqualErr(v199v1, v199v2, t, "equal-map-v199-p-nil")
  9391. // ...
  9392. if v == nil {
  9393. v199v2 = nil
  9394. } else {
  9395. v199v2 = make(map[int8]interface{}, len(v))
  9396. } // reset map
  9397. var v199v3, v199v4 typMapMapInt8Intf
  9398. v199v3 = typMapMapInt8Intf(v199v1)
  9399. v199v4 = typMapMapInt8Intf(v199v2)
  9400. bs199 = testMarshalErr(v199v3, h, t, "enc-map-v199-custom")
  9401. testUnmarshalErr(v199v4, bs199, h, t, "dec-map-v199-p-len")
  9402. testDeepEqualErr(v199v3, v199v4, t, "equal-map-v199-p-len")
  9403. }
  9404. for _, v := range []map[int8]string{nil, {}, {33: "", 44: "some-string"}} {
  9405. // fmt.Printf(">>>> running mammoth map v200: %v\n", v)
  9406. var v200v1, v200v2 map[int8]string
  9407. v200v1 = v
  9408. bs200 := testMarshalErr(v200v1, h, t, "enc-map-v200")
  9409. if v == nil {
  9410. v200v2 = nil
  9411. } else {
  9412. v200v2 = make(map[int8]string, len(v))
  9413. } // reset map
  9414. testUnmarshalErr(v200v2, bs200, h, t, "dec-map-v200")
  9415. testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200")
  9416. if v == nil {
  9417. v200v2 = nil
  9418. } else {
  9419. v200v2 = make(map[int8]string, len(v))
  9420. } // reset map
  9421. testUnmarshalErr(reflect.ValueOf(v200v2), bs200, h, t, "dec-map-v200-noaddr") // decode into non-addressable map value
  9422. testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-noaddr")
  9423. if v == nil {
  9424. v200v2 = nil
  9425. } else {
  9426. v200v2 = make(map[int8]string, len(v))
  9427. } // reset map
  9428. testUnmarshalErr(&v200v2, bs200, h, t, "dec-map-v200-p-len")
  9429. testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-p-len")
  9430. bs200 = testMarshalErr(&v200v1, h, t, "enc-map-v200-p")
  9431. v200v2 = nil
  9432. testUnmarshalErr(&v200v2, bs200, h, t, "dec-map-v200-p-nil")
  9433. testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-p-nil")
  9434. // ...
  9435. if v == nil {
  9436. v200v2 = nil
  9437. } else {
  9438. v200v2 = make(map[int8]string, len(v))
  9439. } // reset map
  9440. var v200v3, v200v4 typMapMapInt8String
  9441. v200v3 = typMapMapInt8String(v200v1)
  9442. v200v4 = typMapMapInt8String(v200v2)
  9443. bs200 = testMarshalErr(v200v3, h, t, "enc-map-v200-custom")
  9444. testUnmarshalErr(v200v4, bs200, h, t, "dec-map-v200-p-len")
  9445. testDeepEqualErr(v200v3, v200v4, t, "equal-map-v200-p-len")
  9446. }
  9447. for _, v := range []map[int8]uint{nil, {}, {33: 0, 44: 33}} {
  9448. // fmt.Printf(">>>> running mammoth map v201: %v\n", v)
  9449. var v201v1, v201v2 map[int8]uint
  9450. v201v1 = v
  9451. bs201 := testMarshalErr(v201v1, h, t, "enc-map-v201")
  9452. if v == nil {
  9453. v201v2 = nil
  9454. } else {
  9455. v201v2 = make(map[int8]uint, len(v))
  9456. } // reset map
  9457. testUnmarshalErr(v201v2, bs201, h, t, "dec-map-v201")
  9458. testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201")
  9459. if v == nil {
  9460. v201v2 = nil
  9461. } else {
  9462. v201v2 = make(map[int8]uint, len(v))
  9463. } // reset map
  9464. testUnmarshalErr(reflect.ValueOf(v201v2), bs201, h, t, "dec-map-v201-noaddr") // decode into non-addressable map value
  9465. testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-noaddr")
  9466. if v == nil {
  9467. v201v2 = nil
  9468. } else {
  9469. v201v2 = make(map[int8]uint, len(v))
  9470. } // reset map
  9471. testUnmarshalErr(&v201v2, bs201, h, t, "dec-map-v201-p-len")
  9472. testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-p-len")
  9473. bs201 = testMarshalErr(&v201v1, h, t, "enc-map-v201-p")
  9474. v201v2 = nil
  9475. testUnmarshalErr(&v201v2, bs201, h, t, "dec-map-v201-p-nil")
  9476. testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-p-nil")
  9477. // ...
  9478. if v == nil {
  9479. v201v2 = nil
  9480. } else {
  9481. v201v2 = make(map[int8]uint, len(v))
  9482. } // reset map
  9483. var v201v3, v201v4 typMapMapInt8Uint
  9484. v201v3 = typMapMapInt8Uint(v201v1)
  9485. v201v4 = typMapMapInt8Uint(v201v2)
  9486. bs201 = testMarshalErr(v201v3, h, t, "enc-map-v201-custom")
  9487. testUnmarshalErr(v201v4, bs201, h, t, "dec-map-v201-p-len")
  9488. testDeepEqualErr(v201v3, v201v4, t, "equal-map-v201-p-len")
  9489. }
  9490. for _, v := range []map[int8]uint8{nil, {}, {44: 0, 33: 44}} {
  9491. // fmt.Printf(">>>> running mammoth map v202: %v\n", v)
  9492. var v202v1, v202v2 map[int8]uint8
  9493. v202v1 = v
  9494. bs202 := testMarshalErr(v202v1, h, t, "enc-map-v202")
  9495. if v == nil {
  9496. v202v2 = nil
  9497. } else {
  9498. v202v2 = make(map[int8]uint8, len(v))
  9499. } // reset map
  9500. testUnmarshalErr(v202v2, bs202, h, t, "dec-map-v202")
  9501. testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202")
  9502. if v == nil {
  9503. v202v2 = nil
  9504. } else {
  9505. v202v2 = make(map[int8]uint8, len(v))
  9506. } // reset map
  9507. testUnmarshalErr(reflect.ValueOf(v202v2), bs202, h, t, "dec-map-v202-noaddr") // decode into non-addressable map value
  9508. testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-noaddr")
  9509. if v == nil {
  9510. v202v2 = nil
  9511. } else {
  9512. v202v2 = make(map[int8]uint8, len(v))
  9513. } // reset map
  9514. testUnmarshalErr(&v202v2, bs202, h, t, "dec-map-v202-p-len")
  9515. testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-p-len")
  9516. bs202 = testMarshalErr(&v202v1, h, t, "enc-map-v202-p")
  9517. v202v2 = nil
  9518. testUnmarshalErr(&v202v2, bs202, h, t, "dec-map-v202-p-nil")
  9519. testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-p-nil")
  9520. // ...
  9521. if v == nil {
  9522. v202v2 = nil
  9523. } else {
  9524. v202v2 = make(map[int8]uint8, len(v))
  9525. } // reset map
  9526. var v202v3, v202v4 typMapMapInt8Uint8
  9527. v202v3 = typMapMapInt8Uint8(v202v1)
  9528. v202v4 = typMapMapInt8Uint8(v202v2)
  9529. bs202 = testMarshalErr(v202v3, h, t, "enc-map-v202-custom")
  9530. testUnmarshalErr(v202v4, bs202, h, t, "dec-map-v202-p-len")
  9531. testDeepEqualErr(v202v3, v202v4, t, "equal-map-v202-p-len")
  9532. }
  9533. for _, v := range []map[int8]uint16{nil, {}, {33: 0, 44: 33}} {
  9534. // fmt.Printf(">>>> running mammoth map v203: %v\n", v)
  9535. var v203v1, v203v2 map[int8]uint16
  9536. v203v1 = v
  9537. bs203 := testMarshalErr(v203v1, h, t, "enc-map-v203")
  9538. if v == nil {
  9539. v203v2 = nil
  9540. } else {
  9541. v203v2 = make(map[int8]uint16, len(v))
  9542. } // reset map
  9543. testUnmarshalErr(v203v2, bs203, h, t, "dec-map-v203")
  9544. testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203")
  9545. if v == nil {
  9546. v203v2 = nil
  9547. } else {
  9548. v203v2 = make(map[int8]uint16, len(v))
  9549. } // reset map
  9550. testUnmarshalErr(reflect.ValueOf(v203v2), bs203, h, t, "dec-map-v203-noaddr") // decode into non-addressable map value
  9551. testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-noaddr")
  9552. if v == nil {
  9553. v203v2 = nil
  9554. } else {
  9555. v203v2 = make(map[int8]uint16, len(v))
  9556. } // reset map
  9557. testUnmarshalErr(&v203v2, bs203, h, t, "dec-map-v203-p-len")
  9558. testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-p-len")
  9559. bs203 = testMarshalErr(&v203v1, h, t, "enc-map-v203-p")
  9560. v203v2 = nil
  9561. testUnmarshalErr(&v203v2, bs203, h, t, "dec-map-v203-p-nil")
  9562. testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-p-nil")
  9563. // ...
  9564. if v == nil {
  9565. v203v2 = nil
  9566. } else {
  9567. v203v2 = make(map[int8]uint16, len(v))
  9568. } // reset map
  9569. var v203v3, v203v4 typMapMapInt8Uint16
  9570. v203v3 = typMapMapInt8Uint16(v203v1)
  9571. v203v4 = typMapMapInt8Uint16(v203v2)
  9572. bs203 = testMarshalErr(v203v3, h, t, "enc-map-v203-custom")
  9573. testUnmarshalErr(v203v4, bs203, h, t, "dec-map-v203-p-len")
  9574. testDeepEqualErr(v203v3, v203v4, t, "equal-map-v203-p-len")
  9575. }
  9576. for _, v := range []map[int8]uint32{nil, {}, {44: 0, 33: 44}} {
  9577. // fmt.Printf(">>>> running mammoth map v204: %v\n", v)
  9578. var v204v1, v204v2 map[int8]uint32
  9579. v204v1 = v
  9580. bs204 := testMarshalErr(v204v1, h, t, "enc-map-v204")
  9581. if v == nil {
  9582. v204v2 = nil
  9583. } else {
  9584. v204v2 = make(map[int8]uint32, len(v))
  9585. } // reset map
  9586. testUnmarshalErr(v204v2, bs204, h, t, "dec-map-v204")
  9587. testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204")
  9588. if v == nil {
  9589. v204v2 = nil
  9590. } else {
  9591. v204v2 = make(map[int8]uint32, len(v))
  9592. } // reset map
  9593. testUnmarshalErr(reflect.ValueOf(v204v2), bs204, h, t, "dec-map-v204-noaddr") // decode into non-addressable map value
  9594. testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-noaddr")
  9595. if v == nil {
  9596. v204v2 = nil
  9597. } else {
  9598. v204v2 = make(map[int8]uint32, len(v))
  9599. } // reset map
  9600. testUnmarshalErr(&v204v2, bs204, h, t, "dec-map-v204-p-len")
  9601. testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-p-len")
  9602. bs204 = testMarshalErr(&v204v1, h, t, "enc-map-v204-p")
  9603. v204v2 = nil
  9604. testUnmarshalErr(&v204v2, bs204, h, t, "dec-map-v204-p-nil")
  9605. testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-p-nil")
  9606. // ...
  9607. if v == nil {
  9608. v204v2 = nil
  9609. } else {
  9610. v204v2 = make(map[int8]uint32, len(v))
  9611. } // reset map
  9612. var v204v3, v204v4 typMapMapInt8Uint32
  9613. v204v3 = typMapMapInt8Uint32(v204v1)
  9614. v204v4 = typMapMapInt8Uint32(v204v2)
  9615. bs204 = testMarshalErr(v204v3, h, t, "enc-map-v204-custom")
  9616. testUnmarshalErr(v204v4, bs204, h, t, "dec-map-v204-p-len")
  9617. testDeepEqualErr(v204v3, v204v4, t, "equal-map-v204-p-len")
  9618. }
  9619. for _, v := range []map[int8]uint64{nil, {}, {33: 0, 44: 33}} {
  9620. // fmt.Printf(">>>> running mammoth map v205: %v\n", v)
  9621. var v205v1, v205v2 map[int8]uint64
  9622. v205v1 = v
  9623. bs205 := testMarshalErr(v205v1, h, t, "enc-map-v205")
  9624. if v == nil {
  9625. v205v2 = nil
  9626. } else {
  9627. v205v2 = make(map[int8]uint64, len(v))
  9628. } // reset map
  9629. testUnmarshalErr(v205v2, bs205, h, t, "dec-map-v205")
  9630. testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205")
  9631. if v == nil {
  9632. v205v2 = nil
  9633. } else {
  9634. v205v2 = make(map[int8]uint64, len(v))
  9635. } // reset map
  9636. testUnmarshalErr(reflect.ValueOf(v205v2), bs205, h, t, "dec-map-v205-noaddr") // decode into non-addressable map value
  9637. testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-noaddr")
  9638. if v == nil {
  9639. v205v2 = nil
  9640. } else {
  9641. v205v2 = make(map[int8]uint64, len(v))
  9642. } // reset map
  9643. testUnmarshalErr(&v205v2, bs205, h, t, "dec-map-v205-p-len")
  9644. testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-p-len")
  9645. bs205 = testMarshalErr(&v205v1, h, t, "enc-map-v205-p")
  9646. v205v2 = nil
  9647. testUnmarshalErr(&v205v2, bs205, h, t, "dec-map-v205-p-nil")
  9648. testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-p-nil")
  9649. // ...
  9650. if v == nil {
  9651. v205v2 = nil
  9652. } else {
  9653. v205v2 = make(map[int8]uint64, len(v))
  9654. } // reset map
  9655. var v205v3, v205v4 typMapMapInt8Uint64
  9656. v205v3 = typMapMapInt8Uint64(v205v1)
  9657. v205v4 = typMapMapInt8Uint64(v205v2)
  9658. bs205 = testMarshalErr(v205v3, h, t, "enc-map-v205-custom")
  9659. testUnmarshalErr(v205v4, bs205, h, t, "dec-map-v205-p-len")
  9660. testDeepEqualErr(v205v3, v205v4, t, "equal-map-v205-p-len")
  9661. }
  9662. for _, v := range []map[int8]uintptr{nil, {}, {44: 0, 33: 44}} {
  9663. // fmt.Printf(">>>> running mammoth map v206: %v\n", v)
  9664. var v206v1, v206v2 map[int8]uintptr
  9665. v206v1 = v
  9666. bs206 := testMarshalErr(v206v1, h, t, "enc-map-v206")
  9667. if v == nil {
  9668. v206v2 = nil
  9669. } else {
  9670. v206v2 = make(map[int8]uintptr, len(v))
  9671. } // reset map
  9672. testUnmarshalErr(v206v2, bs206, h, t, "dec-map-v206")
  9673. testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206")
  9674. if v == nil {
  9675. v206v2 = nil
  9676. } else {
  9677. v206v2 = make(map[int8]uintptr, len(v))
  9678. } // reset map
  9679. testUnmarshalErr(reflect.ValueOf(v206v2), bs206, h, t, "dec-map-v206-noaddr") // decode into non-addressable map value
  9680. testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-noaddr")
  9681. if v == nil {
  9682. v206v2 = nil
  9683. } else {
  9684. v206v2 = make(map[int8]uintptr, len(v))
  9685. } // reset map
  9686. testUnmarshalErr(&v206v2, bs206, h, t, "dec-map-v206-p-len")
  9687. testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-p-len")
  9688. bs206 = testMarshalErr(&v206v1, h, t, "enc-map-v206-p")
  9689. v206v2 = nil
  9690. testUnmarshalErr(&v206v2, bs206, h, t, "dec-map-v206-p-nil")
  9691. testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-p-nil")
  9692. // ...
  9693. if v == nil {
  9694. v206v2 = nil
  9695. } else {
  9696. v206v2 = make(map[int8]uintptr, len(v))
  9697. } // reset map
  9698. var v206v3, v206v4 typMapMapInt8Uintptr
  9699. v206v3 = typMapMapInt8Uintptr(v206v1)
  9700. v206v4 = typMapMapInt8Uintptr(v206v2)
  9701. bs206 = testMarshalErr(v206v3, h, t, "enc-map-v206-custom")
  9702. testUnmarshalErr(v206v4, bs206, h, t, "dec-map-v206-p-len")
  9703. testDeepEqualErr(v206v3, v206v4, t, "equal-map-v206-p-len")
  9704. }
  9705. for _, v := range []map[int8]int{nil, {}, {33: 0, 44: 33}} {
  9706. // fmt.Printf(">>>> running mammoth map v207: %v\n", v)
  9707. var v207v1, v207v2 map[int8]int
  9708. v207v1 = v
  9709. bs207 := testMarshalErr(v207v1, h, t, "enc-map-v207")
  9710. if v == nil {
  9711. v207v2 = nil
  9712. } else {
  9713. v207v2 = make(map[int8]int, len(v))
  9714. } // reset map
  9715. testUnmarshalErr(v207v2, bs207, h, t, "dec-map-v207")
  9716. testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207")
  9717. if v == nil {
  9718. v207v2 = nil
  9719. } else {
  9720. v207v2 = make(map[int8]int, len(v))
  9721. } // reset map
  9722. testUnmarshalErr(reflect.ValueOf(v207v2), bs207, h, t, "dec-map-v207-noaddr") // decode into non-addressable map value
  9723. testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-noaddr")
  9724. if v == nil {
  9725. v207v2 = nil
  9726. } else {
  9727. v207v2 = make(map[int8]int, len(v))
  9728. } // reset map
  9729. testUnmarshalErr(&v207v2, bs207, h, t, "dec-map-v207-p-len")
  9730. testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-p-len")
  9731. bs207 = testMarshalErr(&v207v1, h, t, "enc-map-v207-p")
  9732. v207v2 = nil
  9733. testUnmarshalErr(&v207v2, bs207, h, t, "dec-map-v207-p-nil")
  9734. testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-p-nil")
  9735. // ...
  9736. if v == nil {
  9737. v207v2 = nil
  9738. } else {
  9739. v207v2 = make(map[int8]int, len(v))
  9740. } // reset map
  9741. var v207v3, v207v4 typMapMapInt8Int
  9742. v207v3 = typMapMapInt8Int(v207v1)
  9743. v207v4 = typMapMapInt8Int(v207v2)
  9744. bs207 = testMarshalErr(v207v3, h, t, "enc-map-v207-custom")
  9745. testUnmarshalErr(v207v4, bs207, h, t, "dec-map-v207-p-len")
  9746. testDeepEqualErr(v207v3, v207v4, t, "equal-map-v207-p-len")
  9747. }
  9748. for _, v := range []map[int8]int8{nil, {}, {44: 0, 33: 44}} {
  9749. // fmt.Printf(">>>> running mammoth map v208: %v\n", v)
  9750. var v208v1, v208v2 map[int8]int8
  9751. v208v1 = v
  9752. bs208 := testMarshalErr(v208v1, h, t, "enc-map-v208")
  9753. if v == nil {
  9754. v208v2 = nil
  9755. } else {
  9756. v208v2 = make(map[int8]int8, len(v))
  9757. } // reset map
  9758. testUnmarshalErr(v208v2, bs208, h, t, "dec-map-v208")
  9759. testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208")
  9760. if v == nil {
  9761. v208v2 = nil
  9762. } else {
  9763. v208v2 = make(map[int8]int8, len(v))
  9764. } // reset map
  9765. testUnmarshalErr(reflect.ValueOf(v208v2), bs208, h, t, "dec-map-v208-noaddr") // decode into non-addressable map value
  9766. testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-noaddr")
  9767. if v == nil {
  9768. v208v2 = nil
  9769. } else {
  9770. v208v2 = make(map[int8]int8, len(v))
  9771. } // reset map
  9772. testUnmarshalErr(&v208v2, bs208, h, t, "dec-map-v208-p-len")
  9773. testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-p-len")
  9774. bs208 = testMarshalErr(&v208v1, h, t, "enc-map-v208-p")
  9775. v208v2 = nil
  9776. testUnmarshalErr(&v208v2, bs208, h, t, "dec-map-v208-p-nil")
  9777. testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-p-nil")
  9778. // ...
  9779. if v == nil {
  9780. v208v2 = nil
  9781. } else {
  9782. v208v2 = make(map[int8]int8, len(v))
  9783. } // reset map
  9784. var v208v3, v208v4 typMapMapInt8Int8
  9785. v208v3 = typMapMapInt8Int8(v208v1)
  9786. v208v4 = typMapMapInt8Int8(v208v2)
  9787. bs208 = testMarshalErr(v208v3, h, t, "enc-map-v208-custom")
  9788. testUnmarshalErr(v208v4, bs208, h, t, "dec-map-v208-p-len")
  9789. testDeepEqualErr(v208v3, v208v4, t, "equal-map-v208-p-len")
  9790. }
  9791. for _, v := range []map[int8]int16{nil, {}, {33: 0, 44: 33}} {
  9792. // fmt.Printf(">>>> running mammoth map v209: %v\n", v)
  9793. var v209v1, v209v2 map[int8]int16
  9794. v209v1 = v
  9795. bs209 := testMarshalErr(v209v1, h, t, "enc-map-v209")
  9796. if v == nil {
  9797. v209v2 = nil
  9798. } else {
  9799. v209v2 = make(map[int8]int16, len(v))
  9800. } // reset map
  9801. testUnmarshalErr(v209v2, bs209, h, t, "dec-map-v209")
  9802. testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209")
  9803. if v == nil {
  9804. v209v2 = nil
  9805. } else {
  9806. v209v2 = make(map[int8]int16, len(v))
  9807. } // reset map
  9808. testUnmarshalErr(reflect.ValueOf(v209v2), bs209, h, t, "dec-map-v209-noaddr") // decode into non-addressable map value
  9809. testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-noaddr")
  9810. if v == nil {
  9811. v209v2 = nil
  9812. } else {
  9813. v209v2 = make(map[int8]int16, len(v))
  9814. } // reset map
  9815. testUnmarshalErr(&v209v2, bs209, h, t, "dec-map-v209-p-len")
  9816. testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-p-len")
  9817. bs209 = testMarshalErr(&v209v1, h, t, "enc-map-v209-p")
  9818. v209v2 = nil
  9819. testUnmarshalErr(&v209v2, bs209, h, t, "dec-map-v209-p-nil")
  9820. testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-p-nil")
  9821. // ...
  9822. if v == nil {
  9823. v209v2 = nil
  9824. } else {
  9825. v209v2 = make(map[int8]int16, len(v))
  9826. } // reset map
  9827. var v209v3, v209v4 typMapMapInt8Int16
  9828. v209v3 = typMapMapInt8Int16(v209v1)
  9829. v209v4 = typMapMapInt8Int16(v209v2)
  9830. bs209 = testMarshalErr(v209v3, h, t, "enc-map-v209-custom")
  9831. testUnmarshalErr(v209v4, bs209, h, t, "dec-map-v209-p-len")
  9832. testDeepEqualErr(v209v3, v209v4, t, "equal-map-v209-p-len")
  9833. }
  9834. for _, v := range []map[int8]int32{nil, {}, {44: 0, 33: 44}} {
  9835. // fmt.Printf(">>>> running mammoth map v210: %v\n", v)
  9836. var v210v1, v210v2 map[int8]int32
  9837. v210v1 = v
  9838. bs210 := testMarshalErr(v210v1, h, t, "enc-map-v210")
  9839. if v == nil {
  9840. v210v2 = nil
  9841. } else {
  9842. v210v2 = make(map[int8]int32, len(v))
  9843. } // reset map
  9844. testUnmarshalErr(v210v2, bs210, h, t, "dec-map-v210")
  9845. testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210")
  9846. if v == nil {
  9847. v210v2 = nil
  9848. } else {
  9849. v210v2 = make(map[int8]int32, len(v))
  9850. } // reset map
  9851. testUnmarshalErr(reflect.ValueOf(v210v2), bs210, h, t, "dec-map-v210-noaddr") // decode into non-addressable map value
  9852. testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-noaddr")
  9853. if v == nil {
  9854. v210v2 = nil
  9855. } else {
  9856. v210v2 = make(map[int8]int32, len(v))
  9857. } // reset map
  9858. testUnmarshalErr(&v210v2, bs210, h, t, "dec-map-v210-p-len")
  9859. testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-p-len")
  9860. bs210 = testMarshalErr(&v210v1, h, t, "enc-map-v210-p")
  9861. v210v2 = nil
  9862. testUnmarshalErr(&v210v2, bs210, h, t, "dec-map-v210-p-nil")
  9863. testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-p-nil")
  9864. // ...
  9865. if v == nil {
  9866. v210v2 = nil
  9867. } else {
  9868. v210v2 = make(map[int8]int32, len(v))
  9869. } // reset map
  9870. var v210v3, v210v4 typMapMapInt8Int32
  9871. v210v3 = typMapMapInt8Int32(v210v1)
  9872. v210v4 = typMapMapInt8Int32(v210v2)
  9873. bs210 = testMarshalErr(v210v3, h, t, "enc-map-v210-custom")
  9874. testUnmarshalErr(v210v4, bs210, h, t, "dec-map-v210-p-len")
  9875. testDeepEqualErr(v210v3, v210v4, t, "equal-map-v210-p-len")
  9876. }
  9877. for _, v := range []map[int8]int64{nil, {}, {33: 0, 44: 33}} {
  9878. // fmt.Printf(">>>> running mammoth map v211: %v\n", v)
  9879. var v211v1, v211v2 map[int8]int64
  9880. v211v1 = v
  9881. bs211 := testMarshalErr(v211v1, h, t, "enc-map-v211")
  9882. if v == nil {
  9883. v211v2 = nil
  9884. } else {
  9885. v211v2 = make(map[int8]int64, len(v))
  9886. } // reset map
  9887. testUnmarshalErr(v211v2, bs211, h, t, "dec-map-v211")
  9888. testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211")
  9889. if v == nil {
  9890. v211v2 = nil
  9891. } else {
  9892. v211v2 = make(map[int8]int64, len(v))
  9893. } // reset map
  9894. testUnmarshalErr(reflect.ValueOf(v211v2), bs211, h, t, "dec-map-v211-noaddr") // decode into non-addressable map value
  9895. testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-noaddr")
  9896. if v == nil {
  9897. v211v2 = nil
  9898. } else {
  9899. v211v2 = make(map[int8]int64, len(v))
  9900. } // reset map
  9901. testUnmarshalErr(&v211v2, bs211, h, t, "dec-map-v211-p-len")
  9902. testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-p-len")
  9903. bs211 = testMarshalErr(&v211v1, h, t, "enc-map-v211-p")
  9904. v211v2 = nil
  9905. testUnmarshalErr(&v211v2, bs211, h, t, "dec-map-v211-p-nil")
  9906. testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-p-nil")
  9907. // ...
  9908. if v == nil {
  9909. v211v2 = nil
  9910. } else {
  9911. v211v2 = make(map[int8]int64, len(v))
  9912. } // reset map
  9913. var v211v3, v211v4 typMapMapInt8Int64
  9914. v211v3 = typMapMapInt8Int64(v211v1)
  9915. v211v4 = typMapMapInt8Int64(v211v2)
  9916. bs211 = testMarshalErr(v211v3, h, t, "enc-map-v211-custom")
  9917. testUnmarshalErr(v211v4, bs211, h, t, "dec-map-v211-p-len")
  9918. testDeepEqualErr(v211v3, v211v4, t, "equal-map-v211-p-len")
  9919. }
  9920. for _, v := range []map[int8]float32{nil, {}, {44: 0, 33: 22.2}} {
  9921. // fmt.Printf(">>>> running mammoth map v212: %v\n", v)
  9922. var v212v1, v212v2 map[int8]float32
  9923. v212v1 = v
  9924. bs212 := testMarshalErr(v212v1, h, t, "enc-map-v212")
  9925. if v == nil {
  9926. v212v2 = nil
  9927. } else {
  9928. v212v2 = make(map[int8]float32, len(v))
  9929. } // reset map
  9930. testUnmarshalErr(v212v2, bs212, h, t, "dec-map-v212")
  9931. testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212")
  9932. if v == nil {
  9933. v212v2 = nil
  9934. } else {
  9935. v212v2 = make(map[int8]float32, len(v))
  9936. } // reset map
  9937. testUnmarshalErr(reflect.ValueOf(v212v2), bs212, h, t, "dec-map-v212-noaddr") // decode into non-addressable map value
  9938. testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-noaddr")
  9939. if v == nil {
  9940. v212v2 = nil
  9941. } else {
  9942. v212v2 = make(map[int8]float32, len(v))
  9943. } // reset map
  9944. testUnmarshalErr(&v212v2, bs212, h, t, "dec-map-v212-p-len")
  9945. testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-p-len")
  9946. bs212 = testMarshalErr(&v212v1, h, t, "enc-map-v212-p")
  9947. v212v2 = nil
  9948. testUnmarshalErr(&v212v2, bs212, h, t, "dec-map-v212-p-nil")
  9949. testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-p-nil")
  9950. // ...
  9951. if v == nil {
  9952. v212v2 = nil
  9953. } else {
  9954. v212v2 = make(map[int8]float32, len(v))
  9955. } // reset map
  9956. var v212v3, v212v4 typMapMapInt8Float32
  9957. v212v3 = typMapMapInt8Float32(v212v1)
  9958. v212v4 = typMapMapInt8Float32(v212v2)
  9959. bs212 = testMarshalErr(v212v3, h, t, "enc-map-v212-custom")
  9960. testUnmarshalErr(v212v4, bs212, h, t, "dec-map-v212-p-len")
  9961. testDeepEqualErr(v212v3, v212v4, t, "equal-map-v212-p-len")
  9962. }
  9963. for _, v := range []map[int8]float64{nil, {}, {44: 0, 33: 11.1}} {
  9964. // fmt.Printf(">>>> running mammoth map v213: %v\n", v)
  9965. var v213v1, v213v2 map[int8]float64
  9966. v213v1 = v
  9967. bs213 := testMarshalErr(v213v1, h, t, "enc-map-v213")
  9968. if v == nil {
  9969. v213v2 = nil
  9970. } else {
  9971. v213v2 = make(map[int8]float64, len(v))
  9972. } // reset map
  9973. testUnmarshalErr(v213v2, bs213, h, t, "dec-map-v213")
  9974. testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213")
  9975. if v == nil {
  9976. v213v2 = nil
  9977. } else {
  9978. v213v2 = make(map[int8]float64, len(v))
  9979. } // reset map
  9980. testUnmarshalErr(reflect.ValueOf(v213v2), bs213, h, t, "dec-map-v213-noaddr") // decode into non-addressable map value
  9981. testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-noaddr")
  9982. if v == nil {
  9983. v213v2 = nil
  9984. } else {
  9985. v213v2 = make(map[int8]float64, len(v))
  9986. } // reset map
  9987. testUnmarshalErr(&v213v2, bs213, h, t, "dec-map-v213-p-len")
  9988. testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-p-len")
  9989. bs213 = testMarshalErr(&v213v1, h, t, "enc-map-v213-p")
  9990. v213v2 = nil
  9991. testUnmarshalErr(&v213v2, bs213, h, t, "dec-map-v213-p-nil")
  9992. testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-p-nil")
  9993. // ...
  9994. if v == nil {
  9995. v213v2 = nil
  9996. } else {
  9997. v213v2 = make(map[int8]float64, len(v))
  9998. } // reset map
  9999. var v213v3, v213v4 typMapMapInt8Float64
  10000. v213v3 = typMapMapInt8Float64(v213v1)
  10001. v213v4 = typMapMapInt8Float64(v213v2)
  10002. bs213 = testMarshalErr(v213v3, h, t, "enc-map-v213-custom")
  10003. testUnmarshalErr(v213v4, bs213, h, t, "dec-map-v213-p-len")
  10004. testDeepEqualErr(v213v3, v213v4, t, "equal-map-v213-p-len")
  10005. }
  10006. for _, v := range []map[int8]bool{nil, {}, {44: false, 33: true}} {
  10007. // fmt.Printf(">>>> running mammoth map v214: %v\n", v)
  10008. var v214v1, v214v2 map[int8]bool
  10009. v214v1 = v
  10010. bs214 := testMarshalErr(v214v1, h, t, "enc-map-v214")
  10011. if v == nil {
  10012. v214v2 = nil
  10013. } else {
  10014. v214v2 = make(map[int8]bool, len(v))
  10015. } // reset map
  10016. testUnmarshalErr(v214v2, bs214, h, t, "dec-map-v214")
  10017. testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214")
  10018. if v == nil {
  10019. v214v2 = nil
  10020. } else {
  10021. v214v2 = make(map[int8]bool, len(v))
  10022. } // reset map
  10023. testUnmarshalErr(reflect.ValueOf(v214v2), bs214, h, t, "dec-map-v214-noaddr") // decode into non-addressable map value
  10024. testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-noaddr")
  10025. if v == nil {
  10026. v214v2 = nil
  10027. } else {
  10028. v214v2 = make(map[int8]bool, len(v))
  10029. } // reset map
  10030. testUnmarshalErr(&v214v2, bs214, h, t, "dec-map-v214-p-len")
  10031. testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-p-len")
  10032. bs214 = testMarshalErr(&v214v1, h, t, "enc-map-v214-p")
  10033. v214v2 = nil
  10034. testUnmarshalErr(&v214v2, bs214, h, t, "dec-map-v214-p-nil")
  10035. testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-p-nil")
  10036. // ...
  10037. if v == nil {
  10038. v214v2 = nil
  10039. } else {
  10040. v214v2 = make(map[int8]bool, len(v))
  10041. } // reset map
  10042. var v214v3, v214v4 typMapMapInt8Bool
  10043. v214v3 = typMapMapInt8Bool(v214v1)
  10044. v214v4 = typMapMapInt8Bool(v214v2)
  10045. bs214 = testMarshalErr(v214v3, h, t, "enc-map-v214-custom")
  10046. testUnmarshalErr(v214v4, bs214, h, t, "dec-map-v214-p-len")
  10047. testDeepEqualErr(v214v3, v214v4, t, "equal-map-v214-p-len")
  10048. }
  10049. for _, v := range []map[int16]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  10050. // fmt.Printf(">>>> running mammoth map v217: %v\n", v)
  10051. var v217v1, v217v2 map[int16]interface{}
  10052. v217v1 = v
  10053. bs217 := testMarshalErr(v217v1, h, t, "enc-map-v217")
  10054. if v == nil {
  10055. v217v2 = nil
  10056. } else {
  10057. v217v2 = make(map[int16]interface{}, len(v))
  10058. } // reset map
  10059. testUnmarshalErr(v217v2, bs217, h, t, "dec-map-v217")
  10060. testDeepEqualErr(v217v1, v217v2, t, "equal-map-v217")
  10061. if v == nil {
  10062. v217v2 = nil
  10063. } else {
  10064. v217v2 = make(map[int16]interface{}, len(v))
  10065. } // reset map
  10066. testUnmarshalErr(reflect.ValueOf(v217v2), bs217, h, t, "dec-map-v217-noaddr") // decode into non-addressable map value
  10067. testDeepEqualErr(v217v1, v217v2, t, "equal-map-v217-noaddr")
  10068. if v == nil {
  10069. v217v2 = nil
  10070. } else {
  10071. v217v2 = make(map[int16]interface{}, len(v))
  10072. } // reset map
  10073. testUnmarshalErr(&v217v2, bs217, h, t, "dec-map-v217-p-len")
  10074. testDeepEqualErr(v217v1, v217v2, t, "equal-map-v217-p-len")
  10075. bs217 = testMarshalErr(&v217v1, h, t, "enc-map-v217-p")
  10076. v217v2 = nil
  10077. testUnmarshalErr(&v217v2, bs217, h, t, "dec-map-v217-p-nil")
  10078. testDeepEqualErr(v217v1, v217v2, t, "equal-map-v217-p-nil")
  10079. // ...
  10080. if v == nil {
  10081. v217v2 = nil
  10082. } else {
  10083. v217v2 = make(map[int16]interface{}, len(v))
  10084. } // reset map
  10085. var v217v3, v217v4 typMapMapInt16Intf
  10086. v217v3 = typMapMapInt16Intf(v217v1)
  10087. v217v4 = typMapMapInt16Intf(v217v2)
  10088. bs217 = testMarshalErr(v217v3, h, t, "enc-map-v217-custom")
  10089. testUnmarshalErr(v217v4, bs217, h, t, "dec-map-v217-p-len")
  10090. testDeepEqualErr(v217v3, v217v4, t, "equal-map-v217-p-len")
  10091. }
  10092. for _, v := range []map[int16]string{nil, {}, {44: "", 33: "some-string-2"}} {
  10093. // fmt.Printf(">>>> running mammoth map v218: %v\n", v)
  10094. var v218v1, v218v2 map[int16]string
  10095. v218v1 = v
  10096. bs218 := testMarshalErr(v218v1, h, t, "enc-map-v218")
  10097. if v == nil {
  10098. v218v2 = nil
  10099. } else {
  10100. v218v2 = make(map[int16]string, len(v))
  10101. } // reset map
  10102. testUnmarshalErr(v218v2, bs218, h, t, "dec-map-v218")
  10103. testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218")
  10104. if v == nil {
  10105. v218v2 = nil
  10106. } else {
  10107. v218v2 = make(map[int16]string, len(v))
  10108. } // reset map
  10109. testUnmarshalErr(reflect.ValueOf(v218v2), bs218, h, t, "dec-map-v218-noaddr") // decode into non-addressable map value
  10110. testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-noaddr")
  10111. if v == nil {
  10112. v218v2 = nil
  10113. } else {
  10114. v218v2 = make(map[int16]string, len(v))
  10115. } // reset map
  10116. testUnmarshalErr(&v218v2, bs218, h, t, "dec-map-v218-p-len")
  10117. testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-p-len")
  10118. bs218 = testMarshalErr(&v218v1, h, t, "enc-map-v218-p")
  10119. v218v2 = nil
  10120. testUnmarshalErr(&v218v2, bs218, h, t, "dec-map-v218-p-nil")
  10121. testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-p-nil")
  10122. // ...
  10123. if v == nil {
  10124. v218v2 = nil
  10125. } else {
  10126. v218v2 = make(map[int16]string, len(v))
  10127. } // reset map
  10128. var v218v3, v218v4 typMapMapInt16String
  10129. v218v3 = typMapMapInt16String(v218v1)
  10130. v218v4 = typMapMapInt16String(v218v2)
  10131. bs218 = testMarshalErr(v218v3, h, t, "enc-map-v218-custom")
  10132. testUnmarshalErr(v218v4, bs218, h, t, "dec-map-v218-p-len")
  10133. testDeepEqualErr(v218v3, v218v4, t, "equal-map-v218-p-len")
  10134. }
  10135. for _, v := range []map[int16]uint{nil, {}, {44: 0, 33: 44}} {
  10136. // fmt.Printf(">>>> running mammoth map v219: %v\n", v)
  10137. var v219v1, v219v2 map[int16]uint
  10138. v219v1 = v
  10139. bs219 := testMarshalErr(v219v1, h, t, "enc-map-v219")
  10140. if v == nil {
  10141. v219v2 = nil
  10142. } else {
  10143. v219v2 = make(map[int16]uint, len(v))
  10144. } // reset map
  10145. testUnmarshalErr(v219v2, bs219, h, t, "dec-map-v219")
  10146. testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219")
  10147. if v == nil {
  10148. v219v2 = nil
  10149. } else {
  10150. v219v2 = make(map[int16]uint, len(v))
  10151. } // reset map
  10152. testUnmarshalErr(reflect.ValueOf(v219v2), bs219, h, t, "dec-map-v219-noaddr") // decode into non-addressable map value
  10153. testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-noaddr")
  10154. if v == nil {
  10155. v219v2 = nil
  10156. } else {
  10157. v219v2 = make(map[int16]uint, len(v))
  10158. } // reset map
  10159. testUnmarshalErr(&v219v2, bs219, h, t, "dec-map-v219-p-len")
  10160. testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-p-len")
  10161. bs219 = testMarshalErr(&v219v1, h, t, "enc-map-v219-p")
  10162. v219v2 = nil
  10163. testUnmarshalErr(&v219v2, bs219, h, t, "dec-map-v219-p-nil")
  10164. testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-p-nil")
  10165. // ...
  10166. if v == nil {
  10167. v219v2 = nil
  10168. } else {
  10169. v219v2 = make(map[int16]uint, len(v))
  10170. } // reset map
  10171. var v219v3, v219v4 typMapMapInt16Uint
  10172. v219v3 = typMapMapInt16Uint(v219v1)
  10173. v219v4 = typMapMapInt16Uint(v219v2)
  10174. bs219 = testMarshalErr(v219v3, h, t, "enc-map-v219-custom")
  10175. testUnmarshalErr(v219v4, bs219, h, t, "dec-map-v219-p-len")
  10176. testDeepEqualErr(v219v3, v219v4, t, "equal-map-v219-p-len")
  10177. }
  10178. for _, v := range []map[int16]uint8{nil, {}, {33: 0, 44: 33}} {
  10179. // fmt.Printf(">>>> running mammoth map v220: %v\n", v)
  10180. var v220v1, v220v2 map[int16]uint8
  10181. v220v1 = v
  10182. bs220 := testMarshalErr(v220v1, h, t, "enc-map-v220")
  10183. if v == nil {
  10184. v220v2 = nil
  10185. } else {
  10186. v220v2 = make(map[int16]uint8, len(v))
  10187. } // reset map
  10188. testUnmarshalErr(v220v2, bs220, h, t, "dec-map-v220")
  10189. testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220")
  10190. if v == nil {
  10191. v220v2 = nil
  10192. } else {
  10193. v220v2 = make(map[int16]uint8, len(v))
  10194. } // reset map
  10195. testUnmarshalErr(reflect.ValueOf(v220v2), bs220, h, t, "dec-map-v220-noaddr") // decode into non-addressable map value
  10196. testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-noaddr")
  10197. if v == nil {
  10198. v220v2 = nil
  10199. } else {
  10200. v220v2 = make(map[int16]uint8, len(v))
  10201. } // reset map
  10202. testUnmarshalErr(&v220v2, bs220, h, t, "dec-map-v220-p-len")
  10203. testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-p-len")
  10204. bs220 = testMarshalErr(&v220v1, h, t, "enc-map-v220-p")
  10205. v220v2 = nil
  10206. testUnmarshalErr(&v220v2, bs220, h, t, "dec-map-v220-p-nil")
  10207. testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-p-nil")
  10208. // ...
  10209. if v == nil {
  10210. v220v2 = nil
  10211. } else {
  10212. v220v2 = make(map[int16]uint8, len(v))
  10213. } // reset map
  10214. var v220v3, v220v4 typMapMapInt16Uint8
  10215. v220v3 = typMapMapInt16Uint8(v220v1)
  10216. v220v4 = typMapMapInt16Uint8(v220v2)
  10217. bs220 = testMarshalErr(v220v3, h, t, "enc-map-v220-custom")
  10218. testUnmarshalErr(v220v4, bs220, h, t, "dec-map-v220-p-len")
  10219. testDeepEqualErr(v220v3, v220v4, t, "equal-map-v220-p-len")
  10220. }
  10221. for _, v := range []map[int16]uint16{nil, {}, {44: 0, 33: 44}} {
  10222. // fmt.Printf(">>>> running mammoth map v221: %v\n", v)
  10223. var v221v1, v221v2 map[int16]uint16
  10224. v221v1 = v
  10225. bs221 := testMarshalErr(v221v1, h, t, "enc-map-v221")
  10226. if v == nil {
  10227. v221v2 = nil
  10228. } else {
  10229. v221v2 = make(map[int16]uint16, len(v))
  10230. } // reset map
  10231. testUnmarshalErr(v221v2, bs221, h, t, "dec-map-v221")
  10232. testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221")
  10233. if v == nil {
  10234. v221v2 = nil
  10235. } else {
  10236. v221v2 = make(map[int16]uint16, len(v))
  10237. } // reset map
  10238. testUnmarshalErr(reflect.ValueOf(v221v2), bs221, h, t, "dec-map-v221-noaddr") // decode into non-addressable map value
  10239. testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-noaddr")
  10240. if v == nil {
  10241. v221v2 = nil
  10242. } else {
  10243. v221v2 = make(map[int16]uint16, len(v))
  10244. } // reset map
  10245. testUnmarshalErr(&v221v2, bs221, h, t, "dec-map-v221-p-len")
  10246. testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-p-len")
  10247. bs221 = testMarshalErr(&v221v1, h, t, "enc-map-v221-p")
  10248. v221v2 = nil
  10249. testUnmarshalErr(&v221v2, bs221, h, t, "dec-map-v221-p-nil")
  10250. testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-p-nil")
  10251. // ...
  10252. if v == nil {
  10253. v221v2 = nil
  10254. } else {
  10255. v221v2 = make(map[int16]uint16, len(v))
  10256. } // reset map
  10257. var v221v3, v221v4 typMapMapInt16Uint16
  10258. v221v3 = typMapMapInt16Uint16(v221v1)
  10259. v221v4 = typMapMapInt16Uint16(v221v2)
  10260. bs221 = testMarshalErr(v221v3, h, t, "enc-map-v221-custom")
  10261. testUnmarshalErr(v221v4, bs221, h, t, "dec-map-v221-p-len")
  10262. testDeepEqualErr(v221v3, v221v4, t, "equal-map-v221-p-len")
  10263. }
  10264. for _, v := range []map[int16]uint32{nil, {}, {33: 0, 44: 33}} {
  10265. // fmt.Printf(">>>> running mammoth map v222: %v\n", v)
  10266. var v222v1, v222v2 map[int16]uint32
  10267. v222v1 = v
  10268. bs222 := testMarshalErr(v222v1, h, t, "enc-map-v222")
  10269. if v == nil {
  10270. v222v2 = nil
  10271. } else {
  10272. v222v2 = make(map[int16]uint32, len(v))
  10273. } // reset map
  10274. testUnmarshalErr(v222v2, bs222, h, t, "dec-map-v222")
  10275. testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222")
  10276. if v == nil {
  10277. v222v2 = nil
  10278. } else {
  10279. v222v2 = make(map[int16]uint32, len(v))
  10280. } // reset map
  10281. testUnmarshalErr(reflect.ValueOf(v222v2), bs222, h, t, "dec-map-v222-noaddr") // decode into non-addressable map value
  10282. testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-noaddr")
  10283. if v == nil {
  10284. v222v2 = nil
  10285. } else {
  10286. v222v2 = make(map[int16]uint32, len(v))
  10287. } // reset map
  10288. testUnmarshalErr(&v222v2, bs222, h, t, "dec-map-v222-p-len")
  10289. testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-p-len")
  10290. bs222 = testMarshalErr(&v222v1, h, t, "enc-map-v222-p")
  10291. v222v2 = nil
  10292. testUnmarshalErr(&v222v2, bs222, h, t, "dec-map-v222-p-nil")
  10293. testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-p-nil")
  10294. // ...
  10295. if v == nil {
  10296. v222v2 = nil
  10297. } else {
  10298. v222v2 = make(map[int16]uint32, len(v))
  10299. } // reset map
  10300. var v222v3, v222v4 typMapMapInt16Uint32
  10301. v222v3 = typMapMapInt16Uint32(v222v1)
  10302. v222v4 = typMapMapInt16Uint32(v222v2)
  10303. bs222 = testMarshalErr(v222v3, h, t, "enc-map-v222-custom")
  10304. testUnmarshalErr(v222v4, bs222, h, t, "dec-map-v222-p-len")
  10305. testDeepEqualErr(v222v3, v222v4, t, "equal-map-v222-p-len")
  10306. }
  10307. for _, v := range []map[int16]uint64{nil, {}, {44: 0, 33: 44}} {
  10308. // fmt.Printf(">>>> running mammoth map v223: %v\n", v)
  10309. var v223v1, v223v2 map[int16]uint64
  10310. v223v1 = v
  10311. bs223 := testMarshalErr(v223v1, h, t, "enc-map-v223")
  10312. if v == nil {
  10313. v223v2 = nil
  10314. } else {
  10315. v223v2 = make(map[int16]uint64, len(v))
  10316. } // reset map
  10317. testUnmarshalErr(v223v2, bs223, h, t, "dec-map-v223")
  10318. testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223")
  10319. if v == nil {
  10320. v223v2 = nil
  10321. } else {
  10322. v223v2 = make(map[int16]uint64, len(v))
  10323. } // reset map
  10324. testUnmarshalErr(reflect.ValueOf(v223v2), bs223, h, t, "dec-map-v223-noaddr") // decode into non-addressable map value
  10325. testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-noaddr")
  10326. if v == nil {
  10327. v223v2 = nil
  10328. } else {
  10329. v223v2 = make(map[int16]uint64, len(v))
  10330. } // reset map
  10331. testUnmarshalErr(&v223v2, bs223, h, t, "dec-map-v223-p-len")
  10332. testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-p-len")
  10333. bs223 = testMarshalErr(&v223v1, h, t, "enc-map-v223-p")
  10334. v223v2 = nil
  10335. testUnmarshalErr(&v223v2, bs223, h, t, "dec-map-v223-p-nil")
  10336. testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-p-nil")
  10337. // ...
  10338. if v == nil {
  10339. v223v2 = nil
  10340. } else {
  10341. v223v2 = make(map[int16]uint64, len(v))
  10342. } // reset map
  10343. var v223v3, v223v4 typMapMapInt16Uint64
  10344. v223v3 = typMapMapInt16Uint64(v223v1)
  10345. v223v4 = typMapMapInt16Uint64(v223v2)
  10346. bs223 = testMarshalErr(v223v3, h, t, "enc-map-v223-custom")
  10347. testUnmarshalErr(v223v4, bs223, h, t, "dec-map-v223-p-len")
  10348. testDeepEqualErr(v223v3, v223v4, t, "equal-map-v223-p-len")
  10349. }
  10350. for _, v := range []map[int16]uintptr{nil, {}, {33: 0, 44: 33}} {
  10351. // fmt.Printf(">>>> running mammoth map v224: %v\n", v)
  10352. var v224v1, v224v2 map[int16]uintptr
  10353. v224v1 = v
  10354. bs224 := testMarshalErr(v224v1, h, t, "enc-map-v224")
  10355. if v == nil {
  10356. v224v2 = nil
  10357. } else {
  10358. v224v2 = make(map[int16]uintptr, len(v))
  10359. } // reset map
  10360. testUnmarshalErr(v224v2, bs224, h, t, "dec-map-v224")
  10361. testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224")
  10362. if v == nil {
  10363. v224v2 = nil
  10364. } else {
  10365. v224v2 = make(map[int16]uintptr, len(v))
  10366. } // reset map
  10367. testUnmarshalErr(reflect.ValueOf(v224v2), bs224, h, t, "dec-map-v224-noaddr") // decode into non-addressable map value
  10368. testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-noaddr")
  10369. if v == nil {
  10370. v224v2 = nil
  10371. } else {
  10372. v224v2 = make(map[int16]uintptr, len(v))
  10373. } // reset map
  10374. testUnmarshalErr(&v224v2, bs224, h, t, "dec-map-v224-p-len")
  10375. testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-p-len")
  10376. bs224 = testMarshalErr(&v224v1, h, t, "enc-map-v224-p")
  10377. v224v2 = nil
  10378. testUnmarshalErr(&v224v2, bs224, h, t, "dec-map-v224-p-nil")
  10379. testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-p-nil")
  10380. // ...
  10381. if v == nil {
  10382. v224v2 = nil
  10383. } else {
  10384. v224v2 = make(map[int16]uintptr, len(v))
  10385. } // reset map
  10386. var v224v3, v224v4 typMapMapInt16Uintptr
  10387. v224v3 = typMapMapInt16Uintptr(v224v1)
  10388. v224v4 = typMapMapInt16Uintptr(v224v2)
  10389. bs224 = testMarshalErr(v224v3, h, t, "enc-map-v224-custom")
  10390. testUnmarshalErr(v224v4, bs224, h, t, "dec-map-v224-p-len")
  10391. testDeepEqualErr(v224v3, v224v4, t, "equal-map-v224-p-len")
  10392. }
  10393. for _, v := range []map[int16]int{nil, {}, {44: 0, 33: 44}} {
  10394. // fmt.Printf(">>>> running mammoth map v225: %v\n", v)
  10395. var v225v1, v225v2 map[int16]int
  10396. v225v1 = v
  10397. bs225 := testMarshalErr(v225v1, h, t, "enc-map-v225")
  10398. if v == nil {
  10399. v225v2 = nil
  10400. } else {
  10401. v225v2 = make(map[int16]int, len(v))
  10402. } // reset map
  10403. testUnmarshalErr(v225v2, bs225, h, t, "dec-map-v225")
  10404. testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225")
  10405. if v == nil {
  10406. v225v2 = nil
  10407. } else {
  10408. v225v2 = make(map[int16]int, len(v))
  10409. } // reset map
  10410. testUnmarshalErr(reflect.ValueOf(v225v2), bs225, h, t, "dec-map-v225-noaddr") // decode into non-addressable map value
  10411. testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-noaddr")
  10412. if v == nil {
  10413. v225v2 = nil
  10414. } else {
  10415. v225v2 = make(map[int16]int, len(v))
  10416. } // reset map
  10417. testUnmarshalErr(&v225v2, bs225, h, t, "dec-map-v225-p-len")
  10418. testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-p-len")
  10419. bs225 = testMarshalErr(&v225v1, h, t, "enc-map-v225-p")
  10420. v225v2 = nil
  10421. testUnmarshalErr(&v225v2, bs225, h, t, "dec-map-v225-p-nil")
  10422. testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-p-nil")
  10423. // ...
  10424. if v == nil {
  10425. v225v2 = nil
  10426. } else {
  10427. v225v2 = make(map[int16]int, len(v))
  10428. } // reset map
  10429. var v225v3, v225v4 typMapMapInt16Int
  10430. v225v3 = typMapMapInt16Int(v225v1)
  10431. v225v4 = typMapMapInt16Int(v225v2)
  10432. bs225 = testMarshalErr(v225v3, h, t, "enc-map-v225-custom")
  10433. testUnmarshalErr(v225v4, bs225, h, t, "dec-map-v225-p-len")
  10434. testDeepEqualErr(v225v3, v225v4, t, "equal-map-v225-p-len")
  10435. }
  10436. for _, v := range []map[int16]int8{nil, {}, {33: 0, 44: 33}} {
  10437. // fmt.Printf(">>>> running mammoth map v226: %v\n", v)
  10438. var v226v1, v226v2 map[int16]int8
  10439. v226v1 = v
  10440. bs226 := testMarshalErr(v226v1, h, t, "enc-map-v226")
  10441. if v == nil {
  10442. v226v2 = nil
  10443. } else {
  10444. v226v2 = make(map[int16]int8, len(v))
  10445. } // reset map
  10446. testUnmarshalErr(v226v2, bs226, h, t, "dec-map-v226")
  10447. testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226")
  10448. if v == nil {
  10449. v226v2 = nil
  10450. } else {
  10451. v226v2 = make(map[int16]int8, len(v))
  10452. } // reset map
  10453. testUnmarshalErr(reflect.ValueOf(v226v2), bs226, h, t, "dec-map-v226-noaddr") // decode into non-addressable map value
  10454. testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-noaddr")
  10455. if v == nil {
  10456. v226v2 = nil
  10457. } else {
  10458. v226v2 = make(map[int16]int8, len(v))
  10459. } // reset map
  10460. testUnmarshalErr(&v226v2, bs226, h, t, "dec-map-v226-p-len")
  10461. testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-p-len")
  10462. bs226 = testMarshalErr(&v226v1, h, t, "enc-map-v226-p")
  10463. v226v2 = nil
  10464. testUnmarshalErr(&v226v2, bs226, h, t, "dec-map-v226-p-nil")
  10465. testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-p-nil")
  10466. // ...
  10467. if v == nil {
  10468. v226v2 = nil
  10469. } else {
  10470. v226v2 = make(map[int16]int8, len(v))
  10471. } // reset map
  10472. var v226v3, v226v4 typMapMapInt16Int8
  10473. v226v3 = typMapMapInt16Int8(v226v1)
  10474. v226v4 = typMapMapInt16Int8(v226v2)
  10475. bs226 = testMarshalErr(v226v3, h, t, "enc-map-v226-custom")
  10476. testUnmarshalErr(v226v4, bs226, h, t, "dec-map-v226-p-len")
  10477. testDeepEqualErr(v226v3, v226v4, t, "equal-map-v226-p-len")
  10478. }
  10479. for _, v := range []map[int16]int16{nil, {}, {44: 0, 33: 44}} {
  10480. // fmt.Printf(">>>> running mammoth map v227: %v\n", v)
  10481. var v227v1, v227v2 map[int16]int16
  10482. v227v1 = v
  10483. bs227 := testMarshalErr(v227v1, h, t, "enc-map-v227")
  10484. if v == nil {
  10485. v227v2 = nil
  10486. } else {
  10487. v227v2 = make(map[int16]int16, len(v))
  10488. } // reset map
  10489. testUnmarshalErr(v227v2, bs227, h, t, "dec-map-v227")
  10490. testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227")
  10491. if v == nil {
  10492. v227v2 = nil
  10493. } else {
  10494. v227v2 = make(map[int16]int16, len(v))
  10495. } // reset map
  10496. testUnmarshalErr(reflect.ValueOf(v227v2), bs227, h, t, "dec-map-v227-noaddr") // decode into non-addressable map value
  10497. testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-noaddr")
  10498. if v == nil {
  10499. v227v2 = nil
  10500. } else {
  10501. v227v2 = make(map[int16]int16, len(v))
  10502. } // reset map
  10503. testUnmarshalErr(&v227v2, bs227, h, t, "dec-map-v227-p-len")
  10504. testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-p-len")
  10505. bs227 = testMarshalErr(&v227v1, h, t, "enc-map-v227-p")
  10506. v227v2 = nil
  10507. testUnmarshalErr(&v227v2, bs227, h, t, "dec-map-v227-p-nil")
  10508. testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-p-nil")
  10509. // ...
  10510. if v == nil {
  10511. v227v2 = nil
  10512. } else {
  10513. v227v2 = make(map[int16]int16, len(v))
  10514. } // reset map
  10515. var v227v3, v227v4 typMapMapInt16Int16
  10516. v227v3 = typMapMapInt16Int16(v227v1)
  10517. v227v4 = typMapMapInt16Int16(v227v2)
  10518. bs227 = testMarshalErr(v227v3, h, t, "enc-map-v227-custom")
  10519. testUnmarshalErr(v227v4, bs227, h, t, "dec-map-v227-p-len")
  10520. testDeepEqualErr(v227v3, v227v4, t, "equal-map-v227-p-len")
  10521. }
  10522. for _, v := range []map[int16]int32{nil, {}, {33: 0, 44: 33}} {
  10523. // fmt.Printf(">>>> running mammoth map v228: %v\n", v)
  10524. var v228v1, v228v2 map[int16]int32
  10525. v228v1 = v
  10526. bs228 := testMarshalErr(v228v1, h, t, "enc-map-v228")
  10527. if v == nil {
  10528. v228v2 = nil
  10529. } else {
  10530. v228v2 = make(map[int16]int32, len(v))
  10531. } // reset map
  10532. testUnmarshalErr(v228v2, bs228, h, t, "dec-map-v228")
  10533. testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228")
  10534. if v == nil {
  10535. v228v2 = nil
  10536. } else {
  10537. v228v2 = make(map[int16]int32, len(v))
  10538. } // reset map
  10539. testUnmarshalErr(reflect.ValueOf(v228v2), bs228, h, t, "dec-map-v228-noaddr") // decode into non-addressable map value
  10540. testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-noaddr")
  10541. if v == nil {
  10542. v228v2 = nil
  10543. } else {
  10544. v228v2 = make(map[int16]int32, len(v))
  10545. } // reset map
  10546. testUnmarshalErr(&v228v2, bs228, h, t, "dec-map-v228-p-len")
  10547. testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-p-len")
  10548. bs228 = testMarshalErr(&v228v1, h, t, "enc-map-v228-p")
  10549. v228v2 = nil
  10550. testUnmarshalErr(&v228v2, bs228, h, t, "dec-map-v228-p-nil")
  10551. testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-p-nil")
  10552. // ...
  10553. if v == nil {
  10554. v228v2 = nil
  10555. } else {
  10556. v228v2 = make(map[int16]int32, len(v))
  10557. } // reset map
  10558. var v228v3, v228v4 typMapMapInt16Int32
  10559. v228v3 = typMapMapInt16Int32(v228v1)
  10560. v228v4 = typMapMapInt16Int32(v228v2)
  10561. bs228 = testMarshalErr(v228v3, h, t, "enc-map-v228-custom")
  10562. testUnmarshalErr(v228v4, bs228, h, t, "dec-map-v228-p-len")
  10563. testDeepEqualErr(v228v3, v228v4, t, "equal-map-v228-p-len")
  10564. }
  10565. for _, v := range []map[int16]int64{nil, {}, {44: 0, 33: 44}} {
  10566. // fmt.Printf(">>>> running mammoth map v229: %v\n", v)
  10567. var v229v1, v229v2 map[int16]int64
  10568. v229v1 = v
  10569. bs229 := testMarshalErr(v229v1, h, t, "enc-map-v229")
  10570. if v == nil {
  10571. v229v2 = nil
  10572. } else {
  10573. v229v2 = make(map[int16]int64, len(v))
  10574. } // reset map
  10575. testUnmarshalErr(v229v2, bs229, h, t, "dec-map-v229")
  10576. testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229")
  10577. if v == nil {
  10578. v229v2 = nil
  10579. } else {
  10580. v229v2 = make(map[int16]int64, len(v))
  10581. } // reset map
  10582. testUnmarshalErr(reflect.ValueOf(v229v2), bs229, h, t, "dec-map-v229-noaddr") // decode into non-addressable map value
  10583. testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-noaddr")
  10584. if v == nil {
  10585. v229v2 = nil
  10586. } else {
  10587. v229v2 = make(map[int16]int64, len(v))
  10588. } // reset map
  10589. testUnmarshalErr(&v229v2, bs229, h, t, "dec-map-v229-p-len")
  10590. testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-p-len")
  10591. bs229 = testMarshalErr(&v229v1, h, t, "enc-map-v229-p")
  10592. v229v2 = nil
  10593. testUnmarshalErr(&v229v2, bs229, h, t, "dec-map-v229-p-nil")
  10594. testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-p-nil")
  10595. // ...
  10596. if v == nil {
  10597. v229v2 = nil
  10598. } else {
  10599. v229v2 = make(map[int16]int64, len(v))
  10600. } // reset map
  10601. var v229v3, v229v4 typMapMapInt16Int64
  10602. v229v3 = typMapMapInt16Int64(v229v1)
  10603. v229v4 = typMapMapInt16Int64(v229v2)
  10604. bs229 = testMarshalErr(v229v3, h, t, "enc-map-v229-custom")
  10605. testUnmarshalErr(v229v4, bs229, h, t, "dec-map-v229-p-len")
  10606. testDeepEqualErr(v229v3, v229v4, t, "equal-map-v229-p-len")
  10607. }
  10608. for _, v := range []map[int16]float32{nil, {}, {33: 0, 44: 22.2}} {
  10609. // fmt.Printf(">>>> running mammoth map v230: %v\n", v)
  10610. var v230v1, v230v2 map[int16]float32
  10611. v230v1 = v
  10612. bs230 := testMarshalErr(v230v1, h, t, "enc-map-v230")
  10613. if v == nil {
  10614. v230v2 = nil
  10615. } else {
  10616. v230v2 = make(map[int16]float32, len(v))
  10617. } // reset map
  10618. testUnmarshalErr(v230v2, bs230, h, t, "dec-map-v230")
  10619. testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230")
  10620. if v == nil {
  10621. v230v2 = nil
  10622. } else {
  10623. v230v2 = make(map[int16]float32, len(v))
  10624. } // reset map
  10625. testUnmarshalErr(reflect.ValueOf(v230v2), bs230, h, t, "dec-map-v230-noaddr") // decode into non-addressable map value
  10626. testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-noaddr")
  10627. if v == nil {
  10628. v230v2 = nil
  10629. } else {
  10630. v230v2 = make(map[int16]float32, len(v))
  10631. } // reset map
  10632. testUnmarshalErr(&v230v2, bs230, h, t, "dec-map-v230-p-len")
  10633. testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-p-len")
  10634. bs230 = testMarshalErr(&v230v1, h, t, "enc-map-v230-p")
  10635. v230v2 = nil
  10636. testUnmarshalErr(&v230v2, bs230, h, t, "dec-map-v230-p-nil")
  10637. testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-p-nil")
  10638. // ...
  10639. if v == nil {
  10640. v230v2 = nil
  10641. } else {
  10642. v230v2 = make(map[int16]float32, len(v))
  10643. } // reset map
  10644. var v230v3, v230v4 typMapMapInt16Float32
  10645. v230v3 = typMapMapInt16Float32(v230v1)
  10646. v230v4 = typMapMapInt16Float32(v230v2)
  10647. bs230 = testMarshalErr(v230v3, h, t, "enc-map-v230-custom")
  10648. testUnmarshalErr(v230v4, bs230, h, t, "dec-map-v230-p-len")
  10649. testDeepEqualErr(v230v3, v230v4, t, "equal-map-v230-p-len")
  10650. }
  10651. for _, v := range []map[int16]float64{nil, {}, {33: 0, 44: 11.1}} {
  10652. // fmt.Printf(">>>> running mammoth map v231: %v\n", v)
  10653. var v231v1, v231v2 map[int16]float64
  10654. v231v1 = v
  10655. bs231 := testMarshalErr(v231v1, h, t, "enc-map-v231")
  10656. if v == nil {
  10657. v231v2 = nil
  10658. } else {
  10659. v231v2 = make(map[int16]float64, len(v))
  10660. } // reset map
  10661. testUnmarshalErr(v231v2, bs231, h, t, "dec-map-v231")
  10662. testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231")
  10663. if v == nil {
  10664. v231v2 = nil
  10665. } else {
  10666. v231v2 = make(map[int16]float64, len(v))
  10667. } // reset map
  10668. testUnmarshalErr(reflect.ValueOf(v231v2), bs231, h, t, "dec-map-v231-noaddr") // decode into non-addressable map value
  10669. testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-noaddr")
  10670. if v == nil {
  10671. v231v2 = nil
  10672. } else {
  10673. v231v2 = make(map[int16]float64, len(v))
  10674. } // reset map
  10675. testUnmarshalErr(&v231v2, bs231, h, t, "dec-map-v231-p-len")
  10676. testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-p-len")
  10677. bs231 = testMarshalErr(&v231v1, h, t, "enc-map-v231-p")
  10678. v231v2 = nil
  10679. testUnmarshalErr(&v231v2, bs231, h, t, "dec-map-v231-p-nil")
  10680. testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-p-nil")
  10681. // ...
  10682. if v == nil {
  10683. v231v2 = nil
  10684. } else {
  10685. v231v2 = make(map[int16]float64, len(v))
  10686. } // reset map
  10687. var v231v3, v231v4 typMapMapInt16Float64
  10688. v231v3 = typMapMapInt16Float64(v231v1)
  10689. v231v4 = typMapMapInt16Float64(v231v2)
  10690. bs231 = testMarshalErr(v231v3, h, t, "enc-map-v231-custom")
  10691. testUnmarshalErr(v231v4, bs231, h, t, "dec-map-v231-p-len")
  10692. testDeepEqualErr(v231v3, v231v4, t, "equal-map-v231-p-len")
  10693. }
  10694. for _, v := range []map[int16]bool{nil, {}, {33: false, 44: true}} {
  10695. // fmt.Printf(">>>> running mammoth map v232: %v\n", v)
  10696. var v232v1, v232v2 map[int16]bool
  10697. v232v1 = v
  10698. bs232 := testMarshalErr(v232v1, h, t, "enc-map-v232")
  10699. if v == nil {
  10700. v232v2 = nil
  10701. } else {
  10702. v232v2 = make(map[int16]bool, len(v))
  10703. } // reset map
  10704. testUnmarshalErr(v232v2, bs232, h, t, "dec-map-v232")
  10705. testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232")
  10706. if v == nil {
  10707. v232v2 = nil
  10708. } else {
  10709. v232v2 = make(map[int16]bool, len(v))
  10710. } // reset map
  10711. testUnmarshalErr(reflect.ValueOf(v232v2), bs232, h, t, "dec-map-v232-noaddr") // decode into non-addressable map value
  10712. testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-noaddr")
  10713. if v == nil {
  10714. v232v2 = nil
  10715. } else {
  10716. v232v2 = make(map[int16]bool, len(v))
  10717. } // reset map
  10718. testUnmarshalErr(&v232v2, bs232, h, t, "dec-map-v232-p-len")
  10719. testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-p-len")
  10720. bs232 = testMarshalErr(&v232v1, h, t, "enc-map-v232-p")
  10721. v232v2 = nil
  10722. testUnmarshalErr(&v232v2, bs232, h, t, "dec-map-v232-p-nil")
  10723. testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-p-nil")
  10724. // ...
  10725. if v == nil {
  10726. v232v2 = nil
  10727. } else {
  10728. v232v2 = make(map[int16]bool, len(v))
  10729. } // reset map
  10730. var v232v3, v232v4 typMapMapInt16Bool
  10731. v232v3 = typMapMapInt16Bool(v232v1)
  10732. v232v4 = typMapMapInt16Bool(v232v2)
  10733. bs232 = testMarshalErr(v232v3, h, t, "enc-map-v232-custom")
  10734. testUnmarshalErr(v232v4, bs232, h, t, "dec-map-v232-p-len")
  10735. testDeepEqualErr(v232v3, v232v4, t, "equal-map-v232-p-len")
  10736. }
  10737. for _, v := range []map[int32]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  10738. // fmt.Printf(">>>> running mammoth map v235: %v\n", v)
  10739. var v235v1, v235v2 map[int32]interface{}
  10740. v235v1 = v
  10741. bs235 := testMarshalErr(v235v1, h, t, "enc-map-v235")
  10742. if v == nil {
  10743. v235v2 = nil
  10744. } else {
  10745. v235v2 = make(map[int32]interface{}, len(v))
  10746. } // reset map
  10747. testUnmarshalErr(v235v2, bs235, h, t, "dec-map-v235")
  10748. testDeepEqualErr(v235v1, v235v2, t, "equal-map-v235")
  10749. if v == nil {
  10750. v235v2 = nil
  10751. } else {
  10752. v235v2 = make(map[int32]interface{}, len(v))
  10753. } // reset map
  10754. testUnmarshalErr(reflect.ValueOf(v235v2), bs235, h, t, "dec-map-v235-noaddr") // decode into non-addressable map value
  10755. testDeepEqualErr(v235v1, v235v2, t, "equal-map-v235-noaddr")
  10756. if v == nil {
  10757. v235v2 = nil
  10758. } else {
  10759. v235v2 = make(map[int32]interface{}, len(v))
  10760. } // reset map
  10761. testUnmarshalErr(&v235v2, bs235, h, t, "dec-map-v235-p-len")
  10762. testDeepEqualErr(v235v1, v235v2, t, "equal-map-v235-p-len")
  10763. bs235 = testMarshalErr(&v235v1, h, t, "enc-map-v235-p")
  10764. v235v2 = nil
  10765. testUnmarshalErr(&v235v2, bs235, h, t, "dec-map-v235-p-nil")
  10766. testDeepEqualErr(v235v1, v235v2, t, "equal-map-v235-p-nil")
  10767. // ...
  10768. if v == nil {
  10769. v235v2 = nil
  10770. } else {
  10771. v235v2 = make(map[int32]interface{}, len(v))
  10772. } // reset map
  10773. var v235v3, v235v4 typMapMapInt32Intf
  10774. v235v3 = typMapMapInt32Intf(v235v1)
  10775. v235v4 = typMapMapInt32Intf(v235v2)
  10776. bs235 = testMarshalErr(v235v3, h, t, "enc-map-v235-custom")
  10777. testUnmarshalErr(v235v4, bs235, h, t, "dec-map-v235-p-len")
  10778. testDeepEqualErr(v235v3, v235v4, t, "equal-map-v235-p-len")
  10779. }
  10780. for _, v := range []map[int32]string{nil, {}, {33: "", 44: "some-string"}} {
  10781. // fmt.Printf(">>>> running mammoth map v236: %v\n", v)
  10782. var v236v1, v236v2 map[int32]string
  10783. v236v1 = v
  10784. bs236 := testMarshalErr(v236v1, h, t, "enc-map-v236")
  10785. if v == nil {
  10786. v236v2 = nil
  10787. } else {
  10788. v236v2 = make(map[int32]string, len(v))
  10789. } // reset map
  10790. testUnmarshalErr(v236v2, bs236, h, t, "dec-map-v236")
  10791. testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236")
  10792. if v == nil {
  10793. v236v2 = nil
  10794. } else {
  10795. v236v2 = make(map[int32]string, len(v))
  10796. } // reset map
  10797. testUnmarshalErr(reflect.ValueOf(v236v2), bs236, h, t, "dec-map-v236-noaddr") // decode into non-addressable map value
  10798. testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-noaddr")
  10799. if v == nil {
  10800. v236v2 = nil
  10801. } else {
  10802. v236v2 = make(map[int32]string, len(v))
  10803. } // reset map
  10804. testUnmarshalErr(&v236v2, bs236, h, t, "dec-map-v236-p-len")
  10805. testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-p-len")
  10806. bs236 = testMarshalErr(&v236v1, h, t, "enc-map-v236-p")
  10807. v236v2 = nil
  10808. testUnmarshalErr(&v236v2, bs236, h, t, "dec-map-v236-p-nil")
  10809. testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-p-nil")
  10810. // ...
  10811. if v == nil {
  10812. v236v2 = nil
  10813. } else {
  10814. v236v2 = make(map[int32]string, len(v))
  10815. } // reset map
  10816. var v236v3, v236v4 typMapMapInt32String
  10817. v236v3 = typMapMapInt32String(v236v1)
  10818. v236v4 = typMapMapInt32String(v236v2)
  10819. bs236 = testMarshalErr(v236v3, h, t, "enc-map-v236-custom")
  10820. testUnmarshalErr(v236v4, bs236, h, t, "dec-map-v236-p-len")
  10821. testDeepEqualErr(v236v3, v236v4, t, "equal-map-v236-p-len")
  10822. }
  10823. for _, v := range []map[int32]uint{nil, {}, {33: 0, 44: 33}} {
  10824. // fmt.Printf(">>>> running mammoth map v237: %v\n", v)
  10825. var v237v1, v237v2 map[int32]uint
  10826. v237v1 = v
  10827. bs237 := testMarshalErr(v237v1, h, t, "enc-map-v237")
  10828. if v == nil {
  10829. v237v2 = nil
  10830. } else {
  10831. v237v2 = make(map[int32]uint, len(v))
  10832. } // reset map
  10833. testUnmarshalErr(v237v2, bs237, h, t, "dec-map-v237")
  10834. testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237")
  10835. if v == nil {
  10836. v237v2 = nil
  10837. } else {
  10838. v237v2 = make(map[int32]uint, len(v))
  10839. } // reset map
  10840. testUnmarshalErr(reflect.ValueOf(v237v2), bs237, h, t, "dec-map-v237-noaddr") // decode into non-addressable map value
  10841. testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-noaddr")
  10842. if v == nil {
  10843. v237v2 = nil
  10844. } else {
  10845. v237v2 = make(map[int32]uint, len(v))
  10846. } // reset map
  10847. testUnmarshalErr(&v237v2, bs237, h, t, "dec-map-v237-p-len")
  10848. testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-p-len")
  10849. bs237 = testMarshalErr(&v237v1, h, t, "enc-map-v237-p")
  10850. v237v2 = nil
  10851. testUnmarshalErr(&v237v2, bs237, h, t, "dec-map-v237-p-nil")
  10852. testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-p-nil")
  10853. // ...
  10854. if v == nil {
  10855. v237v2 = nil
  10856. } else {
  10857. v237v2 = make(map[int32]uint, len(v))
  10858. } // reset map
  10859. var v237v3, v237v4 typMapMapInt32Uint
  10860. v237v3 = typMapMapInt32Uint(v237v1)
  10861. v237v4 = typMapMapInt32Uint(v237v2)
  10862. bs237 = testMarshalErr(v237v3, h, t, "enc-map-v237-custom")
  10863. testUnmarshalErr(v237v4, bs237, h, t, "dec-map-v237-p-len")
  10864. testDeepEqualErr(v237v3, v237v4, t, "equal-map-v237-p-len")
  10865. }
  10866. for _, v := range []map[int32]uint8{nil, {}, {44: 0, 33: 44}} {
  10867. // fmt.Printf(">>>> running mammoth map v238: %v\n", v)
  10868. var v238v1, v238v2 map[int32]uint8
  10869. v238v1 = v
  10870. bs238 := testMarshalErr(v238v1, h, t, "enc-map-v238")
  10871. if v == nil {
  10872. v238v2 = nil
  10873. } else {
  10874. v238v2 = make(map[int32]uint8, len(v))
  10875. } // reset map
  10876. testUnmarshalErr(v238v2, bs238, h, t, "dec-map-v238")
  10877. testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238")
  10878. if v == nil {
  10879. v238v2 = nil
  10880. } else {
  10881. v238v2 = make(map[int32]uint8, len(v))
  10882. } // reset map
  10883. testUnmarshalErr(reflect.ValueOf(v238v2), bs238, h, t, "dec-map-v238-noaddr") // decode into non-addressable map value
  10884. testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-noaddr")
  10885. if v == nil {
  10886. v238v2 = nil
  10887. } else {
  10888. v238v2 = make(map[int32]uint8, len(v))
  10889. } // reset map
  10890. testUnmarshalErr(&v238v2, bs238, h, t, "dec-map-v238-p-len")
  10891. testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-p-len")
  10892. bs238 = testMarshalErr(&v238v1, h, t, "enc-map-v238-p")
  10893. v238v2 = nil
  10894. testUnmarshalErr(&v238v2, bs238, h, t, "dec-map-v238-p-nil")
  10895. testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-p-nil")
  10896. // ...
  10897. if v == nil {
  10898. v238v2 = nil
  10899. } else {
  10900. v238v2 = make(map[int32]uint8, len(v))
  10901. } // reset map
  10902. var v238v3, v238v4 typMapMapInt32Uint8
  10903. v238v3 = typMapMapInt32Uint8(v238v1)
  10904. v238v4 = typMapMapInt32Uint8(v238v2)
  10905. bs238 = testMarshalErr(v238v3, h, t, "enc-map-v238-custom")
  10906. testUnmarshalErr(v238v4, bs238, h, t, "dec-map-v238-p-len")
  10907. testDeepEqualErr(v238v3, v238v4, t, "equal-map-v238-p-len")
  10908. }
  10909. for _, v := range []map[int32]uint16{nil, {}, {33: 0, 44: 33}} {
  10910. // fmt.Printf(">>>> running mammoth map v239: %v\n", v)
  10911. var v239v1, v239v2 map[int32]uint16
  10912. v239v1 = v
  10913. bs239 := testMarshalErr(v239v1, h, t, "enc-map-v239")
  10914. if v == nil {
  10915. v239v2 = nil
  10916. } else {
  10917. v239v2 = make(map[int32]uint16, len(v))
  10918. } // reset map
  10919. testUnmarshalErr(v239v2, bs239, h, t, "dec-map-v239")
  10920. testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239")
  10921. if v == nil {
  10922. v239v2 = nil
  10923. } else {
  10924. v239v2 = make(map[int32]uint16, len(v))
  10925. } // reset map
  10926. testUnmarshalErr(reflect.ValueOf(v239v2), bs239, h, t, "dec-map-v239-noaddr") // decode into non-addressable map value
  10927. testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-noaddr")
  10928. if v == nil {
  10929. v239v2 = nil
  10930. } else {
  10931. v239v2 = make(map[int32]uint16, len(v))
  10932. } // reset map
  10933. testUnmarshalErr(&v239v2, bs239, h, t, "dec-map-v239-p-len")
  10934. testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-p-len")
  10935. bs239 = testMarshalErr(&v239v1, h, t, "enc-map-v239-p")
  10936. v239v2 = nil
  10937. testUnmarshalErr(&v239v2, bs239, h, t, "dec-map-v239-p-nil")
  10938. testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-p-nil")
  10939. // ...
  10940. if v == nil {
  10941. v239v2 = nil
  10942. } else {
  10943. v239v2 = make(map[int32]uint16, len(v))
  10944. } // reset map
  10945. var v239v3, v239v4 typMapMapInt32Uint16
  10946. v239v3 = typMapMapInt32Uint16(v239v1)
  10947. v239v4 = typMapMapInt32Uint16(v239v2)
  10948. bs239 = testMarshalErr(v239v3, h, t, "enc-map-v239-custom")
  10949. testUnmarshalErr(v239v4, bs239, h, t, "dec-map-v239-p-len")
  10950. testDeepEqualErr(v239v3, v239v4, t, "equal-map-v239-p-len")
  10951. }
  10952. for _, v := range []map[int32]uint32{nil, {}, {44: 0, 33: 44}} {
  10953. // fmt.Printf(">>>> running mammoth map v240: %v\n", v)
  10954. var v240v1, v240v2 map[int32]uint32
  10955. v240v1 = v
  10956. bs240 := testMarshalErr(v240v1, h, t, "enc-map-v240")
  10957. if v == nil {
  10958. v240v2 = nil
  10959. } else {
  10960. v240v2 = make(map[int32]uint32, len(v))
  10961. } // reset map
  10962. testUnmarshalErr(v240v2, bs240, h, t, "dec-map-v240")
  10963. testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240")
  10964. if v == nil {
  10965. v240v2 = nil
  10966. } else {
  10967. v240v2 = make(map[int32]uint32, len(v))
  10968. } // reset map
  10969. testUnmarshalErr(reflect.ValueOf(v240v2), bs240, h, t, "dec-map-v240-noaddr") // decode into non-addressable map value
  10970. testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-noaddr")
  10971. if v == nil {
  10972. v240v2 = nil
  10973. } else {
  10974. v240v2 = make(map[int32]uint32, len(v))
  10975. } // reset map
  10976. testUnmarshalErr(&v240v2, bs240, h, t, "dec-map-v240-p-len")
  10977. testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-p-len")
  10978. bs240 = testMarshalErr(&v240v1, h, t, "enc-map-v240-p")
  10979. v240v2 = nil
  10980. testUnmarshalErr(&v240v2, bs240, h, t, "dec-map-v240-p-nil")
  10981. testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-p-nil")
  10982. // ...
  10983. if v == nil {
  10984. v240v2 = nil
  10985. } else {
  10986. v240v2 = make(map[int32]uint32, len(v))
  10987. } // reset map
  10988. var v240v3, v240v4 typMapMapInt32Uint32
  10989. v240v3 = typMapMapInt32Uint32(v240v1)
  10990. v240v4 = typMapMapInt32Uint32(v240v2)
  10991. bs240 = testMarshalErr(v240v3, h, t, "enc-map-v240-custom")
  10992. testUnmarshalErr(v240v4, bs240, h, t, "dec-map-v240-p-len")
  10993. testDeepEqualErr(v240v3, v240v4, t, "equal-map-v240-p-len")
  10994. }
  10995. for _, v := range []map[int32]uint64{nil, {}, {33: 0, 44: 33}} {
  10996. // fmt.Printf(">>>> running mammoth map v241: %v\n", v)
  10997. var v241v1, v241v2 map[int32]uint64
  10998. v241v1 = v
  10999. bs241 := testMarshalErr(v241v1, h, t, "enc-map-v241")
  11000. if v == nil {
  11001. v241v2 = nil
  11002. } else {
  11003. v241v2 = make(map[int32]uint64, len(v))
  11004. } // reset map
  11005. testUnmarshalErr(v241v2, bs241, h, t, "dec-map-v241")
  11006. testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241")
  11007. if v == nil {
  11008. v241v2 = nil
  11009. } else {
  11010. v241v2 = make(map[int32]uint64, len(v))
  11011. } // reset map
  11012. testUnmarshalErr(reflect.ValueOf(v241v2), bs241, h, t, "dec-map-v241-noaddr") // decode into non-addressable map value
  11013. testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-noaddr")
  11014. if v == nil {
  11015. v241v2 = nil
  11016. } else {
  11017. v241v2 = make(map[int32]uint64, len(v))
  11018. } // reset map
  11019. testUnmarshalErr(&v241v2, bs241, h, t, "dec-map-v241-p-len")
  11020. testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-p-len")
  11021. bs241 = testMarshalErr(&v241v1, h, t, "enc-map-v241-p")
  11022. v241v2 = nil
  11023. testUnmarshalErr(&v241v2, bs241, h, t, "dec-map-v241-p-nil")
  11024. testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-p-nil")
  11025. // ...
  11026. if v == nil {
  11027. v241v2 = nil
  11028. } else {
  11029. v241v2 = make(map[int32]uint64, len(v))
  11030. } // reset map
  11031. var v241v3, v241v4 typMapMapInt32Uint64
  11032. v241v3 = typMapMapInt32Uint64(v241v1)
  11033. v241v4 = typMapMapInt32Uint64(v241v2)
  11034. bs241 = testMarshalErr(v241v3, h, t, "enc-map-v241-custom")
  11035. testUnmarshalErr(v241v4, bs241, h, t, "dec-map-v241-p-len")
  11036. testDeepEqualErr(v241v3, v241v4, t, "equal-map-v241-p-len")
  11037. }
  11038. for _, v := range []map[int32]uintptr{nil, {}, {44: 0, 33: 44}} {
  11039. // fmt.Printf(">>>> running mammoth map v242: %v\n", v)
  11040. var v242v1, v242v2 map[int32]uintptr
  11041. v242v1 = v
  11042. bs242 := testMarshalErr(v242v1, h, t, "enc-map-v242")
  11043. if v == nil {
  11044. v242v2 = nil
  11045. } else {
  11046. v242v2 = make(map[int32]uintptr, len(v))
  11047. } // reset map
  11048. testUnmarshalErr(v242v2, bs242, h, t, "dec-map-v242")
  11049. testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242")
  11050. if v == nil {
  11051. v242v2 = nil
  11052. } else {
  11053. v242v2 = make(map[int32]uintptr, len(v))
  11054. } // reset map
  11055. testUnmarshalErr(reflect.ValueOf(v242v2), bs242, h, t, "dec-map-v242-noaddr") // decode into non-addressable map value
  11056. testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-noaddr")
  11057. if v == nil {
  11058. v242v2 = nil
  11059. } else {
  11060. v242v2 = make(map[int32]uintptr, len(v))
  11061. } // reset map
  11062. testUnmarshalErr(&v242v2, bs242, h, t, "dec-map-v242-p-len")
  11063. testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-p-len")
  11064. bs242 = testMarshalErr(&v242v1, h, t, "enc-map-v242-p")
  11065. v242v2 = nil
  11066. testUnmarshalErr(&v242v2, bs242, h, t, "dec-map-v242-p-nil")
  11067. testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-p-nil")
  11068. // ...
  11069. if v == nil {
  11070. v242v2 = nil
  11071. } else {
  11072. v242v2 = make(map[int32]uintptr, len(v))
  11073. } // reset map
  11074. var v242v3, v242v4 typMapMapInt32Uintptr
  11075. v242v3 = typMapMapInt32Uintptr(v242v1)
  11076. v242v4 = typMapMapInt32Uintptr(v242v2)
  11077. bs242 = testMarshalErr(v242v3, h, t, "enc-map-v242-custom")
  11078. testUnmarshalErr(v242v4, bs242, h, t, "dec-map-v242-p-len")
  11079. testDeepEqualErr(v242v3, v242v4, t, "equal-map-v242-p-len")
  11080. }
  11081. for _, v := range []map[int32]int{nil, {}, {33: 0, 44: 33}} {
  11082. // fmt.Printf(">>>> running mammoth map v243: %v\n", v)
  11083. var v243v1, v243v2 map[int32]int
  11084. v243v1 = v
  11085. bs243 := testMarshalErr(v243v1, h, t, "enc-map-v243")
  11086. if v == nil {
  11087. v243v2 = nil
  11088. } else {
  11089. v243v2 = make(map[int32]int, len(v))
  11090. } // reset map
  11091. testUnmarshalErr(v243v2, bs243, h, t, "dec-map-v243")
  11092. testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243")
  11093. if v == nil {
  11094. v243v2 = nil
  11095. } else {
  11096. v243v2 = make(map[int32]int, len(v))
  11097. } // reset map
  11098. testUnmarshalErr(reflect.ValueOf(v243v2), bs243, h, t, "dec-map-v243-noaddr") // decode into non-addressable map value
  11099. testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-noaddr")
  11100. if v == nil {
  11101. v243v2 = nil
  11102. } else {
  11103. v243v2 = make(map[int32]int, len(v))
  11104. } // reset map
  11105. testUnmarshalErr(&v243v2, bs243, h, t, "dec-map-v243-p-len")
  11106. testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-p-len")
  11107. bs243 = testMarshalErr(&v243v1, h, t, "enc-map-v243-p")
  11108. v243v2 = nil
  11109. testUnmarshalErr(&v243v2, bs243, h, t, "dec-map-v243-p-nil")
  11110. testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-p-nil")
  11111. // ...
  11112. if v == nil {
  11113. v243v2 = nil
  11114. } else {
  11115. v243v2 = make(map[int32]int, len(v))
  11116. } // reset map
  11117. var v243v3, v243v4 typMapMapInt32Int
  11118. v243v3 = typMapMapInt32Int(v243v1)
  11119. v243v4 = typMapMapInt32Int(v243v2)
  11120. bs243 = testMarshalErr(v243v3, h, t, "enc-map-v243-custom")
  11121. testUnmarshalErr(v243v4, bs243, h, t, "dec-map-v243-p-len")
  11122. testDeepEqualErr(v243v3, v243v4, t, "equal-map-v243-p-len")
  11123. }
  11124. for _, v := range []map[int32]int8{nil, {}, {44: 0, 33: 44}} {
  11125. // fmt.Printf(">>>> running mammoth map v244: %v\n", v)
  11126. var v244v1, v244v2 map[int32]int8
  11127. v244v1 = v
  11128. bs244 := testMarshalErr(v244v1, h, t, "enc-map-v244")
  11129. if v == nil {
  11130. v244v2 = nil
  11131. } else {
  11132. v244v2 = make(map[int32]int8, len(v))
  11133. } // reset map
  11134. testUnmarshalErr(v244v2, bs244, h, t, "dec-map-v244")
  11135. testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244")
  11136. if v == nil {
  11137. v244v2 = nil
  11138. } else {
  11139. v244v2 = make(map[int32]int8, len(v))
  11140. } // reset map
  11141. testUnmarshalErr(reflect.ValueOf(v244v2), bs244, h, t, "dec-map-v244-noaddr") // decode into non-addressable map value
  11142. testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-noaddr")
  11143. if v == nil {
  11144. v244v2 = nil
  11145. } else {
  11146. v244v2 = make(map[int32]int8, len(v))
  11147. } // reset map
  11148. testUnmarshalErr(&v244v2, bs244, h, t, "dec-map-v244-p-len")
  11149. testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-p-len")
  11150. bs244 = testMarshalErr(&v244v1, h, t, "enc-map-v244-p")
  11151. v244v2 = nil
  11152. testUnmarshalErr(&v244v2, bs244, h, t, "dec-map-v244-p-nil")
  11153. testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-p-nil")
  11154. // ...
  11155. if v == nil {
  11156. v244v2 = nil
  11157. } else {
  11158. v244v2 = make(map[int32]int8, len(v))
  11159. } // reset map
  11160. var v244v3, v244v4 typMapMapInt32Int8
  11161. v244v3 = typMapMapInt32Int8(v244v1)
  11162. v244v4 = typMapMapInt32Int8(v244v2)
  11163. bs244 = testMarshalErr(v244v3, h, t, "enc-map-v244-custom")
  11164. testUnmarshalErr(v244v4, bs244, h, t, "dec-map-v244-p-len")
  11165. testDeepEqualErr(v244v3, v244v4, t, "equal-map-v244-p-len")
  11166. }
  11167. for _, v := range []map[int32]int16{nil, {}, {33: 0, 44: 33}} {
  11168. // fmt.Printf(">>>> running mammoth map v245: %v\n", v)
  11169. var v245v1, v245v2 map[int32]int16
  11170. v245v1 = v
  11171. bs245 := testMarshalErr(v245v1, h, t, "enc-map-v245")
  11172. if v == nil {
  11173. v245v2 = nil
  11174. } else {
  11175. v245v2 = make(map[int32]int16, len(v))
  11176. } // reset map
  11177. testUnmarshalErr(v245v2, bs245, h, t, "dec-map-v245")
  11178. testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245")
  11179. if v == nil {
  11180. v245v2 = nil
  11181. } else {
  11182. v245v2 = make(map[int32]int16, len(v))
  11183. } // reset map
  11184. testUnmarshalErr(reflect.ValueOf(v245v2), bs245, h, t, "dec-map-v245-noaddr") // decode into non-addressable map value
  11185. testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-noaddr")
  11186. if v == nil {
  11187. v245v2 = nil
  11188. } else {
  11189. v245v2 = make(map[int32]int16, len(v))
  11190. } // reset map
  11191. testUnmarshalErr(&v245v2, bs245, h, t, "dec-map-v245-p-len")
  11192. testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-p-len")
  11193. bs245 = testMarshalErr(&v245v1, h, t, "enc-map-v245-p")
  11194. v245v2 = nil
  11195. testUnmarshalErr(&v245v2, bs245, h, t, "dec-map-v245-p-nil")
  11196. testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-p-nil")
  11197. // ...
  11198. if v == nil {
  11199. v245v2 = nil
  11200. } else {
  11201. v245v2 = make(map[int32]int16, len(v))
  11202. } // reset map
  11203. var v245v3, v245v4 typMapMapInt32Int16
  11204. v245v3 = typMapMapInt32Int16(v245v1)
  11205. v245v4 = typMapMapInt32Int16(v245v2)
  11206. bs245 = testMarshalErr(v245v3, h, t, "enc-map-v245-custom")
  11207. testUnmarshalErr(v245v4, bs245, h, t, "dec-map-v245-p-len")
  11208. testDeepEqualErr(v245v3, v245v4, t, "equal-map-v245-p-len")
  11209. }
  11210. for _, v := range []map[int32]int32{nil, {}, {44: 0, 33: 44}} {
  11211. // fmt.Printf(">>>> running mammoth map v246: %v\n", v)
  11212. var v246v1, v246v2 map[int32]int32
  11213. v246v1 = v
  11214. bs246 := testMarshalErr(v246v1, h, t, "enc-map-v246")
  11215. if v == nil {
  11216. v246v2 = nil
  11217. } else {
  11218. v246v2 = make(map[int32]int32, len(v))
  11219. } // reset map
  11220. testUnmarshalErr(v246v2, bs246, h, t, "dec-map-v246")
  11221. testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246")
  11222. if v == nil {
  11223. v246v2 = nil
  11224. } else {
  11225. v246v2 = make(map[int32]int32, len(v))
  11226. } // reset map
  11227. testUnmarshalErr(reflect.ValueOf(v246v2), bs246, h, t, "dec-map-v246-noaddr") // decode into non-addressable map value
  11228. testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-noaddr")
  11229. if v == nil {
  11230. v246v2 = nil
  11231. } else {
  11232. v246v2 = make(map[int32]int32, len(v))
  11233. } // reset map
  11234. testUnmarshalErr(&v246v2, bs246, h, t, "dec-map-v246-p-len")
  11235. testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-p-len")
  11236. bs246 = testMarshalErr(&v246v1, h, t, "enc-map-v246-p")
  11237. v246v2 = nil
  11238. testUnmarshalErr(&v246v2, bs246, h, t, "dec-map-v246-p-nil")
  11239. testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-p-nil")
  11240. // ...
  11241. if v == nil {
  11242. v246v2 = nil
  11243. } else {
  11244. v246v2 = make(map[int32]int32, len(v))
  11245. } // reset map
  11246. var v246v3, v246v4 typMapMapInt32Int32
  11247. v246v3 = typMapMapInt32Int32(v246v1)
  11248. v246v4 = typMapMapInt32Int32(v246v2)
  11249. bs246 = testMarshalErr(v246v3, h, t, "enc-map-v246-custom")
  11250. testUnmarshalErr(v246v4, bs246, h, t, "dec-map-v246-p-len")
  11251. testDeepEqualErr(v246v3, v246v4, t, "equal-map-v246-p-len")
  11252. }
  11253. for _, v := range []map[int32]int64{nil, {}, {33: 0, 44: 33}} {
  11254. // fmt.Printf(">>>> running mammoth map v247: %v\n", v)
  11255. var v247v1, v247v2 map[int32]int64
  11256. v247v1 = v
  11257. bs247 := testMarshalErr(v247v1, h, t, "enc-map-v247")
  11258. if v == nil {
  11259. v247v2 = nil
  11260. } else {
  11261. v247v2 = make(map[int32]int64, len(v))
  11262. } // reset map
  11263. testUnmarshalErr(v247v2, bs247, h, t, "dec-map-v247")
  11264. testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247")
  11265. if v == nil {
  11266. v247v2 = nil
  11267. } else {
  11268. v247v2 = make(map[int32]int64, len(v))
  11269. } // reset map
  11270. testUnmarshalErr(reflect.ValueOf(v247v2), bs247, h, t, "dec-map-v247-noaddr") // decode into non-addressable map value
  11271. testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-noaddr")
  11272. if v == nil {
  11273. v247v2 = nil
  11274. } else {
  11275. v247v2 = make(map[int32]int64, len(v))
  11276. } // reset map
  11277. testUnmarshalErr(&v247v2, bs247, h, t, "dec-map-v247-p-len")
  11278. testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-p-len")
  11279. bs247 = testMarshalErr(&v247v1, h, t, "enc-map-v247-p")
  11280. v247v2 = nil
  11281. testUnmarshalErr(&v247v2, bs247, h, t, "dec-map-v247-p-nil")
  11282. testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-p-nil")
  11283. // ...
  11284. if v == nil {
  11285. v247v2 = nil
  11286. } else {
  11287. v247v2 = make(map[int32]int64, len(v))
  11288. } // reset map
  11289. var v247v3, v247v4 typMapMapInt32Int64
  11290. v247v3 = typMapMapInt32Int64(v247v1)
  11291. v247v4 = typMapMapInt32Int64(v247v2)
  11292. bs247 = testMarshalErr(v247v3, h, t, "enc-map-v247-custom")
  11293. testUnmarshalErr(v247v4, bs247, h, t, "dec-map-v247-p-len")
  11294. testDeepEqualErr(v247v3, v247v4, t, "equal-map-v247-p-len")
  11295. }
  11296. for _, v := range []map[int32]float32{nil, {}, {44: 0, 33: 22.2}} {
  11297. // fmt.Printf(">>>> running mammoth map v248: %v\n", v)
  11298. var v248v1, v248v2 map[int32]float32
  11299. v248v1 = v
  11300. bs248 := testMarshalErr(v248v1, h, t, "enc-map-v248")
  11301. if v == nil {
  11302. v248v2 = nil
  11303. } else {
  11304. v248v2 = make(map[int32]float32, len(v))
  11305. } // reset map
  11306. testUnmarshalErr(v248v2, bs248, h, t, "dec-map-v248")
  11307. testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248")
  11308. if v == nil {
  11309. v248v2 = nil
  11310. } else {
  11311. v248v2 = make(map[int32]float32, len(v))
  11312. } // reset map
  11313. testUnmarshalErr(reflect.ValueOf(v248v2), bs248, h, t, "dec-map-v248-noaddr") // decode into non-addressable map value
  11314. testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-noaddr")
  11315. if v == nil {
  11316. v248v2 = nil
  11317. } else {
  11318. v248v2 = make(map[int32]float32, len(v))
  11319. } // reset map
  11320. testUnmarshalErr(&v248v2, bs248, h, t, "dec-map-v248-p-len")
  11321. testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-p-len")
  11322. bs248 = testMarshalErr(&v248v1, h, t, "enc-map-v248-p")
  11323. v248v2 = nil
  11324. testUnmarshalErr(&v248v2, bs248, h, t, "dec-map-v248-p-nil")
  11325. testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-p-nil")
  11326. // ...
  11327. if v == nil {
  11328. v248v2 = nil
  11329. } else {
  11330. v248v2 = make(map[int32]float32, len(v))
  11331. } // reset map
  11332. var v248v3, v248v4 typMapMapInt32Float32
  11333. v248v3 = typMapMapInt32Float32(v248v1)
  11334. v248v4 = typMapMapInt32Float32(v248v2)
  11335. bs248 = testMarshalErr(v248v3, h, t, "enc-map-v248-custom")
  11336. testUnmarshalErr(v248v4, bs248, h, t, "dec-map-v248-p-len")
  11337. testDeepEqualErr(v248v3, v248v4, t, "equal-map-v248-p-len")
  11338. }
  11339. for _, v := range []map[int32]float64{nil, {}, {44: 0, 33: 11.1}} {
  11340. // fmt.Printf(">>>> running mammoth map v249: %v\n", v)
  11341. var v249v1, v249v2 map[int32]float64
  11342. v249v1 = v
  11343. bs249 := testMarshalErr(v249v1, h, t, "enc-map-v249")
  11344. if v == nil {
  11345. v249v2 = nil
  11346. } else {
  11347. v249v2 = make(map[int32]float64, len(v))
  11348. } // reset map
  11349. testUnmarshalErr(v249v2, bs249, h, t, "dec-map-v249")
  11350. testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249")
  11351. if v == nil {
  11352. v249v2 = nil
  11353. } else {
  11354. v249v2 = make(map[int32]float64, len(v))
  11355. } // reset map
  11356. testUnmarshalErr(reflect.ValueOf(v249v2), bs249, h, t, "dec-map-v249-noaddr") // decode into non-addressable map value
  11357. testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-noaddr")
  11358. if v == nil {
  11359. v249v2 = nil
  11360. } else {
  11361. v249v2 = make(map[int32]float64, len(v))
  11362. } // reset map
  11363. testUnmarshalErr(&v249v2, bs249, h, t, "dec-map-v249-p-len")
  11364. testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-p-len")
  11365. bs249 = testMarshalErr(&v249v1, h, t, "enc-map-v249-p")
  11366. v249v2 = nil
  11367. testUnmarshalErr(&v249v2, bs249, h, t, "dec-map-v249-p-nil")
  11368. testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-p-nil")
  11369. // ...
  11370. if v == nil {
  11371. v249v2 = nil
  11372. } else {
  11373. v249v2 = make(map[int32]float64, len(v))
  11374. } // reset map
  11375. var v249v3, v249v4 typMapMapInt32Float64
  11376. v249v3 = typMapMapInt32Float64(v249v1)
  11377. v249v4 = typMapMapInt32Float64(v249v2)
  11378. bs249 = testMarshalErr(v249v3, h, t, "enc-map-v249-custom")
  11379. testUnmarshalErr(v249v4, bs249, h, t, "dec-map-v249-p-len")
  11380. testDeepEqualErr(v249v3, v249v4, t, "equal-map-v249-p-len")
  11381. }
  11382. for _, v := range []map[int32]bool{nil, {}, {44: false, 33: true}} {
  11383. // fmt.Printf(">>>> running mammoth map v250: %v\n", v)
  11384. var v250v1, v250v2 map[int32]bool
  11385. v250v1 = v
  11386. bs250 := testMarshalErr(v250v1, h, t, "enc-map-v250")
  11387. if v == nil {
  11388. v250v2 = nil
  11389. } else {
  11390. v250v2 = make(map[int32]bool, len(v))
  11391. } // reset map
  11392. testUnmarshalErr(v250v2, bs250, h, t, "dec-map-v250")
  11393. testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250")
  11394. if v == nil {
  11395. v250v2 = nil
  11396. } else {
  11397. v250v2 = make(map[int32]bool, len(v))
  11398. } // reset map
  11399. testUnmarshalErr(reflect.ValueOf(v250v2), bs250, h, t, "dec-map-v250-noaddr") // decode into non-addressable map value
  11400. testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-noaddr")
  11401. if v == nil {
  11402. v250v2 = nil
  11403. } else {
  11404. v250v2 = make(map[int32]bool, len(v))
  11405. } // reset map
  11406. testUnmarshalErr(&v250v2, bs250, h, t, "dec-map-v250-p-len")
  11407. testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-p-len")
  11408. bs250 = testMarshalErr(&v250v1, h, t, "enc-map-v250-p")
  11409. v250v2 = nil
  11410. testUnmarshalErr(&v250v2, bs250, h, t, "dec-map-v250-p-nil")
  11411. testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-p-nil")
  11412. // ...
  11413. if v == nil {
  11414. v250v2 = nil
  11415. } else {
  11416. v250v2 = make(map[int32]bool, len(v))
  11417. } // reset map
  11418. var v250v3, v250v4 typMapMapInt32Bool
  11419. v250v3 = typMapMapInt32Bool(v250v1)
  11420. v250v4 = typMapMapInt32Bool(v250v2)
  11421. bs250 = testMarshalErr(v250v3, h, t, "enc-map-v250-custom")
  11422. testUnmarshalErr(v250v4, bs250, h, t, "dec-map-v250-p-len")
  11423. testDeepEqualErr(v250v3, v250v4, t, "equal-map-v250-p-len")
  11424. }
  11425. for _, v := range []map[int64]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  11426. // fmt.Printf(">>>> running mammoth map v253: %v\n", v)
  11427. var v253v1, v253v2 map[int64]interface{}
  11428. v253v1 = v
  11429. bs253 := testMarshalErr(v253v1, h, t, "enc-map-v253")
  11430. if v == nil {
  11431. v253v2 = nil
  11432. } else {
  11433. v253v2 = make(map[int64]interface{}, len(v))
  11434. } // reset map
  11435. testUnmarshalErr(v253v2, bs253, h, t, "dec-map-v253")
  11436. testDeepEqualErr(v253v1, v253v2, t, "equal-map-v253")
  11437. if v == nil {
  11438. v253v2 = nil
  11439. } else {
  11440. v253v2 = make(map[int64]interface{}, len(v))
  11441. } // reset map
  11442. testUnmarshalErr(reflect.ValueOf(v253v2), bs253, h, t, "dec-map-v253-noaddr") // decode into non-addressable map value
  11443. testDeepEqualErr(v253v1, v253v2, t, "equal-map-v253-noaddr")
  11444. if v == nil {
  11445. v253v2 = nil
  11446. } else {
  11447. v253v2 = make(map[int64]interface{}, len(v))
  11448. } // reset map
  11449. testUnmarshalErr(&v253v2, bs253, h, t, "dec-map-v253-p-len")
  11450. testDeepEqualErr(v253v1, v253v2, t, "equal-map-v253-p-len")
  11451. bs253 = testMarshalErr(&v253v1, h, t, "enc-map-v253-p")
  11452. v253v2 = nil
  11453. testUnmarshalErr(&v253v2, bs253, h, t, "dec-map-v253-p-nil")
  11454. testDeepEqualErr(v253v1, v253v2, t, "equal-map-v253-p-nil")
  11455. // ...
  11456. if v == nil {
  11457. v253v2 = nil
  11458. } else {
  11459. v253v2 = make(map[int64]interface{}, len(v))
  11460. } // reset map
  11461. var v253v3, v253v4 typMapMapInt64Intf
  11462. v253v3 = typMapMapInt64Intf(v253v1)
  11463. v253v4 = typMapMapInt64Intf(v253v2)
  11464. bs253 = testMarshalErr(v253v3, h, t, "enc-map-v253-custom")
  11465. testUnmarshalErr(v253v4, bs253, h, t, "dec-map-v253-p-len")
  11466. testDeepEqualErr(v253v3, v253v4, t, "equal-map-v253-p-len")
  11467. }
  11468. for _, v := range []map[int64]string{nil, {}, {44: "", 33: "some-string-2"}} {
  11469. // fmt.Printf(">>>> running mammoth map v254: %v\n", v)
  11470. var v254v1, v254v2 map[int64]string
  11471. v254v1 = v
  11472. bs254 := testMarshalErr(v254v1, h, t, "enc-map-v254")
  11473. if v == nil {
  11474. v254v2 = nil
  11475. } else {
  11476. v254v2 = make(map[int64]string, len(v))
  11477. } // reset map
  11478. testUnmarshalErr(v254v2, bs254, h, t, "dec-map-v254")
  11479. testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254")
  11480. if v == nil {
  11481. v254v2 = nil
  11482. } else {
  11483. v254v2 = make(map[int64]string, len(v))
  11484. } // reset map
  11485. testUnmarshalErr(reflect.ValueOf(v254v2), bs254, h, t, "dec-map-v254-noaddr") // decode into non-addressable map value
  11486. testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-noaddr")
  11487. if v == nil {
  11488. v254v2 = nil
  11489. } else {
  11490. v254v2 = make(map[int64]string, len(v))
  11491. } // reset map
  11492. testUnmarshalErr(&v254v2, bs254, h, t, "dec-map-v254-p-len")
  11493. testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-p-len")
  11494. bs254 = testMarshalErr(&v254v1, h, t, "enc-map-v254-p")
  11495. v254v2 = nil
  11496. testUnmarshalErr(&v254v2, bs254, h, t, "dec-map-v254-p-nil")
  11497. testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-p-nil")
  11498. // ...
  11499. if v == nil {
  11500. v254v2 = nil
  11501. } else {
  11502. v254v2 = make(map[int64]string, len(v))
  11503. } // reset map
  11504. var v254v3, v254v4 typMapMapInt64String
  11505. v254v3 = typMapMapInt64String(v254v1)
  11506. v254v4 = typMapMapInt64String(v254v2)
  11507. bs254 = testMarshalErr(v254v3, h, t, "enc-map-v254-custom")
  11508. testUnmarshalErr(v254v4, bs254, h, t, "dec-map-v254-p-len")
  11509. testDeepEqualErr(v254v3, v254v4, t, "equal-map-v254-p-len")
  11510. }
  11511. for _, v := range []map[int64]uint{nil, {}, {44: 0, 33: 44}} {
  11512. // fmt.Printf(">>>> running mammoth map v255: %v\n", v)
  11513. var v255v1, v255v2 map[int64]uint
  11514. v255v1 = v
  11515. bs255 := testMarshalErr(v255v1, h, t, "enc-map-v255")
  11516. if v == nil {
  11517. v255v2 = nil
  11518. } else {
  11519. v255v2 = make(map[int64]uint, len(v))
  11520. } // reset map
  11521. testUnmarshalErr(v255v2, bs255, h, t, "dec-map-v255")
  11522. testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255")
  11523. if v == nil {
  11524. v255v2 = nil
  11525. } else {
  11526. v255v2 = make(map[int64]uint, len(v))
  11527. } // reset map
  11528. testUnmarshalErr(reflect.ValueOf(v255v2), bs255, h, t, "dec-map-v255-noaddr") // decode into non-addressable map value
  11529. testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-noaddr")
  11530. if v == nil {
  11531. v255v2 = nil
  11532. } else {
  11533. v255v2 = make(map[int64]uint, len(v))
  11534. } // reset map
  11535. testUnmarshalErr(&v255v2, bs255, h, t, "dec-map-v255-p-len")
  11536. testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-p-len")
  11537. bs255 = testMarshalErr(&v255v1, h, t, "enc-map-v255-p")
  11538. v255v2 = nil
  11539. testUnmarshalErr(&v255v2, bs255, h, t, "dec-map-v255-p-nil")
  11540. testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-p-nil")
  11541. // ...
  11542. if v == nil {
  11543. v255v2 = nil
  11544. } else {
  11545. v255v2 = make(map[int64]uint, len(v))
  11546. } // reset map
  11547. var v255v3, v255v4 typMapMapInt64Uint
  11548. v255v3 = typMapMapInt64Uint(v255v1)
  11549. v255v4 = typMapMapInt64Uint(v255v2)
  11550. bs255 = testMarshalErr(v255v3, h, t, "enc-map-v255-custom")
  11551. testUnmarshalErr(v255v4, bs255, h, t, "dec-map-v255-p-len")
  11552. testDeepEqualErr(v255v3, v255v4, t, "equal-map-v255-p-len")
  11553. }
  11554. for _, v := range []map[int64]uint8{nil, {}, {33: 0, 44: 33}} {
  11555. // fmt.Printf(">>>> running mammoth map v256: %v\n", v)
  11556. var v256v1, v256v2 map[int64]uint8
  11557. v256v1 = v
  11558. bs256 := testMarshalErr(v256v1, h, t, "enc-map-v256")
  11559. if v == nil {
  11560. v256v2 = nil
  11561. } else {
  11562. v256v2 = make(map[int64]uint8, len(v))
  11563. } // reset map
  11564. testUnmarshalErr(v256v2, bs256, h, t, "dec-map-v256")
  11565. testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256")
  11566. if v == nil {
  11567. v256v2 = nil
  11568. } else {
  11569. v256v2 = make(map[int64]uint8, len(v))
  11570. } // reset map
  11571. testUnmarshalErr(reflect.ValueOf(v256v2), bs256, h, t, "dec-map-v256-noaddr") // decode into non-addressable map value
  11572. testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-noaddr")
  11573. if v == nil {
  11574. v256v2 = nil
  11575. } else {
  11576. v256v2 = make(map[int64]uint8, len(v))
  11577. } // reset map
  11578. testUnmarshalErr(&v256v2, bs256, h, t, "dec-map-v256-p-len")
  11579. testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-p-len")
  11580. bs256 = testMarshalErr(&v256v1, h, t, "enc-map-v256-p")
  11581. v256v2 = nil
  11582. testUnmarshalErr(&v256v2, bs256, h, t, "dec-map-v256-p-nil")
  11583. testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-p-nil")
  11584. // ...
  11585. if v == nil {
  11586. v256v2 = nil
  11587. } else {
  11588. v256v2 = make(map[int64]uint8, len(v))
  11589. } // reset map
  11590. var v256v3, v256v4 typMapMapInt64Uint8
  11591. v256v3 = typMapMapInt64Uint8(v256v1)
  11592. v256v4 = typMapMapInt64Uint8(v256v2)
  11593. bs256 = testMarshalErr(v256v3, h, t, "enc-map-v256-custom")
  11594. testUnmarshalErr(v256v4, bs256, h, t, "dec-map-v256-p-len")
  11595. testDeepEqualErr(v256v3, v256v4, t, "equal-map-v256-p-len")
  11596. }
  11597. for _, v := range []map[int64]uint16{nil, {}, {44: 0, 33: 44}} {
  11598. // fmt.Printf(">>>> running mammoth map v257: %v\n", v)
  11599. var v257v1, v257v2 map[int64]uint16
  11600. v257v1 = v
  11601. bs257 := testMarshalErr(v257v1, h, t, "enc-map-v257")
  11602. if v == nil {
  11603. v257v2 = nil
  11604. } else {
  11605. v257v2 = make(map[int64]uint16, len(v))
  11606. } // reset map
  11607. testUnmarshalErr(v257v2, bs257, h, t, "dec-map-v257")
  11608. testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257")
  11609. if v == nil {
  11610. v257v2 = nil
  11611. } else {
  11612. v257v2 = make(map[int64]uint16, len(v))
  11613. } // reset map
  11614. testUnmarshalErr(reflect.ValueOf(v257v2), bs257, h, t, "dec-map-v257-noaddr") // decode into non-addressable map value
  11615. testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-noaddr")
  11616. if v == nil {
  11617. v257v2 = nil
  11618. } else {
  11619. v257v2 = make(map[int64]uint16, len(v))
  11620. } // reset map
  11621. testUnmarshalErr(&v257v2, bs257, h, t, "dec-map-v257-p-len")
  11622. testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-p-len")
  11623. bs257 = testMarshalErr(&v257v1, h, t, "enc-map-v257-p")
  11624. v257v2 = nil
  11625. testUnmarshalErr(&v257v2, bs257, h, t, "dec-map-v257-p-nil")
  11626. testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-p-nil")
  11627. // ...
  11628. if v == nil {
  11629. v257v2 = nil
  11630. } else {
  11631. v257v2 = make(map[int64]uint16, len(v))
  11632. } // reset map
  11633. var v257v3, v257v4 typMapMapInt64Uint16
  11634. v257v3 = typMapMapInt64Uint16(v257v1)
  11635. v257v4 = typMapMapInt64Uint16(v257v2)
  11636. bs257 = testMarshalErr(v257v3, h, t, "enc-map-v257-custom")
  11637. testUnmarshalErr(v257v4, bs257, h, t, "dec-map-v257-p-len")
  11638. testDeepEqualErr(v257v3, v257v4, t, "equal-map-v257-p-len")
  11639. }
  11640. for _, v := range []map[int64]uint32{nil, {}, {33: 0, 44: 33}} {
  11641. // fmt.Printf(">>>> running mammoth map v258: %v\n", v)
  11642. var v258v1, v258v2 map[int64]uint32
  11643. v258v1 = v
  11644. bs258 := testMarshalErr(v258v1, h, t, "enc-map-v258")
  11645. if v == nil {
  11646. v258v2 = nil
  11647. } else {
  11648. v258v2 = make(map[int64]uint32, len(v))
  11649. } // reset map
  11650. testUnmarshalErr(v258v2, bs258, h, t, "dec-map-v258")
  11651. testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258")
  11652. if v == nil {
  11653. v258v2 = nil
  11654. } else {
  11655. v258v2 = make(map[int64]uint32, len(v))
  11656. } // reset map
  11657. testUnmarshalErr(reflect.ValueOf(v258v2), bs258, h, t, "dec-map-v258-noaddr") // decode into non-addressable map value
  11658. testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-noaddr")
  11659. if v == nil {
  11660. v258v2 = nil
  11661. } else {
  11662. v258v2 = make(map[int64]uint32, len(v))
  11663. } // reset map
  11664. testUnmarshalErr(&v258v2, bs258, h, t, "dec-map-v258-p-len")
  11665. testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-p-len")
  11666. bs258 = testMarshalErr(&v258v1, h, t, "enc-map-v258-p")
  11667. v258v2 = nil
  11668. testUnmarshalErr(&v258v2, bs258, h, t, "dec-map-v258-p-nil")
  11669. testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-p-nil")
  11670. // ...
  11671. if v == nil {
  11672. v258v2 = nil
  11673. } else {
  11674. v258v2 = make(map[int64]uint32, len(v))
  11675. } // reset map
  11676. var v258v3, v258v4 typMapMapInt64Uint32
  11677. v258v3 = typMapMapInt64Uint32(v258v1)
  11678. v258v4 = typMapMapInt64Uint32(v258v2)
  11679. bs258 = testMarshalErr(v258v3, h, t, "enc-map-v258-custom")
  11680. testUnmarshalErr(v258v4, bs258, h, t, "dec-map-v258-p-len")
  11681. testDeepEqualErr(v258v3, v258v4, t, "equal-map-v258-p-len")
  11682. }
  11683. for _, v := range []map[int64]uint64{nil, {}, {44: 0, 33: 44}} {
  11684. // fmt.Printf(">>>> running mammoth map v259: %v\n", v)
  11685. var v259v1, v259v2 map[int64]uint64
  11686. v259v1 = v
  11687. bs259 := testMarshalErr(v259v1, h, t, "enc-map-v259")
  11688. if v == nil {
  11689. v259v2 = nil
  11690. } else {
  11691. v259v2 = make(map[int64]uint64, len(v))
  11692. } // reset map
  11693. testUnmarshalErr(v259v2, bs259, h, t, "dec-map-v259")
  11694. testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259")
  11695. if v == nil {
  11696. v259v2 = nil
  11697. } else {
  11698. v259v2 = make(map[int64]uint64, len(v))
  11699. } // reset map
  11700. testUnmarshalErr(reflect.ValueOf(v259v2), bs259, h, t, "dec-map-v259-noaddr") // decode into non-addressable map value
  11701. testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-noaddr")
  11702. if v == nil {
  11703. v259v2 = nil
  11704. } else {
  11705. v259v2 = make(map[int64]uint64, len(v))
  11706. } // reset map
  11707. testUnmarshalErr(&v259v2, bs259, h, t, "dec-map-v259-p-len")
  11708. testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-p-len")
  11709. bs259 = testMarshalErr(&v259v1, h, t, "enc-map-v259-p")
  11710. v259v2 = nil
  11711. testUnmarshalErr(&v259v2, bs259, h, t, "dec-map-v259-p-nil")
  11712. testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-p-nil")
  11713. // ...
  11714. if v == nil {
  11715. v259v2 = nil
  11716. } else {
  11717. v259v2 = make(map[int64]uint64, len(v))
  11718. } // reset map
  11719. var v259v3, v259v4 typMapMapInt64Uint64
  11720. v259v3 = typMapMapInt64Uint64(v259v1)
  11721. v259v4 = typMapMapInt64Uint64(v259v2)
  11722. bs259 = testMarshalErr(v259v3, h, t, "enc-map-v259-custom")
  11723. testUnmarshalErr(v259v4, bs259, h, t, "dec-map-v259-p-len")
  11724. testDeepEqualErr(v259v3, v259v4, t, "equal-map-v259-p-len")
  11725. }
  11726. for _, v := range []map[int64]uintptr{nil, {}, {33: 0, 44: 33}} {
  11727. // fmt.Printf(">>>> running mammoth map v260: %v\n", v)
  11728. var v260v1, v260v2 map[int64]uintptr
  11729. v260v1 = v
  11730. bs260 := testMarshalErr(v260v1, h, t, "enc-map-v260")
  11731. if v == nil {
  11732. v260v2 = nil
  11733. } else {
  11734. v260v2 = make(map[int64]uintptr, len(v))
  11735. } // reset map
  11736. testUnmarshalErr(v260v2, bs260, h, t, "dec-map-v260")
  11737. testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260")
  11738. if v == nil {
  11739. v260v2 = nil
  11740. } else {
  11741. v260v2 = make(map[int64]uintptr, len(v))
  11742. } // reset map
  11743. testUnmarshalErr(reflect.ValueOf(v260v2), bs260, h, t, "dec-map-v260-noaddr") // decode into non-addressable map value
  11744. testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-noaddr")
  11745. if v == nil {
  11746. v260v2 = nil
  11747. } else {
  11748. v260v2 = make(map[int64]uintptr, len(v))
  11749. } // reset map
  11750. testUnmarshalErr(&v260v2, bs260, h, t, "dec-map-v260-p-len")
  11751. testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-p-len")
  11752. bs260 = testMarshalErr(&v260v1, h, t, "enc-map-v260-p")
  11753. v260v2 = nil
  11754. testUnmarshalErr(&v260v2, bs260, h, t, "dec-map-v260-p-nil")
  11755. testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-p-nil")
  11756. // ...
  11757. if v == nil {
  11758. v260v2 = nil
  11759. } else {
  11760. v260v2 = make(map[int64]uintptr, len(v))
  11761. } // reset map
  11762. var v260v3, v260v4 typMapMapInt64Uintptr
  11763. v260v3 = typMapMapInt64Uintptr(v260v1)
  11764. v260v4 = typMapMapInt64Uintptr(v260v2)
  11765. bs260 = testMarshalErr(v260v3, h, t, "enc-map-v260-custom")
  11766. testUnmarshalErr(v260v4, bs260, h, t, "dec-map-v260-p-len")
  11767. testDeepEqualErr(v260v3, v260v4, t, "equal-map-v260-p-len")
  11768. }
  11769. for _, v := range []map[int64]int{nil, {}, {44: 0, 33: 44}} {
  11770. // fmt.Printf(">>>> running mammoth map v261: %v\n", v)
  11771. var v261v1, v261v2 map[int64]int
  11772. v261v1 = v
  11773. bs261 := testMarshalErr(v261v1, h, t, "enc-map-v261")
  11774. if v == nil {
  11775. v261v2 = nil
  11776. } else {
  11777. v261v2 = make(map[int64]int, len(v))
  11778. } // reset map
  11779. testUnmarshalErr(v261v2, bs261, h, t, "dec-map-v261")
  11780. testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261")
  11781. if v == nil {
  11782. v261v2 = nil
  11783. } else {
  11784. v261v2 = make(map[int64]int, len(v))
  11785. } // reset map
  11786. testUnmarshalErr(reflect.ValueOf(v261v2), bs261, h, t, "dec-map-v261-noaddr") // decode into non-addressable map value
  11787. testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-noaddr")
  11788. if v == nil {
  11789. v261v2 = nil
  11790. } else {
  11791. v261v2 = make(map[int64]int, len(v))
  11792. } // reset map
  11793. testUnmarshalErr(&v261v2, bs261, h, t, "dec-map-v261-p-len")
  11794. testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-p-len")
  11795. bs261 = testMarshalErr(&v261v1, h, t, "enc-map-v261-p")
  11796. v261v2 = nil
  11797. testUnmarshalErr(&v261v2, bs261, h, t, "dec-map-v261-p-nil")
  11798. testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-p-nil")
  11799. // ...
  11800. if v == nil {
  11801. v261v2 = nil
  11802. } else {
  11803. v261v2 = make(map[int64]int, len(v))
  11804. } // reset map
  11805. var v261v3, v261v4 typMapMapInt64Int
  11806. v261v3 = typMapMapInt64Int(v261v1)
  11807. v261v4 = typMapMapInt64Int(v261v2)
  11808. bs261 = testMarshalErr(v261v3, h, t, "enc-map-v261-custom")
  11809. testUnmarshalErr(v261v4, bs261, h, t, "dec-map-v261-p-len")
  11810. testDeepEqualErr(v261v3, v261v4, t, "equal-map-v261-p-len")
  11811. }
  11812. for _, v := range []map[int64]int8{nil, {}, {33: 0, 44: 33}} {
  11813. // fmt.Printf(">>>> running mammoth map v262: %v\n", v)
  11814. var v262v1, v262v2 map[int64]int8
  11815. v262v1 = v
  11816. bs262 := testMarshalErr(v262v1, h, t, "enc-map-v262")
  11817. if v == nil {
  11818. v262v2 = nil
  11819. } else {
  11820. v262v2 = make(map[int64]int8, len(v))
  11821. } // reset map
  11822. testUnmarshalErr(v262v2, bs262, h, t, "dec-map-v262")
  11823. testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262")
  11824. if v == nil {
  11825. v262v2 = nil
  11826. } else {
  11827. v262v2 = make(map[int64]int8, len(v))
  11828. } // reset map
  11829. testUnmarshalErr(reflect.ValueOf(v262v2), bs262, h, t, "dec-map-v262-noaddr") // decode into non-addressable map value
  11830. testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-noaddr")
  11831. if v == nil {
  11832. v262v2 = nil
  11833. } else {
  11834. v262v2 = make(map[int64]int8, len(v))
  11835. } // reset map
  11836. testUnmarshalErr(&v262v2, bs262, h, t, "dec-map-v262-p-len")
  11837. testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-p-len")
  11838. bs262 = testMarshalErr(&v262v1, h, t, "enc-map-v262-p")
  11839. v262v2 = nil
  11840. testUnmarshalErr(&v262v2, bs262, h, t, "dec-map-v262-p-nil")
  11841. testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-p-nil")
  11842. // ...
  11843. if v == nil {
  11844. v262v2 = nil
  11845. } else {
  11846. v262v2 = make(map[int64]int8, len(v))
  11847. } // reset map
  11848. var v262v3, v262v4 typMapMapInt64Int8
  11849. v262v3 = typMapMapInt64Int8(v262v1)
  11850. v262v4 = typMapMapInt64Int8(v262v2)
  11851. bs262 = testMarshalErr(v262v3, h, t, "enc-map-v262-custom")
  11852. testUnmarshalErr(v262v4, bs262, h, t, "dec-map-v262-p-len")
  11853. testDeepEqualErr(v262v3, v262v4, t, "equal-map-v262-p-len")
  11854. }
  11855. for _, v := range []map[int64]int16{nil, {}, {44: 0, 33: 44}} {
  11856. // fmt.Printf(">>>> running mammoth map v263: %v\n", v)
  11857. var v263v1, v263v2 map[int64]int16
  11858. v263v1 = v
  11859. bs263 := testMarshalErr(v263v1, h, t, "enc-map-v263")
  11860. if v == nil {
  11861. v263v2 = nil
  11862. } else {
  11863. v263v2 = make(map[int64]int16, len(v))
  11864. } // reset map
  11865. testUnmarshalErr(v263v2, bs263, h, t, "dec-map-v263")
  11866. testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263")
  11867. if v == nil {
  11868. v263v2 = nil
  11869. } else {
  11870. v263v2 = make(map[int64]int16, len(v))
  11871. } // reset map
  11872. testUnmarshalErr(reflect.ValueOf(v263v2), bs263, h, t, "dec-map-v263-noaddr") // decode into non-addressable map value
  11873. testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-noaddr")
  11874. if v == nil {
  11875. v263v2 = nil
  11876. } else {
  11877. v263v2 = make(map[int64]int16, len(v))
  11878. } // reset map
  11879. testUnmarshalErr(&v263v2, bs263, h, t, "dec-map-v263-p-len")
  11880. testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-p-len")
  11881. bs263 = testMarshalErr(&v263v1, h, t, "enc-map-v263-p")
  11882. v263v2 = nil
  11883. testUnmarshalErr(&v263v2, bs263, h, t, "dec-map-v263-p-nil")
  11884. testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-p-nil")
  11885. // ...
  11886. if v == nil {
  11887. v263v2 = nil
  11888. } else {
  11889. v263v2 = make(map[int64]int16, len(v))
  11890. } // reset map
  11891. var v263v3, v263v4 typMapMapInt64Int16
  11892. v263v3 = typMapMapInt64Int16(v263v1)
  11893. v263v4 = typMapMapInt64Int16(v263v2)
  11894. bs263 = testMarshalErr(v263v3, h, t, "enc-map-v263-custom")
  11895. testUnmarshalErr(v263v4, bs263, h, t, "dec-map-v263-p-len")
  11896. testDeepEqualErr(v263v3, v263v4, t, "equal-map-v263-p-len")
  11897. }
  11898. for _, v := range []map[int64]int32{nil, {}, {33: 0, 44: 33}} {
  11899. // fmt.Printf(">>>> running mammoth map v264: %v\n", v)
  11900. var v264v1, v264v2 map[int64]int32
  11901. v264v1 = v
  11902. bs264 := testMarshalErr(v264v1, h, t, "enc-map-v264")
  11903. if v == nil {
  11904. v264v2 = nil
  11905. } else {
  11906. v264v2 = make(map[int64]int32, len(v))
  11907. } // reset map
  11908. testUnmarshalErr(v264v2, bs264, h, t, "dec-map-v264")
  11909. testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264")
  11910. if v == nil {
  11911. v264v2 = nil
  11912. } else {
  11913. v264v2 = make(map[int64]int32, len(v))
  11914. } // reset map
  11915. testUnmarshalErr(reflect.ValueOf(v264v2), bs264, h, t, "dec-map-v264-noaddr") // decode into non-addressable map value
  11916. testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-noaddr")
  11917. if v == nil {
  11918. v264v2 = nil
  11919. } else {
  11920. v264v2 = make(map[int64]int32, len(v))
  11921. } // reset map
  11922. testUnmarshalErr(&v264v2, bs264, h, t, "dec-map-v264-p-len")
  11923. testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-p-len")
  11924. bs264 = testMarshalErr(&v264v1, h, t, "enc-map-v264-p")
  11925. v264v2 = nil
  11926. testUnmarshalErr(&v264v2, bs264, h, t, "dec-map-v264-p-nil")
  11927. testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-p-nil")
  11928. // ...
  11929. if v == nil {
  11930. v264v2 = nil
  11931. } else {
  11932. v264v2 = make(map[int64]int32, len(v))
  11933. } // reset map
  11934. var v264v3, v264v4 typMapMapInt64Int32
  11935. v264v3 = typMapMapInt64Int32(v264v1)
  11936. v264v4 = typMapMapInt64Int32(v264v2)
  11937. bs264 = testMarshalErr(v264v3, h, t, "enc-map-v264-custom")
  11938. testUnmarshalErr(v264v4, bs264, h, t, "dec-map-v264-p-len")
  11939. testDeepEqualErr(v264v3, v264v4, t, "equal-map-v264-p-len")
  11940. }
  11941. for _, v := range []map[int64]int64{nil, {}, {44: 0, 33: 44}} {
  11942. // fmt.Printf(">>>> running mammoth map v265: %v\n", v)
  11943. var v265v1, v265v2 map[int64]int64
  11944. v265v1 = v
  11945. bs265 := testMarshalErr(v265v1, h, t, "enc-map-v265")
  11946. if v == nil {
  11947. v265v2 = nil
  11948. } else {
  11949. v265v2 = make(map[int64]int64, len(v))
  11950. } // reset map
  11951. testUnmarshalErr(v265v2, bs265, h, t, "dec-map-v265")
  11952. testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265")
  11953. if v == nil {
  11954. v265v2 = nil
  11955. } else {
  11956. v265v2 = make(map[int64]int64, len(v))
  11957. } // reset map
  11958. testUnmarshalErr(reflect.ValueOf(v265v2), bs265, h, t, "dec-map-v265-noaddr") // decode into non-addressable map value
  11959. testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-noaddr")
  11960. if v == nil {
  11961. v265v2 = nil
  11962. } else {
  11963. v265v2 = make(map[int64]int64, len(v))
  11964. } // reset map
  11965. testUnmarshalErr(&v265v2, bs265, h, t, "dec-map-v265-p-len")
  11966. testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-p-len")
  11967. bs265 = testMarshalErr(&v265v1, h, t, "enc-map-v265-p")
  11968. v265v2 = nil
  11969. testUnmarshalErr(&v265v2, bs265, h, t, "dec-map-v265-p-nil")
  11970. testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-p-nil")
  11971. // ...
  11972. if v == nil {
  11973. v265v2 = nil
  11974. } else {
  11975. v265v2 = make(map[int64]int64, len(v))
  11976. } // reset map
  11977. var v265v3, v265v4 typMapMapInt64Int64
  11978. v265v3 = typMapMapInt64Int64(v265v1)
  11979. v265v4 = typMapMapInt64Int64(v265v2)
  11980. bs265 = testMarshalErr(v265v3, h, t, "enc-map-v265-custom")
  11981. testUnmarshalErr(v265v4, bs265, h, t, "dec-map-v265-p-len")
  11982. testDeepEqualErr(v265v3, v265v4, t, "equal-map-v265-p-len")
  11983. }
  11984. for _, v := range []map[int64]float32{nil, {}, {33: 0, 44: 22.2}} {
  11985. // fmt.Printf(">>>> running mammoth map v266: %v\n", v)
  11986. var v266v1, v266v2 map[int64]float32
  11987. v266v1 = v
  11988. bs266 := testMarshalErr(v266v1, h, t, "enc-map-v266")
  11989. if v == nil {
  11990. v266v2 = nil
  11991. } else {
  11992. v266v2 = make(map[int64]float32, len(v))
  11993. } // reset map
  11994. testUnmarshalErr(v266v2, bs266, h, t, "dec-map-v266")
  11995. testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266")
  11996. if v == nil {
  11997. v266v2 = nil
  11998. } else {
  11999. v266v2 = make(map[int64]float32, len(v))
  12000. } // reset map
  12001. testUnmarshalErr(reflect.ValueOf(v266v2), bs266, h, t, "dec-map-v266-noaddr") // decode into non-addressable map value
  12002. testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-noaddr")
  12003. if v == nil {
  12004. v266v2 = nil
  12005. } else {
  12006. v266v2 = make(map[int64]float32, len(v))
  12007. } // reset map
  12008. testUnmarshalErr(&v266v2, bs266, h, t, "dec-map-v266-p-len")
  12009. testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-p-len")
  12010. bs266 = testMarshalErr(&v266v1, h, t, "enc-map-v266-p")
  12011. v266v2 = nil
  12012. testUnmarshalErr(&v266v2, bs266, h, t, "dec-map-v266-p-nil")
  12013. testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-p-nil")
  12014. // ...
  12015. if v == nil {
  12016. v266v2 = nil
  12017. } else {
  12018. v266v2 = make(map[int64]float32, len(v))
  12019. } // reset map
  12020. var v266v3, v266v4 typMapMapInt64Float32
  12021. v266v3 = typMapMapInt64Float32(v266v1)
  12022. v266v4 = typMapMapInt64Float32(v266v2)
  12023. bs266 = testMarshalErr(v266v3, h, t, "enc-map-v266-custom")
  12024. testUnmarshalErr(v266v4, bs266, h, t, "dec-map-v266-p-len")
  12025. testDeepEqualErr(v266v3, v266v4, t, "equal-map-v266-p-len")
  12026. }
  12027. for _, v := range []map[int64]float64{nil, {}, {33: 0, 44: 11.1}} {
  12028. // fmt.Printf(">>>> running mammoth map v267: %v\n", v)
  12029. var v267v1, v267v2 map[int64]float64
  12030. v267v1 = v
  12031. bs267 := testMarshalErr(v267v1, h, t, "enc-map-v267")
  12032. if v == nil {
  12033. v267v2 = nil
  12034. } else {
  12035. v267v2 = make(map[int64]float64, len(v))
  12036. } // reset map
  12037. testUnmarshalErr(v267v2, bs267, h, t, "dec-map-v267")
  12038. testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267")
  12039. if v == nil {
  12040. v267v2 = nil
  12041. } else {
  12042. v267v2 = make(map[int64]float64, len(v))
  12043. } // reset map
  12044. testUnmarshalErr(reflect.ValueOf(v267v2), bs267, h, t, "dec-map-v267-noaddr") // decode into non-addressable map value
  12045. testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-noaddr")
  12046. if v == nil {
  12047. v267v2 = nil
  12048. } else {
  12049. v267v2 = make(map[int64]float64, len(v))
  12050. } // reset map
  12051. testUnmarshalErr(&v267v2, bs267, h, t, "dec-map-v267-p-len")
  12052. testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-p-len")
  12053. bs267 = testMarshalErr(&v267v1, h, t, "enc-map-v267-p")
  12054. v267v2 = nil
  12055. testUnmarshalErr(&v267v2, bs267, h, t, "dec-map-v267-p-nil")
  12056. testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-p-nil")
  12057. // ...
  12058. if v == nil {
  12059. v267v2 = nil
  12060. } else {
  12061. v267v2 = make(map[int64]float64, len(v))
  12062. } // reset map
  12063. var v267v3, v267v4 typMapMapInt64Float64
  12064. v267v3 = typMapMapInt64Float64(v267v1)
  12065. v267v4 = typMapMapInt64Float64(v267v2)
  12066. bs267 = testMarshalErr(v267v3, h, t, "enc-map-v267-custom")
  12067. testUnmarshalErr(v267v4, bs267, h, t, "dec-map-v267-p-len")
  12068. testDeepEqualErr(v267v3, v267v4, t, "equal-map-v267-p-len")
  12069. }
  12070. for _, v := range []map[int64]bool{nil, {}, {33: false, 44: true}} {
  12071. // fmt.Printf(">>>> running mammoth map v268: %v\n", v)
  12072. var v268v1, v268v2 map[int64]bool
  12073. v268v1 = v
  12074. bs268 := testMarshalErr(v268v1, h, t, "enc-map-v268")
  12075. if v == nil {
  12076. v268v2 = nil
  12077. } else {
  12078. v268v2 = make(map[int64]bool, len(v))
  12079. } // reset map
  12080. testUnmarshalErr(v268v2, bs268, h, t, "dec-map-v268")
  12081. testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268")
  12082. if v == nil {
  12083. v268v2 = nil
  12084. } else {
  12085. v268v2 = make(map[int64]bool, len(v))
  12086. } // reset map
  12087. testUnmarshalErr(reflect.ValueOf(v268v2), bs268, h, t, "dec-map-v268-noaddr") // decode into non-addressable map value
  12088. testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-noaddr")
  12089. if v == nil {
  12090. v268v2 = nil
  12091. } else {
  12092. v268v2 = make(map[int64]bool, len(v))
  12093. } // reset map
  12094. testUnmarshalErr(&v268v2, bs268, h, t, "dec-map-v268-p-len")
  12095. testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-p-len")
  12096. bs268 = testMarshalErr(&v268v1, h, t, "enc-map-v268-p")
  12097. v268v2 = nil
  12098. testUnmarshalErr(&v268v2, bs268, h, t, "dec-map-v268-p-nil")
  12099. testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-p-nil")
  12100. // ...
  12101. if v == nil {
  12102. v268v2 = nil
  12103. } else {
  12104. v268v2 = make(map[int64]bool, len(v))
  12105. } // reset map
  12106. var v268v3, v268v4 typMapMapInt64Bool
  12107. v268v3 = typMapMapInt64Bool(v268v1)
  12108. v268v4 = typMapMapInt64Bool(v268v2)
  12109. bs268 = testMarshalErr(v268v3, h, t, "enc-map-v268-custom")
  12110. testUnmarshalErr(v268v4, bs268, h, t, "dec-map-v268-p-len")
  12111. testDeepEqualErr(v268v3, v268v4, t, "equal-map-v268-p-len")
  12112. }
  12113. for _, v := range []map[bool]interface{}{nil, {}, {true: nil}} {
  12114. // fmt.Printf(">>>> running mammoth map v271: %v\n", v)
  12115. var v271v1, v271v2 map[bool]interface{}
  12116. v271v1 = v
  12117. bs271 := testMarshalErr(v271v1, h, t, "enc-map-v271")
  12118. if v == nil {
  12119. v271v2 = nil
  12120. } else {
  12121. v271v2 = make(map[bool]interface{}, len(v))
  12122. } // reset map
  12123. testUnmarshalErr(v271v2, bs271, h, t, "dec-map-v271")
  12124. testDeepEqualErr(v271v1, v271v2, t, "equal-map-v271")
  12125. if v == nil {
  12126. v271v2 = nil
  12127. } else {
  12128. v271v2 = make(map[bool]interface{}, len(v))
  12129. } // reset map
  12130. testUnmarshalErr(reflect.ValueOf(v271v2), bs271, h, t, "dec-map-v271-noaddr") // decode into non-addressable map value
  12131. testDeepEqualErr(v271v1, v271v2, t, "equal-map-v271-noaddr")
  12132. if v == nil {
  12133. v271v2 = nil
  12134. } else {
  12135. v271v2 = make(map[bool]interface{}, len(v))
  12136. } // reset map
  12137. testUnmarshalErr(&v271v2, bs271, h, t, "dec-map-v271-p-len")
  12138. testDeepEqualErr(v271v1, v271v2, t, "equal-map-v271-p-len")
  12139. bs271 = testMarshalErr(&v271v1, h, t, "enc-map-v271-p")
  12140. v271v2 = nil
  12141. testUnmarshalErr(&v271v2, bs271, h, t, "dec-map-v271-p-nil")
  12142. testDeepEqualErr(v271v1, v271v2, t, "equal-map-v271-p-nil")
  12143. // ...
  12144. if v == nil {
  12145. v271v2 = nil
  12146. } else {
  12147. v271v2 = make(map[bool]interface{}, len(v))
  12148. } // reset map
  12149. var v271v3, v271v4 typMapMapBoolIntf
  12150. v271v3 = typMapMapBoolIntf(v271v1)
  12151. v271v4 = typMapMapBoolIntf(v271v2)
  12152. bs271 = testMarshalErr(v271v3, h, t, "enc-map-v271-custom")
  12153. testUnmarshalErr(v271v4, bs271, h, t, "dec-map-v271-p-len")
  12154. testDeepEqualErr(v271v3, v271v4, t, "equal-map-v271-p-len")
  12155. }
  12156. for _, v := range []map[bool]string{nil, {}, {true: ""}} {
  12157. // fmt.Printf(">>>> running mammoth map v272: %v\n", v)
  12158. var v272v1, v272v2 map[bool]string
  12159. v272v1 = v
  12160. bs272 := testMarshalErr(v272v1, h, t, "enc-map-v272")
  12161. if v == nil {
  12162. v272v2 = nil
  12163. } else {
  12164. v272v2 = make(map[bool]string, len(v))
  12165. } // reset map
  12166. testUnmarshalErr(v272v2, bs272, h, t, "dec-map-v272")
  12167. testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272")
  12168. if v == nil {
  12169. v272v2 = nil
  12170. } else {
  12171. v272v2 = make(map[bool]string, len(v))
  12172. } // reset map
  12173. testUnmarshalErr(reflect.ValueOf(v272v2), bs272, h, t, "dec-map-v272-noaddr") // decode into non-addressable map value
  12174. testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-noaddr")
  12175. if v == nil {
  12176. v272v2 = nil
  12177. } else {
  12178. v272v2 = make(map[bool]string, len(v))
  12179. } // reset map
  12180. testUnmarshalErr(&v272v2, bs272, h, t, "dec-map-v272-p-len")
  12181. testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-p-len")
  12182. bs272 = testMarshalErr(&v272v1, h, t, "enc-map-v272-p")
  12183. v272v2 = nil
  12184. testUnmarshalErr(&v272v2, bs272, h, t, "dec-map-v272-p-nil")
  12185. testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-p-nil")
  12186. // ...
  12187. if v == nil {
  12188. v272v2 = nil
  12189. } else {
  12190. v272v2 = make(map[bool]string, len(v))
  12191. } // reset map
  12192. var v272v3, v272v4 typMapMapBoolString
  12193. v272v3 = typMapMapBoolString(v272v1)
  12194. v272v4 = typMapMapBoolString(v272v2)
  12195. bs272 = testMarshalErr(v272v3, h, t, "enc-map-v272-custom")
  12196. testUnmarshalErr(v272v4, bs272, h, t, "dec-map-v272-p-len")
  12197. testDeepEqualErr(v272v3, v272v4, t, "equal-map-v272-p-len")
  12198. }
  12199. for _, v := range []map[bool]uint{nil, {}, {true: 0}} {
  12200. // fmt.Printf(">>>> running mammoth map v273: %v\n", v)
  12201. var v273v1, v273v2 map[bool]uint
  12202. v273v1 = v
  12203. bs273 := testMarshalErr(v273v1, h, t, "enc-map-v273")
  12204. if v == nil {
  12205. v273v2 = nil
  12206. } else {
  12207. v273v2 = make(map[bool]uint, len(v))
  12208. } // reset map
  12209. testUnmarshalErr(v273v2, bs273, h, t, "dec-map-v273")
  12210. testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273")
  12211. if v == nil {
  12212. v273v2 = nil
  12213. } else {
  12214. v273v2 = make(map[bool]uint, len(v))
  12215. } // reset map
  12216. testUnmarshalErr(reflect.ValueOf(v273v2), bs273, h, t, "dec-map-v273-noaddr") // decode into non-addressable map value
  12217. testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-noaddr")
  12218. if v == nil {
  12219. v273v2 = nil
  12220. } else {
  12221. v273v2 = make(map[bool]uint, len(v))
  12222. } // reset map
  12223. testUnmarshalErr(&v273v2, bs273, h, t, "dec-map-v273-p-len")
  12224. testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-p-len")
  12225. bs273 = testMarshalErr(&v273v1, h, t, "enc-map-v273-p")
  12226. v273v2 = nil
  12227. testUnmarshalErr(&v273v2, bs273, h, t, "dec-map-v273-p-nil")
  12228. testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-p-nil")
  12229. // ...
  12230. if v == nil {
  12231. v273v2 = nil
  12232. } else {
  12233. v273v2 = make(map[bool]uint, len(v))
  12234. } // reset map
  12235. var v273v3, v273v4 typMapMapBoolUint
  12236. v273v3 = typMapMapBoolUint(v273v1)
  12237. v273v4 = typMapMapBoolUint(v273v2)
  12238. bs273 = testMarshalErr(v273v3, h, t, "enc-map-v273-custom")
  12239. testUnmarshalErr(v273v4, bs273, h, t, "dec-map-v273-p-len")
  12240. testDeepEqualErr(v273v3, v273v4, t, "equal-map-v273-p-len")
  12241. }
  12242. for _, v := range []map[bool]uint8{nil, {}, {true: 0}} {
  12243. // fmt.Printf(">>>> running mammoth map v274: %v\n", v)
  12244. var v274v1, v274v2 map[bool]uint8
  12245. v274v1 = v
  12246. bs274 := testMarshalErr(v274v1, h, t, "enc-map-v274")
  12247. if v == nil {
  12248. v274v2 = nil
  12249. } else {
  12250. v274v2 = make(map[bool]uint8, len(v))
  12251. } // reset map
  12252. testUnmarshalErr(v274v2, bs274, h, t, "dec-map-v274")
  12253. testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274")
  12254. if v == nil {
  12255. v274v2 = nil
  12256. } else {
  12257. v274v2 = make(map[bool]uint8, len(v))
  12258. } // reset map
  12259. testUnmarshalErr(reflect.ValueOf(v274v2), bs274, h, t, "dec-map-v274-noaddr") // decode into non-addressable map value
  12260. testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-noaddr")
  12261. if v == nil {
  12262. v274v2 = nil
  12263. } else {
  12264. v274v2 = make(map[bool]uint8, len(v))
  12265. } // reset map
  12266. testUnmarshalErr(&v274v2, bs274, h, t, "dec-map-v274-p-len")
  12267. testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-p-len")
  12268. bs274 = testMarshalErr(&v274v1, h, t, "enc-map-v274-p")
  12269. v274v2 = nil
  12270. testUnmarshalErr(&v274v2, bs274, h, t, "dec-map-v274-p-nil")
  12271. testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-p-nil")
  12272. // ...
  12273. if v == nil {
  12274. v274v2 = nil
  12275. } else {
  12276. v274v2 = make(map[bool]uint8, len(v))
  12277. } // reset map
  12278. var v274v3, v274v4 typMapMapBoolUint8
  12279. v274v3 = typMapMapBoolUint8(v274v1)
  12280. v274v4 = typMapMapBoolUint8(v274v2)
  12281. bs274 = testMarshalErr(v274v3, h, t, "enc-map-v274-custom")
  12282. testUnmarshalErr(v274v4, bs274, h, t, "dec-map-v274-p-len")
  12283. testDeepEqualErr(v274v3, v274v4, t, "equal-map-v274-p-len")
  12284. }
  12285. for _, v := range []map[bool]uint16{nil, {}, {true: 0}} {
  12286. // fmt.Printf(">>>> running mammoth map v275: %v\n", v)
  12287. var v275v1, v275v2 map[bool]uint16
  12288. v275v1 = v
  12289. bs275 := testMarshalErr(v275v1, h, t, "enc-map-v275")
  12290. if v == nil {
  12291. v275v2 = nil
  12292. } else {
  12293. v275v2 = make(map[bool]uint16, len(v))
  12294. } // reset map
  12295. testUnmarshalErr(v275v2, bs275, h, t, "dec-map-v275")
  12296. testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275")
  12297. if v == nil {
  12298. v275v2 = nil
  12299. } else {
  12300. v275v2 = make(map[bool]uint16, len(v))
  12301. } // reset map
  12302. testUnmarshalErr(reflect.ValueOf(v275v2), bs275, h, t, "dec-map-v275-noaddr") // decode into non-addressable map value
  12303. testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-noaddr")
  12304. if v == nil {
  12305. v275v2 = nil
  12306. } else {
  12307. v275v2 = make(map[bool]uint16, len(v))
  12308. } // reset map
  12309. testUnmarshalErr(&v275v2, bs275, h, t, "dec-map-v275-p-len")
  12310. testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-p-len")
  12311. bs275 = testMarshalErr(&v275v1, h, t, "enc-map-v275-p")
  12312. v275v2 = nil
  12313. testUnmarshalErr(&v275v2, bs275, h, t, "dec-map-v275-p-nil")
  12314. testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-p-nil")
  12315. // ...
  12316. if v == nil {
  12317. v275v2 = nil
  12318. } else {
  12319. v275v2 = make(map[bool]uint16, len(v))
  12320. } // reset map
  12321. var v275v3, v275v4 typMapMapBoolUint16
  12322. v275v3 = typMapMapBoolUint16(v275v1)
  12323. v275v4 = typMapMapBoolUint16(v275v2)
  12324. bs275 = testMarshalErr(v275v3, h, t, "enc-map-v275-custom")
  12325. testUnmarshalErr(v275v4, bs275, h, t, "dec-map-v275-p-len")
  12326. testDeepEqualErr(v275v3, v275v4, t, "equal-map-v275-p-len")
  12327. }
  12328. for _, v := range []map[bool]uint32{nil, {}, {true: 0}} {
  12329. // fmt.Printf(">>>> running mammoth map v276: %v\n", v)
  12330. var v276v1, v276v2 map[bool]uint32
  12331. v276v1 = v
  12332. bs276 := testMarshalErr(v276v1, h, t, "enc-map-v276")
  12333. if v == nil {
  12334. v276v2 = nil
  12335. } else {
  12336. v276v2 = make(map[bool]uint32, len(v))
  12337. } // reset map
  12338. testUnmarshalErr(v276v2, bs276, h, t, "dec-map-v276")
  12339. testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276")
  12340. if v == nil {
  12341. v276v2 = nil
  12342. } else {
  12343. v276v2 = make(map[bool]uint32, len(v))
  12344. } // reset map
  12345. testUnmarshalErr(reflect.ValueOf(v276v2), bs276, h, t, "dec-map-v276-noaddr") // decode into non-addressable map value
  12346. testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-noaddr")
  12347. if v == nil {
  12348. v276v2 = nil
  12349. } else {
  12350. v276v2 = make(map[bool]uint32, len(v))
  12351. } // reset map
  12352. testUnmarshalErr(&v276v2, bs276, h, t, "dec-map-v276-p-len")
  12353. testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-p-len")
  12354. bs276 = testMarshalErr(&v276v1, h, t, "enc-map-v276-p")
  12355. v276v2 = nil
  12356. testUnmarshalErr(&v276v2, bs276, h, t, "dec-map-v276-p-nil")
  12357. testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-p-nil")
  12358. // ...
  12359. if v == nil {
  12360. v276v2 = nil
  12361. } else {
  12362. v276v2 = make(map[bool]uint32, len(v))
  12363. } // reset map
  12364. var v276v3, v276v4 typMapMapBoolUint32
  12365. v276v3 = typMapMapBoolUint32(v276v1)
  12366. v276v4 = typMapMapBoolUint32(v276v2)
  12367. bs276 = testMarshalErr(v276v3, h, t, "enc-map-v276-custom")
  12368. testUnmarshalErr(v276v4, bs276, h, t, "dec-map-v276-p-len")
  12369. testDeepEqualErr(v276v3, v276v4, t, "equal-map-v276-p-len")
  12370. }
  12371. for _, v := range []map[bool]uint64{nil, {}, {true: 0}} {
  12372. // fmt.Printf(">>>> running mammoth map v277: %v\n", v)
  12373. var v277v1, v277v2 map[bool]uint64
  12374. v277v1 = v
  12375. bs277 := testMarshalErr(v277v1, h, t, "enc-map-v277")
  12376. if v == nil {
  12377. v277v2 = nil
  12378. } else {
  12379. v277v2 = make(map[bool]uint64, len(v))
  12380. } // reset map
  12381. testUnmarshalErr(v277v2, bs277, h, t, "dec-map-v277")
  12382. testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277")
  12383. if v == nil {
  12384. v277v2 = nil
  12385. } else {
  12386. v277v2 = make(map[bool]uint64, len(v))
  12387. } // reset map
  12388. testUnmarshalErr(reflect.ValueOf(v277v2), bs277, h, t, "dec-map-v277-noaddr") // decode into non-addressable map value
  12389. testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-noaddr")
  12390. if v == nil {
  12391. v277v2 = nil
  12392. } else {
  12393. v277v2 = make(map[bool]uint64, len(v))
  12394. } // reset map
  12395. testUnmarshalErr(&v277v2, bs277, h, t, "dec-map-v277-p-len")
  12396. testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-p-len")
  12397. bs277 = testMarshalErr(&v277v1, h, t, "enc-map-v277-p")
  12398. v277v2 = nil
  12399. testUnmarshalErr(&v277v2, bs277, h, t, "dec-map-v277-p-nil")
  12400. testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-p-nil")
  12401. // ...
  12402. if v == nil {
  12403. v277v2 = nil
  12404. } else {
  12405. v277v2 = make(map[bool]uint64, len(v))
  12406. } // reset map
  12407. var v277v3, v277v4 typMapMapBoolUint64
  12408. v277v3 = typMapMapBoolUint64(v277v1)
  12409. v277v4 = typMapMapBoolUint64(v277v2)
  12410. bs277 = testMarshalErr(v277v3, h, t, "enc-map-v277-custom")
  12411. testUnmarshalErr(v277v4, bs277, h, t, "dec-map-v277-p-len")
  12412. testDeepEqualErr(v277v3, v277v4, t, "equal-map-v277-p-len")
  12413. }
  12414. for _, v := range []map[bool]uintptr{nil, {}, {true: 0}} {
  12415. // fmt.Printf(">>>> running mammoth map v278: %v\n", v)
  12416. var v278v1, v278v2 map[bool]uintptr
  12417. v278v1 = v
  12418. bs278 := testMarshalErr(v278v1, h, t, "enc-map-v278")
  12419. if v == nil {
  12420. v278v2 = nil
  12421. } else {
  12422. v278v2 = make(map[bool]uintptr, len(v))
  12423. } // reset map
  12424. testUnmarshalErr(v278v2, bs278, h, t, "dec-map-v278")
  12425. testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278")
  12426. if v == nil {
  12427. v278v2 = nil
  12428. } else {
  12429. v278v2 = make(map[bool]uintptr, len(v))
  12430. } // reset map
  12431. testUnmarshalErr(reflect.ValueOf(v278v2), bs278, h, t, "dec-map-v278-noaddr") // decode into non-addressable map value
  12432. testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-noaddr")
  12433. if v == nil {
  12434. v278v2 = nil
  12435. } else {
  12436. v278v2 = make(map[bool]uintptr, len(v))
  12437. } // reset map
  12438. testUnmarshalErr(&v278v2, bs278, h, t, "dec-map-v278-p-len")
  12439. testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-p-len")
  12440. bs278 = testMarshalErr(&v278v1, h, t, "enc-map-v278-p")
  12441. v278v2 = nil
  12442. testUnmarshalErr(&v278v2, bs278, h, t, "dec-map-v278-p-nil")
  12443. testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-p-nil")
  12444. // ...
  12445. if v == nil {
  12446. v278v2 = nil
  12447. } else {
  12448. v278v2 = make(map[bool]uintptr, len(v))
  12449. } // reset map
  12450. var v278v3, v278v4 typMapMapBoolUintptr
  12451. v278v3 = typMapMapBoolUintptr(v278v1)
  12452. v278v4 = typMapMapBoolUintptr(v278v2)
  12453. bs278 = testMarshalErr(v278v3, h, t, "enc-map-v278-custom")
  12454. testUnmarshalErr(v278v4, bs278, h, t, "dec-map-v278-p-len")
  12455. testDeepEqualErr(v278v3, v278v4, t, "equal-map-v278-p-len")
  12456. }
  12457. for _, v := range []map[bool]int{nil, {}, {true: 0}} {
  12458. // fmt.Printf(">>>> running mammoth map v279: %v\n", v)
  12459. var v279v1, v279v2 map[bool]int
  12460. v279v1 = v
  12461. bs279 := testMarshalErr(v279v1, h, t, "enc-map-v279")
  12462. if v == nil {
  12463. v279v2 = nil
  12464. } else {
  12465. v279v2 = make(map[bool]int, len(v))
  12466. } // reset map
  12467. testUnmarshalErr(v279v2, bs279, h, t, "dec-map-v279")
  12468. testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279")
  12469. if v == nil {
  12470. v279v2 = nil
  12471. } else {
  12472. v279v2 = make(map[bool]int, len(v))
  12473. } // reset map
  12474. testUnmarshalErr(reflect.ValueOf(v279v2), bs279, h, t, "dec-map-v279-noaddr") // decode into non-addressable map value
  12475. testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-noaddr")
  12476. if v == nil {
  12477. v279v2 = nil
  12478. } else {
  12479. v279v2 = make(map[bool]int, len(v))
  12480. } // reset map
  12481. testUnmarshalErr(&v279v2, bs279, h, t, "dec-map-v279-p-len")
  12482. testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-p-len")
  12483. bs279 = testMarshalErr(&v279v1, h, t, "enc-map-v279-p")
  12484. v279v2 = nil
  12485. testUnmarshalErr(&v279v2, bs279, h, t, "dec-map-v279-p-nil")
  12486. testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-p-nil")
  12487. // ...
  12488. if v == nil {
  12489. v279v2 = nil
  12490. } else {
  12491. v279v2 = make(map[bool]int, len(v))
  12492. } // reset map
  12493. var v279v3, v279v4 typMapMapBoolInt
  12494. v279v3 = typMapMapBoolInt(v279v1)
  12495. v279v4 = typMapMapBoolInt(v279v2)
  12496. bs279 = testMarshalErr(v279v3, h, t, "enc-map-v279-custom")
  12497. testUnmarshalErr(v279v4, bs279, h, t, "dec-map-v279-p-len")
  12498. testDeepEqualErr(v279v3, v279v4, t, "equal-map-v279-p-len")
  12499. }
  12500. for _, v := range []map[bool]int8{nil, {}, {true: 0}} {
  12501. // fmt.Printf(">>>> running mammoth map v280: %v\n", v)
  12502. var v280v1, v280v2 map[bool]int8
  12503. v280v1 = v
  12504. bs280 := testMarshalErr(v280v1, h, t, "enc-map-v280")
  12505. if v == nil {
  12506. v280v2 = nil
  12507. } else {
  12508. v280v2 = make(map[bool]int8, len(v))
  12509. } // reset map
  12510. testUnmarshalErr(v280v2, bs280, h, t, "dec-map-v280")
  12511. testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280")
  12512. if v == nil {
  12513. v280v2 = nil
  12514. } else {
  12515. v280v2 = make(map[bool]int8, len(v))
  12516. } // reset map
  12517. testUnmarshalErr(reflect.ValueOf(v280v2), bs280, h, t, "dec-map-v280-noaddr") // decode into non-addressable map value
  12518. testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-noaddr")
  12519. if v == nil {
  12520. v280v2 = nil
  12521. } else {
  12522. v280v2 = make(map[bool]int8, len(v))
  12523. } // reset map
  12524. testUnmarshalErr(&v280v2, bs280, h, t, "dec-map-v280-p-len")
  12525. testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-p-len")
  12526. bs280 = testMarshalErr(&v280v1, h, t, "enc-map-v280-p")
  12527. v280v2 = nil
  12528. testUnmarshalErr(&v280v2, bs280, h, t, "dec-map-v280-p-nil")
  12529. testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-p-nil")
  12530. // ...
  12531. if v == nil {
  12532. v280v2 = nil
  12533. } else {
  12534. v280v2 = make(map[bool]int8, len(v))
  12535. } // reset map
  12536. var v280v3, v280v4 typMapMapBoolInt8
  12537. v280v3 = typMapMapBoolInt8(v280v1)
  12538. v280v4 = typMapMapBoolInt8(v280v2)
  12539. bs280 = testMarshalErr(v280v3, h, t, "enc-map-v280-custom")
  12540. testUnmarshalErr(v280v4, bs280, h, t, "dec-map-v280-p-len")
  12541. testDeepEqualErr(v280v3, v280v4, t, "equal-map-v280-p-len")
  12542. }
  12543. for _, v := range []map[bool]int16{nil, {}, {true: 0}} {
  12544. // fmt.Printf(">>>> running mammoth map v281: %v\n", v)
  12545. var v281v1, v281v2 map[bool]int16
  12546. v281v1 = v
  12547. bs281 := testMarshalErr(v281v1, h, t, "enc-map-v281")
  12548. if v == nil {
  12549. v281v2 = nil
  12550. } else {
  12551. v281v2 = make(map[bool]int16, len(v))
  12552. } // reset map
  12553. testUnmarshalErr(v281v2, bs281, h, t, "dec-map-v281")
  12554. testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281")
  12555. if v == nil {
  12556. v281v2 = nil
  12557. } else {
  12558. v281v2 = make(map[bool]int16, len(v))
  12559. } // reset map
  12560. testUnmarshalErr(reflect.ValueOf(v281v2), bs281, h, t, "dec-map-v281-noaddr") // decode into non-addressable map value
  12561. testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-noaddr")
  12562. if v == nil {
  12563. v281v2 = nil
  12564. } else {
  12565. v281v2 = make(map[bool]int16, len(v))
  12566. } // reset map
  12567. testUnmarshalErr(&v281v2, bs281, h, t, "dec-map-v281-p-len")
  12568. testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-p-len")
  12569. bs281 = testMarshalErr(&v281v1, h, t, "enc-map-v281-p")
  12570. v281v2 = nil
  12571. testUnmarshalErr(&v281v2, bs281, h, t, "dec-map-v281-p-nil")
  12572. testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-p-nil")
  12573. // ...
  12574. if v == nil {
  12575. v281v2 = nil
  12576. } else {
  12577. v281v2 = make(map[bool]int16, len(v))
  12578. } // reset map
  12579. var v281v3, v281v4 typMapMapBoolInt16
  12580. v281v3 = typMapMapBoolInt16(v281v1)
  12581. v281v4 = typMapMapBoolInt16(v281v2)
  12582. bs281 = testMarshalErr(v281v3, h, t, "enc-map-v281-custom")
  12583. testUnmarshalErr(v281v4, bs281, h, t, "dec-map-v281-p-len")
  12584. testDeepEqualErr(v281v3, v281v4, t, "equal-map-v281-p-len")
  12585. }
  12586. for _, v := range []map[bool]int32{nil, {}, {true: 0}} {
  12587. // fmt.Printf(">>>> running mammoth map v282: %v\n", v)
  12588. var v282v1, v282v2 map[bool]int32
  12589. v282v1 = v
  12590. bs282 := testMarshalErr(v282v1, h, t, "enc-map-v282")
  12591. if v == nil {
  12592. v282v2 = nil
  12593. } else {
  12594. v282v2 = make(map[bool]int32, len(v))
  12595. } // reset map
  12596. testUnmarshalErr(v282v2, bs282, h, t, "dec-map-v282")
  12597. testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282")
  12598. if v == nil {
  12599. v282v2 = nil
  12600. } else {
  12601. v282v2 = make(map[bool]int32, len(v))
  12602. } // reset map
  12603. testUnmarshalErr(reflect.ValueOf(v282v2), bs282, h, t, "dec-map-v282-noaddr") // decode into non-addressable map value
  12604. testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-noaddr")
  12605. if v == nil {
  12606. v282v2 = nil
  12607. } else {
  12608. v282v2 = make(map[bool]int32, len(v))
  12609. } // reset map
  12610. testUnmarshalErr(&v282v2, bs282, h, t, "dec-map-v282-p-len")
  12611. testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-p-len")
  12612. bs282 = testMarshalErr(&v282v1, h, t, "enc-map-v282-p")
  12613. v282v2 = nil
  12614. testUnmarshalErr(&v282v2, bs282, h, t, "dec-map-v282-p-nil")
  12615. testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-p-nil")
  12616. // ...
  12617. if v == nil {
  12618. v282v2 = nil
  12619. } else {
  12620. v282v2 = make(map[bool]int32, len(v))
  12621. } // reset map
  12622. var v282v3, v282v4 typMapMapBoolInt32
  12623. v282v3 = typMapMapBoolInt32(v282v1)
  12624. v282v4 = typMapMapBoolInt32(v282v2)
  12625. bs282 = testMarshalErr(v282v3, h, t, "enc-map-v282-custom")
  12626. testUnmarshalErr(v282v4, bs282, h, t, "dec-map-v282-p-len")
  12627. testDeepEqualErr(v282v3, v282v4, t, "equal-map-v282-p-len")
  12628. }
  12629. for _, v := range []map[bool]int64{nil, {}, {true: 0}} {
  12630. // fmt.Printf(">>>> running mammoth map v283: %v\n", v)
  12631. var v283v1, v283v2 map[bool]int64
  12632. v283v1 = v
  12633. bs283 := testMarshalErr(v283v1, h, t, "enc-map-v283")
  12634. if v == nil {
  12635. v283v2 = nil
  12636. } else {
  12637. v283v2 = make(map[bool]int64, len(v))
  12638. } // reset map
  12639. testUnmarshalErr(v283v2, bs283, h, t, "dec-map-v283")
  12640. testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283")
  12641. if v == nil {
  12642. v283v2 = nil
  12643. } else {
  12644. v283v2 = make(map[bool]int64, len(v))
  12645. } // reset map
  12646. testUnmarshalErr(reflect.ValueOf(v283v2), bs283, h, t, "dec-map-v283-noaddr") // decode into non-addressable map value
  12647. testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-noaddr")
  12648. if v == nil {
  12649. v283v2 = nil
  12650. } else {
  12651. v283v2 = make(map[bool]int64, len(v))
  12652. } // reset map
  12653. testUnmarshalErr(&v283v2, bs283, h, t, "dec-map-v283-p-len")
  12654. testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-p-len")
  12655. bs283 = testMarshalErr(&v283v1, h, t, "enc-map-v283-p")
  12656. v283v2 = nil
  12657. testUnmarshalErr(&v283v2, bs283, h, t, "dec-map-v283-p-nil")
  12658. testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-p-nil")
  12659. // ...
  12660. if v == nil {
  12661. v283v2 = nil
  12662. } else {
  12663. v283v2 = make(map[bool]int64, len(v))
  12664. } // reset map
  12665. var v283v3, v283v4 typMapMapBoolInt64
  12666. v283v3 = typMapMapBoolInt64(v283v1)
  12667. v283v4 = typMapMapBoolInt64(v283v2)
  12668. bs283 = testMarshalErr(v283v3, h, t, "enc-map-v283-custom")
  12669. testUnmarshalErr(v283v4, bs283, h, t, "dec-map-v283-p-len")
  12670. testDeepEqualErr(v283v3, v283v4, t, "equal-map-v283-p-len")
  12671. }
  12672. for _, v := range []map[bool]float32{nil, {}, {true: 0}} {
  12673. // fmt.Printf(">>>> running mammoth map v284: %v\n", v)
  12674. var v284v1, v284v2 map[bool]float32
  12675. v284v1 = v
  12676. bs284 := testMarshalErr(v284v1, h, t, "enc-map-v284")
  12677. if v == nil {
  12678. v284v2 = nil
  12679. } else {
  12680. v284v2 = make(map[bool]float32, len(v))
  12681. } // reset map
  12682. testUnmarshalErr(v284v2, bs284, h, t, "dec-map-v284")
  12683. testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284")
  12684. if v == nil {
  12685. v284v2 = nil
  12686. } else {
  12687. v284v2 = make(map[bool]float32, len(v))
  12688. } // reset map
  12689. testUnmarshalErr(reflect.ValueOf(v284v2), bs284, h, t, "dec-map-v284-noaddr") // decode into non-addressable map value
  12690. testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-noaddr")
  12691. if v == nil {
  12692. v284v2 = nil
  12693. } else {
  12694. v284v2 = make(map[bool]float32, len(v))
  12695. } // reset map
  12696. testUnmarshalErr(&v284v2, bs284, h, t, "dec-map-v284-p-len")
  12697. testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-p-len")
  12698. bs284 = testMarshalErr(&v284v1, h, t, "enc-map-v284-p")
  12699. v284v2 = nil
  12700. testUnmarshalErr(&v284v2, bs284, h, t, "dec-map-v284-p-nil")
  12701. testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-p-nil")
  12702. // ...
  12703. if v == nil {
  12704. v284v2 = nil
  12705. } else {
  12706. v284v2 = make(map[bool]float32, len(v))
  12707. } // reset map
  12708. var v284v3, v284v4 typMapMapBoolFloat32
  12709. v284v3 = typMapMapBoolFloat32(v284v1)
  12710. v284v4 = typMapMapBoolFloat32(v284v2)
  12711. bs284 = testMarshalErr(v284v3, h, t, "enc-map-v284-custom")
  12712. testUnmarshalErr(v284v4, bs284, h, t, "dec-map-v284-p-len")
  12713. testDeepEqualErr(v284v3, v284v4, t, "equal-map-v284-p-len")
  12714. }
  12715. for _, v := range []map[bool]float64{nil, {}, {true: 0}} {
  12716. // fmt.Printf(">>>> running mammoth map v285: %v\n", v)
  12717. var v285v1, v285v2 map[bool]float64
  12718. v285v1 = v
  12719. bs285 := testMarshalErr(v285v1, h, t, "enc-map-v285")
  12720. if v == nil {
  12721. v285v2 = nil
  12722. } else {
  12723. v285v2 = make(map[bool]float64, len(v))
  12724. } // reset map
  12725. testUnmarshalErr(v285v2, bs285, h, t, "dec-map-v285")
  12726. testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285")
  12727. if v == nil {
  12728. v285v2 = nil
  12729. } else {
  12730. v285v2 = make(map[bool]float64, len(v))
  12731. } // reset map
  12732. testUnmarshalErr(reflect.ValueOf(v285v2), bs285, h, t, "dec-map-v285-noaddr") // decode into non-addressable map value
  12733. testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-noaddr")
  12734. if v == nil {
  12735. v285v2 = nil
  12736. } else {
  12737. v285v2 = make(map[bool]float64, len(v))
  12738. } // reset map
  12739. testUnmarshalErr(&v285v2, bs285, h, t, "dec-map-v285-p-len")
  12740. testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-p-len")
  12741. bs285 = testMarshalErr(&v285v1, h, t, "enc-map-v285-p")
  12742. v285v2 = nil
  12743. testUnmarshalErr(&v285v2, bs285, h, t, "dec-map-v285-p-nil")
  12744. testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-p-nil")
  12745. // ...
  12746. if v == nil {
  12747. v285v2 = nil
  12748. } else {
  12749. v285v2 = make(map[bool]float64, len(v))
  12750. } // reset map
  12751. var v285v3, v285v4 typMapMapBoolFloat64
  12752. v285v3 = typMapMapBoolFloat64(v285v1)
  12753. v285v4 = typMapMapBoolFloat64(v285v2)
  12754. bs285 = testMarshalErr(v285v3, h, t, "enc-map-v285-custom")
  12755. testUnmarshalErr(v285v4, bs285, h, t, "dec-map-v285-p-len")
  12756. testDeepEqualErr(v285v3, v285v4, t, "equal-map-v285-p-len")
  12757. }
  12758. for _, v := range []map[bool]bool{nil, {}, {true: false}} {
  12759. // fmt.Printf(">>>> running mammoth map v286: %v\n", v)
  12760. var v286v1, v286v2 map[bool]bool
  12761. v286v1 = v
  12762. bs286 := testMarshalErr(v286v1, h, t, "enc-map-v286")
  12763. if v == nil {
  12764. v286v2 = nil
  12765. } else {
  12766. v286v2 = make(map[bool]bool, len(v))
  12767. } // reset map
  12768. testUnmarshalErr(v286v2, bs286, h, t, "dec-map-v286")
  12769. testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286")
  12770. if v == nil {
  12771. v286v2 = nil
  12772. } else {
  12773. v286v2 = make(map[bool]bool, len(v))
  12774. } // reset map
  12775. testUnmarshalErr(reflect.ValueOf(v286v2), bs286, h, t, "dec-map-v286-noaddr") // decode into non-addressable map value
  12776. testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-noaddr")
  12777. if v == nil {
  12778. v286v2 = nil
  12779. } else {
  12780. v286v2 = make(map[bool]bool, len(v))
  12781. } // reset map
  12782. testUnmarshalErr(&v286v2, bs286, h, t, "dec-map-v286-p-len")
  12783. testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-p-len")
  12784. bs286 = testMarshalErr(&v286v1, h, t, "enc-map-v286-p")
  12785. v286v2 = nil
  12786. testUnmarshalErr(&v286v2, bs286, h, t, "dec-map-v286-p-nil")
  12787. testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-p-nil")
  12788. // ...
  12789. if v == nil {
  12790. v286v2 = nil
  12791. } else {
  12792. v286v2 = make(map[bool]bool, len(v))
  12793. } // reset map
  12794. var v286v3, v286v4 typMapMapBoolBool
  12795. v286v3 = typMapMapBoolBool(v286v1)
  12796. v286v4 = typMapMapBoolBool(v286v2)
  12797. bs286 = testMarshalErr(v286v3, h, t, "enc-map-v286-custom")
  12798. testUnmarshalErr(v286v4, bs286, h, t, "dec-map-v286-p-len")
  12799. testDeepEqualErr(v286v3, v286v4, t, "equal-map-v286-p-len")
  12800. }
  12801. }
  12802. func doTestMammothMapsAndSlices(t *testing.T, h Handle) {
  12803. doTestMammothSlices(t, h)
  12804. doTestMammothMaps(t, h)
  12805. }