mammoth_generated_test.go 466 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188
  1. // Copyright (c) 2012-2018 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. FSliceUint8 []uint8
  57. FptrSliceUint8 *[]uint8
  58. FSliceUint16 []uint16
  59. FptrSliceUint16 *[]uint16
  60. FSliceUint32 []uint32
  61. FptrSliceUint32 *[]uint32
  62. FSliceUint64 []uint64
  63. FptrSliceUint64 *[]uint64
  64. FSliceUintptr []uintptr
  65. FptrSliceUintptr *[]uintptr
  66. FSliceInt []int
  67. FptrSliceInt *[]int
  68. FSliceInt8 []int8
  69. FptrSliceInt8 *[]int8
  70. FSliceInt16 []int16
  71. FptrSliceInt16 *[]int16
  72. FSliceInt32 []int32
  73. FptrSliceInt32 *[]int32
  74. FSliceInt64 []int64
  75. FptrSliceInt64 *[]int64
  76. FSliceBool []bool
  77. FptrSliceBool *[]bool
  78. FMapIntfIntf map[interface{}]interface{}
  79. FptrMapIntfIntf *map[interface{}]interface{}
  80. FMapIntfString map[interface{}]string
  81. FptrMapIntfString *map[interface{}]string
  82. FMapIntfUint map[interface{}]uint
  83. FptrMapIntfUint *map[interface{}]uint
  84. FMapIntfUint8 map[interface{}]uint8
  85. FptrMapIntfUint8 *map[interface{}]uint8
  86. FMapIntfUint16 map[interface{}]uint16
  87. FptrMapIntfUint16 *map[interface{}]uint16
  88. FMapIntfUint32 map[interface{}]uint32
  89. FptrMapIntfUint32 *map[interface{}]uint32
  90. FMapIntfUint64 map[interface{}]uint64
  91. FptrMapIntfUint64 *map[interface{}]uint64
  92. FMapIntfUintptr map[interface{}]uintptr
  93. FptrMapIntfUintptr *map[interface{}]uintptr
  94. FMapIntfInt map[interface{}]int
  95. FptrMapIntfInt *map[interface{}]int
  96. FMapIntfInt8 map[interface{}]int8
  97. FptrMapIntfInt8 *map[interface{}]int8
  98. FMapIntfInt16 map[interface{}]int16
  99. FptrMapIntfInt16 *map[interface{}]int16
  100. FMapIntfInt32 map[interface{}]int32
  101. FptrMapIntfInt32 *map[interface{}]int32
  102. FMapIntfInt64 map[interface{}]int64
  103. FptrMapIntfInt64 *map[interface{}]int64
  104. FMapIntfFloat32 map[interface{}]float32
  105. FptrMapIntfFloat32 *map[interface{}]float32
  106. FMapIntfFloat64 map[interface{}]float64
  107. FptrMapIntfFloat64 *map[interface{}]float64
  108. FMapIntfBool map[interface{}]bool
  109. FptrMapIntfBool *map[interface{}]bool
  110. FMapStringIntf map[string]interface{}
  111. FptrMapStringIntf *map[string]interface{}
  112. FMapStringString map[string]string
  113. FptrMapStringString *map[string]string
  114. FMapStringUint map[string]uint
  115. FptrMapStringUint *map[string]uint
  116. FMapStringUint8 map[string]uint8
  117. FptrMapStringUint8 *map[string]uint8
  118. FMapStringUint16 map[string]uint16
  119. FptrMapStringUint16 *map[string]uint16
  120. FMapStringUint32 map[string]uint32
  121. FptrMapStringUint32 *map[string]uint32
  122. FMapStringUint64 map[string]uint64
  123. FptrMapStringUint64 *map[string]uint64
  124. FMapStringUintptr map[string]uintptr
  125. FptrMapStringUintptr *map[string]uintptr
  126. FMapStringInt map[string]int
  127. FptrMapStringInt *map[string]int
  128. FMapStringInt8 map[string]int8
  129. FptrMapStringInt8 *map[string]int8
  130. FMapStringInt16 map[string]int16
  131. FptrMapStringInt16 *map[string]int16
  132. FMapStringInt32 map[string]int32
  133. FptrMapStringInt32 *map[string]int32
  134. FMapStringInt64 map[string]int64
  135. FptrMapStringInt64 *map[string]int64
  136. FMapStringFloat32 map[string]float32
  137. FptrMapStringFloat32 *map[string]float32
  138. FMapStringFloat64 map[string]float64
  139. FptrMapStringFloat64 *map[string]float64
  140. FMapStringBool map[string]bool
  141. FptrMapStringBool *map[string]bool
  142. FMapFloat32Intf map[float32]interface{}
  143. FptrMapFloat32Intf *map[float32]interface{}
  144. FMapFloat32String map[float32]string
  145. FptrMapFloat32String *map[float32]string
  146. FMapFloat32Uint map[float32]uint
  147. FptrMapFloat32Uint *map[float32]uint
  148. FMapFloat32Uint8 map[float32]uint8
  149. FptrMapFloat32Uint8 *map[float32]uint8
  150. FMapFloat32Uint16 map[float32]uint16
  151. FptrMapFloat32Uint16 *map[float32]uint16
  152. FMapFloat32Uint32 map[float32]uint32
  153. FptrMapFloat32Uint32 *map[float32]uint32
  154. FMapFloat32Uint64 map[float32]uint64
  155. FptrMapFloat32Uint64 *map[float32]uint64
  156. FMapFloat32Uintptr map[float32]uintptr
  157. FptrMapFloat32Uintptr *map[float32]uintptr
  158. FMapFloat32Int map[float32]int
  159. FptrMapFloat32Int *map[float32]int
  160. FMapFloat32Int8 map[float32]int8
  161. FptrMapFloat32Int8 *map[float32]int8
  162. FMapFloat32Int16 map[float32]int16
  163. FptrMapFloat32Int16 *map[float32]int16
  164. FMapFloat32Int32 map[float32]int32
  165. FptrMapFloat32Int32 *map[float32]int32
  166. FMapFloat32Int64 map[float32]int64
  167. FptrMapFloat32Int64 *map[float32]int64
  168. FMapFloat32Float32 map[float32]float32
  169. FptrMapFloat32Float32 *map[float32]float32
  170. FMapFloat32Float64 map[float32]float64
  171. FptrMapFloat32Float64 *map[float32]float64
  172. FMapFloat32Bool map[float32]bool
  173. FptrMapFloat32Bool *map[float32]bool
  174. FMapFloat64Intf map[float64]interface{}
  175. FptrMapFloat64Intf *map[float64]interface{}
  176. FMapFloat64String map[float64]string
  177. FptrMapFloat64String *map[float64]string
  178. FMapFloat64Uint map[float64]uint
  179. FptrMapFloat64Uint *map[float64]uint
  180. FMapFloat64Uint8 map[float64]uint8
  181. FptrMapFloat64Uint8 *map[float64]uint8
  182. FMapFloat64Uint16 map[float64]uint16
  183. FptrMapFloat64Uint16 *map[float64]uint16
  184. FMapFloat64Uint32 map[float64]uint32
  185. FptrMapFloat64Uint32 *map[float64]uint32
  186. FMapFloat64Uint64 map[float64]uint64
  187. FptrMapFloat64Uint64 *map[float64]uint64
  188. FMapFloat64Uintptr map[float64]uintptr
  189. FptrMapFloat64Uintptr *map[float64]uintptr
  190. FMapFloat64Int map[float64]int
  191. FptrMapFloat64Int *map[float64]int
  192. FMapFloat64Int8 map[float64]int8
  193. FptrMapFloat64Int8 *map[float64]int8
  194. FMapFloat64Int16 map[float64]int16
  195. FptrMapFloat64Int16 *map[float64]int16
  196. FMapFloat64Int32 map[float64]int32
  197. FptrMapFloat64Int32 *map[float64]int32
  198. FMapFloat64Int64 map[float64]int64
  199. FptrMapFloat64Int64 *map[float64]int64
  200. FMapFloat64Float32 map[float64]float32
  201. FptrMapFloat64Float32 *map[float64]float32
  202. FMapFloat64Float64 map[float64]float64
  203. FptrMapFloat64Float64 *map[float64]float64
  204. FMapFloat64Bool map[float64]bool
  205. FptrMapFloat64Bool *map[float64]bool
  206. FMapUintIntf map[uint]interface{}
  207. FptrMapUintIntf *map[uint]interface{}
  208. FMapUintString map[uint]string
  209. FptrMapUintString *map[uint]string
  210. FMapUintUint map[uint]uint
  211. FptrMapUintUint *map[uint]uint
  212. FMapUintUint8 map[uint]uint8
  213. FptrMapUintUint8 *map[uint]uint8
  214. FMapUintUint16 map[uint]uint16
  215. FptrMapUintUint16 *map[uint]uint16
  216. FMapUintUint32 map[uint]uint32
  217. FptrMapUintUint32 *map[uint]uint32
  218. FMapUintUint64 map[uint]uint64
  219. FptrMapUintUint64 *map[uint]uint64
  220. FMapUintUintptr map[uint]uintptr
  221. FptrMapUintUintptr *map[uint]uintptr
  222. FMapUintInt map[uint]int
  223. FptrMapUintInt *map[uint]int
  224. FMapUintInt8 map[uint]int8
  225. FptrMapUintInt8 *map[uint]int8
  226. FMapUintInt16 map[uint]int16
  227. FptrMapUintInt16 *map[uint]int16
  228. FMapUintInt32 map[uint]int32
  229. FptrMapUintInt32 *map[uint]int32
  230. FMapUintInt64 map[uint]int64
  231. FptrMapUintInt64 *map[uint]int64
  232. FMapUintFloat32 map[uint]float32
  233. FptrMapUintFloat32 *map[uint]float32
  234. FMapUintFloat64 map[uint]float64
  235. FptrMapUintFloat64 *map[uint]float64
  236. FMapUintBool map[uint]bool
  237. FptrMapUintBool *map[uint]bool
  238. FMapUint8Intf map[uint8]interface{}
  239. FptrMapUint8Intf *map[uint8]interface{}
  240. FMapUint8String map[uint8]string
  241. FptrMapUint8String *map[uint8]string
  242. FMapUint8Uint map[uint8]uint
  243. FptrMapUint8Uint *map[uint8]uint
  244. FMapUint8Uint8 map[uint8]uint8
  245. FptrMapUint8Uint8 *map[uint8]uint8
  246. FMapUint8Uint16 map[uint8]uint16
  247. FptrMapUint8Uint16 *map[uint8]uint16
  248. FMapUint8Uint32 map[uint8]uint32
  249. FptrMapUint8Uint32 *map[uint8]uint32
  250. FMapUint8Uint64 map[uint8]uint64
  251. FptrMapUint8Uint64 *map[uint8]uint64
  252. FMapUint8Uintptr map[uint8]uintptr
  253. FptrMapUint8Uintptr *map[uint8]uintptr
  254. FMapUint8Int map[uint8]int
  255. FptrMapUint8Int *map[uint8]int
  256. FMapUint8Int8 map[uint8]int8
  257. FptrMapUint8Int8 *map[uint8]int8
  258. FMapUint8Int16 map[uint8]int16
  259. FptrMapUint8Int16 *map[uint8]int16
  260. FMapUint8Int32 map[uint8]int32
  261. FptrMapUint8Int32 *map[uint8]int32
  262. FMapUint8Int64 map[uint8]int64
  263. FptrMapUint8Int64 *map[uint8]int64
  264. FMapUint8Float32 map[uint8]float32
  265. FptrMapUint8Float32 *map[uint8]float32
  266. FMapUint8Float64 map[uint8]float64
  267. FptrMapUint8Float64 *map[uint8]float64
  268. FMapUint8Bool map[uint8]bool
  269. FptrMapUint8Bool *map[uint8]bool
  270. FMapUint16Intf map[uint16]interface{}
  271. FptrMapUint16Intf *map[uint16]interface{}
  272. FMapUint16String map[uint16]string
  273. FptrMapUint16String *map[uint16]string
  274. FMapUint16Uint map[uint16]uint
  275. FptrMapUint16Uint *map[uint16]uint
  276. FMapUint16Uint8 map[uint16]uint8
  277. FptrMapUint16Uint8 *map[uint16]uint8
  278. FMapUint16Uint16 map[uint16]uint16
  279. FptrMapUint16Uint16 *map[uint16]uint16
  280. FMapUint16Uint32 map[uint16]uint32
  281. FptrMapUint16Uint32 *map[uint16]uint32
  282. FMapUint16Uint64 map[uint16]uint64
  283. FptrMapUint16Uint64 *map[uint16]uint64
  284. FMapUint16Uintptr map[uint16]uintptr
  285. FptrMapUint16Uintptr *map[uint16]uintptr
  286. FMapUint16Int map[uint16]int
  287. FptrMapUint16Int *map[uint16]int
  288. FMapUint16Int8 map[uint16]int8
  289. FptrMapUint16Int8 *map[uint16]int8
  290. FMapUint16Int16 map[uint16]int16
  291. FptrMapUint16Int16 *map[uint16]int16
  292. FMapUint16Int32 map[uint16]int32
  293. FptrMapUint16Int32 *map[uint16]int32
  294. FMapUint16Int64 map[uint16]int64
  295. FptrMapUint16Int64 *map[uint16]int64
  296. FMapUint16Float32 map[uint16]float32
  297. FptrMapUint16Float32 *map[uint16]float32
  298. FMapUint16Float64 map[uint16]float64
  299. FptrMapUint16Float64 *map[uint16]float64
  300. FMapUint16Bool map[uint16]bool
  301. FptrMapUint16Bool *map[uint16]bool
  302. FMapUint32Intf map[uint32]interface{}
  303. FptrMapUint32Intf *map[uint32]interface{}
  304. FMapUint32String map[uint32]string
  305. FptrMapUint32String *map[uint32]string
  306. FMapUint32Uint map[uint32]uint
  307. FptrMapUint32Uint *map[uint32]uint
  308. FMapUint32Uint8 map[uint32]uint8
  309. FptrMapUint32Uint8 *map[uint32]uint8
  310. FMapUint32Uint16 map[uint32]uint16
  311. FptrMapUint32Uint16 *map[uint32]uint16
  312. FMapUint32Uint32 map[uint32]uint32
  313. FptrMapUint32Uint32 *map[uint32]uint32
  314. FMapUint32Uint64 map[uint32]uint64
  315. FptrMapUint32Uint64 *map[uint32]uint64
  316. FMapUint32Uintptr map[uint32]uintptr
  317. FptrMapUint32Uintptr *map[uint32]uintptr
  318. FMapUint32Int map[uint32]int
  319. FptrMapUint32Int *map[uint32]int
  320. FMapUint32Int8 map[uint32]int8
  321. FptrMapUint32Int8 *map[uint32]int8
  322. FMapUint32Int16 map[uint32]int16
  323. FptrMapUint32Int16 *map[uint32]int16
  324. FMapUint32Int32 map[uint32]int32
  325. FptrMapUint32Int32 *map[uint32]int32
  326. FMapUint32Int64 map[uint32]int64
  327. FptrMapUint32Int64 *map[uint32]int64
  328. FMapUint32Float32 map[uint32]float32
  329. FptrMapUint32Float32 *map[uint32]float32
  330. FMapUint32Float64 map[uint32]float64
  331. FptrMapUint32Float64 *map[uint32]float64
  332. FMapUint32Bool map[uint32]bool
  333. FptrMapUint32Bool *map[uint32]bool
  334. FMapUint64Intf map[uint64]interface{}
  335. FptrMapUint64Intf *map[uint64]interface{}
  336. FMapUint64String map[uint64]string
  337. FptrMapUint64String *map[uint64]string
  338. FMapUint64Uint map[uint64]uint
  339. FptrMapUint64Uint *map[uint64]uint
  340. FMapUint64Uint8 map[uint64]uint8
  341. FptrMapUint64Uint8 *map[uint64]uint8
  342. FMapUint64Uint16 map[uint64]uint16
  343. FptrMapUint64Uint16 *map[uint64]uint16
  344. FMapUint64Uint32 map[uint64]uint32
  345. FptrMapUint64Uint32 *map[uint64]uint32
  346. FMapUint64Uint64 map[uint64]uint64
  347. FptrMapUint64Uint64 *map[uint64]uint64
  348. FMapUint64Uintptr map[uint64]uintptr
  349. FptrMapUint64Uintptr *map[uint64]uintptr
  350. FMapUint64Int map[uint64]int
  351. FptrMapUint64Int *map[uint64]int
  352. FMapUint64Int8 map[uint64]int8
  353. FptrMapUint64Int8 *map[uint64]int8
  354. FMapUint64Int16 map[uint64]int16
  355. FptrMapUint64Int16 *map[uint64]int16
  356. FMapUint64Int32 map[uint64]int32
  357. FptrMapUint64Int32 *map[uint64]int32
  358. FMapUint64Int64 map[uint64]int64
  359. FptrMapUint64Int64 *map[uint64]int64
  360. FMapUint64Float32 map[uint64]float32
  361. FptrMapUint64Float32 *map[uint64]float32
  362. FMapUint64Float64 map[uint64]float64
  363. FptrMapUint64Float64 *map[uint64]float64
  364. FMapUint64Bool map[uint64]bool
  365. FptrMapUint64Bool *map[uint64]bool
  366. FMapUintptrIntf map[uintptr]interface{}
  367. FptrMapUintptrIntf *map[uintptr]interface{}
  368. FMapUintptrString map[uintptr]string
  369. FptrMapUintptrString *map[uintptr]string
  370. FMapUintptrUint map[uintptr]uint
  371. FptrMapUintptrUint *map[uintptr]uint
  372. FMapUintptrUint8 map[uintptr]uint8
  373. FptrMapUintptrUint8 *map[uintptr]uint8
  374. FMapUintptrUint16 map[uintptr]uint16
  375. FptrMapUintptrUint16 *map[uintptr]uint16
  376. FMapUintptrUint32 map[uintptr]uint32
  377. FptrMapUintptrUint32 *map[uintptr]uint32
  378. FMapUintptrUint64 map[uintptr]uint64
  379. FptrMapUintptrUint64 *map[uintptr]uint64
  380. FMapUintptrUintptr map[uintptr]uintptr
  381. FptrMapUintptrUintptr *map[uintptr]uintptr
  382. FMapUintptrInt map[uintptr]int
  383. FptrMapUintptrInt *map[uintptr]int
  384. FMapUintptrInt8 map[uintptr]int8
  385. FptrMapUintptrInt8 *map[uintptr]int8
  386. FMapUintptrInt16 map[uintptr]int16
  387. FptrMapUintptrInt16 *map[uintptr]int16
  388. FMapUintptrInt32 map[uintptr]int32
  389. FptrMapUintptrInt32 *map[uintptr]int32
  390. FMapUintptrInt64 map[uintptr]int64
  391. FptrMapUintptrInt64 *map[uintptr]int64
  392. FMapUintptrFloat32 map[uintptr]float32
  393. FptrMapUintptrFloat32 *map[uintptr]float32
  394. FMapUintptrFloat64 map[uintptr]float64
  395. FptrMapUintptrFloat64 *map[uintptr]float64
  396. FMapUintptrBool map[uintptr]bool
  397. FptrMapUintptrBool *map[uintptr]bool
  398. FMapIntIntf map[int]interface{}
  399. FptrMapIntIntf *map[int]interface{}
  400. FMapIntString map[int]string
  401. FptrMapIntString *map[int]string
  402. FMapIntUint map[int]uint
  403. FptrMapIntUint *map[int]uint
  404. FMapIntUint8 map[int]uint8
  405. FptrMapIntUint8 *map[int]uint8
  406. FMapIntUint16 map[int]uint16
  407. FptrMapIntUint16 *map[int]uint16
  408. FMapIntUint32 map[int]uint32
  409. FptrMapIntUint32 *map[int]uint32
  410. FMapIntUint64 map[int]uint64
  411. FptrMapIntUint64 *map[int]uint64
  412. FMapIntUintptr map[int]uintptr
  413. FptrMapIntUintptr *map[int]uintptr
  414. FMapIntInt map[int]int
  415. FptrMapIntInt *map[int]int
  416. FMapIntInt8 map[int]int8
  417. FptrMapIntInt8 *map[int]int8
  418. FMapIntInt16 map[int]int16
  419. FptrMapIntInt16 *map[int]int16
  420. FMapIntInt32 map[int]int32
  421. FptrMapIntInt32 *map[int]int32
  422. FMapIntInt64 map[int]int64
  423. FptrMapIntInt64 *map[int]int64
  424. FMapIntFloat32 map[int]float32
  425. FptrMapIntFloat32 *map[int]float32
  426. FMapIntFloat64 map[int]float64
  427. FptrMapIntFloat64 *map[int]float64
  428. FMapIntBool map[int]bool
  429. FptrMapIntBool *map[int]bool
  430. FMapInt8Intf map[int8]interface{}
  431. FptrMapInt8Intf *map[int8]interface{}
  432. FMapInt8String map[int8]string
  433. FptrMapInt8String *map[int8]string
  434. FMapInt8Uint map[int8]uint
  435. FptrMapInt8Uint *map[int8]uint
  436. FMapInt8Uint8 map[int8]uint8
  437. FptrMapInt8Uint8 *map[int8]uint8
  438. FMapInt8Uint16 map[int8]uint16
  439. FptrMapInt8Uint16 *map[int8]uint16
  440. FMapInt8Uint32 map[int8]uint32
  441. FptrMapInt8Uint32 *map[int8]uint32
  442. FMapInt8Uint64 map[int8]uint64
  443. FptrMapInt8Uint64 *map[int8]uint64
  444. FMapInt8Uintptr map[int8]uintptr
  445. FptrMapInt8Uintptr *map[int8]uintptr
  446. FMapInt8Int map[int8]int
  447. FptrMapInt8Int *map[int8]int
  448. FMapInt8Int8 map[int8]int8
  449. FptrMapInt8Int8 *map[int8]int8
  450. FMapInt8Int16 map[int8]int16
  451. FptrMapInt8Int16 *map[int8]int16
  452. FMapInt8Int32 map[int8]int32
  453. FptrMapInt8Int32 *map[int8]int32
  454. FMapInt8Int64 map[int8]int64
  455. FptrMapInt8Int64 *map[int8]int64
  456. FMapInt8Float32 map[int8]float32
  457. FptrMapInt8Float32 *map[int8]float32
  458. FMapInt8Float64 map[int8]float64
  459. FptrMapInt8Float64 *map[int8]float64
  460. FMapInt8Bool map[int8]bool
  461. FptrMapInt8Bool *map[int8]bool
  462. FMapInt16Intf map[int16]interface{}
  463. FptrMapInt16Intf *map[int16]interface{}
  464. FMapInt16String map[int16]string
  465. FptrMapInt16String *map[int16]string
  466. FMapInt16Uint map[int16]uint
  467. FptrMapInt16Uint *map[int16]uint
  468. FMapInt16Uint8 map[int16]uint8
  469. FptrMapInt16Uint8 *map[int16]uint8
  470. FMapInt16Uint16 map[int16]uint16
  471. FptrMapInt16Uint16 *map[int16]uint16
  472. FMapInt16Uint32 map[int16]uint32
  473. FptrMapInt16Uint32 *map[int16]uint32
  474. FMapInt16Uint64 map[int16]uint64
  475. FptrMapInt16Uint64 *map[int16]uint64
  476. FMapInt16Uintptr map[int16]uintptr
  477. FptrMapInt16Uintptr *map[int16]uintptr
  478. FMapInt16Int map[int16]int
  479. FptrMapInt16Int *map[int16]int
  480. FMapInt16Int8 map[int16]int8
  481. FptrMapInt16Int8 *map[int16]int8
  482. FMapInt16Int16 map[int16]int16
  483. FptrMapInt16Int16 *map[int16]int16
  484. FMapInt16Int32 map[int16]int32
  485. FptrMapInt16Int32 *map[int16]int32
  486. FMapInt16Int64 map[int16]int64
  487. FptrMapInt16Int64 *map[int16]int64
  488. FMapInt16Float32 map[int16]float32
  489. FptrMapInt16Float32 *map[int16]float32
  490. FMapInt16Float64 map[int16]float64
  491. FptrMapInt16Float64 *map[int16]float64
  492. FMapInt16Bool map[int16]bool
  493. FptrMapInt16Bool *map[int16]bool
  494. FMapInt32Intf map[int32]interface{}
  495. FptrMapInt32Intf *map[int32]interface{}
  496. FMapInt32String map[int32]string
  497. FptrMapInt32String *map[int32]string
  498. FMapInt32Uint map[int32]uint
  499. FptrMapInt32Uint *map[int32]uint
  500. FMapInt32Uint8 map[int32]uint8
  501. FptrMapInt32Uint8 *map[int32]uint8
  502. FMapInt32Uint16 map[int32]uint16
  503. FptrMapInt32Uint16 *map[int32]uint16
  504. FMapInt32Uint32 map[int32]uint32
  505. FptrMapInt32Uint32 *map[int32]uint32
  506. FMapInt32Uint64 map[int32]uint64
  507. FptrMapInt32Uint64 *map[int32]uint64
  508. FMapInt32Uintptr map[int32]uintptr
  509. FptrMapInt32Uintptr *map[int32]uintptr
  510. FMapInt32Int map[int32]int
  511. FptrMapInt32Int *map[int32]int
  512. FMapInt32Int8 map[int32]int8
  513. FptrMapInt32Int8 *map[int32]int8
  514. FMapInt32Int16 map[int32]int16
  515. FptrMapInt32Int16 *map[int32]int16
  516. FMapInt32Int32 map[int32]int32
  517. FptrMapInt32Int32 *map[int32]int32
  518. FMapInt32Int64 map[int32]int64
  519. FptrMapInt32Int64 *map[int32]int64
  520. FMapInt32Float32 map[int32]float32
  521. FptrMapInt32Float32 *map[int32]float32
  522. FMapInt32Float64 map[int32]float64
  523. FptrMapInt32Float64 *map[int32]float64
  524. FMapInt32Bool map[int32]bool
  525. FptrMapInt32Bool *map[int32]bool
  526. FMapInt64Intf map[int64]interface{}
  527. FptrMapInt64Intf *map[int64]interface{}
  528. FMapInt64String map[int64]string
  529. FptrMapInt64String *map[int64]string
  530. FMapInt64Uint map[int64]uint
  531. FptrMapInt64Uint *map[int64]uint
  532. FMapInt64Uint8 map[int64]uint8
  533. FptrMapInt64Uint8 *map[int64]uint8
  534. FMapInt64Uint16 map[int64]uint16
  535. FptrMapInt64Uint16 *map[int64]uint16
  536. FMapInt64Uint32 map[int64]uint32
  537. FptrMapInt64Uint32 *map[int64]uint32
  538. FMapInt64Uint64 map[int64]uint64
  539. FptrMapInt64Uint64 *map[int64]uint64
  540. FMapInt64Uintptr map[int64]uintptr
  541. FptrMapInt64Uintptr *map[int64]uintptr
  542. FMapInt64Int map[int64]int
  543. FptrMapInt64Int *map[int64]int
  544. FMapInt64Int8 map[int64]int8
  545. FptrMapInt64Int8 *map[int64]int8
  546. FMapInt64Int16 map[int64]int16
  547. FptrMapInt64Int16 *map[int64]int16
  548. FMapInt64Int32 map[int64]int32
  549. FptrMapInt64Int32 *map[int64]int32
  550. FMapInt64Int64 map[int64]int64
  551. FptrMapInt64Int64 *map[int64]int64
  552. FMapInt64Float32 map[int64]float32
  553. FptrMapInt64Float32 *map[int64]float32
  554. FMapInt64Float64 map[int64]float64
  555. FptrMapInt64Float64 *map[int64]float64
  556. FMapInt64Bool map[int64]bool
  557. FptrMapInt64Bool *map[int64]bool
  558. FMapBoolIntf map[bool]interface{}
  559. FptrMapBoolIntf *map[bool]interface{}
  560. FMapBoolString map[bool]string
  561. FptrMapBoolString *map[bool]string
  562. FMapBoolUint map[bool]uint
  563. FptrMapBoolUint *map[bool]uint
  564. FMapBoolUint8 map[bool]uint8
  565. FptrMapBoolUint8 *map[bool]uint8
  566. FMapBoolUint16 map[bool]uint16
  567. FptrMapBoolUint16 *map[bool]uint16
  568. FMapBoolUint32 map[bool]uint32
  569. FptrMapBoolUint32 *map[bool]uint32
  570. FMapBoolUint64 map[bool]uint64
  571. FptrMapBoolUint64 *map[bool]uint64
  572. FMapBoolUintptr map[bool]uintptr
  573. FptrMapBoolUintptr *map[bool]uintptr
  574. FMapBoolInt map[bool]int
  575. FptrMapBoolInt *map[bool]int
  576. FMapBoolInt8 map[bool]int8
  577. FptrMapBoolInt8 *map[bool]int8
  578. FMapBoolInt16 map[bool]int16
  579. FptrMapBoolInt16 *map[bool]int16
  580. FMapBoolInt32 map[bool]int32
  581. FptrMapBoolInt32 *map[bool]int32
  582. FMapBoolInt64 map[bool]int64
  583. FptrMapBoolInt64 *map[bool]int64
  584. FMapBoolFloat32 map[bool]float32
  585. FptrMapBoolFloat32 *map[bool]float32
  586. FMapBoolFloat64 map[bool]float64
  587. FptrMapBoolFloat64 *map[bool]float64
  588. FMapBoolBool map[bool]bool
  589. FptrMapBoolBool *map[bool]bool
  590. }
  591. type typMbsSliceIntf []interface{}
  592. func (_ typMbsSliceIntf) MapBySlice() {}
  593. type typMbsSliceString []string
  594. func (_ typMbsSliceString) MapBySlice() {}
  595. type typMbsSliceFloat32 []float32
  596. func (_ typMbsSliceFloat32) MapBySlice() {}
  597. type typMbsSliceFloat64 []float64
  598. func (_ typMbsSliceFloat64) MapBySlice() {}
  599. type typMbsSliceUint []uint
  600. func (_ typMbsSliceUint) MapBySlice() {}
  601. type typMbsSliceUint8 []uint8
  602. func (_ typMbsSliceUint8) MapBySlice() {}
  603. type typMbsSliceUint16 []uint16
  604. func (_ typMbsSliceUint16) MapBySlice() {}
  605. type typMbsSliceUint32 []uint32
  606. func (_ typMbsSliceUint32) MapBySlice() {}
  607. type typMbsSliceUint64 []uint64
  608. func (_ typMbsSliceUint64) MapBySlice() {}
  609. type typMbsSliceUintptr []uintptr
  610. func (_ typMbsSliceUintptr) MapBySlice() {}
  611. type typMbsSliceInt []int
  612. func (_ typMbsSliceInt) MapBySlice() {}
  613. type typMbsSliceInt8 []int8
  614. func (_ typMbsSliceInt8) MapBySlice() {}
  615. type typMbsSliceInt16 []int16
  616. func (_ typMbsSliceInt16) MapBySlice() {}
  617. type typMbsSliceInt32 []int32
  618. func (_ typMbsSliceInt32) MapBySlice() {}
  619. type typMbsSliceInt64 []int64
  620. func (_ typMbsSliceInt64) MapBySlice() {}
  621. type typMbsSliceBool []bool
  622. func (_ typMbsSliceBool) MapBySlice() {}
  623. type typMapMapIntfIntf map[interface{}]interface{}
  624. type typMapMapIntfString map[interface{}]string
  625. type typMapMapIntfUint map[interface{}]uint
  626. type typMapMapIntfUint8 map[interface{}]uint8
  627. type typMapMapIntfUint16 map[interface{}]uint16
  628. type typMapMapIntfUint32 map[interface{}]uint32
  629. type typMapMapIntfUint64 map[interface{}]uint64
  630. type typMapMapIntfUintptr map[interface{}]uintptr
  631. type typMapMapIntfInt map[interface{}]int
  632. type typMapMapIntfInt8 map[interface{}]int8
  633. type typMapMapIntfInt16 map[interface{}]int16
  634. type typMapMapIntfInt32 map[interface{}]int32
  635. type typMapMapIntfInt64 map[interface{}]int64
  636. type typMapMapIntfFloat32 map[interface{}]float32
  637. type typMapMapIntfFloat64 map[interface{}]float64
  638. type typMapMapIntfBool map[interface{}]bool
  639. type typMapMapStringIntf map[string]interface{}
  640. type typMapMapStringString map[string]string
  641. type typMapMapStringUint map[string]uint
  642. type typMapMapStringUint8 map[string]uint8
  643. type typMapMapStringUint16 map[string]uint16
  644. type typMapMapStringUint32 map[string]uint32
  645. type typMapMapStringUint64 map[string]uint64
  646. type typMapMapStringUintptr map[string]uintptr
  647. type typMapMapStringInt map[string]int
  648. type typMapMapStringInt8 map[string]int8
  649. type typMapMapStringInt16 map[string]int16
  650. type typMapMapStringInt32 map[string]int32
  651. type typMapMapStringInt64 map[string]int64
  652. type typMapMapStringFloat32 map[string]float32
  653. type typMapMapStringFloat64 map[string]float64
  654. type typMapMapStringBool map[string]bool
  655. type typMapMapFloat32Intf map[float32]interface{}
  656. type typMapMapFloat32String map[float32]string
  657. type typMapMapFloat32Uint map[float32]uint
  658. type typMapMapFloat32Uint8 map[float32]uint8
  659. type typMapMapFloat32Uint16 map[float32]uint16
  660. type typMapMapFloat32Uint32 map[float32]uint32
  661. type typMapMapFloat32Uint64 map[float32]uint64
  662. type typMapMapFloat32Uintptr map[float32]uintptr
  663. type typMapMapFloat32Int map[float32]int
  664. type typMapMapFloat32Int8 map[float32]int8
  665. type typMapMapFloat32Int16 map[float32]int16
  666. type typMapMapFloat32Int32 map[float32]int32
  667. type typMapMapFloat32Int64 map[float32]int64
  668. type typMapMapFloat32Float32 map[float32]float32
  669. type typMapMapFloat32Float64 map[float32]float64
  670. type typMapMapFloat32Bool map[float32]bool
  671. type typMapMapFloat64Intf map[float64]interface{}
  672. type typMapMapFloat64String map[float64]string
  673. type typMapMapFloat64Uint map[float64]uint
  674. type typMapMapFloat64Uint8 map[float64]uint8
  675. type typMapMapFloat64Uint16 map[float64]uint16
  676. type typMapMapFloat64Uint32 map[float64]uint32
  677. type typMapMapFloat64Uint64 map[float64]uint64
  678. type typMapMapFloat64Uintptr map[float64]uintptr
  679. type typMapMapFloat64Int map[float64]int
  680. type typMapMapFloat64Int8 map[float64]int8
  681. type typMapMapFloat64Int16 map[float64]int16
  682. type typMapMapFloat64Int32 map[float64]int32
  683. type typMapMapFloat64Int64 map[float64]int64
  684. type typMapMapFloat64Float32 map[float64]float32
  685. type typMapMapFloat64Float64 map[float64]float64
  686. type typMapMapFloat64Bool map[float64]bool
  687. type typMapMapUintIntf map[uint]interface{}
  688. type typMapMapUintString map[uint]string
  689. type typMapMapUintUint map[uint]uint
  690. type typMapMapUintUint8 map[uint]uint8
  691. type typMapMapUintUint16 map[uint]uint16
  692. type typMapMapUintUint32 map[uint]uint32
  693. type typMapMapUintUint64 map[uint]uint64
  694. type typMapMapUintUintptr map[uint]uintptr
  695. type typMapMapUintInt map[uint]int
  696. type typMapMapUintInt8 map[uint]int8
  697. type typMapMapUintInt16 map[uint]int16
  698. type typMapMapUintInt32 map[uint]int32
  699. type typMapMapUintInt64 map[uint]int64
  700. type typMapMapUintFloat32 map[uint]float32
  701. type typMapMapUintFloat64 map[uint]float64
  702. type typMapMapUintBool map[uint]bool
  703. type typMapMapUint8Intf map[uint8]interface{}
  704. type typMapMapUint8String map[uint8]string
  705. type typMapMapUint8Uint map[uint8]uint
  706. type typMapMapUint8Uint8 map[uint8]uint8
  707. type typMapMapUint8Uint16 map[uint8]uint16
  708. type typMapMapUint8Uint32 map[uint8]uint32
  709. type typMapMapUint8Uint64 map[uint8]uint64
  710. type typMapMapUint8Uintptr map[uint8]uintptr
  711. type typMapMapUint8Int map[uint8]int
  712. type typMapMapUint8Int8 map[uint8]int8
  713. type typMapMapUint8Int16 map[uint8]int16
  714. type typMapMapUint8Int32 map[uint8]int32
  715. type typMapMapUint8Int64 map[uint8]int64
  716. type typMapMapUint8Float32 map[uint8]float32
  717. type typMapMapUint8Float64 map[uint8]float64
  718. type typMapMapUint8Bool map[uint8]bool
  719. type typMapMapUint16Intf map[uint16]interface{}
  720. type typMapMapUint16String map[uint16]string
  721. type typMapMapUint16Uint map[uint16]uint
  722. type typMapMapUint16Uint8 map[uint16]uint8
  723. type typMapMapUint16Uint16 map[uint16]uint16
  724. type typMapMapUint16Uint32 map[uint16]uint32
  725. type typMapMapUint16Uint64 map[uint16]uint64
  726. type typMapMapUint16Uintptr map[uint16]uintptr
  727. type typMapMapUint16Int map[uint16]int
  728. type typMapMapUint16Int8 map[uint16]int8
  729. type typMapMapUint16Int16 map[uint16]int16
  730. type typMapMapUint16Int32 map[uint16]int32
  731. type typMapMapUint16Int64 map[uint16]int64
  732. type typMapMapUint16Float32 map[uint16]float32
  733. type typMapMapUint16Float64 map[uint16]float64
  734. type typMapMapUint16Bool map[uint16]bool
  735. type typMapMapUint32Intf map[uint32]interface{}
  736. type typMapMapUint32String map[uint32]string
  737. type typMapMapUint32Uint map[uint32]uint
  738. type typMapMapUint32Uint8 map[uint32]uint8
  739. type typMapMapUint32Uint16 map[uint32]uint16
  740. type typMapMapUint32Uint32 map[uint32]uint32
  741. type typMapMapUint32Uint64 map[uint32]uint64
  742. type typMapMapUint32Uintptr map[uint32]uintptr
  743. type typMapMapUint32Int map[uint32]int
  744. type typMapMapUint32Int8 map[uint32]int8
  745. type typMapMapUint32Int16 map[uint32]int16
  746. type typMapMapUint32Int32 map[uint32]int32
  747. type typMapMapUint32Int64 map[uint32]int64
  748. type typMapMapUint32Float32 map[uint32]float32
  749. type typMapMapUint32Float64 map[uint32]float64
  750. type typMapMapUint32Bool map[uint32]bool
  751. type typMapMapUint64Intf map[uint64]interface{}
  752. type typMapMapUint64String map[uint64]string
  753. type typMapMapUint64Uint map[uint64]uint
  754. type typMapMapUint64Uint8 map[uint64]uint8
  755. type typMapMapUint64Uint16 map[uint64]uint16
  756. type typMapMapUint64Uint32 map[uint64]uint32
  757. type typMapMapUint64Uint64 map[uint64]uint64
  758. type typMapMapUint64Uintptr map[uint64]uintptr
  759. type typMapMapUint64Int map[uint64]int
  760. type typMapMapUint64Int8 map[uint64]int8
  761. type typMapMapUint64Int16 map[uint64]int16
  762. type typMapMapUint64Int32 map[uint64]int32
  763. type typMapMapUint64Int64 map[uint64]int64
  764. type typMapMapUint64Float32 map[uint64]float32
  765. type typMapMapUint64Float64 map[uint64]float64
  766. type typMapMapUint64Bool map[uint64]bool
  767. type typMapMapUintptrIntf map[uintptr]interface{}
  768. type typMapMapUintptrString map[uintptr]string
  769. type typMapMapUintptrUint map[uintptr]uint
  770. type typMapMapUintptrUint8 map[uintptr]uint8
  771. type typMapMapUintptrUint16 map[uintptr]uint16
  772. type typMapMapUintptrUint32 map[uintptr]uint32
  773. type typMapMapUintptrUint64 map[uintptr]uint64
  774. type typMapMapUintptrUintptr map[uintptr]uintptr
  775. type typMapMapUintptrInt map[uintptr]int
  776. type typMapMapUintptrInt8 map[uintptr]int8
  777. type typMapMapUintptrInt16 map[uintptr]int16
  778. type typMapMapUintptrInt32 map[uintptr]int32
  779. type typMapMapUintptrInt64 map[uintptr]int64
  780. type typMapMapUintptrFloat32 map[uintptr]float32
  781. type typMapMapUintptrFloat64 map[uintptr]float64
  782. type typMapMapUintptrBool map[uintptr]bool
  783. type typMapMapIntIntf map[int]interface{}
  784. type typMapMapIntString map[int]string
  785. type typMapMapIntUint map[int]uint
  786. type typMapMapIntUint8 map[int]uint8
  787. type typMapMapIntUint16 map[int]uint16
  788. type typMapMapIntUint32 map[int]uint32
  789. type typMapMapIntUint64 map[int]uint64
  790. type typMapMapIntUintptr map[int]uintptr
  791. type typMapMapIntInt map[int]int
  792. type typMapMapIntInt8 map[int]int8
  793. type typMapMapIntInt16 map[int]int16
  794. type typMapMapIntInt32 map[int]int32
  795. type typMapMapIntInt64 map[int]int64
  796. type typMapMapIntFloat32 map[int]float32
  797. type typMapMapIntFloat64 map[int]float64
  798. type typMapMapIntBool map[int]bool
  799. type typMapMapInt8Intf map[int8]interface{}
  800. type typMapMapInt8String map[int8]string
  801. type typMapMapInt8Uint map[int8]uint
  802. type typMapMapInt8Uint8 map[int8]uint8
  803. type typMapMapInt8Uint16 map[int8]uint16
  804. type typMapMapInt8Uint32 map[int8]uint32
  805. type typMapMapInt8Uint64 map[int8]uint64
  806. type typMapMapInt8Uintptr map[int8]uintptr
  807. type typMapMapInt8Int map[int8]int
  808. type typMapMapInt8Int8 map[int8]int8
  809. type typMapMapInt8Int16 map[int8]int16
  810. type typMapMapInt8Int32 map[int8]int32
  811. type typMapMapInt8Int64 map[int8]int64
  812. type typMapMapInt8Float32 map[int8]float32
  813. type typMapMapInt8Float64 map[int8]float64
  814. type typMapMapInt8Bool map[int8]bool
  815. type typMapMapInt16Intf map[int16]interface{}
  816. type typMapMapInt16String map[int16]string
  817. type typMapMapInt16Uint map[int16]uint
  818. type typMapMapInt16Uint8 map[int16]uint8
  819. type typMapMapInt16Uint16 map[int16]uint16
  820. type typMapMapInt16Uint32 map[int16]uint32
  821. type typMapMapInt16Uint64 map[int16]uint64
  822. type typMapMapInt16Uintptr map[int16]uintptr
  823. type typMapMapInt16Int map[int16]int
  824. type typMapMapInt16Int8 map[int16]int8
  825. type typMapMapInt16Int16 map[int16]int16
  826. type typMapMapInt16Int32 map[int16]int32
  827. type typMapMapInt16Int64 map[int16]int64
  828. type typMapMapInt16Float32 map[int16]float32
  829. type typMapMapInt16Float64 map[int16]float64
  830. type typMapMapInt16Bool map[int16]bool
  831. type typMapMapInt32Intf map[int32]interface{}
  832. type typMapMapInt32String map[int32]string
  833. type typMapMapInt32Uint map[int32]uint
  834. type typMapMapInt32Uint8 map[int32]uint8
  835. type typMapMapInt32Uint16 map[int32]uint16
  836. type typMapMapInt32Uint32 map[int32]uint32
  837. type typMapMapInt32Uint64 map[int32]uint64
  838. type typMapMapInt32Uintptr map[int32]uintptr
  839. type typMapMapInt32Int map[int32]int
  840. type typMapMapInt32Int8 map[int32]int8
  841. type typMapMapInt32Int16 map[int32]int16
  842. type typMapMapInt32Int32 map[int32]int32
  843. type typMapMapInt32Int64 map[int32]int64
  844. type typMapMapInt32Float32 map[int32]float32
  845. type typMapMapInt32Float64 map[int32]float64
  846. type typMapMapInt32Bool map[int32]bool
  847. type typMapMapInt64Intf map[int64]interface{}
  848. type typMapMapInt64String map[int64]string
  849. type typMapMapInt64Uint map[int64]uint
  850. type typMapMapInt64Uint8 map[int64]uint8
  851. type typMapMapInt64Uint16 map[int64]uint16
  852. type typMapMapInt64Uint32 map[int64]uint32
  853. type typMapMapInt64Uint64 map[int64]uint64
  854. type typMapMapInt64Uintptr map[int64]uintptr
  855. type typMapMapInt64Int map[int64]int
  856. type typMapMapInt64Int8 map[int64]int8
  857. type typMapMapInt64Int16 map[int64]int16
  858. type typMapMapInt64Int32 map[int64]int32
  859. type typMapMapInt64Int64 map[int64]int64
  860. type typMapMapInt64Float32 map[int64]float32
  861. type typMapMapInt64Float64 map[int64]float64
  862. type typMapMapInt64Bool map[int64]bool
  863. type typMapMapBoolIntf map[bool]interface{}
  864. type typMapMapBoolString map[bool]string
  865. type typMapMapBoolUint map[bool]uint
  866. type typMapMapBoolUint8 map[bool]uint8
  867. type typMapMapBoolUint16 map[bool]uint16
  868. type typMapMapBoolUint32 map[bool]uint32
  869. type typMapMapBoolUint64 map[bool]uint64
  870. type typMapMapBoolUintptr map[bool]uintptr
  871. type typMapMapBoolInt map[bool]int
  872. type typMapMapBoolInt8 map[bool]int8
  873. type typMapMapBoolInt16 map[bool]int16
  874. type typMapMapBoolInt32 map[bool]int32
  875. type typMapMapBoolInt64 map[bool]int64
  876. type typMapMapBoolFloat32 map[bool]float32
  877. type typMapMapBoolFloat64 map[bool]float64
  878. type typMapMapBoolBool map[bool]bool
  879. func doTestMammothSlices(t *testing.T, h Handle) {
  880. var v1va [8]interface{}
  881. for _, v := range [][]interface{}{nil, {}, {"string-is-an-interface-2", nil, nil, "string-is-an-interface"}} {
  882. var v1v1, v1v2 []interface{}
  883. v1v1 = v
  884. bs1 := testMarshalErr(v1v1, h, t, "enc-slice-v1")
  885. if v == nil {
  886. v1v2 = nil
  887. } else {
  888. v1v2 = make([]interface{}, len(v))
  889. }
  890. testUnmarshalErr(v1v2, bs1, h, t, "dec-slice-v1")
  891. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1")
  892. if v == nil {
  893. v1v2 = nil
  894. } else {
  895. v1v2 = make([]interface{}, len(v))
  896. }
  897. testUnmarshalErr(reflect.ValueOf(v1v2), bs1, h, t, "dec-slice-v1-noaddr") // non-addressable value
  898. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-noaddr")
  899. // ...
  900. bs1 = testMarshalErr(&v1v1, h, t, "enc-slice-v1-p")
  901. v1v2 = nil
  902. testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p")
  903. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p")
  904. v1va = [8]interface{}{} // clear the array
  905. v1v2 = v1va[:1:1]
  906. testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-1")
  907. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-1")
  908. v1va = [8]interface{}{} // clear the array
  909. v1v2 = v1va[:len(v1v1):len(v1v1)]
  910. testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-len")
  911. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-len")
  912. v1va = [8]interface{}{} // clear the array
  913. v1v2 = v1va[:]
  914. testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-cap")
  915. testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-cap")
  916. if len(v1v1) > 1 {
  917. v1va = [8]interface{}{} // clear the array
  918. testUnmarshalErr((&v1va)[:len(v1v1)], bs1, h, t, "dec-slice-v1-p-len-noaddr")
  919. testDeepEqualErr(v1v1, v1va[:len(v1v1)], t, "equal-slice-v1-p-len-noaddr")
  920. v1va = [8]interface{}{} // clear the array
  921. testUnmarshalErr((&v1va)[:], bs1, h, t, "dec-slice-v1-p-cap-noaddr")
  922. testDeepEqualErr(v1v1, v1va[:len(v1v1)], t, "equal-slice-v1-p-cap-noaddr")
  923. }
  924. // ...
  925. var v1v3, v1v4 typMbsSliceIntf
  926. v1v2 = nil
  927. if v != nil {
  928. v1v2 = make([]interface{}, len(v))
  929. }
  930. v1v3 = typMbsSliceIntf(v1v1)
  931. v1v4 = typMbsSliceIntf(v1v2)
  932. bs1 = testMarshalErr(v1v3, h, t, "enc-slice-v1-custom")
  933. testUnmarshalErr(v1v4, bs1, h, t, "dec-slice-v1-custom")
  934. testDeepEqualErr(v1v3, v1v4, t, "equal-slice-v1-custom")
  935. bs1 = testMarshalErr(&v1v3, h, t, "enc-slice-v1-custom-p")
  936. v1v2 = nil
  937. v1v4 = typMbsSliceIntf(v1v2)
  938. testUnmarshalErr(&v1v4, bs1, h, t, "dec-slice-v1-custom-p")
  939. testDeepEqualErr(v1v3, v1v4, t, "equal-slice-v1-custom-p")
  940. }
  941. var v19va [8]string
  942. for _, v := range [][]string{nil, {}, {"some-string-2", "", "", "some-string"}} {
  943. var v19v1, v19v2 []string
  944. v19v1 = v
  945. bs19 := testMarshalErr(v19v1, h, t, "enc-slice-v19")
  946. if v == nil {
  947. v19v2 = nil
  948. } else {
  949. v19v2 = make([]string, len(v))
  950. }
  951. testUnmarshalErr(v19v2, bs19, h, t, "dec-slice-v19")
  952. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19")
  953. if v == nil {
  954. v19v2 = nil
  955. } else {
  956. v19v2 = make([]string, len(v))
  957. }
  958. testUnmarshalErr(reflect.ValueOf(v19v2), bs19, h, t, "dec-slice-v19-noaddr") // non-addressable value
  959. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-noaddr")
  960. // ...
  961. bs19 = testMarshalErr(&v19v1, h, t, "enc-slice-v19-p")
  962. v19v2 = nil
  963. testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p")
  964. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p")
  965. v19va = [8]string{} // clear the array
  966. v19v2 = v19va[:1:1]
  967. testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-1")
  968. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-1")
  969. v19va = [8]string{} // clear the array
  970. v19v2 = v19va[:len(v19v1):len(v19v1)]
  971. testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-len")
  972. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-len")
  973. v19va = [8]string{} // clear the array
  974. v19v2 = v19va[:]
  975. testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-cap")
  976. testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-cap")
  977. if len(v19v1) > 1 {
  978. v19va = [8]string{} // clear the array
  979. testUnmarshalErr((&v19va)[:len(v19v1)], bs19, h, t, "dec-slice-v19-p-len-noaddr")
  980. testDeepEqualErr(v19v1, v19va[:len(v19v1)], t, "equal-slice-v19-p-len-noaddr")
  981. v19va = [8]string{} // clear the array
  982. testUnmarshalErr((&v19va)[:], bs19, h, t, "dec-slice-v19-p-cap-noaddr")
  983. testDeepEqualErr(v19v1, v19va[:len(v19v1)], t, "equal-slice-v19-p-cap-noaddr")
  984. }
  985. // ...
  986. var v19v3, v19v4 typMbsSliceString
  987. v19v2 = nil
  988. if v != nil {
  989. v19v2 = make([]string, len(v))
  990. }
  991. v19v3 = typMbsSliceString(v19v1)
  992. v19v4 = typMbsSliceString(v19v2)
  993. bs19 = testMarshalErr(v19v3, h, t, "enc-slice-v19-custom")
  994. testUnmarshalErr(v19v4, bs19, h, t, "dec-slice-v19-custom")
  995. testDeepEqualErr(v19v3, v19v4, t, "equal-slice-v19-custom")
  996. bs19 = testMarshalErr(&v19v3, h, t, "enc-slice-v19-custom-p")
  997. v19v2 = nil
  998. v19v4 = typMbsSliceString(v19v2)
  999. testUnmarshalErr(&v19v4, bs19, h, t, "dec-slice-v19-custom-p")
  1000. testDeepEqualErr(v19v3, v19v4, t, "equal-slice-v19-custom-p")
  1001. }
  1002. var v37va [8]float32
  1003. for _, v := range [][]float32{nil, {}, {22.2, 0, 0, 11.1}} {
  1004. var v37v1, v37v2 []float32
  1005. v37v1 = v
  1006. bs37 := testMarshalErr(v37v1, h, t, "enc-slice-v37")
  1007. if v == nil {
  1008. v37v2 = nil
  1009. } else {
  1010. v37v2 = make([]float32, len(v))
  1011. }
  1012. testUnmarshalErr(v37v2, bs37, h, t, "dec-slice-v37")
  1013. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37")
  1014. if v == nil {
  1015. v37v2 = nil
  1016. } else {
  1017. v37v2 = make([]float32, len(v))
  1018. }
  1019. testUnmarshalErr(reflect.ValueOf(v37v2), bs37, h, t, "dec-slice-v37-noaddr") // non-addressable value
  1020. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-noaddr")
  1021. // ...
  1022. bs37 = testMarshalErr(&v37v1, h, t, "enc-slice-v37-p")
  1023. v37v2 = nil
  1024. testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p")
  1025. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p")
  1026. v37va = [8]float32{} // clear the array
  1027. v37v2 = v37va[:1:1]
  1028. testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-1")
  1029. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-1")
  1030. v37va = [8]float32{} // clear the array
  1031. v37v2 = v37va[:len(v37v1):len(v37v1)]
  1032. testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-len")
  1033. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-len")
  1034. v37va = [8]float32{} // clear the array
  1035. v37v2 = v37va[:]
  1036. testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-cap")
  1037. testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-cap")
  1038. if len(v37v1) > 1 {
  1039. v37va = [8]float32{} // clear the array
  1040. testUnmarshalErr((&v37va)[:len(v37v1)], bs37, h, t, "dec-slice-v37-p-len-noaddr")
  1041. testDeepEqualErr(v37v1, v37va[:len(v37v1)], t, "equal-slice-v37-p-len-noaddr")
  1042. v37va = [8]float32{} // clear the array
  1043. testUnmarshalErr((&v37va)[:], bs37, h, t, "dec-slice-v37-p-cap-noaddr")
  1044. testDeepEqualErr(v37v1, v37va[:len(v37v1)], t, "equal-slice-v37-p-cap-noaddr")
  1045. }
  1046. // ...
  1047. var v37v3, v37v4 typMbsSliceFloat32
  1048. v37v2 = nil
  1049. if v != nil {
  1050. v37v2 = make([]float32, len(v))
  1051. }
  1052. v37v3 = typMbsSliceFloat32(v37v1)
  1053. v37v4 = typMbsSliceFloat32(v37v2)
  1054. bs37 = testMarshalErr(v37v3, h, t, "enc-slice-v37-custom")
  1055. testUnmarshalErr(v37v4, bs37, h, t, "dec-slice-v37-custom")
  1056. testDeepEqualErr(v37v3, v37v4, t, "equal-slice-v37-custom")
  1057. bs37 = testMarshalErr(&v37v3, h, t, "enc-slice-v37-custom-p")
  1058. v37v2 = nil
  1059. v37v4 = typMbsSliceFloat32(v37v2)
  1060. testUnmarshalErr(&v37v4, bs37, h, t, "dec-slice-v37-custom-p")
  1061. testDeepEqualErr(v37v3, v37v4, t, "equal-slice-v37-custom-p")
  1062. }
  1063. var v55va [8]float64
  1064. for _, v := range [][]float64{nil, {}, {22.2, 0, 0, 11.1}} {
  1065. var v55v1, v55v2 []float64
  1066. v55v1 = v
  1067. bs55 := testMarshalErr(v55v1, h, t, "enc-slice-v55")
  1068. if v == nil {
  1069. v55v2 = nil
  1070. } else {
  1071. v55v2 = make([]float64, len(v))
  1072. }
  1073. testUnmarshalErr(v55v2, bs55, h, t, "dec-slice-v55")
  1074. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55")
  1075. if v == nil {
  1076. v55v2 = nil
  1077. } else {
  1078. v55v2 = make([]float64, len(v))
  1079. }
  1080. testUnmarshalErr(reflect.ValueOf(v55v2), bs55, h, t, "dec-slice-v55-noaddr") // non-addressable value
  1081. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-noaddr")
  1082. // ...
  1083. bs55 = testMarshalErr(&v55v1, h, t, "enc-slice-v55-p")
  1084. v55v2 = nil
  1085. testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p")
  1086. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p")
  1087. v55va = [8]float64{} // clear the array
  1088. v55v2 = v55va[:1:1]
  1089. testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-1")
  1090. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-1")
  1091. v55va = [8]float64{} // clear the array
  1092. v55v2 = v55va[:len(v55v1):len(v55v1)]
  1093. testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-len")
  1094. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-len")
  1095. v55va = [8]float64{} // clear the array
  1096. v55v2 = v55va[:]
  1097. testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-cap")
  1098. testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-cap")
  1099. if len(v55v1) > 1 {
  1100. v55va = [8]float64{} // clear the array
  1101. testUnmarshalErr((&v55va)[:len(v55v1)], bs55, h, t, "dec-slice-v55-p-len-noaddr")
  1102. testDeepEqualErr(v55v1, v55va[:len(v55v1)], t, "equal-slice-v55-p-len-noaddr")
  1103. v55va = [8]float64{} // clear the array
  1104. testUnmarshalErr((&v55va)[:], bs55, h, t, "dec-slice-v55-p-cap-noaddr")
  1105. testDeepEqualErr(v55v1, v55va[:len(v55v1)], t, "equal-slice-v55-p-cap-noaddr")
  1106. }
  1107. // ...
  1108. var v55v3, v55v4 typMbsSliceFloat64
  1109. v55v2 = nil
  1110. if v != nil {
  1111. v55v2 = make([]float64, len(v))
  1112. }
  1113. v55v3 = typMbsSliceFloat64(v55v1)
  1114. v55v4 = typMbsSliceFloat64(v55v2)
  1115. bs55 = testMarshalErr(v55v3, h, t, "enc-slice-v55-custom")
  1116. testUnmarshalErr(v55v4, bs55, h, t, "dec-slice-v55-custom")
  1117. testDeepEqualErr(v55v3, v55v4, t, "equal-slice-v55-custom")
  1118. bs55 = testMarshalErr(&v55v3, h, t, "enc-slice-v55-custom-p")
  1119. v55v2 = nil
  1120. v55v4 = typMbsSliceFloat64(v55v2)
  1121. testUnmarshalErr(&v55v4, bs55, h, t, "dec-slice-v55-custom-p")
  1122. testDeepEqualErr(v55v3, v55v4, t, "equal-slice-v55-custom-p")
  1123. }
  1124. var v73va [8]uint
  1125. for _, v := range [][]uint{nil, {}, {44, 0, 0, 33}} {
  1126. var v73v1, v73v2 []uint
  1127. v73v1 = v
  1128. bs73 := testMarshalErr(v73v1, h, t, "enc-slice-v73")
  1129. if v == nil {
  1130. v73v2 = nil
  1131. } else {
  1132. v73v2 = make([]uint, len(v))
  1133. }
  1134. testUnmarshalErr(v73v2, bs73, h, t, "dec-slice-v73")
  1135. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73")
  1136. if v == nil {
  1137. v73v2 = nil
  1138. } else {
  1139. v73v2 = make([]uint, len(v))
  1140. }
  1141. testUnmarshalErr(reflect.ValueOf(v73v2), bs73, h, t, "dec-slice-v73-noaddr") // non-addressable value
  1142. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-noaddr")
  1143. // ...
  1144. bs73 = testMarshalErr(&v73v1, h, t, "enc-slice-v73-p")
  1145. v73v2 = nil
  1146. testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p")
  1147. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p")
  1148. v73va = [8]uint{} // clear the array
  1149. v73v2 = v73va[:1:1]
  1150. testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-1")
  1151. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-1")
  1152. v73va = [8]uint{} // clear the array
  1153. v73v2 = v73va[:len(v73v1):len(v73v1)]
  1154. testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-len")
  1155. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-len")
  1156. v73va = [8]uint{} // clear the array
  1157. v73v2 = v73va[:]
  1158. testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-cap")
  1159. testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-cap")
  1160. if len(v73v1) > 1 {
  1161. v73va = [8]uint{} // clear the array
  1162. testUnmarshalErr((&v73va)[:len(v73v1)], bs73, h, t, "dec-slice-v73-p-len-noaddr")
  1163. testDeepEqualErr(v73v1, v73va[:len(v73v1)], t, "equal-slice-v73-p-len-noaddr")
  1164. v73va = [8]uint{} // clear the array
  1165. testUnmarshalErr((&v73va)[:], bs73, h, t, "dec-slice-v73-p-cap-noaddr")
  1166. testDeepEqualErr(v73v1, v73va[:len(v73v1)], t, "equal-slice-v73-p-cap-noaddr")
  1167. }
  1168. // ...
  1169. var v73v3, v73v4 typMbsSliceUint
  1170. v73v2 = nil
  1171. if v != nil {
  1172. v73v2 = make([]uint, len(v))
  1173. }
  1174. v73v3 = typMbsSliceUint(v73v1)
  1175. v73v4 = typMbsSliceUint(v73v2)
  1176. bs73 = testMarshalErr(v73v3, h, t, "enc-slice-v73-custom")
  1177. testUnmarshalErr(v73v4, bs73, h, t, "dec-slice-v73-custom")
  1178. testDeepEqualErr(v73v3, v73v4, t, "equal-slice-v73-custom")
  1179. bs73 = testMarshalErr(&v73v3, h, t, "enc-slice-v73-custom-p")
  1180. v73v2 = nil
  1181. v73v4 = typMbsSliceUint(v73v2)
  1182. testUnmarshalErr(&v73v4, bs73, h, t, "dec-slice-v73-custom-p")
  1183. testDeepEqualErr(v73v3, v73v4, t, "equal-slice-v73-custom-p")
  1184. }
  1185. var v91va [8]uint8
  1186. for _, v := range [][]uint8{nil, {}, {44, 0, 0, 33}} {
  1187. var v91v1, v91v2 []uint8
  1188. v91v1 = v
  1189. bs91 := testMarshalErr(v91v1, h, t, "enc-slice-v91")
  1190. if v == nil {
  1191. v91v2 = nil
  1192. } else {
  1193. v91v2 = make([]uint8, len(v))
  1194. }
  1195. testUnmarshalErr(v91v2, bs91, h, t, "dec-slice-v91")
  1196. testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91")
  1197. if v == nil {
  1198. v91v2 = nil
  1199. } else {
  1200. v91v2 = make([]uint8, len(v))
  1201. }
  1202. testUnmarshalErr(reflect.ValueOf(v91v2), bs91, h, t, "dec-slice-v91-noaddr") // non-addressable value
  1203. testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-noaddr")
  1204. // ...
  1205. bs91 = testMarshalErr(&v91v1, h, t, "enc-slice-v91-p")
  1206. v91v2 = nil
  1207. testUnmarshalErr(&v91v2, bs91, h, t, "dec-slice-v91-p")
  1208. testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-p")
  1209. v91va = [8]uint8{} // clear the array
  1210. v91v2 = v91va[:1:1]
  1211. testUnmarshalErr(&v91v2, bs91, h, t, "dec-slice-v91-p-1")
  1212. testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-p-1")
  1213. v91va = [8]uint8{} // clear the array
  1214. v91v2 = v91va[:len(v91v1):len(v91v1)]
  1215. testUnmarshalErr(&v91v2, bs91, h, t, "dec-slice-v91-p-len")
  1216. testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-p-len")
  1217. v91va = [8]uint8{} // clear the array
  1218. v91v2 = v91va[:]
  1219. testUnmarshalErr(&v91v2, bs91, h, t, "dec-slice-v91-p-cap")
  1220. testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-p-cap")
  1221. if len(v91v1) > 1 {
  1222. v91va = [8]uint8{} // clear the array
  1223. testUnmarshalErr((&v91va)[:len(v91v1)], bs91, h, t, "dec-slice-v91-p-len-noaddr")
  1224. testDeepEqualErr(v91v1, v91va[:len(v91v1)], t, "equal-slice-v91-p-len-noaddr")
  1225. v91va = [8]uint8{} // clear the array
  1226. testUnmarshalErr((&v91va)[:], bs91, h, t, "dec-slice-v91-p-cap-noaddr")
  1227. testDeepEqualErr(v91v1, v91va[:len(v91v1)], t, "equal-slice-v91-p-cap-noaddr")
  1228. }
  1229. // ...
  1230. var v91v3, v91v4 typMbsSliceUint8
  1231. v91v2 = nil
  1232. if v != nil {
  1233. v91v2 = make([]uint8, len(v))
  1234. }
  1235. v91v3 = typMbsSliceUint8(v91v1)
  1236. v91v4 = typMbsSliceUint8(v91v2)
  1237. bs91 = testMarshalErr(v91v3, h, t, "enc-slice-v91-custom")
  1238. testUnmarshalErr(v91v4, bs91, h, t, "dec-slice-v91-custom")
  1239. testDeepEqualErr(v91v3, v91v4, t, "equal-slice-v91-custom")
  1240. bs91 = testMarshalErr(&v91v3, h, t, "enc-slice-v91-custom-p")
  1241. v91v2 = nil
  1242. v91v4 = typMbsSliceUint8(v91v2)
  1243. testUnmarshalErr(&v91v4, bs91, h, t, "dec-slice-v91-custom-p")
  1244. testDeepEqualErr(v91v3, v91v4, t, "equal-slice-v91-custom-p")
  1245. }
  1246. var v109va [8]uint16
  1247. for _, v := range [][]uint16{nil, {}, {44, 0, 0, 33}} {
  1248. var v109v1, v109v2 []uint16
  1249. v109v1 = v
  1250. bs109 := testMarshalErr(v109v1, h, t, "enc-slice-v109")
  1251. if v == nil {
  1252. v109v2 = nil
  1253. } else {
  1254. v109v2 = make([]uint16, len(v))
  1255. }
  1256. testUnmarshalErr(v109v2, bs109, h, t, "dec-slice-v109")
  1257. testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109")
  1258. if v == nil {
  1259. v109v2 = nil
  1260. } else {
  1261. v109v2 = make([]uint16, len(v))
  1262. }
  1263. testUnmarshalErr(reflect.ValueOf(v109v2), bs109, h, t, "dec-slice-v109-noaddr") // non-addressable value
  1264. testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-noaddr")
  1265. // ...
  1266. bs109 = testMarshalErr(&v109v1, h, t, "enc-slice-v109-p")
  1267. v109v2 = nil
  1268. testUnmarshalErr(&v109v2, bs109, h, t, "dec-slice-v109-p")
  1269. testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-p")
  1270. v109va = [8]uint16{} // clear the array
  1271. v109v2 = v109va[:1:1]
  1272. testUnmarshalErr(&v109v2, bs109, h, t, "dec-slice-v109-p-1")
  1273. testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-p-1")
  1274. v109va = [8]uint16{} // clear the array
  1275. v109v2 = v109va[:len(v109v1):len(v109v1)]
  1276. testUnmarshalErr(&v109v2, bs109, h, t, "dec-slice-v109-p-len")
  1277. testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-p-len")
  1278. v109va = [8]uint16{} // clear the array
  1279. v109v2 = v109va[:]
  1280. testUnmarshalErr(&v109v2, bs109, h, t, "dec-slice-v109-p-cap")
  1281. testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-p-cap")
  1282. if len(v109v1) > 1 {
  1283. v109va = [8]uint16{} // clear the array
  1284. testUnmarshalErr((&v109va)[:len(v109v1)], bs109, h, t, "dec-slice-v109-p-len-noaddr")
  1285. testDeepEqualErr(v109v1, v109va[:len(v109v1)], t, "equal-slice-v109-p-len-noaddr")
  1286. v109va = [8]uint16{} // clear the array
  1287. testUnmarshalErr((&v109va)[:], bs109, h, t, "dec-slice-v109-p-cap-noaddr")
  1288. testDeepEqualErr(v109v1, v109va[:len(v109v1)], t, "equal-slice-v109-p-cap-noaddr")
  1289. }
  1290. // ...
  1291. var v109v3, v109v4 typMbsSliceUint16
  1292. v109v2 = nil
  1293. if v != nil {
  1294. v109v2 = make([]uint16, len(v))
  1295. }
  1296. v109v3 = typMbsSliceUint16(v109v1)
  1297. v109v4 = typMbsSliceUint16(v109v2)
  1298. bs109 = testMarshalErr(v109v3, h, t, "enc-slice-v109-custom")
  1299. testUnmarshalErr(v109v4, bs109, h, t, "dec-slice-v109-custom")
  1300. testDeepEqualErr(v109v3, v109v4, t, "equal-slice-v109-custom")
  1301. bs109 = testMarshalErr(&v109v3, h, t, "enc-slice-v109-custom-p")
  1302. v109v2 = nil
  1303. v109v4 = typMbsSliceUint16(v109v2)
  1304. testUnmarshalErr(&v109v4, bs109, h, t, "dec-slice-v109-custom-p")
  1305. testDeepEqualErr(v109v3, v109v4, t, "equal-slice-v109-custom-p")
  1306. }
  1307. var v127va [8]uint32
  1308. for _, v := range [][]uint32{nil, {}, {44, 0, 0, 33}} {
  1309. var v127v1, v127v2 []uint32
  1310. v127v1 = v
  1311. bs127 := testMarshalErr(v127v1, h, t, "enc-slice-v127")
  1312. if v == nil {
  1313. v127v2 = nil
  1314. } else {
  1315. v127v2 = make([]uint32, len(v))
  1316. }
  1317. testUnmarshalErr(v127v2, bs127, h, t, "dec-slice-v127")
  1318. testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127")
  1319. if v == nil {
  1320. v127v2 = nil
  1321. } else {
  1322. v127v2 = make([]uint32, len(v))
  1323. }
  1324. testUnmarshalErr(reflect.ValueOf(v127v2), bs127, h, t, "dec-slice-v127-noaddr") // non-addressable value
  1325. testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-noaddr")
  1326. // ...
  1327. bs127 = testMarshalErr(&v127v1, h, t, "enc-slice-v127-p")
  1328. v127v2 = nil
  1329. testUnmarshalErr(&v127v2, bs127, h, t, "dec-slice-v127-p")
  1330. testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-p")
  1331. v127va = [8]uint32{} // clear the array
  1332. v127v2 = v127va[:1:1]
  1333. testUnmarshalErr(&v127v2, bs127, h, t, "dec-slice-v127-p-1")
  1334. testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-p-1")
  1335. v127va = [8]uint32{} // clear the array
  1336. v127v2 = v127va[:len(v127v1):len(v127v1)]
  1337. testUnmarshalErr(&v127v2, bs127, h, t, "dec-slice-v127-p-len")
  1338. testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-p-len")
  1339. v127va = [8]uint32{} // clear the array
  1340. v127v2 = v127va[:]
  1341. testUnmarshalErr(&v127v2, bs127, h, t, "dec-slice-v127-p-cap")
  1342. testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-p-cap")
  1343. if len(v127v1) > 1 {
  1344. v127va = [8]uint32{} // clear the array
  1345. testUnmarshalErr((&v127va)[:len(v127v1)], bs127, h, t, "dec-slice-v127-p-len-noaddr")
  1346. testDeepEqualErr(v127v1, v127va[:len(v127v1)], t, "equal-slice-v127-p-len-noaddr")
  1347. v127va = [8]uint32{} // clear the array
  1348. testUnmarshalErr((&v127va)[:], bs127, h, t, "dec-slice-v127-p-cap-noaddr")
  1349. testDeepEqualErr(v127v1, v127va[:len(v127v1)], t, "equal-slice-v127-p-cap-noaddr")
  1350. }
  1351. // ...
  1352. var v127v3, v127v4 typMbsSliceUint32
  1353. v127v2 = nil
  1354. if v != nil {
  1355. v127v2 = make([]uint32, len(v))
  1356. }
  1357. v127v3 = typMbsSliceUint32(v127v1)
  1358. v127v4 = typMbsSliceUint32(v127v2)
  1359. bs127 = testMarshalErr(v127v3, h, t, "enc-slice-v127-custom")
  1360. testUnmarshalErr(v127v4, bs127, h, t, "dec-slice-v127-custom")
  1361. testDeepEqualErr(v127v3, v127v4, t, "equal-slice-v127-custom")
  1362. bs127 = testMarshalErr(&v127v3, h, t, "enc-slice-v127-custom-p")
  1363. v127v2 = nil
  1364. v127v4 = typMbsSliceUint32(v127v2)
  1365. testUnmarshalErr(&v127v4, bs127, h, t, "dec-slice-v127-custom-p")
  1366. testDeepEqualErr(v127v3, v127v4, t, "equal-slice-v127-custom-p")
  1367. }
  1368. var v145va [8]uint64
  1369. for _, v := range [][]uint64{nil, {}, {44, 0, 0, 33}} {
  1370. var v145v1, v145v2 []uint64
  1371. v145v1 = v
  1372. bs145 := testMarshalErr(v145v1, h, t, "enc-slice-v145")
  1373. if v == nil {
  1374. v145v2 = nil
  1375. } else {
  1376. v145v2 = make([]uint64, len(v))
  1377. }
  1378. testUnmarshalErr(v145v2, bs145, h, t, "dec-slice-v145")
  1379. testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145")
  1380. if v == nil {
  1381. v145v2 = nil
  1382. } else {
  1383. v145v2 = make([]uint64, len(v))
  1384. }
  1385. testUnmarshalErr(reflect.ValueOf(v145v2), bs145, h, t, "dec-slice-v145-noaddr") // non-addressable value
  1386. testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-noaddr")
  1387. // ...
  1388. bs145 = testMarshalErr(&v145v1, h, t, "enc-slice-v145-p")
  1389. v145v2 = nil
  1390. testUnmarshalErr(&v145v2, bs145, h, t, "dec-slice-v145-p")
  1391. testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-p")
  1392. v145va = [8]uint64{} // clear the array
  1393. v145v2 = v145va[:1:1]
  1394. testUnmarshalErr(&v145v2, bs145, h, t, "dec-slice-v145-p-1")
  1395. testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-p-1")
  1396. v145va = [8]uint64{} // clear the array
  1397. v145v2 = v145va[:len(v145v1):len(v145v1)]
  1398. testUnmarshalErr(&v145v2, bs145, h, t, "dec-slice-v145-p-len")
  1399. testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-p-len")
  1400. v145va = [8]uint64{} // clear the array
  1401. v145v2 = v145va[:]
  1402. testUnmarshalErr(&v145v2, bs145, h, t, "dec-slice-v145-p-cap")
  1403. testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-p-cap")
  1404. if len(v145v1) > 1 {
  1405. v145va = [8]uint64{} // clear the array
  1406. testUnmarshalErr((&v145va)[:len(v145v1)], bs145, h, t, "dec-slice-v145-p-len-noaddr")
  1407. testDeepEqualErr(v145v1, v145va[:len(v145v1)], t, "equal-slice-v145-p-len-noaddr")
  1408. v145va = [8]uint64{} // clear the array
  1409. testUnmarshalErr((&v145va)[:], bs145, h, t, "dec-slice-v145-p-cap-noaddr")
  1410. testDeepEqualErr(v145v1, v145va[:len(v145v1)], t, "equal-slice-v145-p-cap-noaddr")
  1411. }
  1412. // ...
  1413. var v145v3, v145v4 typMbsSliceUint64
  1414. v145v2 = nil
  1415. if v != nil {
  1416. v145v2 = make([]uint64, len(v))
  1417. }
  1418. v145v3 = typMbsSliceUint64(v145v1)
  1419. v145v4 = typMbsSliceUint64(v145v2)
  1420. bs145 = testMarshalErr(v145v3, h, t, "enc-slice-v145-custom")
  1421. testUnmarshalErr(v145v4, bs145, h, t, "dec-slice-v145-custom")
  1422. testDeepEqualErr(v145v3, v145v4, t, "equal-slice-v145-custom")
  1423. bs145 = testMarshalErr(&v145v3, h, t, "enc-slice-v145-custom-p")
  1424. v145v2 = nil
  1425. v145v4 = typMbsSliceUint64(v145v2)
  1426. testUnmarshalErr(&v145v4, bs145, h, t, "dec-slice-v145-custom-p")
  1427. testDeepEqualErr(v145v3, v145v4, t, "equal-slice-v145-custom-p")
  1428. }
  1429. var v163va [8]uintptr
  1430. for _, v := range [][]uintptr{nil, {}, {44, 0, 0, 33}} {
  1431. var v163v1, v163v2 []uintptr
  1432. v163v1 = v
  1433. bs163 := testMarshalErr(v163v1, h, t, "enc-slice-v163")
  1434. if v == nil {
  1435. v163v2 = nil
  1436. } else {
  1437. v163v2 = make([]uintptr, len(v))
  1438. }
  1439. testUnmarshalErr(v163v2, bs163, h, t, "dec-slice-v163")
  1440. testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163")
  1441. if v == nil {
  1442. v163v2 = nil
  1443. } else {
  1444. v163v2 = make([]uintptr, len(v))
  1445. }
  1446. testUnmarshalErr(reflect.ValueOf(v163v2), bs163, h, t, "dec-slice-v163-noaddr") // non-addressable value
  1447. testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-noaddr")
  1448. // ...
  1449. bs163 = testMarshalErr(&v163v1, h, t, "enc-slice-v163-p")
  1450. v163v2 = nil
  1451. testUnmarshalErr(&v163v2, bs163, h, t, "dec-slice-v163-p")
  1452. testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-p")
  1453. v163va = [8]uintptr{} // clear the array
  1454. v163v2 = v163va[:1:1]
  1455. testUnmarshalErr(&v163v2, bs163, h, t, "dec-slice-v163-p-1")
  1456. testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-p-1")
  1457. v163va = [8]uintptr{} // clear the array
  1458. v163v2 = v163va[:len(v163v1):len(v163v1)]
  1459. testUnmarshalErr(&v163v2, bs163, h, t, "dec-slice-v163-p-len")
  1460. testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-p-len")
  1461. v163va = [8]uintptr{} // clear the array
  1462. v163v2 = v163va[:]
  1463. testUnmarshalErr(&v163v2, bs163, h, t, "dec-slice-v163-p-cap")
  1464. testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-p-cap")
  1465. if len(v163v1) > 1 {
  1466. v163va = [8]uintptr{} // clear the array
  1467. testUnmarshalErr((&v163va)[:len(v163v1)], bs163, h, t, "dec-slice-v163-p-len-noaddr")
  1468. testDeepEqualErr(v163v1, v163va[:len(v163v1)], t, "equal-slice-v163-p-len-noaddr")
  1469. v163va = [8]uintptr{} // clear the array
  1470. testUnmarshalErr((&v163va)[:], bs163, h, t, "dec-slice-v163-p-cap-noaddr")
  1471. testDeepEqualErr(v163v1, v163va[:len(v163v1)], t, "equal-slice-v163-p-cap-noaddr")
  1472. }
  1473. // ...
  1474. var v163v3, v163v4 typMbsSliceUintptr
  1475. v163v2 = nil
  1476. if v != nil {
  1477. v163v2 = make([]uintptr, len(v))
  1478. }
  1479. v163v3 = typMbsSliceUintptr(v163v1)
  1480. v163v4 = typMbsSliceUintptr(v163v2)
  1481. bs163 = testMarshalErr(v163v3, h, t, "enc-slice-v163-custom")
  1482. testUnmarshalErr(v163v4, bs163, h, t, "dec-slice-v163-custom")
  1483. testDeepEqualErr(v163v3, v163v4, t, "equal-slice-v163-custom")
  1484. bs163 = testMarshalErr(&v163v3, h, t, "enc-slice-v163-custom-p")
  1485. v163v2 = nil
  1486. v163v4 = typMbsSliceUintptr(v163v2)
  1487. testUnmarshalErr(&v163v4, bs163, h, t, "dec-slice-v163-custom-p")
  1488. testDeepEqualErr(v163v3, v163v4, t, "equal-slice-v163-custom-p")
  1489. }
  1490. var v181va [8]int
  1491. for _, v := range [][]int{nil, {}, {44, 0, 0, 33}} {
  1492. var v181v1, v181v2 []int
  1493. v181v1 = v
  1494. bs181 := testMarshalErr(v181v1, h, t, "enc-slice-v181")
  1495. if v == nil {
  1496. v181v2 = nil
  1497. } else {
  1498. v181v2 = make([]int, len(v))
  1499. }
  1500. testUnmarshalErr(v181v2, bs181, h, t, "dec-slice-v181")
  1501. testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181")
  1502. if v == nil {
  1503. v181v2 = nil
  1504. } else {
  1505. v181v2 = make([]int, len(v))
  1506. }
  1507. testUnmarshalErr(reflect.ValueOf(v181v2), bs181, h, t, "dec-slice-v181-noaddr") // non-addressable value
  1508. testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-noaddr")
  1509. // ...
  1510. bs181 = testMarshalErr(&v181v1, h, t, "enc-slice-v181-p")
  1511. v181v2 = nil
  1512. testUnmarshalErr(&v181v2, bs181, h, t, "dec-slice-v181-p")
  1513. testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-p")
  1514. v181va = [8]int{} // clear the array
  1515. v181v2 = v181va[:1:1]
  1516. testUnmarshalErr(&v181v2, bs181, h, t, "dec-slice-v181-p-1")
  1517. testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-p-1")
  1518. v181va = [8]int{} // clear the array
  1519. v181v2 = v181va[:len(v181v1):len(v181v1)]
  1520. testUnmarshalErr(&v181v2, bs181, h, t, "dec-slice-v181-p-len")
  1521. testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-p-len")
  1522. v181va = [8]int{} // clear the array
  1523. v181v2 = v181va[:]
  1524. testUnmarshalErr(&v181v2, bs181, h, t, "dec-slice-v181-p-cap")
  1525. testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-p-cap")
  1526. if len(v181v1) > 1 {
  1527. v181va = [8]int{} // clear the array
  1528. testUnmarshalErr((&v181va)[:len(v181v1)], bs181, h, t, "dec-slice-v181-p-len-noaddr")
  1529. testDeepEqualErr(v181v1, v181va[:len(v181v1)], t, "equal-slice-v181-p-len-noaddr")
  1530. v181va = [8]int{} // clear the array
  1531. testUnmarshalErr((&v181va)[:], bs181, h, t, "dec-slice-v181-p-cap-noaddr")
  1532. testDeepEqualErr(v181v1, v181va[:len(v181v1)], t, "equal-slice-v181-p-cap-noaddr")
  1533. }
  1534. // ...
  1535. var v181v3, v181v4 typMbsSliceInt
  1536. v181v2 = nil
  1537. if v != nil {
  1538. v181v2 = make([]int, len(v))
  1539. }
  1540. v181v3 = typMbsSliceInt(v181v1)
  1541. v181v4 = typMbsSliceInt(v181v2)
  1542. bs181 = testMarshalErr(v181v3, h, t, "enc-slice-v181-custom")
  1543. testUnmarshalErr(v181v4, bs181, h, t, "dec-slice-v181-custom")
  1544. testDeepEqualErr(v181v3, v181v4, t, "equal-slice-v181-custom")
  1545. bs181 = testMarshalErr(&v181v3, h, t, "enc-slice-v181-custom-p")
  1546. v181v2 = nil
  1547. v181v4 = typMbsSliceInt(v181v2)
  1548. testUnmarshalErr(&v181v4, bs181, h, t, "dec-slice-v181-custom-p")
  1549. testDeepEqualErr(v181v3, v181v4, t, "equal-slice-v181-custom-p")
  1550. }
  1551. var v199va [8]int8
  1552. for _, v := range [][]int8{nil, {}, {44, 0, 0, 33}} {
  1553. var v199v1, v199v2 []int8
  1554. v199v1 = v
  1555. bs199 := testMarshalErr(v199v1, h, t, "enc-slice-v199")
  1556. if v == nil {
  1557. v199v2 = nil
  1558. } else {
  1559. v199v2 = make([]int8, len(v))
  1560. }
  1561. testUnmarshalErr(v199v2, bs199, h, t, "dec-slice-v199")
  1562. testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199")
  1563. if v == nil {
  1564. v199v2 = nil
  1565. } else {
  1566. v199v2 = make([]int8, len(v))
  1567. }
  1568. testUnmarshalErr(reflect.ValueOf(v199v2), bs199, h, t, "dec-slice-v199-noaddr") // non-addressable value
  1569. testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-noaddr")
  1570. // ...
  1571. bs199 = testMarshalErr(&v199v1, h, t, "enc-slice-v199-p")
  1572. v199v2 = nil
  1573. testUnmarshalErr(&v199v2, bs199, h, t, "dec-slice-v199-p")
  1574. testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-p")
  1575. v199va = [8]int8{} // clear the array
  1576. v199v2 = v199va[:1:1]
  1577. testUnmarshalErr(&v199v2, bs199, h, t, "dec-slice-v199-p-1")
  1578. testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-p-1")
  1579. v199va = [8]int8{} // clear the array
  1580. v199v2 = v199va[:len(v199v1):len(v199v1)]
  1581. testUnmarshalErr(&v199v2, bs199, h, t, "dec-slice-v199-p-len")
  1582. testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-p-len")
  1583. v199va = [8]int8{} // clear the array
  1584. v199v2 = v199va[:]
  1585. testUnmarshalErr(&v199v2, bs199, h, t, "dec-slice-v199-p-cap")
  1586. testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-p-cap")
  1587. if len(v199v1) > 1 {
  1588. v199va = [8]int8{} // clear the array
  1589. testUnmarshalErr((&v199va)[:len(v199v1)], bs199, h, t, "dec-slice-v199-p-len-noaddr")
  1590. testDeepEqualErr(v199v1, v199va[:len(v199v1)], t, "equal-slice-v199-p-len-noaddr")
  1591. v199va = [8]int8{} // clear the array
  1592. testUnmarshalErr((&v199va)[:], bs199, h, t, "dec-slice-v199-p-cap-noaddr")
  1593. testDeepEqualErr(v199v1, v199va[:len(v199v1)], t, "equal-slice-v199-p-cap-noaddr")
  1594. }
  1595. // ...
  1596. var v199v3, v199v4 typMbsSliceInt8
  1597. v199v2 = nil
  1598. if v != nil {
  1599. v199v2 = make([]int8, len(v))
  1600. }
  1601. v199v3 = typMbsSliceInt8(v199v1)
  1602. v199v4 = typMbsSliceInt8(v199v2)
  1603. bs199 = testMarshalErr(v199v3, h, t, "enc-slice-v199-custom")
  1604. testUnmarshalErr(v199v4, bs199, h, t, "dec-slice-v199-custom")
  1605. testDeepEqualErr(v199v3, v199v4, t, "equal-slice-v199-custom")
  1606. bs199 = testMarshalErr(&v199v3, h, t, "enc-slice-v199-custom-p")
  1607. v199v2 = nil
  1608. v199v4 = typMbsSliceInt8(v199v2)
  1609. testUnmarshalErr(&v199v4, bs199, h, t, "dec-slice-v199-custom-p")
  1610. testDeepEqualErr(v199v3, v199v4, t, "equal-slice-v199-custom-p")
  1611. }
  1612. var v217va [8]int16
  1613. for _, v := range [][]int16{nil, {}, {44, 0, 0, 33}} {
  1614. var v217v1, v217v2 []int16
  1615. v217v1 = v
  1616. bs217 := testMarshalErr(v217v1, h, t, "enc-slice-v217")
  1617. if v == nil {
  1618. v217v2 = nil
  1619. } else {
  1620. v217v2 = make([]int16, len(v))
  1621. }
  1622. testUnmarshalErr(v217v2, bs217, h, t, "dec-slice-v217")
  1623. testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217")
  1624. if v == nil {
  1625. v217v2 = nil
  1626. } else {
  1627. v217v2 = make([]int16, len(v))
  1628. }
  1629. testUnmarshalErr(reflect.ValueOf(v217v2), bs217, h, t, "dec-slice-v217-noaddr") // non-addressable value
  1630. testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-noaddr")
  1631. // ...
  1632. bs217 = testMarshalErr(&v217v1, h, t, "enc-slice-v217-p")
  1633. v217v2 = nil
  1634. testUnmarshalErr(&v217v2, bs217, h, t, "dec-slice-v217-p")
  1635. testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-p")
  1636. v217va = [8]int16{} // clear the array
  1637. v217v2 = v217va[:1:1]
  1638. testUnmarshalErr(&v217v2, bs217, h, t, "dec-slice-v217-p-1")
  1639. testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-p-1")
  1640. v217va = [8]int16{} // clear the array
  1641. v217v2 = v217va[:len(v217v1):len(v217v1)]
  1642. testUnmarshalErr(&v217v2, bs217, h, t, "dec-slice-v217-p-len")
  1643. testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-p-len")
  1644. v217va = [8]int16{} // clear the array
  1645. v217v2 = v217va[:]
  1646. testUnmarshalErr(&v217v2, bs217, h, t, "dec-slice-v217-p-cap")
  1647. testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-p-cap")
  1648. if len(v217v1) > 1 {
  1649. v217va = [8]int16{} // clear the array
  1650. testUnmarshalErr((&v217va)[:len(v217v1)], bs217, h, t, "dec-slice-v217-p-len-noaddr")
  1651. testDeepEqualErr(v217v1, v217va[:len(v217v1)], t, "equal-slice-v217-p-len-noaddr")
  1652. v217va = [8]int16{} // clear the array
  1653. testUnmarshalErr((&v217va)[:], bs217, h, t, "dec-slice-v217-p-cap-noaddr")
  1654. testDeepEqualErr(v217v1, v217va[:len(v217v1)], t, "equal-slice-v217-p-cap-noaddr")
  1655. }
  1656. // ...
  1657. var v217v3, v217v4 typMbsSliceInt16
  1658. v217v2 = nil
  1659. if v != nil {
  1660. v217v2 = make([]int16, len(v))
  1661. }
  1662. v217v3 = typMbsSliceInt16(v217v1)
  1663. v217v4 = typMbsSliceInt16(v217v2)
  1664. bs217 = testMarshalErr(v217v3, h, t, "enc-slice-v217-custom")
  1665. testUnmarshalErr(v217v4, bs217, h, t, "dec-slice-v217-custom")
  1666. testDeepEqualErr(v217v3, v217v4, t, "equal-slice-v217-custom")
  1667. bs217 = testMarshalErr(&v217v3, h, t, "enc-slice-v217-custom-p")
  1668. v217v2 = nil
  1669. v217v4 = typMbsSliceInt16(v217v2)
  1670. testUnmarshalErr(&v217v4, bs217, h, t, "dec-slice-v217-custom-p")
  1671. testDeepEqualErr(v217v3, v217v4, t, "equal-slice-v217-custom-p")
  1672. }
  1673. var v235va [8]int32
  1674. for _, v := range [][]int32{nil, {}, {44, 0, 0, 33}} {
  1675. var v235v1, v235v2 []int32
  1676. v235v1 = v
  1677. bs235 := testMarshalErr(v235v1, h, t, "enc-slice-v235")
  1678. if v == nil {
  1679. v235v2 = nil
  1680. } else {
  1681. v235v2 = make([]int32, len(v))
  1682. }
  1683. testUnmarshalErr(v235v2, bs235, h, t, "dec-slice-v235")
  1684. testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235")
  1685. if v == nil {
  1686. v235v2 = nil
  1687. } else {
  1688. v235v2 = make([]int32, len(v))
  1689. }
  1690. testUnmarshalErr(reflect.ValueOf(v235v2), bs235, h, t, "dec-slice-v235-noaddr") // non-addressable value
  1691. testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-noaddr")
  1692. // ...
  1693. bs235 = testMarshalErr(&v235v1, h, t, "enc-slice-v235-p")
  1694. v235v2 = nil
  1695. testUnmarshalErr(&v235v2, bs235, h, t, "dec-slice-v235-p")
  1696. testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-p")
  1697. v235va = [8]int32{} // clear the array
  1698. v235v2 = v235va[:1:1]
  1699. testUnmarshalErr(&v235v2, bs235, h, t, "dec-slice-v235-p-1")
  1700. testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-p-1")
  1701. v235va = [8]int32{} // clear the array
  1702. v235v2 = v235va[:len(v235v1):len(v235v1)]
  1703. testUnmarshalErr(&v235v2, bs235, h, t, "dec-slice-v235-p-len")
  1704. testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-p-len")
  1705. v235va = [8]int32{} // clear the array
  1706. v235v2 = v235va[:]
  1707. testUnmarshalErr(&v235v2, bs235, h, t, "dec-slice-v235-p-cap")
  1708. testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-p-cap")
  1709. if len(v235v1) > 1 {
  1710. v235va = [8]int32{} // clear the array
  1711. testUnmarshalErr((&v235va)[:len(v235v1)], bs235, h, t, "dec-slice-v235-p-len-noaddr")
  1712. testDeepEqualErr(v235v1, v235va[:len(v235v1)], t, "equal-slice-v235-p-len-noaddr")
  1713. v235va = [8]int32{} // clear the array
  1714. testUnmarshalErr((&v235va)[:], bs235, h, t, "dec-slice-v235-p-cap-noaddr")
  1715. testDeepEqualErr(v235v1, v235va[:len(v235v1)], t, "equal-slice-v235-p-cap-noaddr")
  1716. }
  1717. // ...
  1718. var v235v3, v235v4 typMbsSliceInt32
  1719. v235v2 = nil
  1720. if v != nil {
  1721. v235v2 = make([]int32, len(v))
  1722. }
  1723. v235v3 = typMbsSliceInt32(v235v1)
  1724. v235v4 = typMbsSliceInt32(v235v2)
  1725. bs235 = testMarshalErr(v235v3, h, t, "enc-slice-v235-custom")
  1726. testUnmarshalErr(v235v4, bs235, h, t, "dec-slice-v235-custom")
  1727. testDeepEqualErr(v235v3, v235v4, t, "equal-slice-v235-custom")
  1728. bs235 = testMarshalErr(&v235v3, h, t, "enc-slice-v235-custom-p")
  1729. v235v2 = nil
  1730. v235v4 = typMbsSliceInt32(v235v2)
  1731. testUnmarshalErr(&v235v4, bs235, h, t, "dec-slice-v235-custom-p")
  1732. testDeepEqualErr(v235v3, v235v4, t, "equal-slice-v235-custom-p")
  1733. }
  1734. var v253va [8]int64
  1735. for _, v := range [][]int64{nil, {}, {44, 0, 0, 33}} {
  1736. var v253v1, v253v2 []int64
  1737. v253v1 = v
  1738. bs253 := testMarshalErr(v253v1, h, t, "enc-slice-v253")
  1739. if v == nil {
  1740. v253v2 = nil
  1741. } else {
  1742. v253v2 = make([]int64, len(v))
  1743. }
  1744. testUnmarshalErr(v253v2, bs253, h, t, "dec-slice-v253")
  1745. testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253")
  1746. if v == nil {
  1747. v253v2 = nil
  1748. } else {
  1749. v253v2 = make([]int64, len(v))
  1750. }
  1751. testUnmarshalErr(reflect.ValueOf(v253v2), bs253, h, t, "dec-slice-v253-noaddr") // non-addressable value
  1752. testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-noaddr")
  1753. // ...
  1754. bs253 = testMarshalErr(&v253v1, h, t, "enc-slice-v253-p")
  1755. v253v2 = nil
  1756. testUnmarshalErr(&v253v2, bs253, h, t, "dec-slice-v253-p")
  1757. testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-p")
  1758. v253va = [8]int64{} // clear the array
  1759. v253v2 = v253va[:1:1]
  1760. testUnmarshalErr(&v253v2, bs253, h, t, "dec-slice-v253-p-1")
  1761. testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-p-1")
  1762. v253va = [8]int64{} // clear the array
  1763. v253v2 = v253va[:len(v253v1):len(v253v1)]
  1764. testUnmarshalErr(&v253v2, bs253, h, t, "dec-slice-v253-p-len")
  1765. testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-p-len")
  1766. v253va = [8]int64{} // clear the array
  1767. v253v2 = v253va[:]
  1768. testUnmarshalErr(&v253v2, bs253, h, t, "dec-slice-v253-p-cap")
  1769. testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-p-cap")
  1770. if len(v253v1) > 1 {
  1771. v253va = [8]int64{} // clear the array
  1772. testUnmarshalErr((&v253va)[:len(v253v1)], bs253, h, t, "dec-slice-v253-p-len-noaddr")
  1773. testDeepEqualErr(v253v1, v253va[:len(v253v1)], t, "equal-slice-v253-p-len-noaddr")
  1774. v253va = [8]int64{} // clear the array
  1775. testUnmarshalErr((&v253va)[:], bs253, h, t, "dec-slice-v253-p-cap-noaddr")
  1776. testDeepEqualErr(v253v1, v253va[:len(v253v1)], t, "equal-slice-v253-p-cap-noaddr")
  1777. }
  1778. // ...
  1779. var v253v3, v253v4 typMbsSliceInt64
  1780. v253v2 = nil
  1781. if v != nil {
  1782. v253v2 = make([]int64, len(v))
  1783. }
  1784. v253v3 = typMbsSliceInt64(v253v1)
  1785. v253v4 = typMbsSliceInt64(v253v2)
  1786. bs253 = testMarshalErr(v253v3, h, t, "enc-slice-v253-custom")
  1787. testUnmarshalErr(v253v4, bs253, h, t, "dec-slice-v253-custom")
  1788. testDeepEqualErr(v253v3, v253v4, t, "equal-slice-v253-custom")
  1789. bs253 = testMarshalErr(&v253v3, h, t, "enc-slice-v253-custom-p")
  1790. v253v2 = nil
  1791. v253v4 = typMbsSliceInt64(v253v2)
  1792. testUnmarshalErr(&v253v4, bs253, h, t, "dec-slice-v253-custom-p")
  1793. testDeepEqualErr(v253v3, v253v4, t, "equal-slice-v253-custom-p")
  1794. }
  1795. var v271va [8]bool
  1796. for _, v := range [][]bool{nil, {}, {true, false, false, true}} {
  1797. var v271v1, v271v2 []bool
  1798. v271v1 = v
  1799. bs271 := testMarshalErr(v271v1, h, t, "enc-slice-v271")
  1800. if v == nil {
  1801. v271v2 = nil
  1802. } else {
  1803. v271v2 = make([]bool, len(v))
  1804. }
  1805. testUnmarshalErr(v271v2, bs271, h, t, "dec-slice-v271")
  1806. testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271")
  1807. if v == nil {
  1808. v271v2 = nil
  1809. } else {
  1810. v271v2 = make([]bool, len(v))
  1811. }
  1812. testUnmarshalErr(reflect.ValueOf(v271v2), bs271, h, t, "dec-slice-v271-noaddr") // non-addressable value
  1813. testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-noaddr")
  1814. // ...
  1815. bs271 = testMarshalErr(&v271v1, h, t, "enc-slice-v271-p")
  1816. v271v2 = nil
  1817. testUnmarshalErr(&v271v2, bs271, h, t, "dec-slice-v271-p")
  1818. testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-p")
  1819. v271va = [8]bool{} // clear the array
  1820. v271v2 = v271va[:1:1]
  1821. testUnmarshalErr(&v271v2, bs271, h, t, "dec-slice-v271-p-1")
  1822. testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-p-1")
  1823. v271va = [8]bool{} // clear the array
  1824. v271v2 = v271va[:len(v271v1):len(v271v1)]
  1825. testUnmarshalErr(&v271v2, bs271, h, t, "dec-slice-v271-p-len")
  1826. testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-p-len")
  1827. v271va = [8]bool{} // clear the array
  1828. v271v2 = v271va[:]
  1829. testUnmarshalErr(&v271v2, bs271, h, t, "dec-slice-v271-p-cap")
  1830. testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-p-cap")
  1831. if len(v271v1) > 1 {
  1832. v271va = [8]bool{} // clear the array
  1833. testUnmarshalErr((&v271va)[:len(v271v1)], bs271, h, t, "dec-slice-v271-p-len-noaddr")
  1834. testDeepEqualErr(v271v1, v271va[:len(v271v1)], t, "equal-slice-v271-p-len-noaddr")
  1835. v271va = [8]bool{} // clear the array
  1836. testUnmarshalErr((&v271va)[:], bs271, h, t, "dec-slice-v271-p-cap-noaddr")
  1837. testDeepEqualErr(v271v1, v271va[:len(v271v1)], t, "equal-slice-v271-p-cap-noaddr")
  1838. }
  1839. // ...
  1840. var v271v3, v271v4 typMbsSliceBool
  1841. v271v2 = nil
  1842. if v != nil {
  1843. v271v2 = make([]bool, len(v))
  1844. }
  1845. v271v3 = typMbsSliceBool(v271v1)
  1846. v271v4 = typMbsSliceBool(v271v2)
  1847. bs271 = testMarshalErr(v271v3, h, t, "enc-slice-v271-custom")
  1848. testUnmarshalErr(v271v4, bs271, h, t, "dec-slice-v271-custom")
  1849. testDeepEqualErr(v271v3, v271v4, t, "equal-slice-v271-custom")
  1850. bs271 = testMarshalErr(&v271v3, h, t, "enc-slice-v271-custom-p")
  1851. v271v2 = nil
  1852. v271v4 = typMbsSliceBool(v271v2)
  1853. testUnmarshalErr(&v271v4, bs271, h, t, "dec-slice-v271-custom-p")
  1854. testDeepEqualErr(v271v3, v271v4, t, "equal-slice-v271-custom-p")
  1855. }
  1856. }
  1857. func doTestMammothMaps(t *testing.T, h Handle) {
  1858. for _, v := range []map[interface{}]interface{}{nil, {}, {"string-is-an-interface-2": nil, "string-is-an-interface": "string-is-an-interface-2"}} {
  1859. // fmt.Printf(">>>> running mammoth map v2: %v\n", v)
  1860. var v2v1, v2v2 map[interface{}]interface{}
  1861. v2v1 = v
  1862. bs2 := testMarshalErr(v2v1, h, t, "enc-map-v2")
  1863. if v == nil {
  1864. v2v2 = nil
  1865. } else {
  1866. v2v2 = make(map[interface{}]interface{}, len(v))
  1867. } // reset map
  1868. testUnmarshalErr(v2v2, bs2, h, t, "dec-map-v2")
  1869. testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2")
  1870. if v == nil {
  1871. v2v2 = nil
  1872. } else {
  1873. v2v2 = make(map[interface{}]interface{}, len(v))
  1874. } // reset map
  1875. testUnmarshalErr(reflect.ValueOf(v2v2), bs2, h, t, "dec-map-v2-noaddr") // decode into non-addressable map value
  1876. testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-noaddr")
  1877. if v == nil {
  1878. v2v2 = nil
  1879. } else {
  1880. v2v2 = make(map[interface{}]interface{}, len(v))
  1881. } // reset map
  1882. testUnmarshalErr(&v2v2, bs2, h, t, "dec-map-v2-p-len")
  1883. testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-p-len")
  1884. bs2 = testMarshalErr(&v2v1, h, t, "enc-map-v2-p")
  1885. v2v2 = nil
  1886. testUnmarshalErr(&v2v2, bs2, h, t, "dec-map-v2-p-nil")
  1887. testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-p-nil")
  1888. // ...
  1889. if v == nil {
  1890. v2v2 = nil
  1891. } else {
  1892. v2v2 = make(map[interface{}]interface{}, len(v))
  1893. } // reset map
  1894. var v2v3, v2v4 typMapMapIntfIntf
  1895. v2v3 = typMapMapIntfIntf(v2v1)
  1896. v2v4 = typMapMapIntfIntf(v2v2)
  1897. bs2 = testMarshalErr(v2v3, h, t, "enc-map-v2-custom")
  1898. testUnmarshalErr(v2v4, bs2, h, t, "dec-map-v2-p-len")
  1899. testDeepEqualErr(v2v3, v2v4, t, "equal-map-v2-p-len")
  1900. }
  1901. for _, v := range []map[interface{}]string{nil, {}, {"string-is-an-interface": "", "string-is-an-interface-2": "some-string-2"}} {
  1902. // fmt.Printf(">>>> running mammoth map v3: %v\n", v)
  1903. var v3v1, v3v2 map[interface{}]string
  1904. v3v1 = v
  1905. bs3 := testMarshalErr(v3v1, h, t, "enc-map-v3")
  1906. if v == nil {
  1907. v3v2 = nil
  1908. } else {
  1909. v3v2 = make(map[interface{}]string, len(v))
  1910. } // reset map
  1911. testUnmarshalErr(v3v2, bs3, h, t, "dec-map-v3")
  1912. testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3")
  1913. if v == nil {
  1914. v3v2 = nil
  1915. } else {
  1916. v3v2 = make(map[interface{}]string, len(v))
  1917. } // reset map
  1918. testUnmarshalErr(reflect.ValueOf(v3v2), bs3, h, t, "dec-map-v3-noaddr") // decode into non-addressable map value
  1919. testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-noaddr")
  1920. if v == nil {
  1921. v3v2 = nil
  1922. } else {
  1923. v3v2 = make(map[interface{}]string, len(v))
  1924. } // reset map
  1925. testUnmarshalErr(&v3v2, bs3, h, t, "dec-map-v3-p-len")
  1926. testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-p-len")
  1927. bs3 = testMarshalErr(&v3v1, h, t, "enc-map-v3-p")
  1928. v3v2 = nil
  1929. testUnmarshalErr(&v3v2, bs3, h, t, "dec-map-v3-p-nil")
  1930. testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-p-nil")
  1931. // ...
  1932. if v == nil {
  1933. v3v2 = nil
  1934. } else {
  1935. v3v2 = make(map[interface{}]string, len(v))
  1936. } // reset map
  1937. var v3v3, v3v4 typMapMapIntfString
  1938. v3v3 = typMapMapIntfString(v3v1)
  1939. v3v4 = typMapMapIntfString(v3v2)
  1940. bs3 = testMarshalErr(v3v3, h, t, "enc-map-v3-custom")
  1941. testUnmarshalErr(v3v4, bs3, h, t, "dec-map-v3-p-len")
  1942. testDeepEqualErr(v3v3, v3v4, t, "equal-map-v3-p-len")
  1943. }
  1944. for _, v := range []map[interface{}]uint{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  1945. // fmt.Printf(">>>> running mammoth map v4: %v\n", v)
  1946. var v4v1, v4v2 map[interface{}]uint
  1947. v4v1 = v
  1948. bs4 := testMarshalErr(v4v1, h, t, "enc-map-v4")
  1949. if v == nil {
  1950. v4v2 = nil
  1951. } else {
  1952. v4v2 = make(map[interface{}]uint, len(v))
  1953. } // reset map
  1954. testUnmarshalErr(v4v2, bs4, h, t, "dec-map-v4")
  1955. testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4")
  1956. if v == nil {
  1957. v4v2 = nil
  1958. } else {
  1959. v4v2 = make(map[interface{}]uint, len(v))
  1960. } // reset map
  1961. testUnmarshalErr(reflect.ValueOf(v4v2), bs4, h, t, "dec-map-v4-noaddr") // decode into non-addressable map value
  1962. testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-noaddr")
  1963. if v == nil {
  1964. v4v2 = nil
  1965. } else {
  1966. v4v2 = make(map[interface{}]uint, len(v))
  1967. } // reset map
  1968. testUnmarshalErr(&v4v2, bs4, h, t, "dec-map-v4-p-len")
  1969. testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-p-len")
  1970. bs4 = testMarshalErr(&v4v1, h, t, "enc-map-v4-p")
  1971. v4v2 = nil
  1972. testUnmarshalErr(&v4v2, bs4, h, t, "dec-map-v4-p-nil")
  1973. testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-p-nil")
  1974. // ...
  1975. if v == nil {
  1976. v4v2 = nil
  1977. } else {
  1978. v4v2 = make(map[interface{}]uint, len(v))
  1979. } // reset map
  1980. var v4v3, v4v4 typMapMapIntfUint
  1981. v4v3 = typMapMapIntfUint(v4v1)
  1982. v4v4 = typMapMapIntfUint(v4v2)
  1983. bs4 = testMarshalErr(v4v3, h, t, "enc-map-v4-custom")
  1984. testUnmarshalErr(v4v4, bs4, h, t, "dec-map-v4-p-len")
  1985. testDeepEqualErr(v4v3, v4v4, t, "equal-map-v4-p-len")
  1986. }
  1987. for _, v := range []map[interface{}]uint8{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  1988. // fmt.Printf(">>>> running mammoth map v5: %v\n", v)
  1989. var v5v1, v5v2 map[interface{}]uint8
  1990. v5v1 = v
  1991. bs5 := testMarshalErr(v5v1, h, t, "enc-map-v5")
  1992. if v == nil {
  1993. v5v2 = nil
  1994. } else {
  1995. v5v2 = make(map[interface{}]uint8, len(v))
  1996. } // reset map
  1997. testUnmarshalErr(v5v2, bs5, h, t, "dec-map-v5")
  1998. testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5")
  1999. if v == nil {
  2000. v5v2 = nil
  2001. } else {
  2002. v5v2 = make(map[interface{}]uint8, len(v))
  2003. } // reset map
  2004. testUnmarshalErr(reflect.ValueOf(v5v2), bs5, h, t, "dec-map-v5-noaddr") // decode into non-addressable map value
  2005. testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-noaddr")
  2006. if v == nil {
  2007. v5v2 = nil
  2008. } else {
  2009. v5v2 = make(map[interface{}]uint8, len(v))
  2010. } // reset map
  2011. testUnmarshalErr(&v5v2, bs5, h, t, "dec-map-v5-p-len")
  2012. testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-p-len")
  2013. bs5 = testMarshalErr(&v5v1, h, t, "enc-map-v5-p")
  2014. v5v2 = nil
  2015. testUnmarshalErr(&v5v2, bs5, h, t, "dec-map-v5-p-nil")
  2016. testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-p-nil")
  2017. // ...
  2018. if v == nil {
  2019. v5v2 = nil
  2020. } else {
  2021. v5v2 = make(map[interface{}]uint8, len(v))
  2022. } // reset map
  2023. var v5v3, v5v4 typMapMapIntfUint8
  2024. v5v3 = typMapMapIntfUint8(v5v1)
  2025. v5v4 = typMapMapIntfUint8(v5v2)
  2026. bs5 = testMarshalErr(v5v3, h, t, "enc-map-v5-custom")
  2027. testUnmarshalErr(v5v4, bs5, h, t, "dec-map-v5-p-len")
  2028. testDeepEqualErr(v5v3, v5v4, t, "equal-map-v5-p-len")
  2029. }
  2030. for _, v := range []map[interface{}]uint16{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2031. // fmt.Printf(">>>> running mammoth map v6: %v\n", v)
  2032. var v6v1, v6v2 map[interface{}]uint16
  2033. v6v1 = v
  2034. bs6 := testMarshalErr(v6v1, h, t, "enc-map-v6")
  2035. if v == nil {
  2036. v6v2 = nil
  2037. } else {
  2038. v6v2 = make(map[interface{}]uint16, len(v))
  2039. } // reset map
  2040. testUnmarshalErr(v6v2, bs6, h, t, "dec-map-v6")
  2041. testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6")
  2042. if v == nil {
  2043. v6v2 = nil
  2044. } else {
  2045. v6v2 = make(map[interface{}]uint16, len(v))
  2046. } // reset map
  2047. testUnmarshalErr(reflect.ValueOf(v6v2), bs6, h, t, "dec-map-v6-noaddr") // decode into non-addressable map value
  2048. testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-noaddr")
  2049. if v == nil {
  2050. v6v2 = nil
  2051. } else {
  2052. v6v2 = make(map[interface{}]uint16, len(v))
  2053. } // reset map
  2054. testUnmarshalErr(&v6v2, bs6, h, t, "dec-map-v6-p-len")
  2055. testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-p-len")
  2056. bs6 = testMarshalErr(&v6v1, h, t, "enc-map-v6-p")
  2057. v6v2 = nil
  2058. testUnmarshalErr(&v6v2, bs6, h, t, "dec-map-v6-p-nil")
  2059. testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-p-nil")
  2060. // ...
  2061. if v == nil {
  2062. v6v2 = nil
  2063. } else {
  2064. v6v2 = make(map[interface{}]uint16, len(v))
  2065. } // reset map
  2066. var v6v3, v6v4 typMapMapIntfUint16
  2067. v6v3 = typMapMapIntfUint16(v6v1)
  2068. v6v4 = typMapMapIntfUint16(v6v2)
  2069. bs6 = testMarshalErr(v6v3, h, t, "enc-map-v6-custom")
  2070. testUnmarshalErr(v6v4, bs6, h, t, "dec-map-v6-p-len")
  2071. testDeepEqualErr(v6v3, v6v4, t, "equal-map-v6-p-len")
  2072. }
  2073. for _, v := range []map[interface{}]uint32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  2074. // fmt.Printf(">>>> running mammoth map v7: %v\n", v)
  2075. var v7v1, v7v2 map[interface{}]uint32
  2076. v7v1 = v
  2077. bs7 := testMarshalErr(v7v1, h, t, "enc-map-v7")
  2078. if v == nil {
  2079. v7v2 = nil
  2080. } else {
  2081. v7v2 = make(map[interface{}]uint32, len(v))
  2082. } // reset map
  2083. testUnmarshalErr(v7v2, bs7, h, t, "dec-map-v7")
  2084. testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7")
  2085. if v == nil {
  2086. v7v2 = nil
  2087. } else {
  2088. v7v2 = make(map[interface{}]uint32, len(v))
  2089. } // reset map
  2090. testUnmarshalErr(reflect.ValueOf(v7v2), bs7, h, t, "dec-map-v7-noaddr") // decode into non-addressable map value
  2091. testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-noaddr")
  2092. if v == nil {
  2093. v7v2 = nil
  2094. } else {
  2095. v7v2 = make(map[interface{}]uint32, len(v))
  2096. } // reset map
  2097. testUnmarshalErr(&v7v2, bs7, h, t, "dec-map-v7-p-len")
  2098. testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-p-len")
  2099. bs7 = testMarshalErr(&v7v1, h, t, "enc-map-v7-p")
  2100. v7v2 = nil
  2101. testUnmarshalErr(&v7v2, bs7, h, t, "dec-map-v7-p-nil")
  2102. testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-p-nil")
  2103. // ...
  2104. if v == nil {
  2105. v7v2 = nil
  2106. } else {
  2107. v7v2 = make(map[interface{}]uint32, len(v))
  2108. } // reset map
  2109. var v7v3, v7v4 typMapMapIntfUint32
  2110. v7v3 = typMapMapIntfUint32(v7v1)
  2111. v7v4 = typMapMapIntfUint32(v7v2)
  2112. bs7 = testMarshalErr(v7v3, h, t, "enc-map-v7-custom")
  2113. testUnmarshalErr(v7v4, bs7, h, t, "dec-map-v7-p-len")
  2114. testDeepEqualErr(v7v3, v7v4, t, "equal-map-v7-p-len")
  2115. }
  2116. for _, v := range []map[interface{}]uint64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2117. // fmt.Printf(">>>> running mammoth map v8: %v\n", v)
  2118. var v8v1, v8v2 map[interface{}]uint64
  2119. v8v1 = v
  2120. bs8 := testMarshalErr(v8v1, h, t, "enc-map-v8")
  2121. if v == nil {
  2122. v8v2 = nil
  2123. } else {
  2124. v8v2 = make(map[interface{}]uint64, len(v))
  2125. } // reset map
  2126. testUnmarshalErr(v8v2, bs8, h, t, "dec-map-v8")
  2127. testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8")
  2128. if v == nil {
  2129. v8v2 = nil
  2130. } else {
  2131. v8v2 = make(map[interface{}]uint64, len(v))
  2132. } // reset map
  2133. testUnmarshalErr(reflect.ValueOf(v8v2), bs8, h, t, "dec-map-v8-noaddr") // decode into non-addressable map value
  2134. testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-noaddr")
  2135. if v == nil {
  2136. v8v2 = nil
  2137. } else {
  2138. v8v2 = make(map[interface{}]uint64, len(v))
  2139. } // reset map
  2140. testUnmarshalErr(&v8v2, bs8, h, t, "dec-map-v8-p-len")
  2141. testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-p-len")
  2142. bs8 = testMarshalErr(&v8v1, h, t, "enc-map-v8-p")
  2143. v8v2 = nil
  2144. testUnmarshalErr(&v8v2, bs8, h, t, "dec-map-v8-p-nil")
  2145. testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-p-nil")
  2146. // ...
  2147. if v == nil {
  2148. v8v2 = nil
  2149. } else {
  2150. v8v2 = make(map[interface{}]uint64, len(v))
  2151. } // reset map
  2152. var v8v3, v8v4 typMapMapIntfUint64
  2153. v8v3 = typMapMapIntfUint64(v8v1)
  2154. v8v4 = typMapMapIntfUint64(v8v2)
  2155. bs8 = testMarshalErr(v8v3, h, t, "enc-map-v8-custom")
  2156. testUnmarshalErr(v8v4, bs8, h, t, "dec-map-v8-p-len")
  2157. testDeepEqualErr(v8v3, v8v4, t, "equal-map-v8-p-len")
  2158. }
  2159. for _, v := range []map[interface{}]uintptr{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  2160. // fmt.Printf(">>>> running mammoth map v9: %v\n", v)
  2161. var v9v1, v9v2 map[interface{}]uintptr
  2162. v9v1 = v
  2163. bs9 := testMarshalErr(v9v1, h, t, "enc-map-v9")
  2164. if v == nil {
  2165. v9v2 = nil
  2166. } else {
  2167. v9v2 = make(map[interface{}]uintptr, len(v))
  2168. } // reset map
  2169. testUnmarshalErr(v9v2, bs9, h, t, "dec-map-v9")
  2170. testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9")
  2171. if v == nil {
  2172. v9v2 = nil
  2173. } else {
  2174. v9v2 = make(map[interface{}]uintptr, len(v))
  2175. } // reset map
  2176. testUnmarshalErr(reflect.ValueOf(v9v2), bs9, h, t, "dec-map-v9-noaddr") // decode into non-addressable map value
  2177. testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-noaddr")
  2178. if v == nil {
  2179. v9v2 = nil
  2180. } else {
  2181. v9v2 = make(map[interface{}]uintptr, len(v))
  2182. } // reset map
  2183. testUnmarshalErr(&v9v2, bs9, h, t, "dec-map-v9-p-len")
  2184. testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-p-len")
  2185. bs9 = testMarshalErr(&v9v1, h, t, "enc-map-v9-p")
  2186. v9v2 = nil
  2187. testUnmarshalErr(&v9v2, bs9, h, t, "dec-map-v9-p-nil")
  2188. testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-p-nil")
  2189. // ...
  2190. if v == nil {
  2191. v9v2 = nil
  2192. } else {
  2193. v9v2 = make(map[interface{}]uintptr, len(v))
  2194. } // reset map
  2195. var v9v3, v9v4 typMapMapIntfUintptr
  2196. v9v3 = typMapMapIntfUintptr(v9v1)
  2197. v9v4 = typMapMapIntfUintptr(v9v2)
  2198. bs9 = testMarshalErr(v9v3, h, t, "enc-map-v9-custom")
  2199. testUnmarshalErr(v9v4, bs9, h, t, "dec-map-v9-p-len")
  2200. testDeepEqualErr(v9v3, v9v4, t, "equal-map-v9-p-len")
  2201. }
  2202. for _, v := range []map[interface{}]int{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2203. // fmt.Printf(">>>> running mammoth map v10: %v\n", v)
  2204. var v10v1, v10v2 map[interface{}]int
  2205. v10v1 = v
  2206. bs10 := testMarshalErr(v10v1, h, t, "enc-map-v10")
  2207. if v == nil {
  2208. v10v2 = nil
  2209. } else {
  2210. v10v2 = make(map[interface{}]int, len(v))
  2211. } // reset map
  2212. testUnmarshalErr(v10v2, bs10, h, t, "dec-map-v10")
  2213. testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10")
  2214. if v == nil {
  2215. v10v2 = nil
  2216. } else {
  2217. v10v2 = make(map[interface{}]int, len(v))
  2218. } // reset map
  2219. testUnmarshalErr(reflect.ValueOf(v10v2), bs10, h, t, "dec-map-v10-noaddr") // decode into non-addressable map value
  2220. testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-noaddr")
  2221. if v == nil {
  2222. v10v2 = nil
  2223. } else {
  2224. v10v2 = make(map[interface{}]int, len(v))
  2225. } // reset map
  2226. testUnmarshalErr(&v10v2, bs10, h, t, "dec-map-v10-p-len")
  2227. testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-p-len")
  2228. bs10 = testMarshalErr(&v10v1, h, t, "enc-map-v10-p")
  2229. v10v2 = nil
  2230. testUnmarshalErr(&v10v2, bs10, h, t, "dec-map-v10-p-nil")
  2231. testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-p-nil")
  2232. // ...
  2233. if v == nil {
  2234. v10v2 = nil
  2235. } else {
  2236. v10v2 = make(map[interface{}]int, len(v))
  2237. } // reset map
  2238. var v10v3, v10v4 typMapMapIntfInt
  2239. v10v3 = typMapMapIntfInt(v10v1)
  2240. v10v4 = typMapMapIntfInt(v10v2)
  2241. bs10 = testMarshalErr(v10v3, h, t, "enc-map-v10-custom")
  2242. testUnmarshalErr(v10v4, bs10, h, t, "dec-map-v10-p-len")
  2243. testDeepEqualErr(v10v3, v10v4, t, "equal-map-v10-p-len")
  2244. }
  2245. for _, v := range []map[interface{}]int8{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  2246. // fmt.Printf(">>>> running mammoth map v11: %v\n", v)
  2247. var v11v1, v11v2 map[interface{}]int8
  2248. v11v1 = v
  2249. bs11 := testMarshalErr(v11v1, h, t, "enc-map-v11")
  2250. if v == nil {
  2251. v11v2 = nil
  2252. } else {
  2253. v11v2 = make(map[interface{}]int8, len(v))
  2254. } // reset map
  2255. testUnmarshalErr(v11v2, bs11, h, t, "dec-map-v11")
  2256. testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11")
  2257. if v == nil {
  2258. v11v2 = nil
  2259. } else {
  2260. v11v2 = make(map[interface{}]int8, len(v))
  2261. } // reset map
  2262. testUnmarshalErr(reflect.ValueOf(v11v2), bs11, h, t, "dec-map-v11-noaddr") // decode into non-addressable map value
  2263. testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-noaddr")
  2264. if v == nil {
  2265. v11v2 = nil
  2266. } else {
  2267. v11v2 = make(map[interface{}]int8, len(v))
  2268. } // reset map
  2269. testUnmarshalErr(&v11v2, bs11, h, t, "dec-map-v11-p-len")
  2270. testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-p-len")
  2271. bs11 = testMarshalErr(&v11v1, h, t, "enc-map-v11-p")
  2272. v11v2 = nil
  2273. testUnmarshalErr(&v11v2, bs11, h, t, "dec-map-v11-p-nil")
  2274. testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-p-nil")
  2275. // ...
  2276. if v == nil {
  2277. v11v2 = nil
  2278. } else {
  2279. v11v2 = make(map[interface{}]int8, len(v))
  2280. } // reset map
  2281. var v11v3, v11v4 typMapMapIntfInt8
  2282. v11v3 = typMapMapIntfInt8(v11v1)
  2283. v11v4 = typMapMapIntfInt8(v11v2)
  2284. bs11 = testMarshalErr(v11v3, h, t, "enc-map-v11-custom")
  2285. testUnmarshalErr(v11v4, bs11, h, t, "dec-map-v11-p-len")
  2286. testDeepEqualErr(v11v3, v11v4, t, "equal-map-v11-p-len")
  2287. }
  2288. for _, v := range []map[interface{}]int16{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2289. // fmt.Printf(">>>> running mammoth map v12: %v\n", v)
  2290. var v12v1, v12v2 map[interface{}]int16
  2291. v12v1 = v
  2292. bs12 := testMarshalErr(v12v1, h, t, "enc-map-v12")
  2293. if v == nil {
  2294. v12v2 = nil
  2295. } else {
  2296. v12v2 = make(map[interface{}]int16, len(v))
  2297. } // reset map
  2298. testUnmarshalErr(v12v2, bs12, h, t, "dec-map-v12")
  2299. testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12")
  2300. if v == nil {
  2301. v12v2 = nil
  2302. } else {
  2303. v12v2 = make(map[interface{}]int16, len(v))
  2304. } // reset map
  2305. testUnmarshalErr(reflect.ValueOf(v12v2), bs12, h, t, "dec-map-v12-noaddr") // decode into non-addressable map value
  2306. testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-noaddr")
  2307. if v == nil {
  2308. v12v2 = nil
  2309. } else {
  2310. v12v2 = make(map[interface{}]int16, len(v))
  2311. } // reset map
  2312. testUnmarshalErr(&v12v2, bs12, h, t, "dec-map-v12-p-len")
  2313. testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-p-len")
  2314. bs12 = testMarshalErr(&v12v1, h, t, "enc-map-v12-p")
  2315. v12v2 = nil
  2316. testUnmarshalErr(&v12v2, bs12, h, t, "dec-map-v12-p-nil")
  2317. testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-p-nil")
  2318. // ...
  2319. if v == nil {
  2320. v12v2 = nil
  2321. } else {
  2322. v12v2 = make(map[interface{}]int16, len(v))
  2323. } // reset map
  2324. var v12v3, v12v4 typMapMapIntfInt16
  2325. v12v3 = typMapMapIntfInt16(v12v1)
  2326. v12v4 = typMapMapIntfInt16(v12v2)
  2327. bs12 = testMarshalErr(v12v3, h, t, "enc-map-v12-custom")
  2328. testUnmarshalErr(v12v4, bs12, h, t, "dec-map-v12-p-len")
  2329. testDeepEqualErr(v12v3, v12v4, t, "equal-map-v12-p-len")
  2330. }
  2331. for _, v := range []map[interface{}]int32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} {
  2332. // fmt.Printf(">>>> running mammoth map v13: %v\n", v)
  2333. var v13v1, v13v2 map[interface{}]int32
  2334. v13v1 = v
  2335. bs13 := testMarshalErr(v13v1, h, t, "enc-map-v13")
  2336. if v == nil {
  2337. v13v2 = nil
  2338. } else {
  2339. v13v2 = make(map[interface{}]int32, len(v))
  2340. } // reset map
  2341. testUnmarshalErr(v13v2, bs13, h, t, "dec-map-v13")
  2342. testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13")
  2343. if v == nil {
  2344. v13v2 = nil
  2345. } else {
  2346. v13v2 = make(map[interface{}]int32, len(v))
  2347. } // reset map
  2348. testUnmarshalErr(reflect.ValueOf(v13v2), bs13, h, t, "dec-map-v13-noaddr") // decode into non-addressable map value
  2349. testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-noaddr")
  2350. if v == nil {
  2351. v13v2 = nil
  2352. } else {
  2353. v13v2 = make(map[interface{}]int32, len(v))
  2354. } // reset map
  2355. testUnmarshalErr(&v13v2, bs13, h, t, "dec-map-v13-p-len")
  2356. testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-p-len")
  2357. bs13 = testMarshalErr(&v13v1, h, t, "enc-map-v13-p")
  2358. v13v2 = nil
  2359. testUnmarshalErr(&v13v2, bs13, h, t, "dec-map-v13-p-nil")
  2360. testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-p-nil")
  2361. // ...
  2362. if v == nil {
  2363. v13v2 = nil
  2364. } else {
  2365. v13v2 = make(map[interface{}]int32, len(v))
  2366. } // reset map
  2367. var v13v3, v13v4 typMapMapIntfInt32
  2368. v13v3 = typMapMapIntfInt32(v13v1)
  2369. v13v4 = typMapMapIntfInt32(v13v2)
  2370. bs13 = testMarshalErr(v13v3, h, t, "enc-map-v13-custom")
  2371. testUnmarshalErr(v13v4, bs13, h, t, "dec-map-v13-p-len")
  2372. testDeepEqualErr(v13v3, v13v4, t, "equal-map-v13-p-len")
  2373. }
  2374. for _, v := range []map[interface{}]int64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} {
  2375. // fmt.Printf(">>>> running mammoth map v14: %v\n", v)
  2376. var v14v1, v14v2 map[interface{}]int64
  2377. v14v1 = v
  2378. bs14 := testMarshalErr(v14v1, h, t, "enc-map-v14")
  2379. if v == nil {
  2380. v14v2 = nil
  2381. } else {
  2382. v14v2 = make(map[interface{}]int64, len(v))
  2383. } // reset map
  2384. testUnmarshalErr(v14v2, bs14, h, t, "dec-map-v14")
  2385. testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14")
  2386. if v == nil {
  2387. v14v2 = nil
  2388. } else {
  2389. v14v2 = make(map[interface{}]int64, len(v))
  2390. } // reset map
  2391. testUnmarshalErr(reflect.ValueOf(v14v2), bs14, h, t, "dec-map-v14-noaddr") // decode into non-addressable map value
  2392. testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-noaddr")
  2393. if v == nil {
  2394. v14v2 = nil
  2395. } else {
  2396. v14v2 = make(map[interface{}]int64, len(v))
  2397. } // reset map
  2398. testUnmarshalErr(&v14v2, bs14, h, t, "dec-map-v14-p-len")
  2399. testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-p-len")
  2400. bs14 = testMarshalErr(&v14v1, h, t, "enc-map-v14-p")
  2401. v14v2 = nil
  2402. testUnmarshalErr(&v14v2, bs14, h, t, "dec-map-v14-p-nil")
  2403. testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-p-nil")
  2404. // ...
  2405. if v == nil {
  2406. v14v2 = nil
  2407. } else {
  2408. v14v2 = make(map[interface{}]int64, len(v))
  2409. } // reset map
  2410. var v14v3, v14v4 typMapMapIntfInt64
  2411. v14v3 = typMapMapIntfInt64(v14v1)
  2412. v14v4 = typMapMapIntfInt64(v14v2)
  2413. bs14 = testMarshalErr(v14v3, h, t, "enc-map-v14-custom")
  2414. testUnmarshalErr(v14v4, bs14, h, t, "dec-map-v14-p-len")
  2415. testDeepEqualErr(v14v3, v14v4, t, "equal-map-v14-p-len")
  2416. }
  2417. for _, v := range []map[interface{}]float32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 22.2}} {
  2418. // fmt.Printf(">>>> running mammoth map v15: %v\n", v)
  2419. var v15v1, v15v2 map[interface{}]float32
  2420. v15v1 = v
  2421. bs15 := testMarshalErr(v15v1, h, t, "enc-map-v15")
  2422. if v == nil {
  2423. v15v2 = nil
  2424. } else {
  2425. v15v2 = make(map[interface{}]float32, len(v))
  2426. } // reset map
  2427. testUnmarshalErr(v15v2, bs15, h, t, "dec-map-v15")
  2428. testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15")
  2429. if v == nil {
  2430. v15v2 = nil
  2431. } else {
  2432. v15v2 = make(map[interface{}]float32, len(v))
  2433. } // reset map
  2434. testUnmarshalErr(reflect.ValueOf(v15v2), bs15, h, t, "dec-map-v15-noaddr") // decode into non-addressable map value
  2435. testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-noaddr")
  2436. if v == nil {
  2437. v15v2 = nil
  2438. } else {
  2439. v15v2 = make(map[interface{}]float32, len(v))
  2440. } // reset map
  2441. testUnmarshalErr(&v15v2, bs15, h, t, "dec-map-v15-p-len")
  2442. testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-p-len")
  2443. bs15 = testMarshalErr(&v15v1, h, t, "enc-map-v15-p")
  2444. v15v2 = nil
  2445. testUnmarshalErr(&v15v2, bs15, h, t, "dec-map-v15-p-nil")
  2446. testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-p-nil")
  2447. // ...
  2448. if v == nil {
  2449. v15v2 = nil
  2450. } else {
  2451. v15v2 = make(map[interface{}]float32, len(v))
  2452. } // reset map
  2453. var v15v3, v15v4 typMapMapIntfFloat32
  2454. v15v3 = typMapMapIntfFloat32(v15v1)
  2455. v15v4 = typMapMapIntfFloat32(v15v2)
  2456. bs15 = testMarshalErr(v15v3, h, t, "enc-map-v15-custom")
  2457. testUnmarshalErr(v15v4, bs15, h, t, "dec-map-v15-p-len")
  2458. testDeepEqualErr(v15v3, v15v4, t, "equal-map-v15-p-len")
  2459. }
  2460. for _, v := range []map[interface{}]float64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 11.1}} {
  2461. // fmt.Printf(">>>> running mammoth map v16: %v\n", v)
  2462. var v16v1, v16v2 map[interface{}]float64
  2463. v16v1 = v
  2464. bs16 := testMarshalErr(v16v1, h, t, "enc-map-v16")
  2465. if v == nil {
  2466. v16v2 = nil
  2467. } else {
  2468. v16v2 = make(map[interface{}]float64, len(v))
  2469. } // reset map
  2470. testUnmarshalErr(v16v2, bs16, h, t, "dec-map-v16")
  2471. testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16")
  2472. if v == nil {
  2473. v16v2 = nil
  2474. } else {
  2475. v16v2 = make(map[interface{}]float64, len(v))
  2476. } // reset map
  2477. testUnmarshalErr(reflect.ValueOf(v16v2), bs16, h, t, "dec-map-v16-noaddr") // decode into non-addressable map value
  2478. testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-noaddr")
  2479. if v == nil {
  2480. v16v2 = nil
  2481. } else {
  2482. v16v2 = make(map[interface{}]float64, len(v))
  2483. } // reset map
  2484. testUnmarshalErr(&v16v2, bs16, h, t, "dec-map-v16-p-len")
  2485. testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-p-len")
  2486. bs16 = testMarshalErr(&v16v1, h, t, "enc-map-v16-p")
  2487. v16v2 = nil
  2488. testUnmarshalErr(&v16v2, bs16, h, t, "dec-map-v16-p-nil")
  2489. testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-p-nil")
  2490. // ...
  2491. if v == nil {
  2492. v16v2 = nil
  2493. } else {
  2494. v16v2 = make(map[interface{}]float64, len(v))
  2495. } // reset map
  2496. var v16v3, v16v4 typMapMapIntfFloat64
  2497. v16v3 = typMapMapIntfFloat64(v16v1)
  2498. v16v4 = typMapMapIntfFloat64(v16v2)
  2499. bs16 = testMarshalErr(v16v3, h, t, "enc-map-v16-custom")
  2500. testUnmarshalErr(v16v4, bs16, h, t, "dec-map-v16-p-len")
  2501. testDeepEqualErr(v16v3, v16v4, t, "equal-map-v16-p-len")
  2502. }
  2503. for _, v := range []map[interface{}]bool{nil, {}, {"string-is-an-interface": false, "string-is-an-interface-2": true}} {
  2504. // fmt.Printf(">>>> running mammoth map v17: %v\n", v)
  2505. var v17v1, v17v2 map[interface{}]bool
  2506. v17v1 = v
  2507. bs17 := testMarshalErr(v17v1, h, t, "enc-map-v17")
  2508. if v == nil {
  2509. v17v2 = nil
  2510. } else {
  2511. v17v2 = make(map[interface{}]bool, len(v))
  2512. } // reset map
  2513. testUnmarshalErr(v17v2, bs17, h, t, "dec-map-v17")
  2514. testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17")
  2515. if v == nil {
  2516. v17v2 = nil
  2517. } else {
  2518. v17v2 = make(map[interface{}]bool, len(v))
  2519. } // reset map
  2520. testUnmarshalErr(reflect.ValueOf(v17v2), bs17, h, t, "dec-map-v17-noaddr") // decode into non-addressable map value
  2521. testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-noaddr")
  2522. if v == nil {
  2523. v17v2 = nil
  2524. } else {
  2525. v17v2 = make(map[interface{}]bool, len(v))
  2526. } // reset map
  2527. testUnmarshalErr(&v17v2, bs17, h, t, "dec-map-v17-p-len")
  2528. testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-p-len")
  2529. bs17 = testMarshalErr(&v17v1, h, t, "enc-map-v17-p")
  2530. v17v2 = nil
  2531. testUnmarshalErr(&v17v2, bs17, h, t, "dec-map-v17-p-nil")
  2532. testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-p-nil")
  2533. // ...
  2534. if v == nil {
  2535. v17v2 = nil
  2536. } else {
  2537. v17v2 = make(map[interface{}]bool, len(v))
  2538. } // reset map
  2539. var v17v3, v17v4 typMapMapIntfBool
  2540. v17v3 = typMapMapIntfBool(v17v1)
  2541. v17v4 = typMapMapIntfBool(v17v2)
  2542. bs17 = testMarshalErr(v17v3, h, t, "enc-map-v17-custom")
  2543. testUnmarshalErr(v17v4, bs17, h, t, "dec-map-v17-p-len")
  2544. testDeepEqualErr(v17v3, v17v4, t, "equal-map-v17-p-len")
  2545. }
  2546. for _, v := range []map[string]interface{}{nil, {}, {"some-string": nil, "some-string-2": "string-is-an-interface"}} {
  2547. // fmt.Printf(">>>> running mammoth map v20: %v\n", v)
  2548. var v20v1, v20v2 map[string]interface{}
  2549. v20v1 = v
  2550. bs20 := testMarshalErr(v20v1, h, t, "enc-map-v20")
  2551. if v == nil {
  2552. v20v2 = nil
  2553. } else {
  2554. v20v2 = make(map[string]interface{}, len(v))
  2555. } // reset map
  2556. testUnmarshalErr(v20v2, bs20, h, t, "dec-map-v20")
  2557. testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20")
  2558. if v == nil {
  2559. v20v2 = nil
  2560. } else {
  2561. v20v2 = make(map[string]interface{}, len(v))
  2562. } // reset map
  2563. testUnmarshalErr(reflect.ValueOf(v20v2), bs20, h, t, "dec-map-v20-noaddr") // decode into non-addressable map value
  2564. testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-noaddr")
  2565. if v == nil {
  2566. v20v2 = nil
  2567. } else {
  2568. v20v2 = make(map[string]interface{}, len(v))
  2569. } // reset map
  2570. testUnmarshalErr(&v20v2, bs20, h, t, "dec-map-v20-p-len")
  2571. testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-p-len")
  2572. bs20 = testMarshalErr(&v20v1, h, t, "enc-map-v20-p")
  2573. v20v2 = nil
  2574. testUnmarshalErr(&v20v2, bs20, h, t, "dec-map-v20-p-nil")
  2575. testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-p-nil")
  2576. // ...
  2577. if v == nil {
  2578. v20v2 = nil
  2579. } else {
  2580. v20v2 = make(map[string]interface{}, len(v))
  2581. } // reset map
  2582. var v20v3, v20v4 typMapMapStringIntf
  2583. v20v3 = typMapMapStringIntf(v20v1)
  2584. v20v4 = typMapMapStringIntf(v20v2)
  2585. bs20 = testMarshalErr(v20v3, h, t, "enc-map-v20-custom")
  2586. testUnmarshalErr(v20v4, bs20, h, t, "dec-map-v20-p-len")
  2587. testDeepEqualErr(v20v3, v20v4, t, "equal-map-v20-p-len")
  2588. }
  2589. for _, v := range []map[string]string{nil, {}, {"some-string": "", "some-string-2": "some-string"}} {
  2590. // fmt.Printf(">>>> running mammoth map v21: %v\n", v)
  2591. var v21v1, v21v2 map[string]string
  2592. v21v1 = v
  2593. bs21 := testMarshalErr(v21v1, h, t, "enc-map-v21")
  2594. if v == nil {
  2595. v21v2 = nil
  2596. } else {
  2597. v21v2 = make(map[string]string, len(v))
  2598. } // reset map
  2599. testUnmarshalErr(v21v2, bs21, h, t, "dec-map-v21")
  2600. testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21")
  2601. if v == nil {
  2602. v21v2 = nil
  2603. } else {
  2604. v21v2 = make(map[string]string, len(v))
  2605. } // reset map
  2606. testUnmarshalErr(reflect.ValueOf(v21v2), bs21, h, t, "dec-map-v21-noaddr") // decode into non-addressable map value
  2607. testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-noaddr")
  2608. if v == nil {
  2609. v21v2 = nil
  2610. } else {
  2611. v21v2 = make(map[string]string, len(v))
  2612. } // reset map
  2613. testUnmarshalErr(&v21v2, bs21, h, t, "dec-map-v21-p-len")
  2614. testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-p-len")
  2615. bs21 = testMarshalErr(&v21v1, h, t, "enc-map-v21-p")
  2616. v21v2 = nil
  2617. testUnmarshalErr(&v21v2, bs21, h, t, "dec-map-v21-p-nil")
  2618. testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-p-nil")
  2619. // ...
  2620. if v == nil {
  2621. v21v2 = nil
  2622. } else {
  2623. v21v2 = make(map[string]string, len(v))
  2624. } // reset map
  2625. var v21v3, v21v4 typMapMapStringString
  2626. v21v3 = typMapMapStringString(v21v1)
  2627. v21v4 = typMapMapStringString(v21v2)
  2628. bs21 = testMarshalErr(v21v3, h, t, "enc-map-v21-custom")
  2629. testUnmarshalErr(v21v4, bs21, h, t, "dec-map-v21-p-len")
  2630. testDeepEqualErr(v21v3, v21v4, t, "equal-map-v21-p-len")
  2631. }
  2632. for _, v := range []map[string]uint{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2633. // fmt.Printf(">>>> running mammoth map v22: %v\n", v)
  2634. var v22v1, v22v2 map[string]uint
  2635. v22v1 = v
  2636. bs22 := testMarshalErr(v22v1, h, t, "enc-map-v22")
  2637. if v == nil {
  2638. v22v2 = nil
  2639. } else {
  2640. v22v2 = make(map[string]uint, len(v))
  2641. } // reset map
  2642. testUnmarshalErr(v22v2, bs22, h, t, "dec-map-v22")
  2643. testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22")
  2644. if v == nil {
  2645. v22v2 = nil
  2646. } else {
  2647. v22v2 = make(map[string]uint, len(v))
  2648. } // reset map
  2649. testUnmarshalErr(reflect.ValueOf(v22v2), bs22, h, t, "dec-map-v22-noaddr") // decode into non-addressable map value
  2650. testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-noaddr")
  2651. if v == nil {
  2652. v22v2 = nil
  2653. } else {
  2654. v22v2 = make(map[string]uint, len(v))
  2655. } // reset map
  2656. testUnmarshalErr(&v22v2, bs22, h, t, "dec-map-v22-p-len")
  2657. testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-p-len")
  2658. bs22 = testMarshalErr(&v22v1, h, t, "enc-map-v22-p")
  2659. v22v2 = nil
  2660. testUnmarshalErr(&v22v2, bs22, h, t, "dec-map-v22-p-nil")
  2661. testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-p-nil")
  2662. // ...
  2663. if v == nil {
  2664. v22v2 = nil
  2665. } else {
  2666. v22v2 = make(map[string]uint, len(v))
  2667. } // reset map
  2668. var v22v3, v22v4 typMapMapStringUint
  2669. v22v3 = typMapMapStringUint(v22v1)
  2670. v22v4 = typMapMapStringUint(v22v2)
  2671. bs22 = testMarshalErr(v22v3, h, t, "enc-map-v22-custom")
  2672. testUnmarshalErr(v22v4, bs22, h, t, "dec-map-v22-p-len")
  2673. testDeepEqualErr(v22v3, v22v4, t, "equal-map-v22-p-len")
  2674. }
  2675. for _, v := range []map[string]uint8{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2676. // fmt.Printf(">>>> running mammoth map v23: %v\n", v)
  2677. var v23v1, v23v2 map[string]uint8
  2678. v23v1 = v
  2679. bs23 := testMarshalErr(v23v1, h, t, "enc-map-v23")
  2680. if v == nil {
  2681. v23v2 = nil
  2682. } else {
  2683. v23v2 = make(map[string]uint8, len(v))
  2684. } // reset map
  2685. testUnmarshalErr(v23v2, bs23, h, t, "dec-map-v23")
  2686. testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23")
  2687. if v == nil {
  2688. v23v2 = nil
  2689. } else {
  2690. v23v2 = make(map[string]uint8, len(v))
  2691. } // reset map
  2692. testUnmarshalErr(reflect.ValueOf(v23v2), bs23, h, t, "dec-map-v23-noaddr") // decode into non-addressable map value
  2693. testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-noaddr")
  2694. if v == nil {
  2695. v23v2 = nil
  2696. } else {
  2697. v23v2 = make(map[string]uint8, len(v))
  2698. } // reset map
  2699. testUnmarshalErr(&v23v2, bs23, h, t, "dec-map-v23-p-len")
  2700. testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-p-len")
  2701. bs23 = testMarshalErr(&v23v1, h, t, "enc-map-v23-p")
  2702. v23v2 = nil
  2703. testUnmarshalErr(&v23v2, bs23, h, t, "dec-map-v23-p-nil")
  2704. testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-p-nil")
  2705. // ...
  2706. if v == nil {
  2707. v23v2 = nil
  2708. } else {
  2709. v23v2 = make(map[string]uint8, len(v))
  2710. } // reset map
  2711. var v23v3, v23v4 typMapMapStringUint8
  2712. v23v3 = typMapMapStringUint8(v23v1)
  2713. v23v4 = typMapMapStringUint8(v23v2)
  2714. bs23 = testMarshalErr(v23v3, h, t, "enc-map-v23-custom")
  2715. testUnmarshalErr(v23v4, bs23, h, t, "dec-map-v23-p-len")
  2716. testDeepEqualErr(v23v3, v23v4, t, "equal-map-v23-p-len")
  2717. }
  2718. for _, v := range []map[string]uint16{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2719. // fmt.Printf(">>>> running mammoth map v24: %v\n", v)
  2720. var v24v1, v24v2 map[string]uint16
  2721. v24v1 = v
  2722. bs24 := testMarshalErr(v24v1, h, t, "enc-map-v24")
  2723. if v == nil {
  2724. v24v2 = nil
  2725. } else {
  2726. v24v2 = make(map[string]uint16, len(v))
  2727. } // reset map
  2728. testUnmarshalErr(v24v2, bs24, h, t, "dec-map-v24")
  2729. testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24")
  2730. if v == nil {
  2731. v24v2 = nil
  2732. } else {
  2733. v24v2 = make(map[string]uint16, len(v))
  2734. } // reset map
  2735. testUnmarshalErr(reflect.ValueOf(v24v2), bs24, h, t, "dec-map-v24-noaddr") // decode into non-addressable map value
  2736. testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-noaddr")
  2737. if v == nil {
  2738. v24v2 = nil
  2739. } else {
  2740. v24v2 = make(map[string]uint16, len(v))
  2741. } // reset map
  2742. testUnmarshalErr(&v24v2, bs24, h, t, "dec-map-v24-p-len")
  2743. testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-p-len")
  2744. bs24 = testMarshalErr(&v24v1, h, t, "enc-map-v24-p")
  2745. v24v2 = nil
  2746. testUnmarshalErr(&v24v2, bs24, h, t, "dec-map-v24-p-nil")
  2747. testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-p-nil")
  2748. // ...
  2749. if v == nil {
  2750. v24v2 = nil
  2751. } else {
  2752. v24v2 = make(map[string]uint16, len(v))
  2753. } // reset map
  2754. var v24v3, v24v4 typMapMapStringUint16
  2755. v24v3 = typMapMapStringUint16(v24v1)
  2756. v24v4 = typMapMapStringUint16(v24v2)
  2757. bs24 = testMarshalErr(v24v3, h, t, "enc-map-v24-custom")
  2758. testUnmarshalErr(v24v4, bs24, h, t, "dec-map-v24-p-len")
  2759. testDeepEqualErr(v24v3, v24v4, t, "equal-map-v24-p-len")
  2760. }
  2761. for _, v := range []map[string]uint32{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2762. // fmt.Printf(">>>> running mammoth map v25: %v\n", v)
  2763. var v25v1, v25v2 map[string]uint32
  2764. v25v1 = v
  2765. bs25 := testMarshalErr(v25v1, h, t, "enc-map-v25")
  2766. if v == nil {
  2767. v25v2 = nil
  2768. } else {
  2769. v25v2 = make(map[string]uint32, len(v))
  2770. } // reset map
  2771. testUnmarshalErr(v25v2, bs25, h, t, "dec-map-v25")
  2772. testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25")
  2773. if v == nil {
  2774. v25v2 = nil
  2775. } else {
  2776. v25v2 = make(map[string]uint32, len(v))
  2777. } // reset map
  2778. testUnmarshalErr(reflect.ValueOf(v25v2), bs25, h, t, "dec-map-v25-noaddr") // decode into non-addressable map value
  2779. testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-noaddr")
  2780. if v == nil {
  2781. v25v2 = nil
  2782. } else {
  2783. v25v2 = make(map[string]uint32, len(v))
  2784. } // reset map
  2785. testUnmarshalErr(&v25v2, bs25, h, t, "dec-map-v25-p-len")
  2786. testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-p-len")
  2787. bs25 = testMarshalErr(&v25v1, h, t, "enc-map-v25-p")
  2788. v25v2 = nil
  2789. testUnmarshalErr(&v25v2, bs25, h, t, "dec-map-v25-p-nil")
  2790. testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-p-nil")
  2791. // ...
  2792. if v == nil {
  2793. v25v2 = nil
  2794. } else {
  2795. v25v2 = make(map[string]uint32, len(v))
  2796. } // reset map
  2797. var v25v3, v25v4 typMapMapStringUint32
  2798. v25v3 = typMapMapStringUint32(v25v1)
  2799. v25v4 = typMapMapStringUint32(v25v2)
  2800. bs25 = testMarshalErr(v25v3, h, t, "enc-map-v25-custom")
  2801. testUnmarshalErr(v25v4, bs25, h, t, "dec-map-v25-p-len")
  2802. testDeepEqualErr(v25v3, v25v4, t, "equal-map-v25-p-len")
  2803. }
  2804. for _, v := range []map[string]uint64{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2805. // fmt.Printf(">>>> running mammoth map v26: %v\n", v)
  2806. var v26v1, v26v2 map[string]uint64
  2807. v26v1 = v
  2808. bs26 := testMarshalErr(v26v1, h, t, "enc-map-v26")
  2809. if v == nil {
  2810. v26v2 = nil
  2811. } else {
  2812. v26v2 = make(map[string]uint64, len(v))
  2813. } // reset map
  2814. testUnmarshalErr(v26v2, bs26, h, t, "dec-map-v26")
  2815. testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26")
  2816. if v == nil {
  2817. v26v2 = nil
  2818. } else {
  2819. v26v2 = make(map[string]uint64, len(v))
  2820. } // reset map
  2821. testUnmarshalErr(reflect.ValueOf(v26v2), bs26, h, t, "dec-map-v26-noaddr") // decode into non-addressable map value
  2822. testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-noaddr")
  2823. if v == nil {
  2824. v26v2 = nil
  2825. } else {
  2826. v26v2 = make(map[string]uint64, len(v))
  2827. } // reset map
  2828. testUnmarshalErr(&v26v2, bs26, h, t, "dec-map-v26-p-len")
  2829. testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-p-len")
  2830. bs26 = testMarshalErr(&v26v1, h, t, "enc-map-v26-p")
  2831. v26v2 = nil
  2832. testUnmarshalErr(&v26v2, bs26, h, t, "dec-map-v26-p-nil")
  2833. testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-p-nil")
  2834. // ...
  2835. if v == nil {
  2836. v26v2 = nil
  2837. } else {
  2838. v26v2 = make(map[string]uint64, len(v))
  2839. } // reset map
  2840. var v26v3, v26v4 typMapMapStringUint64
  2841. v26v3 = typMapMapStringUint64(v26v1)
  2842. v26v4 = typMapMapStringUint64(v26v2)
  2843. bs26 = testMarshalErr(v26v3, h, t, "enc-map-v26-custom")
  2844. testUnmarshalErr(v26v4, bs26, h, t, "dec-map-v26-p-len")
  2845. testDeepEqualErr(v26v3, v26v4, t, "equal-map-v26-p-len")
  2846. }
  2847. for _, v := range []map[string]uintptr{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2848. // fmt.Printf(">>>> running mammoth map v27: %v\n", v)
  2849. var v27v1, v27v2 map[string]uintptr
  2850. v27v1 = v
  2851. bs27 := testMarshalErr(v27v1, h, t, "enc-map-v27")
  2852. if v == nil {
  2853. v27v2 = nil
  2854. } else {
  2855. v27v2 = make(map[string]uintptr, len(v))
  2856. } // reset map
  2857. testUnmarshalErr(v27v2, bs27, h, t, "dec-map-v27")
  2858. testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27")
  2859. if v == nil {
  2860. v27v2 = nil
  2861. } else {
  2862. v27v2 = make(map[string]uintptr, len(v))
  2863. } // reset map
  2864. testUnmarshalErr(reflect.ValueOf(v27v2), bs27, h, t, "dec-map-v27-noaddr") // decode into non-addressable map value
  2865. testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-noaddr")
  2866. if v == nil {
  2867. v27v2 = nil
  2868. } else {
  2869. v27v2 = make(map[string]uintptr, len(v))
  2870. } // reset map
  2871. testUnmarshalErr(&v27v2, bs27, h, t, "dec-map-v27-p-len")
  2872. testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-p-len")
  2873. bs27 = testMarshalErr(&v27v1, h, t, "enc-map-v27-p")
  2874. v27v2 = nil
  2875. testUnmarshalErr(&v27v2, bs27, h, t, "dec-map-v27-p-nil")
  2876. testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-p-nil")
  2877. // ...
  2878. if v == nil {
  2879. v27v2 = nil
  2880. } else {
  2881. v27v2 = make(map[string]uintptr, len(v))
  2882. } // reset map
  2883. var v27v3, v27v4 typMapMapStringUintptr
  2884. v27v3 = typMapMapStringUintptr(v27v1)
  2885. v27v4 = typMapMapStringUintptr(v27v2)
  2886. bs27 = testMarshalErr(v27v3, h, t, "enc-map-v27-custom")
  2887. testUnmarshalErr(v27v4, bs27, h, t, "dec-map-v27-p-len")
  2888. testDeepEqualErr(v27v3, v27v4, t, "equal-map-v27-p-len")
  2889. }
  2890. for _, v := range []map[string]int{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2891. // fmt.Printf(">>>> running mammoth map v28: %v\n", v)
  2892. var v28v1, v28v2 map[string]int
  2893. v28v1 = v
  2894. bs28 := testMarshalErr(v28v1, h, t, "enc-map-v28")
  2895. if v == nil {
  2896. v28v2 = nil
  2897. } else {
  2898. v28v2 = make(map[string]int, len(v))
  2899. } // reset map
  2900. testUnmarshalErr(v28v2, bs28, h, t, "dec-map-v28")
  2901. testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28")
  2902. if v == nil {
  2903. v28v2 = nil
  2904. } else {
  2905. v28v2 = make(map[string]int, len(v))
  2906. } // reset map
  2907. testUnmarshalErr(reflect.ValueOf(v28v2), bs28, h, t, "dec-map-v28-noaddr") // decode into non-addressable map value
  2908. testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-noaddr")
  2909. if v == nil {
  2910. v28v2 = nil
  2911. } else {
  2912. v28v2 = make(map[string]int, len(v))
  2913. } // reset map
  2914. testUnmarshalErr(&v28v2, bs28, h, t, "dec-map-v28-p-len")
  2915. testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-p-len")
  2916. bs28 = testMarshalErr(&v28v1, h, t, "enc-map-v28-p")
  2917. v28v2 = nil
  2918. testUnmarshalErr(&v28v2, bs28, h, t, "dec-map-v28-p-nil")
  2919. testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-p-nil")
  2920. // ...
  2921. if v == nil {
  2922. v28v2 = nil
  2923. } else {
  2924. v28v2 = make(map[string]int, len(v))
  2925. } // reset map
  2926. var v28v3, v28v4 typMapMapStringInt
  2927. v28v3 = typMapMapStringInt(v28v1)
  2928. v28v4 = typMapMapStringInt(v28v2)
  2929. bs28 = testMarshalErr(v28v3, h, t, "enc-map-v28-custom")
  2930. testUnmarshalErr(v28v4, bs28, h, t, "dec-map-v28-p-len")
  2931. testDeepEqualErr(v28v3, v28v4, t, "equal-map-v28-p-len")
  2932. }
  2933. for _, v := range []map[string]int8{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  2934. // fmt.Printf(">>>> running mammoth map v29: %v\n", v)
  2935. var v29v1, v29v2 map[string]int8
  2936. v29v1 = v
  2937. bs29 := testMarshalErr(v29v1, h, t, "enc-map-v29")
  2938. if v == nil {
  2939. v29v2 = nil
  2940. } else {
  2941. v29v2 = make(map[string]int8, len(v))
  2942. } // reset map
  2943. testUnmarshalErr(v29v2, bs29, h, t, "dec-map-v29")
  2944. testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29")
  2945. if v == nil {
  2946. v29v2 = nil
  2947. } else {
  2948. v29v2 = make(map[string]int8, len(v))
  2949. } // reset map
  2950. testUnmarshalErr(reflect.ValueOf(v29v2), bs29, h, t, "dec-map-v29-noaddr") // decode into non-addressable map value
  2951. testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-noaddr")
  2952. if v == nil {
  2953. v29v2 = nil
  2954. } else {
  2955. v29v2 = make(map[string]int8, len(v))
  2956. } // reset map
  2957. testUnmarshalErr(&v29v2, bs29, h, t, "dec-map-v29-p-len")
  2958. testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-p-len")
  2959. bs29 = testMarshalErr(&v29v1, h, t, "enc-map-v29-p")
  2960. v29v2 = nil
  2961. testUnmarshalErr(&v29v2, bs29, h, t, "dec-map-v29-p-nil")
  2962. testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-p-nil")
  2963. // ...
  2964. if v == nil {
  2965. v29v2 = nil
  2966. } else {
  2967. v29v2 = make(map[string]int8, len(v))
  2968. } // reset map
  2969. var v29v3, v29v4 typMapMapStringInt8
  2970. v29v3 = typMapMapStringInt8(v29v1)
  2971. v29v4 = typMapMapStringInt8(v29v2)
  2972. bs29 = testMarshalErr(v29v3, h, t, "enc-map-v29-custom")
  2973. testUnmarshalErr(v29v4, bs29, h, t, "dec-map-v29-p-len")
  2974. testDeepEqualErr(v29v3, v29v4, t, "equal-map-v29-p-len")
  2975. }
  2976. for _, v := range []map[string]int16{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  2977. // fmt.Printf(">>>> running mammoth map v30: %v\n", v)
  2978. var v30v1, v30v2 map[string]int16
  2979. v30v1 = v
  2980. bs30 := testMarshalErr(v30v1, h, t, "enc-map-v30")
  2981. if v == nil {
  2982. v30v2 = nil
  2983. } else {
  2984. v30v2 = make(map[string]int16, len(v))
  2985. } // reset map
  2986. testUnmarshalErr(v30v2, bs30, h, t, "dec-map-v30")
  2987. testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30")
  2988. if v == nil {
  2989. v30v2 = nil
  2990. } else {
  2991. v30v2 = make(map[string]int16, len(v))
  2992. } // reset map
  2993. testUnmarshalErr(reflect.ValueOf(v30v2), bs30, h, t, "dec-map-v30-noaddr") // decode into non-addressable map value
  2994. testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-noaddr")
  2995. if v == nil {
  2996. v30v2 = nil
  2997. } else {
  2998. v30v2 = make(map[string]int16, len(v))
  2999. } // reset map
  3000. testUnmarshalErr(&v30v2, bs30, h, t, "dec-map-v30-p-len")
  3001. testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-p-len")
  3002. bs30 = testMarshalErr(&v30v1, h, t, "enc-map-v30-p")
  3003. v30v2 = nil
  3004. testUnmarshalErr(&v30v2, bs30, h, t, "dec-map-v30-p-nil")
  3005. testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-p-nil")
  3006. // ...
  3007. if v == nil {
  3008. v30v2 = nil
  3009. } else {
  3010. v30v2 = make(map[string]int16, len(v))
  3011. } // reset map
  3012. var v30v3, v30v4 typMapMapStringInt16
  3013. v30v3 = typMapMapStringInt16(v30v1)
  3014. v30v4 = typMapMapStringInt16(v30v2)
  3015. bs30 = testMarshalErr(v30v3, h, t, "enc-map-v30-custom")
  3016. testUnmarshalErr(v30v4, bs30, h, t, "dec-map-v30-p-len")
  3017. testDeepEqualErr(v30v3, v30v4, t, "equal-map-v30-p-len")
  3018. }
  3019. for _, v := range []map[string]int32{nil, {}, {"some-string-2": 0, "some-string": 44}} {
  3020. // fmt.Printf(">>>> running mammoth map v31: %v\n", v)
  3021. var v31v1, v31v2 map[string]int32
  3022. v31v1 = v
  3023. bs31 := testMarshalErr(v31v1, h, t, "enc-map-v31")
  3024. if v == nil {
  3025. v31v2 = nil
  3026. } else {
  3027. v31v2 = make(map[string]int32, len(v))
  3028. } // reset map
  3029. testUnmarshalErr(v31v2, bs31, h, t, "dec-map-v31")
  3030. testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31")
  3031. if v == nil {
  3032. v31v2 = nil
  3033. } else {
  3034. v31v2 = make(map[string]int32, len(v))
  3035. } // reset map
  3036. testUnmarshalErr(reflect.ValueOf(v31v2), bs31, h, t, "dec-map-v31-noaddr") // decode into non-addressable map value
  3037. testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-noaddr")
  3038. if v == nil {
  3039. v31v2 = nil
  3040. } else {
  3041. v31v2 = make(map[string]int32, len(v))
  3042. } // reset map
  3043. testUnmarshalErr(&v31v2, bs31, h, t, "dec-map-v31-p-len")
  3044. testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-p-len")
  3045. bs31 = testMarshalErr(&v31v1, h, t, "enc-map-v31-p")
  3046. v31v2 = nil
  3047. testUnmarshalErr(&v31v2, bs31, h, t, "dec-map-v31-p-nil")
  3048. testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-p-nil")
  3049. // ...
  3050. if v == nil {
  3051. v31v2 = nil
  3052. } else {
  3053. v31v2 = make(map[string]int32, len(v))
  3054. } // reset map
  3055. var v31v3, v31v4 typMapMapStringInt32
  3056. v31v3 = typMapMapStringInt32(v31v1)
  3057. v31v4 = typMapMapStringInt32(v31v2)
  3058. bs31 = testMarshalErr(v31v3, h, t, "enc-map-v31-custom")
  3059. testUnmarshalErr(v31v4, bs31, h, t, "dec-map-v31-p-len")
  3060. testDeepEqualErr(v31v3, v31v4, t, "equal-map-v31-p-len")
  3061. }
  3062. for _, v := range []map[string]int64{nil, {}, {"some-string-2": 0, "some-string": 33}} {
  3063. // fmt.Printf(">>>> running mammoth map v32: %v\n", v)
  3064. var v32v1, v32v2 map[string]int64
  3065. v32v1 = v
  3066. bs32 := testMarshalErr(v32v1, h, t, "enc-map-v32")
  3067. if v == nil {
  3068. v32v2 = nil
  3069. } else {
  3070. v32v2 = make(map[string]int64, len(v))
  3071. } // reset map
  3072. testUnmarshalErr(v32v2, bs32, h, t, "dec-map-v32")
  3073. testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32")
  3074. if v == nil {
  3075. v32v2 = nil
  3076. } else {
  3077. v32v2 = make(map[string]int64, len(v))
  3078. } // reset map
  3079. testUnmarshalErr(reflect.ValueOf(v32v2), bs32, h, t, "dec-map-v32-noaddr") // decode into non-addressable map value
  3080. testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-noaddr")
  3081. if v == nil {
  3082. v32v2 = nil
  3083. } else {
  3084. v32v2 = make(map[string]int64, len(v))
  3085. } // reset map
  3086. testUnmarshalErr(&v32v2, bs32, h, t, "dec-map-v32-p-len")
  3087. testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-p-len")
  3088. bs32 = testMarshalErr(&v32v1, h, t, "enc-map-v32-p")
  3089. v32v2 = nil
  3090. testUnmarshalErr(&v32v2, bs32, h, t, "dec-map-v32-p-nil")
  3091. testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-p-nil")
  3092. // ...
  3093. if v == nil {
  3094. v32v2 = nil
  3095. } else {
  3096. v32v2 = make(map[string]int64, len(v))
  3097. } // reset map
  3098. var v32v3, v32v4 typMapMapStringInt64
  3099. v32v3 = typMapMapStringInt64(v32v1)
  3100. v32v4 = typMapMapStringInt64(v32v2)
  3101. bs32 = testMarshalErr(v32v3, h, t, "enc-map-v32-custom")
  3102. testUnmarshalErr(v32v4, bs32, h, t, "dec-map-v32-p-len")
  3103. testDeepEqualErr(v32v3, v32v4, t, "equal-map-v32-p-len")
  3104. }
  3105. for _, v := range []map[string]float32{nil, {}, {"some-string-2": 0, "some-string": 22.2}} {
  3106. // fmt.Printf(">>>> running mammoth map v33: %v\n", v)
  3107. var v33v1, v33v2 map[string]float32
  3108. v33v1 = v
  3109. bs33 := testMarshalErr(v33v1, h, t, "enc-map-v33")
  3110. if v == nil {
  3111. v33v2 = nil
  3112. } else {
  3113. v33v2 = make(map[string]float32, len(v))
  3114. } // reset map
  3115. testUnmarshalErr(v33v2, bs33, h, t, "dec-map-v33")
  3116. testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33")
  3117. if v == nil {
  3118. v33v2 = nil
  3119. } else {
  3120. v33v2 = make(map[string]float32, len(v))
  3121. } // reset map
  3122. testUnmarshalErr(reflect.ValueOf(v33v2), bs33, h, t, "dec-map-v33-noaddr") // decode into non-addressable map value
  3123. testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-noaddr")
  3124. if v == nil {
  3125. v33v2 = nil
  3126. } else {
  3127. v33v2 = make(map[string]float32, len(v))
  3128. } // reset map
  3129. testUnmarshalErr(&v33v2, bs33, h, t, "dec-map-v33-p-len")
  3130. testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-p-len")
  3131. bs33 = testMarshalErr(&v33v1, h, t, "enc-map-v33-p")
  3132. v33v2 = nil
  3133. testUnmarshalErr(&v33v2, bs33, h, t, "dec-map-v33-p-nil")
  3134. testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-p-nil")
  3135. // ...
  3136. if v == nil {
  3137. v33v2 = nil
  3138. } else {
  3139. v33v2 = make(map[string]float32, len(v))
  3140. } // reset map
  3141. var v33v3, v33v4 typMapMapStringFloat32
  3142. v33v3 = typMapMapStringFloat32(v33v1)
  3143. v33v4 = typMapMapStringFloat32(v33v2)
  3144. bs33 = testMarshalErr(v33v3, h, t, "enc-map-v33-custom")
  3145. testUnmarshalErr(v33v4, bs33, h, t, "dec-map-v33-p-len")
  3146. testDeepEqualErr(v33v3, v33v4, t, "equal-map-v33-p-len")
  3147. }
  3148. for _, v := range []map[string]float64{nil, {}, {"some-string-2": 0, "some-string": 11.1}} {
  3149. // fmt.Printf(">>>> running mammoth map v34: %v\n", v)
  3150. var v34v1, v34v2 map[string]float64
  3151. v34v1 = v
  3152. bs34 := testMarshalErr(v34v1, h, t, "enc-map-v34")
  3153. if v == nil {
  3154. v34v2 = nil
  3155. } else {
  3156. v34v2 = make(map[string]float64, len(v))
  3157. } // reset map
  3158. testUnmarshalErr(v34v2, bs34, h, t, "dec-map-v34")
  3159. testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34")
  3160. if v == nil {
  3161. v34v2 = nil
  3162. } else {
  3163. v34v2 = make(map[string]float64, len(v))
  3164. } // reset map
  3165. testUnmarshalErr(reflect.ValueOf(v34v2), bs34, h, t, "dec-map-v34-noaddr") // decode into non-addressable map value
  3166. testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-noaddr")
  3167. if v == nil {
  3168. v34v2 = nil
  3169. } else {
  3170. v34v2 = make(map[string]float64, len(v))
  3171. } // reset map
  3172. testUnmarshalErr(&v34v2, bs34, h, t, "dec-map-v34-p-len")
  3173. testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-p-len")
  3174. bs34 = testMarshalErr(&v34v1, h, t, "enc-map-v34-p")
  3175. v34v2 = nil
  3176. testUnmarshalErr(&v34v2, bs34, h, t, "dec-map-v34-p-nil")
  3177. testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-p-nil")
  3178. // ...
  3179. if v == nil {
  3180. v34v2 = nil
  3181. } else {
  3182. v34v2 = make(map[string]float64, len(v))
  3183. } // reset map
  3184. var v34v3, v34v4 typMapMapStringFloat64
  3185. v34v3 = typMapMapStringFloat64(v34v1)
  3186. v34v4 = typMapMapStringFloat64(v34v2)
  3187. bs34 = testMarshalErr(v34v3, h, t, "enc-map-v34-custom")
  3188. testUnmarshalErr(v34v4, bs34, h, t, "dec-map-v34-p-len")
  3189. testDeepEqualErr(v34v3, v34v4, t, "equal-map-v34-p-len")
  3190. }
  3191. for _, v := range []map[string]bool{nil, {}, {"some-string-2": false, "some-string": true}} {
  3192. // fmt.Printf(">>>> running mammoth map v35: %v\n", v)
  3193. var v35v1, v35v2 map[string]bool
  3194. v35v1 = v
  3195. bs35 := testMarshalErr(v35v1, h, t, "enc-map-v35")
  3196. if v == nil {
  3197. v35v2 = nil
  3198. } else {
  3199. v35v2 = make(map[string]bool, len(v))
  3200. } // reset map
  3201. testUnmarshalErr(v35v2, bs35, h, t, "dec-map-v35")
  3202. testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35")
  3203. if v == nil {
  3204. v35v2 = nil
  3205. } else {
  3206. v35v2 = make(map[string]bool, len(v))
  3207. } // reset map
  3208. testUnmarshalErr(reflect.ValueOf(v35v2), bs35, h, t, "dec-map-v35-noaddr") // decode into non-addressable map value
  3209. testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-noaddr")
  3210. if v == nil {
  3211. v35v2 = nil
  3212. } else {
  3213. v35v2 = make(map[string]bool, len(v))
  3214. } // reset map
  3215. testUnmarshalErr(&v35v2, bs35, h, t, "dec-map-v35-p-len")
  3216. testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-p-len")
  3217. bs35 = testMarshalErr(&v35v1, h, t, "enc-map-v35-p")
  3218. v35v2 = nil
  3219. testUnmarshalErr(&v35v2, bs35, h, t, "dec-map-v35-p-nil")
  3220. testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-p-nil")
  3221. // ...
  3222. if v == nil {
  3223. v35v2 = nil
  3224. } else {
  3225. v35v2 = make(map[string]bool, len(v))
  3226. } // reset map
  3227. var v35v3, v35v4 typMapMapStringBool
  3228. v35v3 = typMapMapStringBool(v35v1)
  3229. v35v4 = typMapMapStringBool(v35v2)
  3230. bs35 = testMarshalErr(v35v3, h, t, "enc-map-v35-custom")
  3231. testUnmarshalErr(v35v4, bs35, h, t, "dec-map-v35-p-len")
  3232. testDeepEqualErr(v35v3, v35v4, t, "equal-map-v35-p-len")
  3233. }
  3234. for _, v := range []map[float32]interface{}{nil, {}, {22.2: nil, 11.1: "string-is-an-interface-2"}} {
  3235. // fmt.Printf(">>>> running mammoth map v38: %v\n", v)
  3236. var v38v1, v38v2 map[float32]interface{}
  3237. v38v1 = v
  3238. bs38 := testMarshalErr(v38v1, h, t, "enc-map-v38")
  3239. if v == nil {
  3240. v38v2 = nil
  3241. } else {
  3242. v38v2 = make(map[float32]interface{}, len(v))
  3243. } // reset map
  3244. testUnmarshalErr(v38v2, bs38, h, t, "dec-map-v38")
  3245. testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38")
  3246. if v == nil {
  3247. v38v2 = nil
  3248. } else {
  3249. v38v2 = make(map[float32]interface{}, len(v))
  3250. } // reset map
  3251. testUnmarshalErr(reflect.ValueOf(v38v2), bs38, h, t, "dec-map-v38-noaddr") // decode into non-addressable map value
  3252. testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-noaddr")
  3253. if v == nil {
  3254. v38v2 = nil
  3255. } else {
  3256. v38v2 = make(map[float32]interface{}, len(v))
  3257. } // reset map
  3258. testUnmarshalErr(&v38v2, bs38, h, t, "dec-map-v38-p-len")
  3259. testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-p-len")
  3260. bs38 = testMarshalErr(&v38v1, h, t, "enc-map-v38-p")
  3261. v38v2 = nil
  3262. testUnmarshalErr(&v38v2, bs38, h, t, "dec-map-v38-p-nil")
  3263. testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-p-nil")
  3264. // ...
  3265. if v == nil {
  3266. v38v2 = nil
  3267. } else {
  3268. v38v2 = make(map[float32]interface{}, len(v))
  3269. } // reset map
  3270. var v38v3, v38v4 typMapMapFloat32Intf
  3271. v38v3 = typMapMapFloat32Intf(v38v1)
  3272. v38v4 = typMapMapFloat32Intf(v38v2)
  3273. bs38 = testMarshalErr(v38v3, h, t, "enc-map-v38-custom")
  3274. testUnmarshalErr(v38v4, bs38, h, t, "dec-map-v38-p-len")
  3275. testDeepEqualErr(v38v3, v38v4, t, "equal-map-v38-p-len")
  3276. }
  3277. for _, v := range []map[float32]string{nil, {}, {22.2: "", 11.1: "some-string-2"}} {
  3278. // fmt.Printf(">>>> running mammoth map v39: %v\n", v)
  3279. var v39v1, v39v2 map[float32]string
  3280. v39v1 = v
  3281. bs39 := testMarshalErr(v39v1, h, t, "enc-map-v39")
  3282. if v == nil {
  3283. v39v2 = nil
  3284. } else {
  3285. v39v2 = make(map[float32]string, len(v))
  3286. } // reset map
  3287. testUnmarshalErr(v39v2, bs39, h, t, "dec-map-v39")
  3288. testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39")
  3289. if v == nil {
  3290. v39v2 = nil
  3291. } else {
  3292. v39v2 = make(map[float32]string, len(v))
  3293. } // reset map
  3294. testUnmarshalErr(reflect.ValueOf(v39v2), bs39, h, t, "dec-map-v39-noaddr") // decode into non-addressable map value
  3295. testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-noaddr")
  3296. if v == nil {
  3297. v39v2 = nil
  3298. } else {
  3299. v39v2 = make(map[float32]string, len(v))
  3300. } // reset map
  3301. testUnmarshalErr(&v39v2, bs39, h, t, "dec-map-v39-p-len")
  3302. testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-p-len")
  3303. bs39 = testMarshalErr(&v39v1, h, t, "enc-map-v39-p")
  3304. v39v2 = nil
  3305. testUnmarshalErr(&v39v2, bs39, h, t, "dec-map-v39-p-nil")
  3306. testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-p-nil")
  3307. // ...
  3308. if v == nil {
  3309. v39v2 = nil
  3310. } else {
  3311. v39v2 = make(map[float32]string, len(v))
  3312. } // reset map
  3313. var v39v3, v39v4 typMapMapFloat32String
  3314. v39v3 = typMapMapFloat32String(v39v1)
  3315. v39v4 = typMapMapFloat32String(v39v2)
  3316. bs39 = testMarshalErr(v39v3, h, t, "enc-map-v39-custom")
  3317. testUnmarshalErr(v39v4, bs39, h, t, "dec-map-v39-p-len")
  3318. testDeepEqualErr(v39v3, v39v4, t, "equal-map-v39-p-len")
  3319. }
  3320. for _, v := range []map[float32]uint{nil, {}, {22.2: 0, 11.1: 44}} {
  3321. // fmt.Printf(">>>> running mammoth map v40: %v\n", v)
  3322. var v40v1, v40v2 map[float32]uint
  3323. v40v1 = v
  3324. bs40 := testMarshalErr(v40v1, h, t, "enc-map-v40")
  3325. if v == nil {
  3326. v40v2 = nil
  3327. } else {
  3328. v40v2 = make(map[float32]uint, len(v))
  3329. } // reset map
  3330. testUnmarshalErr(v40v2, bs40, h, t, "dec-map-v40")
  3331. testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40")
  3332. if v == nil {
  3333. v40v2 = nil
  3334. } else {
  3335. v40v2 = make(map[float32]uint, len(v))
  3336. } // reset map
  3337. testUnmarshalErr(reflect.ValueOf(v40v2), bs40, h, t, "dec-map-v40-noaddr") // decode into non-addressable map value
  3338. testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-noaddr")
  3339. if v == nil {
  3340. v40v2 = nil
  3341. } else {
  3342. v40v2 = make(map[float32]uint, len(v))
  3343. } // reset map
  3344. testUnmarshalErr(&v40v2, bs40, h, t, "dec-map-v40-p-len")
  3345. testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-p-len")
  3346. bs40 = testMarshalErr(&v40v1, h, t, "enc-map-v40-p")
  3347. v40v2 = nil
  3348. testUnmarshalErr(&v40v2, bs40, h, t, "dec-map-v40-p-nil")
  3349. testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-p-nil")
  3350. // ...
  3351. if v == nil {
  3352. v40v2 = nil
  3353. } else {
  3354. v40v2 = make(map[float32]uint, len(v))
  3355. } // reset map
  3356. var v40v3, v40v4 typMapMapFloat32Uint
  3357. v40v3 = typMapMapFloat32Uint(v40v1)
  3358. v40v4 = typMapMapFloat32Uint(v40v2)
  3359. bs40 = testMarshalErr(v40v3, h, t, "enc-map-v40-custom")
  3360. testUnmarshalErr(v40v4, bs40, h, t, "dec-map-v40-p-len")
  3361. testDeepEqualErr(v40v3, v40v4, t, "equal-map-v40-p-len")
  3362. }
  3363. for _, v := range []map[float32]uint8{nil, {}, {22.2: 0, 11.1: 33}} {
  3364. // fmt.Printf(">>>> running mammoth map v41: %v\n", v)
  3365. var v41v1, v41v2 map[float32]uint8
  3366. v41v1 = v
  3367. bs41 := testMarshalErr(v41v1, h, t, "enc-map-v41")
  3368. if v == nil {
  3369. v41v2 = nil
  3370. } else {
  3371. v41v2 = make(map[float32]uint8, len(v))
  3372. } // reset map
  3373. testUnmarshalErr(v41v2, bs41, h, t, "dec-map-v41")
  3374. testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41")
  3375. if v == nil {
  3376. v41v2 = nil
  3377. } else {
  3378. v41v2 = make(map[float32]uint8, len(v))
  3379. } // reset map
  3380. testUnmarshalErr(reflect.ValueOf(v41v2), bs41, h, t, "dec-map-v41-noaddr") // decode into non-addressable map value
  3381. testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-noaddr")
  3382. if v == nil {
  3383. v41v2 = nil
  3384. } else {
  3385. v41v2 = make(map[float32]uint8, len(v))
  3386. } // reset map
  3387. testUnmarshalErr(&v41v2, bs41, h, t, "dec-map-v41-p-len")
  3388. testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-p-len")
  3389. bs41 = testMarshalErr(&v41v1, h, t, "enc-map-v41-p")
  3390. v41v2 = nil
  3391. testUnmarshalErr(&v41v2, bs41, h, t, "dec-map-v41-p-nil")
  3392. testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-p-nil")
  3393. // ...
  3394. if v == nil {
  3395. v41v2 = nil
  3396. } else {
  3397. v41v2 = make(map[float32]uint8, len(v))
  3398. } // reset map
  3399. var v41v3, v41v4 typMapMapFloat32Uint8
  3400. v41v3 = typMapMapFloat32Uint8(v41v1)
  3401. v41v4 = typMapMapFloat32Uint8(v41v2)
  3402. bs41 = testMarshalErr(v41v3, h, t, "enc-map-v41-custom")
  3403. testUnmarshalErr(v41v4, bs41, h, t, "dec-map-v41-p-len")
  3404. testDeepEqualErr(v41v3, v41v4, t, "equal-map-v41-p-len")
  3405. }
  3406. for _, v := range []map[float32]uint16{nil, {}, {22.2: 0, 11.1: 44}} {
  3407. // fmt.Printf(">>>> running mammoth map v42: %v\n", v)
  3408. var v42v1, v42v2 map[float32]uint16
  3409. v42v1 = v
  3410. bs42 := testMarshalErr(v42v1, h, t, "enc-map-v42")
  3411. if v == nil {
  3412. v42v2 = nil
  3413. } else {
  3414. v42v2 = make(map[float32]uint16, len(v))
  3415. } // reset map
  3416. testUnmarshalErr(v42v2, bs42, h, t, "dec-map-v42")
  3417. testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42")
  3418. if v == nil {
  3419. v42v2 = nil
  3420. } else {
  3421. v42v2 = make(map[float32]uint16, len(v))
  3422. } // reset map
  3423. testUnmarshalErr(reflect.ValueOf(v42v2), bs42, h, t, "dec-map-v42-noaddr") // decode into non-addressable map value
  3424. testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-noaddr")
  3425. if v == nil {
  3426. v42v2 = nil
  3427. } else {
  3428. v42v2 = make(map[float32]uint16, len(v))
  3429. } // reset map
  3430. testUnmarshalErr(&v42v2, bs42, h, t, "dec-map-v42-p-len")
  3431. testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-p-len")
  3432. bs42 = testMarshalErr(&v42v1, h, t, "enc-map-v42-p")
  3433. v42v2 = nil
  3434. testUnmarshalErr(&v42v2, bs42, h, t, "dec-map-v42-p-nil")
  3435. testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-p-nil")
  3436. // ...
  3437. if v == nil {
  3438. v42v2 = nil
  3439. } else {
  3440. v42v2 = make(map[float32]uint16, len(v))
  3441. } // reset map
  3442. var v42v3, v42v4 typMapMapFloat32Uint16
  3443. v42v3 = typMapMapFloat32Uint16(v42v1)
  3444. v42v4 = typMapMapFloat32Uint16(v42v2)
  3445. bs42 = testMarshalErr(v42v3, h, t, "enc-map-v42-custom")
  3446. testUnmarshalErr(v42v4, bs42, h, t, "dec-map-v42-p-len")
  3447. testDeepEqualErr(v42v3, v42v4, t, "equal-map-v42-p-len")
  3448. }
  3449. for _, v := range []map[float32]uint32{nil, {}, {22.2: 0, 11.1: 33}} {
  3450. // fmt.Printf(">>>> running mammoth map v43: %v\n", v)
  3451. var v43v1, v43v2 map[float32]uint32
  3452. v43v1 = v
  3453. bs43 := testMarshalErr(v43v1, h, t, "enc-map-v43")
  3454. if v == nil {
  3455. v43v2 = nil
  3456. } else {
  3457. v43v2 = make(map[float32]uint32, len(v))
  3458. } // reset map
  3459. testUnmarshalErr(v43v2, bs43, h, t, "dec-map-v43")
  3460. testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43")
  3461. if v == nil {
  3462. v43v2 = nil
  3463. } else {
  3464. v43v2 = make(map[float32]uint32, len(v))
  3465. } // reset map
  3466. testUnmarshalErr(reflect.ValueOf(v43v2), bs43, h, t, "dec-map-v43-noaddr") // decode into non-addressable map value
  3467. testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-noaddr")
  3468. if v == nil {
  3469. v43v2 = nil
  3470. } else {
  3471. v43v2 = make(map[float32]uint32, len(v))
  3472. } // reset map
  3473. testUnmarshalErr(&v43v2, bs43, h, t, "dec-map-v43-p-len")
  3474. testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-p-len")
  3475. bs43 = testMarshalErr(&v43v1, h, t, "enc-map-v43-p")
  3476. v43v2 = nil
  3477. testUnmarshalErr(&v43v2, bs43, h, t, "dec-map-v43-p-nil")
  3478. testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-p-nil")
  3479. // ...
  3480. if v == nil {
  3481. v43v2 = nil
  3482. } else {
  3483. v43v2 = make(map[float32]uint32, len(v))
  3484. } // reset map
  3485. var v43v3, v43v4 typMapMapFloat32Uint32
  3486. v43v3 = typMapMapFloat32Uint32(v43v1)
  3487. v43v4 = typMapMapFloat32Uint32(v43v2)
  3488. bs43 = testMarshalErr(v43v3, h, t, "enc-map-v43-custom")
  3489. testUnmarshalErr(v43v4, bs43, h, t, "dec-map-v43-p-len")
  3490. testDeepEqualErr(v43v3, v43v4, t, "equal-map-v43-p-len")
  3491. }
  3492. for _, v := range []map[float32]uint64{nil, {}, {22.2: 0, 11.1: 44}} {
  3493. // fmt.Printf(">>>> running mammoth map v44: %v\n", v)
  3494. var v44v1, v44v2 map[float32]uint64
  3495. v44v1 = v
  3496. bs44 := testMarshalErr(v44v1, h, t, "enc-map-v44")
  3497. if v == nil {
  3498. v44v2 = nil
  3499. } else {
  3500. v44v2 = make(map[float32]uint64, len(v))
  3501. } // reset map
  3502. testUnmarshalErr(v44v2, bs44, h, t, "dec-map-v44")
  3503. testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44")
  3504. if v == nil {
  3505. v44v2 = nil
  3506. } else {
  3507. v44v2 = make(map[float32]uint64, len(v))
  3508. } // reset map
  3509. testUnmarshalErr(reflect.ValueOf(v44v2), bs44, h, t, "dec-map-v44-noaddr") // decode into non-addressable map value
  3510. testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-noaddr")
  3511. if v == nil {
  3512. v44v2 = nil
  3513. } else {
  3514. v44v2 = make(map[float32]uint64, len(v))
  3515. } // reset map
  3516. testUnmarshalErr(&v44v2, bs44, h, t, "dec-map-v44-p-len")
  3517. testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-p-len")
  3518. bs44 = testMarshalErr(&v44v1, h, t, "enc-map-v44-p")
  3519. v44v2 = nil
  3520. testUnmarshalErr(&v44v2, bs44, h, t, "dec-map-v44-p-nil")
  3521. testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-p-nil")
  3522. // ...
  3523. if v == nil {
  3524. v44v2 = nil
  3525. } else {
  3526. v44v2 = make(map[float32]uint64, len(v))
  3527. } // reset map
  3528. var v44v3, v44v4 typMapMapFloat32Uint64
  3529. v44v3 = typMapMapFloat32Uint64(v44v1)
  3530. v44v4 = typMapMapFloat32Uint64(v44v2)
  3531. bs44 = testMarshalErr(v44v3, h, t, "enc-map-v44-custom")
  3532. testUnmarshalErr(v44v4, bs44, h, t, "dec-map-v44-p-len")
  3533. testDeepEqualErr(v44v3, v44v4, t, "equal-map-v44-p-len")
  3534. }
  3535. for _, v := range []map[float32]uintptr{nil, {}, {22.2: 0, 11.1: 33}} {
  3536. // fmt.Printf(">>>> running mammoth map v45: %v\n", v)
  3537. var v45v1, v45v2 map[float32]uintptr
  3538. v45v1 = v
  3539. bs45 := testMarshalErr(v45v1, h, t, "enc-map-v45")
  3540. if v == nil {
  3541. v45v2 = nil
  3542. } else {
  3543. v45v2 = make(map[float32]uintptr, len(v))
  3544. } // reset map
  3545. testUnmarshalErr(v45v2, bs45, h, t, "dec-map-v45")
  3546. testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45")
  3547. if v == nil {
  3548. v45v2 = nil
  3549. } else {
  3550. v45v2 = make(map[float32]uintptr, len(v))
  3551. } // reset map
  3552. testUnmarshalErr(reflect.ValueOf(v45v2), bs45, h, t, "dec-map-v45-noaddr") // decode into non-addressable map value
  3553. testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-noaddr")
  3554. if v == nil {
  3555. v45v2 = nil
  3556. } else {
  3557. v45v2 = make(map[float32]uintptr, len(v))
  3558. } // reset map
  3559. testUnmarshalErr(&v45v2, bs45, h, t, "dec-map-v45-p-len")
  3560. testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-p-len")
  3561. bs45 = testMarshalErr(&v45v1, h, t, "enc-map-v45-p")
  3562. v45v2 = nil
  3563. testUnmarshalErr(&v45v2, bs45, h, t, "dec-map-v45-p-nil")
  3564. testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-p-nil")
  3565. // ...
  3566. if v == nil {
  3567. v45v2 = nil
  3568. } else {
  3569. v45v2 = make(map[float32]uintptr, len(v))
  3570. } // reset map
  3571. var v45v3, v45v4 typMapMapFloat32Uintptr
  3572. v45v3 = typMapMapFloat32Uintptr(v45v1)
  3573. v45v4 = typMapMapFloat32Uintptr(v45v2)
  3574. bs45 = testMarshalErr(v45v3, h, t, "enc-map-v45-custom")
  3575. testUnmarshalErr(v45v4, bs45, h, t, "dec-map-v45-p-len")
  3576. testDeepEqualErr(v45v3, v45v4, t, "equal-map-v45-p-len")
  3577. }
  3578. for _, v := range []map[float32]int{nil, {}, {22.2: 0, 11.1: 44}} {
  3579. // fmt.Printf(">>>> running mammoth map v46: %v\n", v)
  3580. var v46v1, v46v2 map[float32]int
  3581. v46v1 = v
  3582. bs46 := testMarshalErr(v46v1, h, t, "enc-map-v46")
  3583. if v == nil {
  3584. v46v2 = nil
  3585. } else {
  3586. v46v2 = make(map[float32]int, len(v))
  3587. } // reset map
  3588. testUnmarshalErr(v46v2, bs46, h, t, "dec-map-v46")
  3589. testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46")
  3590. if v == nil {
  3591. v46v2 = nil
  3592. } else {
  3593. v46v2 = make(map[float32]int, len(v))
  3594. } // reset map
  3595. testUnmarshalErr(reflect.ValueOf(v46v2), bs46, h, t, "dec-map-v46-noaddr") // decode into non-addressable map value
  3596. testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-noaddr")
  3597. if v == nil {
  3598. v46v2 = nil
  3599. } else {
  3600. v46v2 = make(map[float32]int, len(v))
  3601. } // reset map
  3602. testUnmarshalErr(&v46v2, bs46, h, t, "dec-map-v46-p-len")
  3603. testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-p-len")
  3604. bs46 = testMarshalErr(&v46v1, h, t, "enc-map-v46-p")
  3605. v46v2 = nil
  3606. testUnmarshalErr(&v46v2, bs46, h, t, "dec-map-v46-p-nil")
  3607. testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-p-nil")
  3608. // ...
  3609. if v == nil {
  3610. v46v2 = nil
  3611. } else {
  3612. v46v2 = make(map[float32]int, len(v))
  3613. } // reset map
  3614. var v46v3, v46v4 typMapMapFloat32Int
  3615. v46v3 = typMapMapFloat32Int(v46v1)
  3616. v46v4 = typMapMapFloat32Int(v46v2)
  3617. bs46 = testMarshalErr(v46v3, h, t, "enc-map-v46-custom")
  3618. testUnmarshalErr(v46v4, bs46, h, t, "dec-map-v46-p-len")
  3619. testDeepEqualErr(v46v3, v46v4, t, "equal-map-v46-p-len")
  3620. }
  3621. for _, v := range []map[float32]int8{nil, {}, {22.2: 0, 11.1: 33}} {
  3622. // fmt.Printf(">>>> running mammoth map v47: %v\n", v)
  3623. var v47v1, v47v2 map[float32]int8
  3624. v47v1 = v
  3625. bs47 := testMarshalErr(v47v1, h, t, "enc-map-v47")
  3626. if v == nil {
  3627. v47v2 = nil
  3628. } else {
  3629. v47v2 = make(map[float32]int8, len(v))
  3630. } // reset map
  3631. testUnmarshalErr(v47v2, bs47, h, t, "dec-map-v47")
  3632. testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47")
  3633. if v == nil {
  3634. v47v2 = nil
  3635. } else {
  3636. v47v2 = make(map[float32]int8, len(v))
  3637. } // reset map
  3638. testUnmarshalErr(reflect.ValueOf(v47v2), bs47, h, t, "dec-map-v47-noaddr") // decode into non-addressable map value
  3639. testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-noaddr")
  3640. if v == nil {
  3641. v47v2 = nil
  3642. } else {
  3643. v47v2 = make(map[float32]int8, len(v))
  3644. } // reset map
  3645. testUnmarshalErr(&v47v2, bs47, h, t, "dec-map-v47-p-len")
  3646. testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-p-len")
  3647. bs47 = testMarshalErr(&v47v1, h, t, "enc-map-v47-p")
  3648. v47v2 = nil
  3649. testUnmarshalErr(&v47v2, bs47, h, t, "dec-map-v47-p-nil")
  3650. testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-p-nil")
  3651. // ...
  3652. if v == nil {
  3653. v47v2 = nil
  3654. } else {
  3655. v47v2 = make(map[float32]int8, len(v))
  3656. } // reset map
  3657. var v47v3, v47v4 typMapMapFloat32Int8
  3658. v47v3 = typMapMapFloat32Int8(v47v1)
  3659. v47v4 = typMapMapFloat32Int8(v47v2)
  3660. bs47 = testMarshalErr(v47v3, h, t, "enc-map-v47-custom")
  3661. testUnmarshalErr(v47v4, bs47, h, t, "dec-map-v47-p-len")
  3662. testDeepEqualErr(v47v3, v47v4, t, "equal-map-v47-p-len")
  3663. }
  3664. for _, v := range []map[float32]int16{nil, {}, {22.2: 0, 11.1: 44}} {
  3665. // fmt.Printf(">>>> running mammoth map v48: %v\n", v)
  3666. var v48v1, v48v2 map[float32]int16
  3667. v48v1 = v
  3668. bs48 := testMarshalErr(v48v1, h, t, "enc-map-v48")
  3669. if v == nil {
  3670. v48v2 = nil
  3671. } else {
  3672. v48v2 = make(map[float32]int16, len(v))
  3673. } // reset map
  3674. testUnmarshalErr(v48v2, bs48, h, t, "dec-map-v48")
  3675. testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48")
  3676. if v == nil {
  3677. v48v2 = nil
  3678. } else {
  3679. v48v2 = make(map[float32]int16, len(v))
  3680. } // reset map
  3681. testUnmarshalErr(reflect.ValueOf(v48v2), bs48, h, t, "dec-map-v48-noaddr") // decode into non-addressable map value
  3682. testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-noaddr")
  3683. if v == nil {
  3684. v48v2 = nil
  3685. } else {
  3686. v48v2 = make(map[float32]int16, len(v))
  3687. } // reset map
  3688. testUnmarshalErr(&v48v2, bs48, h, t, "dec-map-v48-p-len")
  3689. testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-p-len")
  3690. bs48 = testMarshalErr(&v48v1, h, t, "enc-map-v48-p")
  3691. v48v2 = nil
  3692. testUnmarshalErr(&v48v2, bs48, h, t, "dec-map-v48-p-nil")
  3693. testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-p-nil")
  3694. // ...
  3695. if v == nil {
  3696. v48v2 = nil
  3697. } else {
  3698. v48v2 = make(map[float32]int16, len(v))
  3699. } // reset map
  3700. var v48v3, v48v4 typMapMapFloat32Int16
  3701. v48v3 = typMapMapFloat32Int16(v48v1)
  3702. v48v4 = typMapMapFloat32Int16(v48v2)
  3703. bs48 = testMarshalErr(v48v3, h, t, "enc-map-v48-custom")
  3704. testUnmarshalErr(v48v4, bs48, h, t, "dec-map-v48-p-len")
  3705. testDeepEqualErr(v48v3, v48v4, t, "equal-map-v48-p-len")
  3706. }
  3707. for _, v := range []map[float32]int32{nil, {}, {22.2: 0, 11.1: 33}} {
  3708. // fmt.Printf(">>>> running mammoth map v49: %v\n", v)
  3709. var v49v1, v49v2 map[float32]int32
  3710. v49v1 = v
  3711. bs49 := testMarshalErr(v49v1, h, t, "enc-map-v49")
  3712. if v == nil {
  3713. v49v2 = nil
  3714. } else {
  3715. v49v2 = make(map[float32]int32, len(v))
  3716. } // reset map
  3717. testUnmarshalErr(v49v2, bs49, h, t, "dec-map-v49")
  3718. testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49")
  3719. if v == nil {
  3720. v49v2 = nil
  3721. } else {
  3722. v49v2 = make(map[float32]int32, len(v))
  3723. } // reset map
  3724. testUnmarshalErr(reflect.ValueOf(v49v2), bs49, h, t, "dec-map-v49-noaddr") // decode into non-addressable map value
  3725. testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-noaddr")
  3726. if v == nil {
  3727. v49v2 = nil
  3728. } else {
  3729. v49v2 = make(map[float32]int32, len(v))
  3730. } // reset map
  3731. testUnmarshalErr(&v49v2, bs49, h, t, "dec-map-v49-p-len")
  3732. testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-p-len")
  3733. bs49 = testMarshalErr(&v49v1, h, t, "enc-map-v49-p")
  3734. v49v2 = nil
  3735. testUnmarshalErr(&v49v2, bs49, h, t, "dec-map-v49-p-nil")
  3736. testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-p-nil")
  3737. // ...
  3738. if v == nil {
  3739. v49v2 = nil
  3740. } else {
  3741. v49v2 = make(map[float32]int32, len(v))
  3742. } // reset map
  3743. var v49v3, v49v4 typMapMapFloat32Int32
  3744. v49v3 = typMapMapFloat32Int32(v49v1)
  3745. v49v4 = typMapMapFloat32Int32(v49v2)
  3746. bs49 = testMarshalErr(v49v3, h, t, "enc-map-v49-custom")
  3747. testUnmarshalErr(v49v4, bs49, h, t, "dec-map-v49-p-len")
  3748. testDeepEqualErr(v49v3, v49v4, t, "equal-map-v49-p-len")
  3749. }
  3750. for _, v := range []map[float32]int64{nil, {}, {22.2: 0, 11.1: 44}} {
  3751. // fmt.Printf(">>>> running mammoth map v50: %v\n", v)
  3752. var v50v1, v50v2 map[float32]int64
  3753. v50v1 = v
  3754. bs50 := testMarshalErr(v50v1, h, t, "enc-map-v50")
  3755. if v == nil {
  3756. v50v2 = nil
  3757. } else {
  3758. v50v2 = make(map[float32]int64, len(v))
  3759. } // reset map
  3760. testUnmarshalErr(v50v2, bs50, h, t, "dec-map-v50")
  3761. testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50")
  3762. if v == nil {
  3763. v50v2 = nil
  3764. } else {
  3765. v50v2 = make(map[float32]int64, len(v))
  3766. } // reset map
  3767. testUnmarshalErr(reflect.ValueOf(v50v2), bs50, h, t, "dec-map-v50-noaddr") // decode into non-addressable map value
  3768. testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-noaddr")
  3769. if v == nil {
  3770. v50v2 = nil
  3771. } else {
  3772. v50v2 = make(map[float32]int64, len(v))
  3773. } // reset map
  3774. testUnmarshalErr(&v50v2, bs50, h, t, "dec-map-v50-p-len")
  3775. testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-p-len")
  3776. bs50 = testMarshalErr(&v50v1, h, t, "enc-map-v50-p")
  3777. v50v2 = nil
  3778. testUnmarshalErr(&v50v2, bs50, h, t, "dec-map-v50-p-nil")
  3779. testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-p-nil")
  3780. // ...
  3781. if v == nil {
  3782. v50v2 = nil
  3783. } else {
  3784. v50v2 = make(map[float32]int64, len(v))
  3785. } // reset map
  3786. var v50v3, v50v4 typMapMapFloat32Int64
  3787. v50v3 = typMapMapFloat32Int64(v50v1)
  3788. v50v4 = typMapMapFloat32Int64(v50v2)
  3789. bs50 = testMarshalErr(v50v3, h, t, "enc-map-v50-custom")
  3790. testUnmarshalErr(v50v4, bs50, h, t, "dec-map-v50-p-len")
  3791. testDeepEqualErr(v50v3, v50v4, t, "equal-map-v50-p-len")
  3792. }
  3793. for _, v := range []map[float32]float32{nil, {}, {22.2: 0, 11.1: 22.2}} {
  3794. // fmt.Printf(">>>> running mammoth map v51: %v\n", v)
  3795. var v51v1, v51v2 map[float32]float32
  3796. v51v1 = v
  3797. bs51 := testMarshalErr(v51v1, h, t, "enc-map-v51")
  3798. if v == nil {
  3799. v51v2 = nil
  3800. } else {
  3801. v51v2 = make(map[float32]float32, len(v))
  3802. } // reset map
  3803. testUnmarshalErr(v51v2, bs51, h, t, "dec-map-v51")
  3804. testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51")
  3805. if v == nil {
  3806. v51v2 = nil
  3807. } else {
  3808. v51v2 = make(map[float32]float32, len(v))
  3809. } // reset map
  3810. testUnmarshalErr(reflect.ValueOf(v51v2), bs51, h, t, "dec-map-v51-noaddr") // decode into non-addressable map value
  3811. testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-noaddr")
  3812. if v == nil {
  3813. v51v2 = nil
  3814. } else {
  3815. v51v2 = make(map[float32]float32, len(v))
  3816. } // reset map
  3817. testUnmarshalErr(&v51v2, bs51, h, t, "dec-map-v51-p-len")
  3818. testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-p-len")
  3819. bs51 = testMarshalErr(&v51v1, h, t, "enc-map-v51-p")
  3820. v51v2 = nil
  3821. testUnmarshalErr(&v51v2, bs51, h, t, "dec-map-v51-p-nil")
  3822. testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-p-nil")
  3823. // ...
  3824. if v == nil {
  3825. v51v2 = nil
  3826. } else {
  3827. v51v2 = make(map[float32]float32, len(v))
  3828. } // reset map
  3829. var v51v3, v51v4 typMapMapFloat32Float32
  3830. v51v3 = typMapMapFloat32Float32(v51v1)
  3831. v51v4 = typMapMapFloat32Float32(v51v2)
  3832. bs51 = testMarshalErr(v51v3, h, t, "enc-map-v51-custom")
  3833. testUnmarshalErr(v51v4, bs51, h, t, "dec-map-v51-p-len")
  3834. testDeepEqualErr(v51v3, v51v4, t, "equal-map-v51-p-len")
  3835. }
  3836. for _, v := range []map[float32]float64{nil, {}, {11.1: 0, 22.2: 11.1}} {
  3837. // fmt.Printf(">>>> running mammoth map v52: %v\n", v)
  3838. var v52v1, v52v2 map[float32]float64
  3839. v52v1 = v
  3840. bs52 := testMarshalErr(v52v1, h, t, "enc-map-v52")
  3841. if v == nil {
  3842. v52v2 = nil
  3843. } else {
  3844. v52v2 = make(map[float32]float64, len(v))
  3845. } // reset map
  3846. testUnmarshalErr(v52v2, bs52, h, t, "dec-map-v52")
  3847. testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52")
  3848. if v == nil {
  3849. v52v2 = nil
  3850. } else {
  3851. v52v2 = make(map[float32]float64, len(v))
  3852. } // reset map
  3853. testUnmarshalErr(reflect.ValueOf(v52v2), bs52, h, t, "dec-map-v52-noaddr") // decode into non-addressable map value
  3854. testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-noaddr")
  3855. if v == nil {
  3856. v52v2 = nil
  3857. } else {
  3858. v52v2 = make(map[float32]float64, len(v))
  3859. } // reset map
  3860. testUnmarshalErr(&v52v2, bs52, h, t, "dec-map-v52-p-len")
  3861. testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-p-len")
  3862. bs52 = testMarshalErr(&v52v1, h, t, "enc-map-v52-p")
  3863. v52v2 = nil
  3864. testUnmarshalErr(&v52v2, bs52, h, t, "dec-map-v52-p-nil")
  3865. testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-p-nil")
  3866. // ...
  3867. if v == nil {
  3868. v52v2 = nil
  3869. } else {
  3870. v52v2 = make(map[float32]float64, len(v))
  3871. } // reset map
  3872. var v52v3, v52v4 typMapMapFloat32Float64
  3873. v52v3 = typMapMapFloat32Float64(v52v1)
  3874. v52v4 = typMapMapFloat32Float64(v52v2)
  3875. bs52 = testMarshalErr(v52v3, h, t, "enc-map-v52-custom")
  3876. testUnmarshalErr(v52v4, bs52, h, t, "dec-map-v52-p-len")
  3877. testDeepEqualErr(v52v3, v52v4, t, "equal-map-v52-p-len")
  3878. }
  3879. for _, v := range []map[float32]bool{nil, {}, {22.2: false, 11.1: true}} {
  3880. // fmt.Printf(">>>> running mammoth map v53: %v\n", v)
  3881. var v53v1, v53v2 map[float32]bool
  3882. v53v1 = v
  3883. bs53 := testMarshalErr(v53v1, h, t, "enc-map-v53")
  3884. if v == nil {
  3885. v53v2 = nil
  3886. } else {
  3887. v53v2 = make(map[float32]bool, len(v))
  3888. } // reset map
  3889. testUnmarshalErr(v53v2, bs53, h, t, "dec-map-v53")
  3890. testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53")
  3891. if v == nil {
  3892. v53v2 = nil
  3893. } else {
  3894. v53v2 = make(map[float32]bool, len(v))
  3895. } // reset map
  3896. testUnmarshalErr(reflect.ValueOf(v53v2), bs53, h, t, "dec-map-v53-noaddr") // decode into non-addressable map value
  3897. testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-noaddr")
  3898. if v == nil {
  3899. v53v2 = nil
  3900. } else {
  3901. v53v2 = make(map[float32]bool, len(v))
  3902. } // reset map
  3903. testUnmarshalErr(&v53v2, bs53, h, t, "dec-map-v53-p-len")
  3904. testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-p-len")
  3905. bs53 = testMarshalErr(&v53v1, h, t, "enc-map-v53-p")
  3906. v53v2 = nil
  3907. testUnmarshalErr(&v53v2, bs53, h, t, "dec-map-v53-p-nil")
  3908. testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-p-nil")
  3909. // ...
  3910. if v == nil {
  3911. v53v2 = nil
  3912. } else {
  3913. v53v2 = make(map[float32]bool, len(v))
  3914. } // reset map
  3915. var v53v3, v53v4 typMapMapFloat32Bool
  3916. v53v3 = typMapMapFloat32Bool(v53v1)
  3917. v53v4 = typMapMapFloat32Bool(v53v2)
  3918. bs53 = testMarshalErr(v53v3, h, t, "enc-map-v53-custom")
  3919. testUnmarshalErr(v53v4, bs53, h, t, "dec-map-v53-p-len")
  3920. testDeepEqualErr(v53v3, v53v4, t, "equal-map-v53-p-len")
  3921. }
  3922. for _, v := range []map[float64]interface{}{nil, {}, {22.2: nil, 11.1: "string-is-an-interface"}} {
  3923. // fmt.Printf(">>>> running mammoth map v56: %v\n", v)
  3924. var v56v1, v56v2 map[float64]interface{}
  3925. v56v1 = v
  3926. bs56 := testMarshalErr(v56v1, h, t, "enc-map-v56")
  3927. if v == nil {
  3928. v56v2 = nil
  3929. } else {
  3930. v56v2 = make(map[float64]interface{}, len(v))
  3931. } // reset map
  3932. testUnmarshalErr(v56v2, bs56, h, t, "dec-map-v56")
  3933. testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56")
  3934. if v == nil {
  3935. v56v2 = nil
  3936. } else {
  3937. v56v2 = make(map[float64]interface{}, len(v))
  3938. } // reset map
  3939. testUnmarshalErr(reflect.ValueOf(v56v2), bs56, h, t, "dec-map-v56-noaddr") // decode into non-addressable map value
  3940. testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-noaddr")
  3941. if v == nil {
  3942. v56v2 = nil
  3943. } else {
  3944. v56v2 = make(map[float64]interface{}, len(v))
  3945. } // reset map
  3946. testUnmarshalErr(&v56v2, bs56, h, t, "dec-map-v56-p-len")
  3947. testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-p-len")
  3948. bs56 = testMarshalErr(&v56v1, h, t, "enc-map-v56-p")
  3949. v56v2 = nil
  3950. testUnmarshalErr(&v56v2, bs56, h, t, "dec-map-v56-p-nil")
  3951. testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-p-nil")
  3952. // ...
  3953. if v == nil {
  3954. v56v2 = nil
  3955. } else {
  3956. v56v2 = make(map[float64]interface{}, len(v))
  3957. } // reset map
  3958. var v56v3, v56v4 typMapMapFloat64Intf
  3959. v56v3 = typMapMapFloat64Intf(v56v1)
  3960. v56v4 = typMapMapFloat64Intf(v56v2)
  3961. bs56 = testMarshalErr(v56v3, h, t, "enc-map-v56-custom")
  3962. testUnmarshalErr(v56v4, bs56, h, t, "dec-map-v56-p-len")
  3963. testDeepEqualErr(v56v3, v56v4, t, "equal-map-v56-p-len")
  3964. }
  3965. for _, v := range []map[float64]string{nil, {}, {22.2: "", 11.1: "some-string"}} {
  3966. // fmt.Printf(">>>> running mammoth map v57: %v\n", v)
  3967. var v57v1, v57v2 map[float64]string
  3968. v57v1 = v
  3969. bs57 := testMarshalErr(v57v1, h, t, "enc-map-v57")
  3970. if v == nil {
  3971. v57v2 = nil
  3972. } else {
  3973. v57v2 = make(map[float64]string, len(v))
  3974. } // reset map
  3975. testUnmarshalErr(v57v2, bs57, h, t, "dec-map-v57")
  3976. testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57")
  3977. if v == nil {
  3978. v57v2 = nil
  3979. } else {
  3980. v57v2 = make(map[float64]string, len(v))
  3981. } // reset map
  3982. testUnmarshalErr(reflect.ValueOf(v57v2), bs57, h, t, "dec-map-v57-noaddr") // decode into non-addressable map value
  3983. testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-noaddr")
  3984. if v == nil {
  3985. v57v2 = nil
  3986. } else {
  3987. v57v2 = make(map[float64]string, len(v))
  3988. } // reset map
  3989. testUnmarshalErr(&v57v2, bs57, h, t, "dec-map-v57-p-len")
  3990. testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-p-len")
  3991. bs57 = testMarshalErr(&v57v1, h, t, "enc-map-v57-p")
  3992. v57v2 = nil
  3993. testUnmarshalErr(&v57v2, bs57, h, t, "dec-map-v57-p-nil")
  3994. testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-p-nil")
  3995. // ...
  3996. if v == nil {
  3997. v57v2 = nil
  3998. } else {
  3999. v57v2 = make(map[float64]string, len(v))
  4000. } // reset map
  4001. var v57v3, v57v4 typMapMapFloat64String
  4002. v57v3 = typMapMapFloat64String(v57v1)
  4003. v57v4 = typMapMapFloat64String(v57v2)
  4004. bs57 = testMarshalErr(v57v3, h, t, "enc-map-v57-custom")
  4005. testUnmarshalErr(v57v4, bs57, h, t, "dec-map-v57-p-len")
  4006. testDeepEqualErr(v57v3, v57v4, t, "equal-map-v57-p-len")
  4007. }
  4008. for _, v := range []map[float64]uint{nil, {}, {22.2: 0, 11.1: 33}} {
  4009. // fmt.Printf(">>>> running mammoth map v58: %v\n", v)
  4010. var v58v1, v58v2 map[float64]uint
  4011. v58v1 = v
  4012. bs58 := testMarshalErr(v58v1, h, t, "enc-map-v58")
  4013. if v == nil {
  4014. v58v2 = nil
  4015. } else {
  4016. v58v2 = make(map[float64]uint, len(v))
  4017. } // reset map
  4018. testUnmarshalErr(v58v2, bs58, h, t, "dec-map-v58")
  4019. testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58")
  4020. if v == nil {
  4021. v58v2 = nil
  4022. } else {
  4023. v58v2 = make(map[float64]uint, len(v))
  4024. } // reset map
  4025. testUnmarshalErr(reflect.ValueOf(v58v2), bs58, h, t, "dec-map-v58-noaddr") // decode into non-addressable map value
  4026. testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-noaddr")
  4027. if v == nil {
  4028. v58v2 = nil
  4029. } else {
  4030. v58v2 = make(map[float64]uint, len(v))
  4031. } // reset map
  4032. testUnmarshalErr(&v58v2, bs58, h, t, "dec-map-v58-p-len")
  4033. testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-p-len")
  4034. bs58 = testMarshalErr(&v58v1, h, t, "enc-map-v58-p")
  4035. v58v2 = nil
  4036. testUnmarshalErr(&v58v2, bs58, h, t, "dec-map-v58-p-nil")
  4037. testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-p-nil")
  4038. // ...
  4039. if v == nil {
  4040. v58v2 = nil
  4041. } else {
  4042. v58v2 = make(map[float64]uint, len(v))
  4043. } // reset map
  4044. var v58v3, v58v4 typMapMapFloat64Uint
  4045. v58v3 = typMapMapFloat64Uint(v58v1)
  4046. v58v4 = typMapMapFloat64Uint(v58v2)
  4047. bs58 = testMarshalErr(v58v3, h, t, "enc-map-v58-custom")
  4048. testUnmarshalErr(v58v4, bs58, h, t, "dec-map-v58-p-len")
  4049. testDeepEqualErr(v58v3, v58v4, t, "equal-map-v58-p-len")
  4050. }
  4051. for _, v := range []map[float64]uint8{nil, {}, {22.2: 0, 11.1: 44}} {
  4052. // fmt.Printf(">>>> running mammoth map v59: %v\n", v)
  4053. var v59v1, v59v2 map[float64]uint8
  4054. v59v1 = v
  4055. bs59 := testMarshalErr(v59v1, h, t, "enc-map-v59")
  4056. if v == nil {
  4057. v59v2 = nil
  4058. } else {
  4059. v59v2 = make(map[float64]uint8, len(v))
  4060. } // reset map
  4061. testUnmarshalErr(v59v2, bs59, h, t, "dec-map-v59")
  4062. testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59")
  4063. if v == nil {
  4064. v59v2 = nil
  4065. } else {
  4066. v59v2 = make(map[float64]uint8, len(v))
  4067. } // reset map
  4068. testUnmarshalErr(reflect.ValueOf(v59v2), bs59, h, t, "dec-map-v59-noaddr") // decode into non-addressable map value
  4069. testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-noaddr")
  4070. if v == nil {
  4071. v59v2 = nil
  4072. } else {
  4073. v59v2 = make(map[float64]uint8, len(v))
  4074. } // reset map
  4075. testUnmarshalErr(&v59v2, bs59, h, t, "dec-map-v59-p-len")
  4076. testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-p-len")
  4077. bs59 = testMarshalErr(&v59v1, h, t, "enc-map-v59-p")
  4078. v59v2 = nil
  4079. testUnmarshalErr(&v59v2, bs59, h, t, "dec-map-v59-p-nil")
  4080. testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-p-nil")
  4081. // ...
  4082. if v == nil {
  4083. v59v2 = nil
  4084. } else {
  4085. v59v2 = make(map[float64]uint8, len(v))
  4086. } // reset map
  4087. var v59v3, v59v4 typMapMapFloat64Uint8
  4088. v59v3 = typMapMapFloat64Uint8(v59v1)
  4089. v59v4 = typMapMapFloat64Uint8(v59v2)
  4090. bs59 = testMarshalErr(v59v3, h, t, "enc-map-v59-custom")
  4091. testUnmarshalErr(v59v4, bs59, h, t, "dec-map-v59-p-len")
  4092. testDeepEqualErr(v59v3, v59v4, t, "equal-map-v59-p-len")
  4093. }
  4094. for _, v := range []map[float64]uint16{nil, {}, {22.2: 0, 11.1: 33}} {
  4095. // fmt.Printf(">>>> running mammoth map v60: %v\n", v)
  4096. var v60v1, v60v2 map[float64]uint16
  4097. v60v1 = v
  4098. bs60 := testMarshalErr(v60v1, h, t, "enc-map-v60")
  4099. if v == nil {
  4100. v60v2 = nil
  4101. } else {
  4102. v60v2 = make(map[float64]uint16, len(v))
  4103. } // reset map
  4104. testUnmarshalErr(v60v2, bs60, h, t, "dec-map-v60")
  4105. testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60")
  4106. if v == nil {
  4107. v60v2 = nil
  4108. } else {
  4109. v60v2 = make(map[float64]uint16, len(v))
  4110. } // reset map
  4111. testUnmarshalErr(reflect.ValueOf(v60v2), bs60, h, t, "dec-map-v60-noaddr") // decode into non-addressable map value
  4112. testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-noaddr")
  4113. if v == nil {
  4114. v60v2 = nil
  4115. } else {
  4116. v60v2 = make(map[float64]uint16, len(v))
  4117. } // reset map
  4118. testUnmarshalErr(&v60v2, bs60, h, t, "dec-map-v60-p-len")
  4119. testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-p-len")
  4120. bs60 = testMarshalErr(&v60v1, h, t, "enc-map-v60-p")
  4121. v60v2 = nil
  4122. testUnmarshalErr(&v60v2, bs60, h, t, "dec-map-v60-p-nil")
  4123. testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-p-nil")
  4124. // ...
  4125. if v == nil {
  4126. v60v2 = nil
  4127. } else {
  4128. v60v2 = make(map[float64]uint16, len(v))
  4129. } // reset map
  4130. var v60v3, v60v4 typMapMapFloat64Uint16
  4131. v60v3 = typMapMapFloat64Uint16(v60v1)
  4132. v60v4 = typMapMapFloat64Uint16(v60v2)
  4133. bs60 = testMarshalErr(v60v3, h, t, "enc-map-v60-custom")
  4134. testUnmarshalErr(v60v4, bs60, h, t, "dec-map-v60-p-len")
  4135. testDeepEqualErr(v60v3, v60v4, t, "equal-map-v60-p-len")
  4136. }
  4137. for _, v := range []map[float64]uint32{nil, {}, {22.2: 0, 11.1: 44}} {
  4138. // fmt.Printf(">>>> running mammoth map v61: %v\n", v)
  4139. var v61v1, v61v2 map[float64]uint32
  4140. v61v1 = v
  4141. bs61 := testMarshalErr(v61v1, h, t, "enc-map-v61")
  4142. if v == nil {
  4143. v61v2 = nil
  4144. } else {
  4145. v61v2 = make(map[float64]uint32, len(v))
  4146. } // reset map
  4147. testUnmarshalErr(v61v2, bs61, h, t, "dec-map-v61")
  4148. testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61")
  4149. if v == nil {
  4150. v61v2 = nil
  4151. } else {
  4152. v61v2 = make(map[float64]uint32, len(v))
  4153. } // reset map
  4154. testUnmarshalErr(reflect.ValueOf(v61v2), bs61, h, t, "dec-map-v61-noaddr") // decode into non-addressable map value
  4155. testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-noaddr")
  4156. if v == nil {
  4157. v61v2 = nil
  4158. } else {
  4159. v61v2 = make(map[float64]uint32, len(v))
  4160. } // reset map
  4161. testUnmarshalErr(&v61v2, bs61, h, t, "dec-map-v61-p-len")
  4162. testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-p-len")
  4163. bs61 = testMarshalErr(&v61v1, h, t, "enc-map-v61-p")
  4164. v61v2 = nil
  4165. testUnmarshalErr(&v61v2, bs61, h, t, "dec-map-v61-p-nil")
  4166. testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-p-nil")
  4167. // ...
  4168. if v == nil {
  4169. v61v2 = nil
  4170. } else {
  4171. v61v2 = make(map[float64]uint32, len(v))
  4172. } // reset map
  4173. var v61v3, v61v4 typMapMapFloat64Uint32
  4174. v61v3 = typMapMapFloat64Uint32(v61v1)
  4175. v61v4 = typMapMapFloat64Uint32(v61v2)
  4176. bs61 = testMarshalErr(v61v3, h, t, "enc-map-v61-custom")
  4177. testUnmarshalErr(v61v4, bs61, h, t, "dec-map-v61-p-len")
  4178. testDeepEqualErr(v61v3, v61v4, t, "equal-map-v61-p-len")
  4179. }
  4180. for _, v := range []map[float64]uint64{nil, {}, {22.2: 0, 11.1: 33}} {
  4181. // fmt.Printf(">>>> running mammoth map v62: %v\n", v)
  4182. var v62v1, v62v2 map[float64]uint64
  4183. v62v1 = v
  4184. bs62 := testMarshalErr(v62v1, h, t, "enc-map-v62")
  4185. if v == nil {
  4186. v62v2 = nil
  4187. } else {
  4188. v62v2 = make(map[float64]uint64, len(v))
  4189. } // reset map
  4190. testUnmarshalErr(v62v2, bs62, h, t, "dec-map-v62")
  4191. testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62")
  4192. if v == nil {
  4193. v62v2 = nil
  4194. } else {
  4195. v62v2 = make(map[float64]uint64, len(v))
  4196. } // reset map
  4197. testUnmarshalErr(reflect.ValueOf(v62v2), bs62, h, t, "dec-map-v62-noaddr") // decode into non-addressable map value
  4198. testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-noaddr")
  4199. if v == nil {
  4200. v62v2 = nil
  4201. } else {
  4202. v62v2 = make(map[float64]uint64, len(v))
  4203. } // reset map
  4204. testUnmarshalErr(&v62v2, bs62, h, t, "dec-map-v62-p-len")
  4205. testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-p-len")
  4206. bs62 = testMarshalErr(&v62v1, h, t, "enc-map-v62-p")
  4207. v62v2 = nil
  4208. testUnmarshalErr(&v62v2, bs62, h, t, "dec-map-v62-p-nil")
  4209. testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-p-nil")
  4210. // ...
  4211. if v == nil {
  4212. v62v2 = nil
  4213. } else {
  4214. v62v2 = make(map[float64]uint64, len(v))
  4215. } // reset map
  4216. var v62v3, v62v4 typMapMapFloat64Uint64
  4217. v62v3 = typMapMapFloat64Uint64(v62v1)
  4218. v62v4 = typMapMapFloat64Uint64(v62v2)
  4219. bs62 = testMarshalErr(v62v3, h, t, "enc-map-v62-custom")
  4220. testUnmarshalErr(v62v4, bs62, h, t, "dec-map-v62-p-len")
  4221. testDeepEqualErr(v62v3, v62v4, t, "equal-map-v62-p-len")
  4222. }
  4223. for _, v := range []map[float64]uintptr{nil, {}, {22.2: 0, 11.1: 44}} {
  4224. // fmt.Printf(">>>> running mammoth map v63: %v\n", v)
  4225. var v63v1, v63v2 map[float64]uintptr
  4226. v63v1 = v
  4227. bs63 := testMarshalErr(v63v1, h, t, "enc-map-v63")
  4228. if v == nil {
  4229. v63v2 = nil
  4230. } else {
  4231. v63v2 = make(map[float64]uintptr, len(v))
  4232. } // reset map
  4233. testUnmarshalErr(v63v2, bs63, h, t, "dec-map-v63")
  4234. testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63")
  4235. if v == nil {
  4236. v63v2 = nil
  4237. } else {
  4238. v63v2 = make(map[float64]uintptr, len(v))
  4239. } // reset map
  4240. testUnmarshalErr(reflect.ValueOf(v63v2), bs63, h, t, "dec-map-v63-noaddr") // decode into non-addressable map value
  4241. testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-noaddr")
  4242. if v == nil {
  4243. v63v2 = nil
  4244. } else {
  4245. v63v2 = make(map[float64]uintptr, len(v))
  4246. } // reset map
  4247. testUnmarshalErr(&v63v2, bs63, h, t, "dec-map-v63-p-len")
  4248. testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-p-len")
  4249. bs63 = testMarshalErr(&v63v1, h, t, "enc-map-v63-p")
  4250. v63v2 = nil
  4251. testUnmarshalErr(&v63v2, bs63, h, t, "dec-map-v63-p-nil")
  4252. testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-p-nil")
  4253. // ...
  4254. if v == nil {
  4255. v63v2 = nil
  4256. } else {
  4257. v63v2 = make(map[float64]uintptr, len(v))
  4258. } // reset map
  4259. var v63v3, v63v4 typMapMapFloat64Uintptr
  4260. v63v3 = typMapMapFloat64Uintptr(v63v1)
  4261. v63v4 = typMapMapFloat64Uintptr(v63v2)
  4262. bs63 = testMarshalErr(v63v3, h, t, "enc-map-v63-custom")
  4263. testUnmarshalErr(v63v4, bs63, h, t, "dec-map-v63-p-len")
  4264. testDeepEqualErr(v63v3, v63v4, t, "equal-map-v63-p-len")
  4265. }
  4266. for _, v := range []map[float64]int{nil, {}, {22.2: 0, 11.1: 33}} {
  4267. // fmt.Printf(">>>> running mammoth map v64: %v\n", v)
  4268. var v64v1, v64v2 map[float64]int
  4269. v64v1 = v
  4270. bs64 := testMarshalErr(v64v1, h, t, "enc-map-v64")
  4271. if v == nil {
  4272. v64v2 = nil
  4273. } else {
  4274. v64v2 = make(map[float64]int, len(v))
  4275. } // reset map
  4276. testUnmarshalErr(v64v2, bs64, h, t, "dec-map-v64")
  4277. testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64")
  4278. if v == nil {
  4279. v64v2 = nil
  4280. } else {
  4281. v64v2 = make(map[float64]int, len(v))
  4282. } // reset map
  4283. testUnmarshalErr(reflect.ValueOf(v64v2), bs64, h, t, "dec-map-v64-noaddr") // decode into non-addressable map value
  4284. testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-noaddr")
  4285. if v == nil {
  4286. v64v2 = nil
  4287. } else {
  4288. v64v2 = make(map[float64]int, len(v))
  4289. } // reset map
  4290. testUnmarshalErr(&v64v2, bs64, h, t, "dec-map-v64-p-len")
  4291. testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-p-len")
  4292. bs64 = testMarshalErr(&v64v1, h, t, "enc-map-v64-p")
  4293. v64v2 = nil
  4294. testUnmarshalErr(&v64v2, bs64, h, t, "dec-map-v64-p-nil")
  4295. testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-p-nil")
  4296. // ...
  4297. if v == nil {
  4298. v64v2 = nil
  4299. } else {
  4300. v64v2 = make(map[float64]int, len(v))
  4301. } // reset map
  4302. var v64v3, v64v4 typMapMapFloat64Int
  4303. v64v3 = typMapMapFloat64Int(v64v1)
  4304. v64v4 = typMapMapFloat64Int(v64v2)
  4305. bs64 = testMarshalErr(v64v3, h, t, "enc-map-v64-custom")
  4306. testUnmarshalErr(v64v4, bs64, h, t, "dec-map-v64-p-len")
  4307. testDeepEqualErr(v64v3, v64v4, t, "equal-map-v64-p-len")
  4308. }
  4309. for _, v := range []map[float64]int8{nil, {}, {22.2: 0, 11.1: 44}} {
  4310. // fmt.Printf(">>>> running mammoth map v65: %v\n", v)
  4311. var v65v1, v65v2 map[float64]int8
  4312. v65v1 = v
  4313. bs65 := testMarshalErr(v65v1, h, t, "enc-map-v65")
  4314. if v == nil {
  4315. v65v2 = nil
  4316. } else {
  4317. v65v2 = make(map[float64]int8, len(v))
  4318. } // reset map
  4319. testUnmarshalErr(v65v2, bs65, h, t, "dec-map-v65")
  4320. testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65")
  4321. if v == nil {
  4322. v65v2 = nil
  4323. } else {
  4324. v65v2 = make(map[float64]int8, len(v))
  4325. } // reset map
  4326. testUnmarshalErr(reflect.ValueOf(v65v2), bs65, h, t, "dec-map-v65-noaddr") // decode into non-addressable map value
  4327. testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-noaddr")
  4328. if v == nil {
  4329. v65v2 = nil
  4330. } else {
  4331. v65v2 = make(map[float64]int8, len(v))
  4332. } // reset map
  4333. testUnmarshalErr(&v65v2, bs65, h, t, "dec-map-v65-p-len")
  4334. testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-p-len")
  4335. bs65 = testMarshalErr(&v65v1, h, t, "enc-map-v65-p")
  4336. v65v2 = nil
  4337. testUnmarshalErr(&v65v2, bs65, h, t, "dec-map-v65-p-nil")
  4338. testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-p-nil")
  4339. // ...
  4340. if v == nil {
  4341. v65v2 = nil
  4342. } else {
  4343. v65v2 = make(map[float64]int8, len(v))
  4344. } // reset map
  4345. var v65v3, v65v4 typMapMapFloat64Int8
  4346. v65v3 = typMapMapFloat64Int8(v65v1)
  4347. v65v4 = typMapMapFloat64Int8(v65v2)
  4348. bs65 = testMarshalErr(v65v3, h, t, "enc-map-v65-custom")
  4349. testUnmarshalErr(v65v4, bs65, h, t, "dec-map-v65-p-len")
  4350. testDeepEqualErr(v65v3, v65v4, t, "equal-map-v65-p-len")
  4351. }
  4352. for _, v := range []map[float64]int16{nil, {}, {22.2: 0, 11.1: 33}} {
  4353. // fmt.Printf(">>>> running mammoth map v66: %v\n", v)
  4354. var v66v1, v66v2 map[float64]int16
  4355. v66v1 = v
  4356. bs66 := testMarshalErr(v66v1, h, t, "enc-map-v66")
  4357. if v == nil {
  4358. v66v2 = nil
  4359. } else {
  4360. v66v2 = make(map[float64]int16, len(v))
  4361. } // reset map
  4362. testUnmarshalErr(v66v2, bs66, h, t, "dec-map-v66")
  4363. testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66")
  4364. if v == nil {
  4365. v66v2 = nil
  4366. } else {
  4367. v66v2 = make(map[float64]int16, len(v))
  4368. } // reset map
  4369. testUnmarshalErr(reflect.ValueOf(v66v2), bs66, h, t, "dec-map-v66-noaddr") // decode into non-addressable map value
  4370. testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-noaddr")
  4371. if v == nil {
  4372. v66v2 = nil
  4373. } else {
  4374. v66v2 = make(map[float64]int16, len(v))
  4375. } // reset map
  4376. testUnmarshalErr(&v66v2, bs66, h, t, "dec-map-v66-p-len")
  4377. testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-p-len")
  4378. bs66 = testMarshalErr(&v66v1, h, t, "enc-map-v66-p")
  4379. v66v2 = nil
  4380. testUnmarshalErr(&v66v2, bs66, h, t, "dec-map-v66-p-nil")
  4381. testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-p-nil")
  4382. // ...
  4383. if v == nil {
  4384. v66v2 = nil
  4385. } else {
  4386. v66v2 = make(map[float64]int16, len(v))
  4387. } // reset map
  4388. var v66v3, v66v4 typMapMapFloat64Int16
  4389. v66v3 = typMapMapFloat64Int16(v66v1)
  4390. v66v4 = typMapMapFloat64Int16(v66v2)
  4391. bs66 = testMarshalErr(v66v3, h, t, "enc-map-v66-custom")
  4392. testUnmarshalErr(v66v4, bs66, h, t, "dec-map-v66-p-len")
  4393. testDeepEqualErr(v66v3, v66v4, t, "equal-map-v66-p-len")
  4394. }
  4395. for _, v := range []map[float64]int32{nil, {}, {22.2: 0, 11.1: 44}} {
  4396. // fmt.Printf(">>>> running mammoth map v67: %v\n", v)
  4397. var v67v1, v67v2 map[float64]int32
  4398. v67v1 = v
  4399. bs67 := testMarshalErr(v67v1, h, t, "enc-map-v67")
  4400. if v == nil {
  4401. v67v2 = nil
  4402. } else {
  4403. v67v2 = make(map[float64]int32, len(v))
  4404. } // reset map
  4405. testUnmarshalErr(v67v2, bs67, h, t, "dec-map-v67")
  4406. testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67")
  4407. if v == nil {
  4408. v67v2 = nil
  4409. } else {
  4410. v67v2 = make(map[float64]int32, len(v))
  4411. } // reset map
  4412. testUnmarshalErr(reflect.ValueOf(v67v2), bs67, h, t, "dec-map-v67-noaddr") // decode into non-addressable map value
  4413. testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-noaddr")
  4414. if v == nil {
  4415. v67v2 = nil
  4416. } else {
  4417. v67v2 = make(map[float64]int32, len(v))
  4418. } // reset map
  4419. testUnmarshalErr(&v67v2, bs67, h, t, "dec-map-v67-p-len")
  4420. testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-p-len")
  4421. bs67 = testMarshalErr(&v67v1, h, t, "enc-map-v67-p")
  4422. v67v2 = nil
  4423. testUnmarshalErr(&v67v2, bs67, h, t, "dec-map-v67-p-nil")
  4424. testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-p-nil")
  4425. // ...
  4426. if v == nil {
  4427. v67v2 = nil
  4428. } else {
  4429. v67v2 = make(map[float64]int32, len(v))
  4430. } // reset map
  4431. var v67v3, v67v4 typMapMapFloat64Int32
  4432. v67v3 = typMapMapFloat64Int32(v67v1)
  4433. v67v4 = typMapMapFloat64Int32(v67v2)
  4434. bs67 = testMarshalErr(v67v3, h, t, "enc-map-v67-custom")
  4435. testUnmarshalErr(v67v4, bs67, h, t, "dec-map-v67-p-len")
  4436. testDeepEqualErr(v67v3, v67v4, t, "equal-map-v67-p-len")
  4437. }
  4438. for _, v := range []map[float64]int64{nil, {}, {22.2: 0, 11.1: 33}} {
  4439. // fmt.Printf(">>>> running mammoth map v68: %v\n", v)
  4440. var v68v1, v68v2 map[float64]int64
  4441. v68v1 = v
  4442. bs68 := testMarshalErr(v68v1, h, t, "enc-map-v68")
  4443. if v == nil {
  4444. v68v2 = nil
  4445. } else {
  4446. v68v2 = make(map[float64]int64, len(v))
  4447. } // reset map
  4448. testUnmarshalErr(v68v2, bs68, h, t, "dec-map-v68")
  4449. testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68")
  4450. if v == nil {
  4451. v68v2 = nil
  4452. } else {
  4453. v68v2 = make(map[float64]int64, len(v))
  4454. } // reset map
  4455. testUnmarshalErr(reflect.ValueOf(v68v2), bs68, h, t, "dec-map-v68-noaddr") // decode into non-addressable map value
  4456. testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-noaddr")
  4457. if v == nil {
  4458. v68v2 = nil
  4459. } else {
  4460. v68v2 = make(map[float64]int64, len(v))
  4461. } // reset map
  4462. testUnmarshalErr(&v68v2, bs68, h, t, "dec-map-v68-p-len")
  4463. testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-p-len")
  4464. bs68 = testMarshalErr(&v68v1, h, t, "enc-map-v68-p")
  4465. v68v2 = nil
  4466. testUnmarshalErr(&v68v2, bs68, h, t, "dec-map-v68-p-nil")
  4467. testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-p-nil")
  4468. // ...
  4469. if v == nil {
  4470. v68v2 = nil
  4471. } else {
  4472. v68v2 = make(map[float64]int64, len(v))
  4473. } // reset map
  4474. var v68v3, v68v4 typMapMapFloat64Int64
  4475. v68v3 = typMapMapFloat64Int64(v68v1)
  4476. v68v4 = typMapMapFloat64Int64(v68v2)
  4477. bs68 = testMarshalErr(v68v3, h, t, "enc-map-v68-custom")
  4478. testUnmarshalErr(v68v4, bs68, h, t, "dec-map-v68-p-len")
  4479. testDeepEqualErr(v68v3, v68v4, t, "equal-map-v68-p-len")
  4480. }
  4481. for _, v := range []map[float64]float32{nil, {}, {22.2: 0, 11.1: 22.2}} {
  4482. // fmt.Printf(">>>> running mammoth map v69: %v\n", v)
  4483. var v69v1, v69v2 map[float64]float32
  4484. v69v1 = v
  4485. bs69 := testMarshalErr(v69v1, h, t, "enc-map-v69")
  4486. if v == nil {
  4487. v69v2 = nil
  4488. } else {
  4489. v69v2 = make(map[float64]float32, len(v))
  4490. } // reset map
  4491. testUnmarshalErr(v69v2, bs69, h, t, "dec-map-v69")
  4492. testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69")
  4493. if v == nil {
  4494. v69v2 = nil
  4495. } else {
  4496. v69v2 = make(map[float64]float32, len(v))
  4497. } // reset map
  4498. testUnmarshalErr(reflect.ValueOf(v69v2), bs69, h, t, "dec-map-v69-noaddr") // decode into non-addressable map value
  4499. testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-noaddr")
  4500. if v == nil {
  4501. v69v2 = nil
  4502. } else {
  4503. v69v2 = make(map[float64]float32, len(v))
  4504. } // reset map
  4505. testUnmarshalErr(&v69v2, bs69, h, t, "dec-map-v69-p-len")
  4506. testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-p-len")
  4507. bs69 = testMarshalErr(&v69v1, h, t, "enc-map-v69-p")
  4508. v69v2 = nil
  4509. testUnmarshalErr(&v69v2, bs69, h, t, "dec-map-v69-p-nil")
  4510. testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-p-nil")
  4511. // ...
  4512. if v == nil {
  4513. v69v2 = nil
  4514. } else {
  4515. v69v2 = make(map[float64]float32, len(v))
  4516. } // reset map
  4517. var v69v3, v69v4 typMapMapFloat64Float32
  4518. v69v3 = typMapMapFloat64Float32(v69v1)
  4519. v69v4 = typMapMapFloat64Float32(v69v2)
  4520. bs69 = testMarshalErr(v69v3, h, t, "enc-map-v69-custom")
  4521. testUnmarshalErr(v69v4, bs69, h, t, "dec-map-v69-p-len")
  4522. testDeepEqualErr(v69v3, v69v4, t, "equal-map-v69-p-len")
  4523. }
  4524. for _, v := range []map[float64]float64{nil, {}, {11.1: 0, 22.2: 11.1}} {
  4525. // fmt.Printf(">>>> running mammoth map v70: %v\n", v)
  4526. var v70v1, v70v2 map[float64]float64
  4527. v70v1 = v
  4528. bs70 := testMarshalErr(v70v1, h, t, "enc-map-v70")
  4529. if v == nil {
  4530. v70v2 = nil
  4531. } else {
  4532. v70v2 = make(map[float64]float64, len(v))
  4533. } // reset map
  4534. testUnmarshalErr(v70v2, bs70, h, t, "dec-map-v70")
  4535. testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70")
  4536. if v == nil {
  4537. v70v2 = nil
  4538. } else {
  4539. v70v2 = make(map[float64]float64, len(v))
  4540. } // reset map
  4541. testUnmarshalErr(reflect.ValueOf(v70v2), bs70, h, t, "dec-map-v70-noaddr") // decode into non-addressable map value
  4542. testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-noaddr")
  4543. if v == nil {
  4544. v70v2 = nil
  4545. } else {
  4546. v70v2 = make(map[float64]float64, len(v))
  4547. } // reset map
  4548. testUnmarshalErr(&v70v2, bs70, h, t, "dec-map-v70-p-len")
  4549. testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-p-len")
  4550. bs70 = testMarshalErr(&v70v1, h, t, "enc-map-v70-p")
  4551. v70v2 = nil
  4552. testUnmarshalErr(&v70v2, bs70, h, t, "dec-map-v70-p-nil")
  4553. testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-p-nil")
  4554. // ...
  4555. if v == nil {
  4556. v70v2 = nil
  4557. } else {
  4558. v70v2 = make(map[float64]float64, len(v))
  4559. } // reset map
  4560. var v70v3, v70v4 typMapMapFloat64Float64
  4561. v70v3 = typMapMapFloat64Float64(v70v1)
  4562. v70v4 = typMapMapFloat64Float64(v70v2)
  4563. bs70 = testMarshalErr(v70v3, h, t, "enc-map-v70-custom")
  4564. testUnmarshalErr(v70v4, bs70, h, t, "dec-map-v70-p-len")
  4565. testDeepEqualErr(v70v3, v70v4, t, "equal-map-v70-p-len")
  4566. }
  4567. for _, v := range []map[float64]bool{nil, {}, {22.2: false, 11.1: true}} {
  4568. // fmt.Printf(">>>> running mammoth map v71: %v\n", v)
  4569. var v71v1, v71v2 map[float64]bool
  4570. v71v1 = v
  4571. bs71 := testMarshalErr(v71v1, h, t, "enc-map-v71")
  4572. if v == nil {
  4573. v71v2 = nil
  4574. } else {
  4575. v71v2 = make(map[float64]bool, len(v))
  4576. } // reset map
  4577. testUnmarshalErr(v71v2, bs71, h, t, "dec-map-v71")
  4578. testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71")
  4579. if v == nil {
  4580. v71v2 = nil
  4581. } else {
  4582. v71v2 = make(map[float64]bool, len(v))
  4583. } // reset map
  4584. testUnmarshalErr(reflect.ValueOf(v71v2), bs71, h, t, "dec-map-v71-noaddr") // decode into non-addressable map value
  4585. testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-noaddr")
  4586. if v == nil {
  4587. v71v2 = nil
  4588. } else {
  4589. v71v2 = make(map[float64]bool, len(v))
  4590. } // reset map
  4591. testUnmarshalErr(&v71v2, bs71, h, t, "dec-map-v71-p-len")
  4592. testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-p-len")
  4593. bs71 = testMarshalErr(&v71v1, h, t, "enc-map-v71-p")
  4594. v71v2 = nil
  4595. testUnmarshalErr(&v71v2, bs71, h, t, "dec-map-v71-p-nil")
  4596. testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-p-nil")
  4597. // ...
  4598. if v == nil {
  4599. v71v2 = nil
  4600. } else {
  4601. v71v2 = make(map[float64]bool, len(v))
  4602. } // reset map
  4603. var v71v3, v71v4 typMapMapFloat64Bool
  4604. v71v3 = typMapMapFloat64Bool(v71v1)
  4605. v71v4 = typMapMapFloat64Bool(v71v2)
  4606. bs71 = testMarshalErr(v71v3, h, t, "enc-map-v71-custom")
  4607. testUnmarshalErr(v71v4, bs71, h, t, "dec-map-v71-p-len")
  4608. testDeepEqualErr(v71v3, v71v4, t, "equal-map-v71-p-len")
  4609. }
  4610. for _, v := range []map[uint]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  4611. // fmt.Printf(">>>> running mammoth map v74: %v\n", v)
  4612. var v74v1, v74v2 map[uint]interface{}
  4613. v74v1 = v
  4614. bs74 := testMarshalErr(v74v1, h, t, "enc-map-v74")
  4615. if v == nil {
  4616. v74v2 = nil
  4617. } else {
  4618. v74v2 = make(map[uint]interface{}, len(v))
  4619. } // reset map
  4620. testUnmarshalErr(v74v2, bs74, h, t, "dec-map-v74")
  4621. testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74")
  4622. if v == nil {
  4623. v74v2 = nil
  4624. } else {
  4625. v74v2 = make(map[uint]interface{}, len(v))
  4626. } // reset map
  4627. testUnmarshalErr(reflect.ValueOf(v74v2), bs74, h, t, "dec-map-v74-noaddr") // decode into non-addressable map value
  4628. testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-noaddr")
  4629. if v == nil {
  4630. v74v2 = nil
  4631. } else {
  4632. v74v2 = make(map[uint]interface{}, len(v))
  4633. } // reset map
  4634. testUnmarshalErr(&v74v2, bs74, h, t, "dec-map-v74-p-len")
  4635. testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-p-len")
  4636. bs74 = testMarshalErr(&v74v1, h, t, "enc-map-v74-p")
  4637. v74v2 = nil
  4638. testUnmarshalErr(&v74v2, bs74, h, t, "dec-map-v74-p-nil")
  4639. testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-p-nil")
  4640. // ...
  4641. if v == nil {
  4642. v74v2 = nil
  4643. } else {
  4644. v74v2 = make(map[uint]interface{}, len(v))
  4645. } // reset map
  4646. var v74v3, v74v4 typMapMapUintIntf
  4647. v74v3 = typMapMapUintIntf(v74v1)
  4648. v74v4 = typMapMapUintIntf(v74v2)
  4649. bs74 = testMarshalErr(v74v3, h, t, "enc-map-v74-custom")
  4650. testUnmarshalErr(v74v4, bs74, h, t, "dec-map-v74-p-len")
  4651. testDeepEqualErr(v74v3, v74v4, t, "equal-map-v74-p-len")
  4652. }
  4653. for _, v := range []map[uint]string{nil, {}, {44: "", 33: "some-string-2"}} {
  4654. // fmt.Printf(">>>> running mammoth map v75: %v\n", v)
  4655. var v75v1, v75v2 map[uint]string
  4656. v75v1 = v
  4657. bs75 := testMarshalErr(v75v1, h, t, "enc-map-v75")
  4658. if v == nil {
  4659. v75v2 = nil
  4660. } else {
  4661. v75v2 = make(map[uint]string, len(v))
  4662. } // reset map
  4663. testUnmarshalErr(v75v2, bs75, h, t, "dec-map-v75")
  4664. testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75")
  4665. if v == nil {
  4666. v75v2 = nil
  4667. } else {
  4668. v75v2 = make(map[uint]string, len(v))
  4669. } // reset map
  4670. testUnmarshalErr(reflect.ValueOf(v75v2), bs75, h, t, "dec-map-v75-noaddr") // decode into non-addressable map value
  4671. testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-noaddr")
  4672. if v == nil {
  4673. v75v2 = nil
  4674. } else {
  4675. v75v2 = make(map[uint]string, len(v))
  4676. } // reset map
  4677. testUnmarshalErr(&v75v2, bs75, h, t, "dec-map-v75-p-len")
  4678. testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-p-len")
  4679. bs75 = testMarshalErr(&v75v1, h, t, "enc-map-v75-p")
  4680. v75v2 = nil
  4681. testUnmarshalErr(&v75v2, bs75, h, t, "dec-map-v75-p-nil")
  4682. testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-p-nil")
  4683. // ...
  4684. if v == nil {
  4685. v75v2 = nil
  4686. } else {
  4687. v75v2 = make(map[uint]string, len(v))
  4688. } // reset map
  4689. var v75v3, v75v4 typMapMapUintString
  4690. v75v3 = typMapMapUintString(v75v1)
  4691. v75v4 = typMapMapUintString(v75v2)
  4692. bs75 = testMarshalErr(v75v3, h, t, "enc-map-v75-custom")
  4693. testUnmarshalErr(v75v4, bs75, h, t, "dec-map-v75-p-len")
  4694. testDeepEqualErr(v75v3, v75v4, t, "equal-map-v75-p-len")
  4695. }
  4696. for _, v := range []map[uint]uint{nil, {}, {44: 0, 33: 44}} {
  4697. // fmt.Printf(">>>> running mammoth map v76: %v\n", v)
  4698. var v76v1, v76v2 map[uint]uint
  4699. v76v1 = v
  4700. bs76 := testMarshalErr(v76v1, h, t, "enc-map-v76")
  4701. if v == nil {
  4702. v76v2 = nil
  4703. } else {
  4704. v76v2 = make(map[uint]uint, len(v))
  4705. } // reset map
  4706. testUnmarshalErr(v76v2, bs76, h, t, "dec-map-v76")
  4707. testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76")
  4708. if v == nil {
  4709. v76v2 = nil
  4710. } else {
  4711. v76v2 = make(map[uint]uint, len(v))
  4712. } // reset map
  4713. testUnmarshalErr(reflect.ValueOf(v76v2), bs76, h, t, "dec-map-v76-noaddr") // decode into non-addressable map value
  4714. testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-noaddr")
  4715. if v == nil {
  4716. v76v2 = nil
  4717. } else {
  4718. v76v2 = make(map[uint]uint, len(v))
  4719. } // reset map
  4720. testUnmarshalErr(&v76v2, bs76, h, t, "dec-map-v76-p-len")
  4721. testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-p-len")
  4722. bs76 = testMarshalErr(&v76v1, h, t, "enc-map-v76-p")
  4723. v76v2 = nil
  4724. testUnmarshalErr(&v76v2, bs76, h, t, "dec-map-v76-p-nil")
  4725. testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-p-nil")
  4726. // ...
  4727. if v == nil {
  4728. v76v2 = nil
  4729. } else {
  4730. v76v2 = make(map[uint]uint, len(v))
  4731. } // reset map
  4732. var v76v3, v76v4 typMapMapUintUint
  4733. v76v3 = typMapMapUintUint(v76v1)
  4734. v76v4 = typMapMapUintUint(v76v2)
  4735. bs76 = testMarshalErr(v76v3, h, t, "enc-map-v76-custom")
  4736. testUnmarshalErr(v76v4, bs76, h, t, "dec-map-v76-p-len")
  4737. testDeepEqualErr(v76v3, v76v4, t, "equal-map-v76-p-len")
  4738. }
  4739. for _, v := range []map[uint]uint8{nil, {}, {33: 0, 44: 33}} {
  4740. // fmt.Printf(">>>> running mammoth map v77: %v\n", v)
  4741. var v77v1, v77v2 map[uint]uint8
  4742. v77v1 = v
  4743. bs77 := testMarshalErr(v77v1, h, t, "enc-map-v77")
  4744. if v == nil {
  4745. v77v2 = nil
  4746. } else {
  4747. v77v2 = make(map[uint]uint8, len(v))
  4748. } // reset map
  4749. testUnmarshalErr(v77v2, bs77, h, t, "dec-map-v77")
  4750. testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77")
  4751. if v == nil {
  4752. v77v2 = nil
  4753. } else {
  4754. v77v2 = make(map[uint]uint8, len(v))
  4755. } // reset map
  4756. testUnmarshalErr(reflect.ValueOf(v77v2), bs77, h, t, "dec-map-v77-noaddr") // decode into non-addressable map value
  4757. testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-noaddr")
  4758. if v == nil {
  4759. v77v2 = nil
  4760. } else {
  4761. v77v2 = make(map[uint]uint8, len(v))
  4762. } // reset map
  4763. testUnmarshalErr(&v77v2, bs77, h, t, "dec-map-v77-p-len")
  4764. testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-p-len")
  4765. bs77 = testMarshalErr(&v77v1, h, t, "enc-map-v77-p")
  4766. v77v2 = nil
  4767. testUnmarshalErr(&v77v2, bs77, h, t, "dec-map-v77-p-nil")
  4768. testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-p-nil")
  4769. // ...
  4770. if v == nil {
  4771. v77v2 = nil
  4772. } else {
  4773. v77v2 = make(map[uint]uint8, len(v))
  4774. } // reset map
  4775. var v77v3, v77v4 typMapMapUintUint8
  4776. v77v3 = typMapMapUintUint8(v77v1)
  4777. v77v4 = typMapMapUintUint8(v77v2)
  4778. bs77 = testMarshalErr(v77v3, h, t, "enc-map-v77-custom")
  4779. testUnmarshalErr(v77v4, bs77, h, t, "dec-map-v77-p-len")
  4780. testDeepEqualErr(v77v3, v77v4, t, "equal-map-v77-p-len")
  4781. }
  4782. for _, v := range []map[uint]uint16{nil, {}, {44: 0, 33: 44}} {
  4783. // fmt.Printf(">>>> running mammoth map v78: %v\n", v)
  4784. var v78v1, v78v2 map[uint]uint16
  4785. v78v1 = v
  4786. bs78 := testMarshalErr(v78v1, h, t, "enc-map-v78")
  4787. if v == nil {
  4788. v78v2 = nil
  4789. } else {
  4790. v78v2 = make(map[uint]uint16, len(v))
  4791. } // reset map
  4792. testUnmarshalErr(v78v2, bs78, h, t, "dec-map-v78")
  4793. testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78")
  4794. if v == nil {
  4795. v78v2 = nil
  4796. } else {
  4797. v78v2 = make(map[uint]uint16, len(v))
  4798. } // reset map
  4799. testUnmarshalErr(reflect.ValueOf(v78v2), bs78, h, t, "dec-map-v78-noaddr") // decode into non-addressable map value
  4800. testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-noaddr")
  4801. if v == nil {
  4802. v78v2 = nil
  4803. } else {
  4804. v78v2 = make(map[uint]uint16, len(v))
  4805. } // reset map
  4806. testUnmarshalErr(&v78v2, bs78, h, t, "dec-map-v78-p-len")
  4807. testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-p-len")
  4808. bs78 = testMarshalErr(&v78v1, h, t, "enc-map-v78-p")
  4809. v78v2 = nil
  4810. testUnmarshalErr(&v78v2, bs78, h, t, "dec-map-v78-p-nil")
  4811. testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-p-nil")
  4812. // ...
  4813. if v == nil {
  4814. v78v2 = nil
  4815. } else {
  4816. v78v2 = make(map[uint]uint16, len(v))
  4817. } // reset map
  4818. var v78v3, v78v4 typMapMapUintUint16
  4819. v78v3 = typMapMapUintUint16(v78v1)
  4820. v78v4 = typMapMapUintUint16(v78v2)
  4821. bs78 = testMarshalErr(v78v3, h, t, "enc-map-v78-custom")
  4822. testUnmarshalErr(v78v4, bs78, h, t, "dec-map-v78-p-len")
  4823. testDeepEqualErr(v78v3, v78v4, t, "equal-map-v78-p-len")
  4824. }
  4825. for _, v := range []map[uint]uint32{nil, {}, {33: 0, 44: 33}} {
  4826. // fmt.Printf(">>>> running mammoth map v79: %v\n", v)
  4827. var v79v1, v79v2 map[uint]uint32
  4828. v79v1 = v
  4829. bs79 := testMarshalErr(v79v1, h, t, "enc-map-v79")
  4830. if v == nil {
  4831. v79v2 = nil
  4832. } else {
  4833. v79v2 = make(map[uint]uint32, len(v))
  4834. } // reset map
  4835. testUnmarshalErr(v79v2, bs79, h, t, "dec-map-v79")
  4836. testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79")
  4837. if v == nil {
  4838. v79v2 = nil
  4839. } else {
  4840. v79v2 = make(map[uint]uint32, len(v))
  4841. } // reset map
  4842. testUnmarshalErr(reflect.ValueOf(v79v2), bs79, h, t, "dec-map-v79-noaddr") // decode into non-addressable map value
  4843. testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-noaddr")
  4844. if v == nil {
  4845. v79v2 = nil
  4846. } else {
  4847. v79v2 = make(map[uint]uint32, len(v))
  4848. } // reset map
  4849. testUnmarshalErr(&v79v2, bs79, h, t, "dec-map-v79-p-len")
  4850. testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-p-len")
  4851. bs79 = testMarshalErr(&v79v1, h, t, "enc-map-v79-p")
  4852. v79v2 = nil
  4853. testUnmarshalErr(&v79v2, bs79, h, t, "dec-map-v79-p-nil")
  4854. testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-p-nil")
  4855. // ...
  4856. if v == nil {
  4857. v79v2 = nil
  4858. } else {
  4859. v79v2 = make(map[uint]uint32, len(v))
  4860. } // reset map
  4861. var v79v3, v79v4 typMapMapUintUint32
  4862. v79v3 = typMapMapUintUint32(v79v1)
  4863. v79v4 = typMapMapUintUint32(v79v2)
  4864. bs79 = testMarshalErr(v79v3, h, t, "enc-map-v79-custom")
  4865. testUnmarshalErr(v79v4, bs79, h, t, "dec-map-v79-p-len")
  4866. testDeepEqualErr(v79v3, v79v4, t, "equal-map-v79-p-len")
  4867. }
  4868. for _, v := range []map[uint]uint64{nil, {}, {44: 0, 33: 44}} {
  4869. // fmt.Printf(">>>> running mammoth map v80: %v\n", v)
  4870. var v80v1, v80v2 map[uint]uint64
  4871. v80v1 = v
  4872. bs80 := testMarshalErr(v80v1, h, t, "enc-map-v80")
  4873. if v == nil {
  4874. v80v2 = nil
  4875. } else {
  4876. v80v2 = make(map[uint]uint64, len(v))
  4877. } // reset map
  4878. testUnmarshalErr(v80v2, bs80, h, t, "dec-map-v80")
  4879. testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80")
  4880. if v == nil {
  4881. v80v2 = nil
  4882. } else {
  4883. v80v2 = make(map[uint]uint64, len(v))
  4884. } // reset map
  4885. testUnmarshalErr(reflect.ValueOf(v80v2), bs80, h, t, "dec-map-v80-noaddr") // decode into non-addressable map value
  4886. testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-noaddr")
  4887. if v == nil {
  4888. v80v2 = nil
  4889. } else {
  4890. v80v2 = make(map[uint]uint64, len(v))
  4891. } // reset map
  4892. testUnmarshalErr(&v80v2, bs80, h, t, "dec-map-v80-p-len")
  4893. testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-p-len")
  4894. bs80 = testMarshalErr(&v80v1, h, t, "enc-map-v80-p")
  4895. v80v2 = nil
  4896. testUnmarshalErr(&v80v2, bs80, h, t, "dec-map-v80-p-nil")
  4897. testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-p-nil")
  4898. // ...
  4899. if v == nil {
  4900. v80v2 = nil
  4901. } else {
  4902. v80v2 = make(map[uint]uint64, len(v))
  4903. } // reset map
  4904. var v80v3, v80v4 typMapMapUintUint64
  4905. v80v3 = typMapMapUintUint64(v80v1)
  4906. v80v4 = typMapMapUintUint64(v80v2)
  4907. bs80 = testMarshalErr(v80v3, h, t, "enc-map-v80-custom")
  4908. testUnmarshalErr(v80v4, bs80, h, t, "dec-map-v80-p-len")
  4909. testDeepEqualErr(v80v3, v80v4, t, "equal-map-v80-p-len")
  4910. }
  4911. for _, v := range []map[uint]uintptr{nil, {}, {33: 0, 44: 33}} {
  4912. // fmt.Printf(">>>> running mammoth map v81: %v\n", v)
  4913. var v81v1, v81v2 map[uint]uintptr
  4914. v81v1 = v
  4915. bs81 := testMarshalErr(v81v1, h, t, "enc-map-v81")
  4916. if v == nil {
  4917. v81v2 = nil
  4918. } else {
  4919. v81v2 = make(map[uint]uintptr, len(v))
  4920. } // reset map
  4921. testUnmarshalErr(v81v2, bs81, h, t, "dec-map-v81")
  4922. testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81")
  4923. if v == nil {
  4924. v81v2 = nil
  4925. } else {
  4926. v81v2 = make(map[uint]uintptr, len(v))
  4927. } // reset map
  4928. testUnmarshalErr(reflect.ValueOf(v81v2), bs81, h, t, "dec-map-v81-noaddr") // decode into non-addressable map value
  4929. testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-noaddr")
  4930. if v == nil {
  4931. v81v2 = nil
  4932. } else {
  4933. v81v2 = make(map[uint]uintptr, len(v))
  4934. } // reset map
  4935. testUnmarshalErr(&v81v2, bs81, h, t, "dec-map-v81-p-len")
  4936. testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-p-len")
  4937. bs81 = testMarshalErr(&v81v1, h, t, "enc-map-v81-p")
  4938. v81v2 = nil
  4939. testUnmarshalErr(&v81v2, bs81, h, t, "dec-map-v81-p-nil")
  4940. testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-p-nil")
  4941. // ...
  4942. if v == nil {
  4943. v81v2 = nil
  4944. } else {
  4945. v81v2 = make(map[uint]uintptr, len(v))
  4946. } // reset map
  4947. var v81v3, v81v4 typMapMapUintUintptr
  4948. v81v3 = typMapMapUintUintptr(v81v1)
  4949. v81v4 = typMapMapUintUintptr(v81v2)
  4950. bs81 = testMarshalErr(v81v3, h, t, "enc-map-v81-custom")
  4951. testUnmarshalErr(v81v4, bs81, h, t, "dec-map-v81-p-len")
  4952. testDeepEqualErr(v81v3, v81v4, t, "equal-map-v81-p-len")
  4953. }
  4954. for _, v := range []map[uint]int{nil, {}, {44: 0, 33: 44}} {
  4955. // fmt.Printf(">>>> running mammoth map v82: %v\n", v)
  4956. var v82v1, v82v2 map[uint]int
  4957. v82v1 = v
  4958. bs82 := testMarshalErr(v82v1, h, t, "enc-map-v82")
  4959. if v == nil {
  4960. v82v2 = nil
  4961. } else {
  4962. v82v2 = make(map[uint]int, len(v))
  4963. } // reset map
  4964. testUnmarshalErr(v82v2, bs82, h, t, "dec-map-v82")
  4965. testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82")
  4966. if v == nil {
  4967. v82v2 = nil
  4968. } else {
  4969. v82v2 = make(map[uint]int, len(v))
  4970. } // reset map
  4971. testUnmarshalErr(reflect.ValueOf(v82v2), bs82, h, t, "dec-map-v82-noaddr") // decode into non-addressable map value
  4972. testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-noaddr")
  4973. if v == nil {
  4974. v82v2 = nil
  4975. } else {
  4976. v82v2 = make(map[uint]int, len(v))
  4977. } // reset map
  4978. testUnmarshalErr(&v82v2, bs82, h, t, "dec-map-v82-p-len")
  4979. testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-p-len")
  4980. bs82 = testMarshalErr(&v82v1, h, t, "enc-map-v82-p")
  4981. v82v2 = nil
  4982. testUnmarshalErr(&v82v2, bs82, h, t, "dec-map-v82-p-nil")
  4983. testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-p-nil")
  4984. // ...
  4985. if v == nil {
  4986. v82v2 = nil
  4987. } else {
  4988. v82v2 = make(map[uint]int, len(v))
  4989. } // reset map
  4990. var v82v3, v82v4 typMapMapUintInt
  4991. v82v3 = typMapMapUintInt(v82v1)
  4992. v82v4 = typMapMapUintInt(v82v2)
  4993. bs82 = testMarshalErr(v82v3, h, t, "enc-map-v82-custom")
  4994. testUnmarshalErr(v82v4, bs82, h, t, "dec-map-v82-p-len")
  4995. testDeepEqualErr(v82v3, v82v4, t, "equal-map-v82-p-len")
  4996. }
  4997. for _, v := range []map[uint]int8{nil, {}, {33: 0, 44: 33}} {
  4998. // fmt.Printf(">>>> running mammoth map v83: %v\n", v)
  4999. var v83v1, v83v2 map[uint]int8
  5000. v83v1 = v
  5001. bs83 := testMarshalErr(v83v1, h, t, "enc-map-v83")
  5002. if v == nil {
  5003. v83v2 = nil
  5004. } else {
  5005. v83v2 = make(map[uint]int8, len(v))
  5006. } // reset map
  5007. testUnmarshalErr(v83v2, bs83, h, t, "dec-map-v83")
  5008. testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83")
  5009. if v == nil {
  5010. v83v2 = nil
  5011. } else {
  5012. v83v2 = make(map[uint]int8, len(v))
  5013. } // reset map
  5014. testUnmarshalErr(reflect.ValueOf(v83v2), bs83, h, t, "dec-map-v83-noaddr") // decode into non-addressable map value
  5015. testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-noaddr")
  5016. if v == nil {
  5017. v83v2 = nil
  5018. } else {
  5019. v83v2 = make(map[uint]int8, len(v))
  5020. } // reset map
  5021. testUnmarshalErr(&v83v2, bs83, h, t, "dec-map-v83-p-len")
  5022. testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-p-len")
  5023. bs83 = testMarshalErr(&v83v1, h, t, "enc-map-v83-p")
  5024. v83v2 = nil
  5025. testUnmarshalErr(&v83v2, bs83, h, t, "dec-map-v83-p-nil")
  5026. testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-p-nil")
  5027. // ...
  5028. if v == nil {
  5029. v83v2 = nil
  5030. } else {
  5031. v83v2 = make(map[uint]int8, len(v))
  5032. } // reset map
  5033. var v83v3, v83v4 typMapMapUintInt8
  5034. v83v3 = typMapMapUintInt8(v83v1)
  5035. v83v4 = typMapMapUintInt8(v83v2)
  5036. bs83 = testMarshalErr(v83v3, h, t, "enc-map-v83-custom")
  5037. testUnmarshalErr(v83v4, bs83, h, t, "dec-map-v83-p-len")
  5038. testDeepEqualErr(v83v3, v83v4, t, "equal-map-v83-p-len")
  5039. }
  5040. for _, v := range []map[uint]int16{nil, {}, {44: 0, 33: 44}} {
  5041. // fmt.Printf(">>>> running mammoth map v84: %v\n", v)
  5042. var v84v1, v84v2 map[uint]int16
  5043. v84v1 = v
  5044. bs84 := testMarshalErr(v84v1, h, t, "enc-map-v84")
  5045. if v == nil {
  5046. v84v2 = nil
  5047. } else {
  5048. v84v2 = make(map[uint]int16, len(v))
  5049. } // reset map
  5050. testUnmarshalErr(v84v2, bs84, h, t, "dec-map-v84")
  5051. testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84")
  5052. if v == nil {
  5053. v84v2 = nil
  5054. } else {
  5055. v84v2 = make(map[uint]int16, len(v))
  5056. } // reset map
  5057. testUnmarshalErr(reflect.ValueOf(v84v2), bs84, h, t, "dec-map-v84-noaddr") // decode into non-addressable map value
  5058. testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-noaddr")
  5059. if v == nil {
  5060. v84v2 = nil
  5061. } else {
  5062. v84v2 = make(map[uint]int16, len(v))
  5063. } // reset map
  5064. testUnmarshalErr(&v84v2, bs84, h, t, "dec-map-v84-p-len")
  5065. testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-p-len")
  5066. bs84 = testMarshalErr(&v84v1, h, t, "enc-map-v84-p")
  5067. v84v2 = nil
  5068. testUnmarshalErr(&v84v2, bs84, h, t, "dec-map-v84-p-nil")
  5069. testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-p-nil")
  5070. // ...
  5071. if v == nil {
  5072. v84v2 = nil
  5073. } else {
  5074. v84v2 = make(map[uint]int16, len(v))
  5075. } // reset map
  5076. var v84v3, v84v4 typMapMapUintInt16
  5077. v84v3 = typMapMapUintInt16(v84v1)
  5078. v84v4 = typMapMapUintInt16(v84v2)
  5079. bs84 = testMarshalErr(v84v3, h, t, "enc-map-v84-custom")
  5080. testUnmarshalErr(v84v4, bs84, h, t, "dec-map-v84-p-len")
  5081. testDeepEqualErr(v84v3, v84v4, t, "equal-map-v84-p-len")
  5082. }
  5083. for _, v := range []map[uint]int32{nil, {}, {33: 0, 44: 33}} {
  5084. // fmt.Printf(">>>> running mammoth map v85: %v\n", v)
  5085. var v85v1, v85v2 map[uint]int32
  5086. v85v1 = v
  5087. bs85 := testMarshalErr(v85v1, h, t, "enc-map-v85")
  5088. if v == nil {
  5089. v85v2 = nil
  5090. } else {
  5091. v85v2 = make(map[uint]int32, len(v))
  5092. } // reset map
  5093. testUnmarshalErr(v85v2, bs85, h, t, "dec-map-v85")
  5094. testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85")
  5095. if v == nil {
  5096. v85v2 = nil
  5097. } else {
  5098. v85v2 = make(map[uint]int32, len(v))
  5099. } // reset map
  5100. testUnmarshalErr(reflect.ValueOf(v85v2), bs85, h, t, "dec-map-v85-noaddr") // decode into non-addressable map value
  5101. testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-noaddr")
  5102. if v == nil {
  5103. v85v2 = nil
  5104. } else {
  5105. v85v2 = make(map[uint]int32, len(v))
  5106. } // reset map
  5107. testUnmarshalErr(&v85v2, bs85, h, t, "dec-map-v85-p-len")
  5108. testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-p-len")
  5109. bs85 = testMarshalErr(&v85v1, h, t, "enc-map-v85-p")
  5110. v85v2 = nil
  5111. testUnmarshalErr(&v85v2, bs85, h, t, "dec-map-v85-p-nil")
  5112. testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-p-nil")
  5113. // ...
  5114. if v == nil {
  5115. v85v2 = nil
  5116. } else {
  5117. v85v2 = make(map[uint]int32, len(v))
  5118. } // reset map
  5119. var v85v3, v85v4 typMapMapUintInt32
  5120. v85v3 = typMapMapUintInt32(v85v1)
  5121. v85v4 = typMapMapUintInt32(v85v2)
  5122. bs85 = testMarshalErr(v85v3, h, t, "enc-map-v85-custom")
  5123. testUnmarshalErr(v85v4, bs85, h, t, "dec-map-v85-p-len")
  5124. testDeepEqualErr(v85v3, v85v4, t, "equal-map-v85-p-len")
  5125. }
  5126. for _, v := range []map[uint]int64{nil, {}, {44: 0, 33: 44}} {
  5127. // fmt.Printf(">>>> running mammoth map v86: %v\n", v)
  5128. var v86v1, v86v2 map[uint]int64
  5129. v86v1 = v
  5130. bs86 := testMarshalErr(v86v1, h, t, "enc-map-v86")
  5131. if v == nil {
  5132. v86v2 = nil
  5133. } else {
  5134. v86v2 = make(map[uint]int64, len(v))
  5135. } // reset map
  5136. testUnmarshalErr(v86v2, bs86, h, t, "dec-map-v86")
  5137. testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86")
  5138. if v == nil {
  5139. v86v2 = nil
  5140. } else {
  5141. v86v2 = make(map[uint]int64, len(v))
  5142. } // reset map
  5143. testUnmarshalErr(reflect.ValueOf(v86v2), bs86, h, t, "dec-map-v86-noaddr") // decode into non-addressable map value
  5144. testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-noaddr")
  5145. if v == nil {
  5146. v86v2 = nil
  5147. } else {
  5148. v86v2 = make(map[uint]int64, len(v))
  5149. } // reset map
  5150. testUnmarshalErr(&v86v2, bs86, h, t, "dec-map-v86-p-len")
  5151. testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-p-len")
  5152. bs86 = testMarshalErr(&v86v1, h, t, "enc-map-v86-p")
  5153. v86v2 = nil
  5154. testUnmarshalErr(&v86v2, bs86, h, t, "dec-map-v86-p-nil")
  5155. testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-p-nil")
  5156. // ...
  5157. if v == nil {
  5158. v86v2 = nil
  5159. } else {
  5160. v86v2 = make(map[uint]int64, len(v))
  5161. } // reset map
  5162. var v86v3, v86v4 typMapMapUintInt64
  5163. v86v3 = typMapMapUintInt64(v86v1)
  5164. v86v4 = typMapMapUintInt64(v86v2)
  5165. bs86 = testMarshalErr(v86v3, h, t, "enc-map-v86-custom")
  5166. testUnmarshalErr(v86v4, bs86, h, t, "dec-map-v86-p-len")
  5167. testDeepEqualErr(v86v3, v86v4, t, "equal-map-v86-p-len")
  5168. }
  5169. for _, v := range []map[uint]float32{nil, {}, {33: 0, 44: 22.2}} {
  5170. // fmt.Printf(">>>> running mammoth map v87: %v\n", v)
  5171. var v87v1, v87v2 map[uint]float32
  5172. v87v1 = v
  5173. bs87 := testMarshalErr(v87v1, h, t, "enc-map-v87")
  5174. if v == nil {
  5175. v87v2 = nil
  5176. } else {
  5177. v87v2 = make(map[uint]float32, len(v))
  5178. } // reset map
  5179. testUnmarshalErr(v87v2, bs87, h, t, "dec-map-v87")
  5180. testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87")
  5181. if v == nil {
  5182. v87v2 = nil
  5183. } else {
  5184. v87v2 = make(map[uint]float32, len(v))
  5185. } // reset map
  5186. testUnmarshalErr(reflect.ValueOf(v87v2), bs87, h, t, "dec-map-v87-noaddr") // decode into non-addressable map value
  5187. testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-noaddr")
  5188. if v == nil {
  5189. v87v2 = nil
  5190. } else {
  5191. v87v2 = make(map[uint]float32, len(v))
  5192. } // reset map
  5193. testUnmarshalErr(&v87v2, bs87, h, t, "dec-map-v87-p-len")
  5194. testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-p-len")
  5195. bs87 = testMarshalErr(&v87v1, h, t, "enc-map-v87-p")
  5196. v87v2 = nil
  5197. testUnmarshalErr(&v87v2, bs87, h, t, "dec-map-v87-p-nil")
  5198. testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-p-nil")
  5199. // ...
  5200. if v == nil {
  5201. v87v2 = nil
  5202. } else {
  5203. v87v2 = make(map[uint]float32, len(v))
  5204. } // reset map
  5205. var v87v3, v87v4 typMapMapUintFloat32
  5206. v87v3 = typMapMapUintFloat32(v87v1)
  5207. v87v4 = typMapMapUintFloat32(v87v2)
  5208. bs87 = testMarshalErr(v87v3, h, t, "enc-map-v87-custom")
  5209. testUnmarshalErr(v87v4, bs87, h, t, "dec-map-v87-p-len")
  5210. testDeepEqualErr(v87v3, v87v4, t, "equal-map-v87-p-len")
  5211. }
  5212. for _, v := range []map[uint]float64{nil, {}, {33: 0, 44: 11.1}} {
  5213. // fmt.Printf(">>>> running mammoth map v88: %v\n", v)
  5214. var v88v1, v88v2 map[uint]float64
  5215. v88v1 = v
  5216. bs88 := testMarshalErr(v88v1, h, t, "enc-map-v88")
  5217. if v == nil {
  5218. v88v2 = nil
  5219. } else {
  5220. v88v2 = make(map[uint]float64, len(v))
  5221. } // reset map
  5222. testUnmarshalErr(v88v2, bs88, h, t, "dec-map-v88")
  5223. testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88")
  5224. if v == nil {
  5225. v88v2 = nil
  5226. } else {
  5227. v88v2 = make(map[uint]float64, len(v))
  5228. } // reset map
  5229. testUnmarshalErr(reflect.ValueOf(v88v2), bs88, h, t, "dec-map-v88-noaddr") // decode into non-addressable map value
  5230. testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-noaddr")
  5231. if v == nil {
  5232. v88v2 = nil
  5233. } else {
  5234. v88v2 = make(map[uint]float64, len(v))
  5235. } // reset map
  5236. testUnmarshalErr(&v88v2, bs88, h, t, "dec-map-v88-p-len")
  5237. testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-p-len")
  5238. bs88 = testMarshalErr(&v88v1, h, t, "enc-map-v88-p")
  5239. v88v2 = nil
  5240. testUnmarshalErr(&v88v2, bs88, h, t, "dec-map-v88-p-nil")
  5241. testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-p-nil")
  5242. // ...
  5243. if v == nil {
  5244. v88v2 = nil
  5245. } else {
  5246. v88v2 = make(map[uint]float64, len(v))
  5247. } // reset map
  5248. var v88v3, v88v4 typMapMapUintFloat64
  5249. v88v3 = typMapMapUintFloat64(v88v1)
  5250. v88v4 = typMapMapUintFloat64(v88v2)
  5251. bs88 = testMarshalErr(v88v3, h, t, "enc-map-v88-custom")
  5252. testUnmarshalErr(v88v4, bs88, h, t, "dec-map-v88-p-len")
  5253. testDeepEqualErr(v88v3, v88v4, t, "equal-map-v88-p-len")
  5254. }
  5255. for _, v := range []map[uint]bool{nil, {}, {33: false, 44: true}} {
  5256. // fmt.Printf(">>>> running mammoth map v89: %v\n", v)
  5257. var v89v1, v89v2 map[uint]bool
  5258. v89v1 = v
  5259. bs89 := testMarshalErr(v89v1, h, t, "enc-map-v89")
  5260. if v == nil {
  5261. v89v2 = nil
  5262. } else {
  5263. v89v2 = make(map[uint]bool, len(v))
  5264. } // reset map
  5265. testUnmarshalErr(v89v2, bs89, h, t, "dec-map-v89")
  5266. testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89")
  5267. if v == nil {
  5268. v89v2 = nil
  5269. } else {
  5270. v89v2 = make(map[uint]bool, len(v))
  5271. } // reset map
  5272. testUnmarshalErr(reflect.ValueOf(v89v2), bs89, h, t, "dec-map-v89-noaddr") // decode into non-addressable map value
  5273. testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-noaddr")
  5274. if v == nil {
  5275. v89v2 = nil
  5276. } else {
  5277. v89v2 = make(map[uint]bool, len(v))
  5278. } // reset map
  5279. testUnmarshalErr(&v89v2, bs89, h, t, "dec-map-v89-p-len")
  5280. testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-p-len")
  5281. bs89 = testMarshalErr(&v89v1, h, t, "enc-map-v89-p")
  5282. v89v2 = nil
  5283. testUnmarshalErr(&v89v2, bs89, h, t, "dec-map-v89-p-nil")
  5284. testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-p-nil")
  5285. // ...
  5286. if v == nil {
  5287. v89v2 = nil
  5288. } else {
  5289. v89v2 = make(map[uint]bool, len(v))
  5290. } // reset map
  5291. var v89v3, v89v4 typMapMapUintBool
  5292. v89v3 = typMapMapUintBool(v89v1)
  5293. v89v4 = typMapMapUintBool(v89v2)
  5294. bs89 = testMarshalErr(v89v3, h, t, "enc-map-v89-custom")
  5295. testUnmarshalErr(v89v4, bs89, h, t, "dec-map-v89-p-len")
  5296. testDeepEqualErr(v89v3, v89v4, t, "equal-map-v89-p-len")
  5297. }
  5298. for _, v := range []map[uint8]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  5299. // fmt.Printf(">>>> running mammoth map v92: %v\n", v)
  5300. var v92v1, v92v2 map[uint8]interface{}
  5301. v92v1 = v
  5302. bs92 := testMarshalErr(v92v1, h, t, "enc-map-v92")
  5303. if v == nil {
  5304. v92v2 = nil
  5305. } else {
  5306. v92v2 = make(map[uint8]interface{}, len(v))
  5307. } // reset map
  5308. testUnmarshalErr(v92v2, bs92, h, t, "dec-map-v92")
  5309. testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92")
  5310. if v == nil {
  5311. v92v2 = nil
  5312. } else {
  5313. v92v2 = make(map[uint8]interface{}, len(v))
  5314. } // reset map
  5315. testUnmarshalErr(reflect.ValueOf(v92v2), bs92, h, t, "dec-map-v92-noaddr") // decode into non-addressable map value
  5316. testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-noaddr")
  5317. if v == nil {
  5318. v92v2 = nil
  5319. } else {
  5320. v92v2 = make(map[uint8]interface{}, len(v))
  5321. } // reset map
  5322. testUnmarshalErr(&v92v2, bs92, h, t, "dec-map-v92-p-len")
  5323. testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-p-len")
  5324. bs92 = testMarshalErr(&v92v1, h, t, "enc-map-v92-p")
  5325. v92v2 = nil
  5326. testUnmarshalErr(&v92v2, bs92, h, t, "dec-map-v92-p-nil")
  5327. testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-p-nil")
  5328. // ...
  5329. if v == nil {
  5330. v92v2 = nil
  5331. } else {
  5332. v92v2 = make(map[uint8]interface{}, len(v))
  5333. } // reset map
  5334. var v92v3, v92v4 typMapMapUint8Intf
  5335. v92v3 = typMapMapUint8Intf(v92v1)
  5336. v92v4 = typMapMapUint8Intf(v92v2)
  5337. bs92 = testMarshalErr(v92v3, h, t, "enc-map-v92-custom")
  5338. testUnmarshalErr(v92v4, bs92, h, t, "dec-map-v92-p-len")
  5339. testDeepEqualErr(v92v3, v92v4, t, "equal-map-v92-p-len")
  5340. }
  5341. for _, v := range []map[uint8]string{nil, {}, {33: "", 44: "some-string"}} {
  5342. // fmt.Printf(">>>> running mammoth map v93: %v\n", v)
  5343. var v93v1, v93v2 map[uint8]string
  5344. v93v1 = v
  5345. bs93 := testMarshalErr(v93v1, h, t, "enc-map-v93")
  5346. if v == nil {
  5347. v93v2 = nil
  5348. } else {
  5349. v93v2 = make(map[uint8]string, len(v))
  5350. } // reset map
  5351. testUnmarshalErr(v93v2, bs93, h, t, "dec-map-v93")
  5352. testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93")
  5353. if v == nil {
  5354. v93v2 = nil
  5355. } else {
  5356. v93v2 = make(map[uint8]string, len(v))
  5357. } // reset map
  5358. testUnmarshalErr(reflect.ValueOf(v93v2), bs93, h, t, "dec-map-v93-noaddr") // decode into non-addressable map value
  5359. testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-noaddr")
  5360. if v == nil {
  5361. v93v2 = nil
  5362. } else {
  5363. v93v2 = make(map[uint8]string, len(v))
  5364. } // reset map
  5365. testUnmarshalErr(&v93v2, bs93, h, t, "dec-map-v93-p-len")
  5366. testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-p-len")
  5367. bs93 = testMarshalErr(&v93v1, h, t, "enc-map-v93-p")
  5368. v93v2 = nil
  5369. testUnmarshalErr(&v93v2, bs93, h, t, "dec-map-v93-p-nil")
  5370. testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-p-nil")
  5371. // ...
  5372. if v == nil {
  5373. v93v2 = nil
  5374. } else {
  5375. v93v2 = make(map[uint8]string, len(v))
  5376. } // reset map
  5377. var v93v3, v93v4 typMapMapUint8String
  5378. v93v3 = typMapMapUint8String(v93v1)
  5379. v93v4 = typMapMapUint8String(v93v2)
  5380. bs93 = testMarshalErr(v93v3, h, t, "enc-map-v93-custom")
  5381. testUnmarshalErr(v93v4, bs93, h, t, "dec-map-v93-p-len")
  5382. testDeepEqualErr(v93v3, v93v4, t, "equal-map-v93-p-len")
  5383. }
  5384. for _, v := range []map[uint8]uint{nil, {}, {33: 0, 44: 33}} {
  5385. // fmt.Printf(">>>> running mammoth map v94: %v\n", v)
  5386. var v94v1, v94v2 map[uint8]uint
  5387. v94v1 = v
  5388. bs94 := testMarshalErr(v94v1, h, t, "enc-map-v94")
  5389. if v == nil {
  5390. v94v2 = nil
  5391. } else {
  5392. v94v2 = make(map[uint8]uint, len(v))
  5393. } // reset map
  5394. testUnmarshalErr(v94v2, bs94, h, t, "dec-map-v94")
  5395. testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94")
  5396. if v == nil {
  5397. v94v2 = nil
  5398. } else {
  5399. v94v2 = make(map[uint8]uint, len(v))
  5400. } // reset map
  5401. testUnmarshalErr(reflect.ValueOf(v94v2), bs94, h, t, "dec-map-v94-noaddr") // decode into non-addressable map value
  5402. testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-noaddr")
  5403. if v == nil {
  5404. v94v2 = nil
  5405. } else {
  5406. v94v2 = make(map[uint8]uint, len(v))
  5407. } // reset map
  5408. testUnmarshalErr(&v94v2, bs94, h, t, "dec-map-v94-p-len")
  5409. testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-p-len")
  5410. bs94 = testMarshalErr(&v94v1, h, t, "enc-map-v94-p")
  5411. v94v2 = nil
  5412. testUnmarshalErr(&v94v2, bs94, h, t, "dec-map-v94-p-nil")
  5413. testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-p-nil")
  5414. // ...
  5415. if v == nil {
  5416. v94v2 = nil
  5417. } else {
  5418. v94v2 = make(map[uint8]uint, len(v))
  5419. } // reset map
  5420. var v94v3, v94v4 typMapMapUint8Uint
  5421. v94v3 = typMapMapUint8Uint(v94v1)
  5422. v94v4 = typMapMapUint8Uint(v94v2)
  5423. bs94 = testMarshalErr(v94v3, h, t, "enc-map-v94-custom")
  5424. testUnmarshalErr(v94v4, bs94, h, t, "dec-map-v94-p-len")
  5425. testDeepEqualErr(v94v3, v94v4, t, "equal-map-v94-p-len")
  5426. }
  5427. for _, v := range []map[uint8]uint8{nil, {}, {44: 0, 33: 44}} {
  5428. // fmt.Printf(">>>> running mammoth map v95: %v\n", v)
  5429. var v95v1, v95v2 map[uint8]uint8
  5430. v95v1 = v
  5431. bs95 := testMarshalErr(v95v1, h, t, "enc-map-v95")
  5432. if v == nil {
  5433. v95v2 = nil
  5434. } else {
  5435. v95v2 = make(map[uint8]uint8, len(v))
  5436. } // reset map
  5437. testUnmarshalErr(v95v2, bs95, h, t, "dec-map-v95")
  5438. testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95")
  5439. if v == nil {
  5440. v95v2 = nil
  5441. } else {
  5442. v95v2 = make(map[uint8]uint8, len(v))
  5443. } // reset map
  5444. testUnmarshalErr(reflect.ValueOf(v95v2), bs95, h, t, "dec-map-v95-noaddr") // decode into non-addressable map value
  5445. testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-noaddr")
  5446. if v == nil {
  5447. v95v2 = nil
  5448. } else {
  5449. v95v2 = make(map[uint8]uint8, len(v))
  5450. } // reset map
  5451. testUnmarshalErr(&v95v2, bs95, h, t, "dec-map-v95-p-len")
  5452. testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-p-len")
  5453. bs95 = testMarshalErr(&v95v1, h, t, "enc-map-v95-p")
  5454. v95v2 = nil
  5455. testUnmarshalErr(&v95v2, bs95, h, t, "dec-map-v95-p-nil")
  5456. testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-p-nil")
  5457. // ...
  5458. if v == nil {
  5459. v95v2 = nil
  5460. } else {
  5461. v95v2 = make(map[uint8]uint8, len(v))
  5462. } // reset map
  5463. var v95v3, v95v4 typMapMapUint8Uint8
  5464. v95v3 = typMapMapUint8Uint8(v95v1)
  5465. v95v4 = typMapMapUint8Uint8(v95v2)
  5466. bs95 = testMarshalErr(v95v3, h, t, "enc-map-v95-custom")
  5467. testUnmarshalErr(v95v4, bs95, h, t, "dec-map-v95-p-len")
  5468. testDeepEqualErr(v95v3, v95v4, t, "equal-map-v95-p-len")
  5469. }
  5470. for _, v := range []map[uint8]uint16{nil, {}, {33: 0, 44: 33}} {
  5471. // fmt.Printf(">>>> running mammoth map v96: %v\n", v)
  5472. var v96v1, v96v2 map[uint8]uint16
  5473. v96v1 = v
  5474. bs96 := testMarshalErr(v96v1, h, t, "enc-map-v96")
  5475. if v == nil {
  5476. v96v2 = nil
  5477. } else {
  5478. v96v2 = make(map[uint8]uint16, len(v))
  5479. } // reset map
  5480. testUnmarshalErr(v96v2, bs96, h, t, "dec-map-v96")
  5481. testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96")
  5482. if v == nil {
  5483. v96v2 = nil
  5484. } else {
  5485. v96v2 = make(map[uint8]uint16, len(v))
  5486. } // reset map
  5487. testUnmarshalErr(reflect.ValueOf(v96v2), bs96, h, t, "dec-map-v96-noaddr") // decode into non-addressable map value
  5488. testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-noaddr")
  5489. if v == nil {
  5490. v96v2 = nil
  5491. } else {
  5492. v96v2 = make(map[uint8]uint16, len(v))
  5493. } // reset map
  5494. testUnmarshalErr(&v96v2, bs96, h, t, "dec-map-v96-p-len")
  5495. testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-p-len")
  5496. bs96 = testMarshalErr(&v96v1, h, t, "enc-map-v96-p")
  5497. v96v2 = nil
  5498. testUnmarshalErr(&v96v2, bs96, h, t, "dec-map-v96-p-nil")
  5499. testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-p-nil")
  5500. // ...
  5501. if v == nil {
  5502. v96v2 = nil
  5503. } else {
  5504. v96v2 = make(map[uint8]uint16, len(v))
  5505. } // reset map
  5506. var v96v3, v96v4 typMapMapUint8Uint16
  5507. v96v3 = typMapMapUint8Uint16(v96v1)
  5508. v96v4 = typMapMapUint8Uint16(v96v2)
  5509. bs96 = testMarshalErr(v96v3, h, t, "enc-map-v96-custom")
  5510. testUnmarshalErr(v96v4, bs96, h, t, "dec-map-v96-p-len")
  5511. testDeepEqualErr(v96v3, v96v4, t, "equal-map-v96-p-len")
  5512. }
  5513. for _, v := range []map[uint8]uint32{nil, {}, {44: 0, 33: 44}} {
  5514. // fmt.Printf(">>>> running mammoth map v97: %v\n", v)
  5515. var v97v1, v97v2 map[uint8]uint32
  5516. v97v1 = v
  5517. bs97 := testMarshalErr(v97v1, h, t, "enc-map-v97")
  5518. if v == nil {
  5519. v97v2 = nil
  5520. } else {
  5521. v97v2 = make(map[uint8]uint32, len(v))
  5522. } // reset map
  5523. testUnmarshalErr(v97v2, bs97, h, t, "dec-map-v97")
  5524. testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97")
  5525. if v == nil {
  5526. v97v2 = nil
  5527. } else {
  5528. v97v2 = make(map[uint8]uint32, len(v))
  5529. } // reset map
  5530. testUnmarshalErr(reflect.ValueOf(v97v2), bs97, h, t, "dec-map-v97-noaddr") // decode into non-addressable map value
  5531. testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-noaddr")
  5532. if v == nil {
  5533. v97v2 = nil
  5534. } else {
  5535. v97v2 = make(map[uint8]uint32, len(v))
  5536. } // reset map
  5537. testUnmarshalErr(&v97v2, bs97, h, t, "dec-map-v97-p-len")
  5538. testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-p-len")
  5539. bs97 = testMarshalErr(&v97v1, h, t, "enc-map-v97-p")
  5540. v97v2 = nil
  5541. testUnmarshalErr(&v97v2, bs97, h, t, "dec-map-v97-p-nil")
  5542. testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-p-nil")
  5543. // ...
  5544. if v == nil {
  5545. v97v2 = nil
  5546. } else {
  5547. v97v2 = make(map[uint8]uint32, len(v))
  5548. } // reset map
  5549. var v97v3, v97v4 typMapMapUint8Uint32
  5550. v97v3 = typMapMapUint8Uint32(v97v1)
  5551. v97v4 = typMapMapUint8Uint32(v97v2)
  5552. bs97 = testMarshalErr(v97v3, h, t, "enc-map-v97-custom")
  5553. testUnmarshalErr(v97v4, bs97, h, t, "dec-map-v97-p-len")
  5554. testDeepEqualErr(v97v3, v97v4, t, "equal-map-v97-p-len")
  5555. }
  5556. for _, v := range []map[uint8]uint64{nil, {}, {33: 0, 44: 33}} {
  5557. // fmt.Printf(">>>> running mammoth map v98: %v\n", v)
  5558. var v98v1, v98v2 map[uint8]uint64
  5559. v98v1 = v
  5560. bs98 := testMarshalErr(v98v1, h, t, "enc-map-v98")
  5561. if v == nil {
  5562. v98v2 = nil
  5563. } else {
  5564. v98v2 = make(map[uint8]uint64, len(v))
  5565. } // reset map
  5566. testUnmarshalErr(v98v2, bs98, h, t, "dec-map-v98")
  5567. testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98")
  5568. if v == nil {
  5569. v98v2 = nil
  5570. } else {
  5571. v98v2 = make(map[uint8]uint64, len(v))
  5572. } // reset map
  5573. testUnmarshalErr(reflect.ValueOf(v98v2), bs98, h, t, "dec-map-v98-noaddr") // decode into non-addressable map value
  5574. testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-noaddr")
  5575. if v == nil {
  5576. v98v2 = nil
  5577. } else {
  5578. v98v2 = make(map[uint8]uint64, len(v))
  5579. } // reset map
  5580. testUnmarshalErr(&v98v2, bs98, h, t, "dec-map-v98-p-len")
  5581. testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-p-len")
  5582. bs98 = testMarshalErr(&v98v1, h, t, "enc-map-v98-p")
  5583. v98v2 = nil
  5584. testUnmarshalErr(&v98v2, bs98, h, t, "dec-map-v98-p-nil")
  5585. testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-p-nil")
  5586. // ...
  5587. if v == nil {
  5588. v98v2 = nil
  5589. } else {
  5590. v98v2 = make(map[uint8]uint64, len(v))
  5591. } // reset map
  5592. var v98v3, v98v4 typMapMapUint8Uint64
  5593. v98v3 = typMapMapUint8Uint64(v98v1)
  5594. v98v4 = typMapMapUint8Uint64(v98v2)
  5595. bs98 = testMarshalErr(v98v3, h, t, "enc-map-v98-custom")
  5596. testUnmarshalErr(v98v4, bs98, h, t, "dec-map-v98-p-len")
  5597. testDeepEqualErr(v98v3, v98v4, t, "equal-map-v98-p-len")
  5598. }
  5599. for _, v := range []map[uint8]uintptr{nil, {}, {44: 0, 33: 44}} {
  5600. // fmt.Printf(">>>> running mammoth map v99: %v\n", v)
  5601. var v99v1, v99v2 map[uint8]uintptr
  5602. v99v1 = v
  5603. bs99 := testMarshalErr(v99v1, h, t, "enc-map-v99")
  5604. if v == nil {
  5605. v99v2 = nil
  5606. } else {
  5607. v99v2 = make(map[uint8]uintptr, len(v))
  5608. } // reset map
  5609. testUnmarshalErr(v99v2, bs99, h, t, "dec-map-v99")
  5610. testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99")
  5611. if v == nil {
  5612. v99v2 = nil
  5613. } else {
  5614. v99v2 = make(map[uint8]uintptr, len(v))
  5615. } // reset map
  5616. testUnmarshalErr(reflect.ValueOf(v99v2), bs99, h, t, "dec-map-v99-noaddr") // decode into non-addressable map value
  5617. testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-noaddr")
  5618. if v == nil {
  5619. v99v2 = nil
  5620. } else {
  5621. v99v2 = make(map[uint8]uintptr, len(v))
  5622. } // reset map
  5623. testUnmarshalErr(&v99v2, bs99, h, t, "dec-map-v99-p-len")
  5624. testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-p-len")
  5625. bs99 = testMarshalErr(&v99v1, h, t, "enc-map-v99-p")
  5626. v99v2 = nil
  5627. testUnmarshalErr(&v99v2, bs99, h, t, "dec-map-v99-p-nil")
  5628. testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-p-nil")
  5629. // ...
  5630. if v == nil {
  5631. v99v2 = nil
  5632. } else {
  5633. v99v2 = make(map[uint8]uintptr, len(v))
  5634. } // reset map
  5635. var v99v3, v99v4 typMapMapUint8Uintptr
  5636. v99v3 = typMapMapUint8Uintptr(v99v1)
  5637. v99v4 = typMapMapUint8Uintptr(v99v2)
  5638. bs99 = testMarshalErr(v99v3, h, t, "enc-map-v99-custom")
  5639. testUnmarshalErr(v99v4, bs99, h, t, "dec-map-v99-p-len")
  5640. testDeepEqualErr(v99v3, v99v4, t, "equal-map-v99-p-len")
  5641. }
  5642. for _, v := range []map[uint8]int{nil, {}, {33: 0, 44: 33}} {
  5643. // fmt.Printf(">>>> running mammoth map v100: %v\n", v)
  5644. var v100v1, v100v2 map[uint8]int
  5645. v100v1 = v
  5646. bs100 := testMarshalErr(v100v1, h, t, "enc-map-v100")
  5647. if v == nil {
  5648. v100v2 = nil
  5649. } else {
  5650. v100v2 = make(map[uint8]int, len(v))
  5651. } // reset map
  5652. testUnmarshalErr(v100v2, bs100, h, t, "dec-map-v100")
  5653. testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100")
  5654. if v == nil {
  5655. v100v2 = nil
  5656. } else {
  5657. v100v2 = make(map[uint8]int, len(v))
  5658. } // reset map
  5659. testUnmarshalErr(reflect.ValueOf(v100v2), bs100, h, t, "dec-map-v100-noaddr") // decode into non-addressable map value
  5660. testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-noaddr")
  5661. if v == nil {
  5662. v100v2 = nil
  5663. } else {
  5664. v100v2 = make(map[uint8]int, len(v))
  5665. } // reset map
  5666. testUnmarshalErr(&v100v2, bs100, h, t, "dec-map-v100-p-len")
  5667. testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-p-len")
  5668. bs100 = testMarshalErr(&v100v1, h, t, "enc-map-v100-p")
  5669. v100v2 = nil
  5670. testUnmarshalErr(&v100v2, bs100, h, t, "dec-map-v100-p-nil")
  5671. testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-p-nil")
  5672. // ...
  5673. if v == nil {
  5674. v100v2 = nil
  5675. } else {
  5676. v100v2 = make(map[uint8]int, len(v))
  5677. } // reset map
  5678. var v100v3, v100v4 typMapMapUint8Int
  5679. v100v3 = typMapMapUint8Int(v100v1)
  5680. v100v4 = typMapMapUint8Int(v100v2)
  5681. bs100 = testMarshalErr(v100v3, h, t, "enc-map-v100-custom")
  5682. testUnmarshalErr(v100v4, bs100, h, t, "dec-map-v100-p-len")
  5683. testDeepEqualErr(v100v3, v100v4, t, "equal-map-v100-p-len")
  5684. }
  5685. for _, v := range []map[uint8]int8{nil, {}, {44: 0, 33: 44}} {
  5686. // fmt.Printf(">>>> running mammoth map v101: %v\n", v)
  5687. var v101v1, v101v2 map[uint8]int8
  5688. v101v1 = v
  5689. bs101 := testMarshalErr(v101v1, h, t, "enc-map-v101")
  5690. if v == nil {
  5691. v101v2 = nil
  5692. } else {
  5693. v101v2 = make(map[uint8]int8, len(v))
  5694. } // reset map
  5695. testUnmarshalErr(v101v2, bs101, h, t, "dec-map-v101")
  5696. testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101")
  5697. if v == nil {
  5698. v101v2 = nil
  5699. } else {
  5700. v101v2 = make(map[uint8]int8, len(v))
  5701. } // reset map
  5702. testUnmarshalErr(reflect.ValueOf(v101v2), bs101, h, t, "dec-map-v101-noaddr") // decode into non-addressable map value
  5703. testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-noaddr")
  5704. if v == nil {
  5705. v101v2 = nil
  5706. } else {
  5707. v101v2 = make(map[uint8]int8, len(v))
  5708. } // reset map
  5709. testUnmarshalErr(&v101v2, bs101, h, t, "dec-map-v101-p-len")
  5710. testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-p-len")
  5711. bs101 = testMarshalErr(&v101v1, h, t, "enc-map-v101-p")
  5712. v101v2 = nil
  5713. testUnmarshalErr(&v101v2, bs101, h, t, "dec-map-v101-p-nil")
  5714. testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-p-nil")
  5715. // ...
  5716. if v == nil {
  5717. v101v2 = nil
  5718. } else {
  5719. v101v2 = make(map[uint8]int8, len(v))
  5720. } // reset map
  5721. var v101v3, v101v4 typMapMapUint8Int8
  5722. v101v3 = typMapMapUint8Int8(v101v1)
  5723. v101v4 = typMapMapUint8Int8(v101v2)
  5724. bs101 = testMarshalErr(v101v3, h, t, "enc-map-v101-custom")
  5725. testUnmarshalErr(v101v4, bs101, h, t, "dec-map-v101-p-len")
  5726. testDeepEqualErr(v101v3, v101v4, t, "equal-map-v101-p-len")
  5727. }
  5728. for _, v := range []map[uint8]int16{nil, {}, {33: 0, 44: 33}} {
  5729. // fmt.Printf(">>>> running mammoth map v102: %v\n", v)
  5730. var v102v1, v102v2 map[uint8]int16
  5731. v102v1 = v
  5732. bs102 := testMarshalErr(v102v1, h, t, "enc-map-v102")
  5733. if v == nil {
  5734. v102v2 = nil
  5735. } else {
  5736. v102v2 = make(map[uint8]int16, len(v))
  5737. } // reset map
  5738. testUnmarshalErr(v102v2, bs102, h, t, "dec-map-v102")
  5739. testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102")
  5740. if v == nil {
  5741. v102v2 = nil
  5742. } else {
  5743. v102v2 = make(map[uint8]int16, len(v))
  5744. } // reset map
  5745. testUnmarshalErr(reflect.ValueOf(v102v2), bs102, h, t, "dec-map-v102-noaddr") // decode into non-addressable map value
  5746. testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-noaddr")
  5747. if v == nil {
  5748. v102v2 = nil
  5749. } else {
  5750. v102v2 = make(map[uint8]int16, len(v))
  5751. } // reset map
  5752. testUnmarshalErr(&v102v2, bs102, h, t, "dec-map-v102-p-len")
  5753. testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-p-len")
  5754. bs102 = testMarshalErr(&v102v1, h, t, "enc-map-v102-p")
  5755. v102v2 = nil
  5756. testUnmarshalErr(&v102v2, bs102, h, t, "dec-map-v102-p-nil")
  5757. testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-p-nil")
  5758. // ...
  5759. if v == nil {
  5760. v102v2 = nil
  5761. } else {
  5762. v102v2 = make(map[uint8]int16, len(v))
  5763. } // reset map
  5764. var v102v3, v102v4 typMapMapUint8Int16
  5765. v102v3 = typMapMapUint8Int16(v102v1)
  5766. v102v4 = typMapMapUint8Int16(v102v2)
  5767. bs102 = testMarshalErr(v102v3, h, t, "enc-map-v102-custom")
  5768. testUnmarshalErr(v102v4, bs102, h, t, "dec-map-v102-p-len")
  5769. testDeepEqualErr(v102v3, v102v4, t, "equal-map-v102-p-len")
  5770. }
  5771. for _, v := range []map[uint8]int32{nil, {}, {44: 0, 33: 44}} {
  5772. // fmt.Printf(">>>> running mammoth map v103: %v\n", v)
  5773. var v103v1, v103v2 map[uint8]int32
  5774. v103v1 = v
  5775. bs103 := testMarshalErr(v103v1, h, t, "enc-map-v103")
  5776. if v == nil {
  5777. v103v2 = nil
  5778. } else {
  5779. v103v2 = make(map[uint8]int32, len(v))
  5780. } // reset map
  5781. testUnmarshalErr(v103v2, bs103, h, t, "dec-map-v103")
  5782. testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103")
  5783. if v == nil {
  5784. v103v2 = nil
  5785. } else {
  5786. v103v2 = make(map[uint8]int32, len(v))
  5787. } // reset map
  5788. testUnmarshalErr(reflect.ValueOf(v103v2), bs103, h, t, "dec-map-v103-noaddr") // decode into non-addressable map value
  5789. testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-noaddr")
  5790. if v == nil {
  5791. v103v2 = nil
  5792. } else {
  5793. v103v2 = make(map[uint8]int32, len(v))
  5794. } // reset map
  5795. testUnmarshalErr(&v103v2, bs103, h, t, "dec-map-v103-p-len")
  5796. testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-p-len")
  5797. bs103 = testMarshalErr(&v103v1, h, t, "enc-map-v103-p")
  5798. v103v2 = nil
  5799. testUnmarshalErr(&v103v2, bs103, h, t, "dec-map-v103-p-nil")
  5800. testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-p-nil")
  5801. // ...
  5802. if v == nil {
  5803. v103v2 = nil
  5804. } else {
  5805. v103v2 = make(map[uint8]int32, len(v))
  5806. } // reset map
  5807. var v103v3, v103v4 typMapMapUint8Int32
  5808. v103v3 = typMapMapUint8Int32(v103v1)
  5809. v103v4 = typMapMapUint8Int32(v103v2)
  5810. bs103 = testMarshalErr(v103v3, h, t, "enc-map-v103-custom")
  5811. testUnmarshalErr(v103v4, bs103, h, t, "dec-map-v103-p-len")
  5812. testDeepEqualErr(v103v3, v103v4, t, "equal-map-v103-p-len")
  5813. }
  5814. for _, v := range []map[uint8]int64{nil, {}, {33: 0, 44: 33}} {
  5815. // fmt.Printf(">>>> running mammoth map v104: %v\n", v)
  5816. var v104v1, v104v2 map[uint8]int64
  5817. v104v1 = v
  5818. bs104 := testMarshalErr(v104v1, h, t, "enc-map-v104")
  5819. if v == nil {
  5820. v104v2 = nil
  5821. } else {
  5822. v104v2 = make(map[uint8]int64, len(v))
  5823. } // reset map
  5824. testUnmarshalErr(v104v2, bs104, h, t, "dec-map-v104")
  5825. testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104")
  5826. if v == nil {
  5827. v104v2 = nil
  5828. } else {
  5829. v104v2 = make(map[uint8]int64, len(v))
  5830. } // reset map
  5831. testUnmarshalErr(reflect.ValueOf(v104v2), bs104, h, t, "dec-map-v104-noaddr") // decode into non-addressable map value
  5832. testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-noaddr")
  5833. if v == nil {
  5834. v104v2 = nil
  5835. } else {
  5836. v104v2 = make(map[uint8]int64, len(v))
  5837. } // reset map
  5838. testUnmarshalErr(&v104v2, bs104, h, t, "dec-map-v104-p-len")
  5839. testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-p-len")
  5840. bs104 = testMarshalErr(&v104v1, h, t, "enc-map-v104-p")
  5841. v104v2 = nil
  5842. testUnmarshalErr(&v104v2, bs104, h, t, "dec-map-v104-p-nil")
  5843. testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-p-nil")
  5844. // ...
  5845. if v == nil {
  5846. v104v2 = nil
  5847. } else {
  5848. v104v2 = make(map[uint8]int64, len(v))
  5849. } // reset map
  5850. var v104v3, v104v4 typMapMapUint8Int64
  5851. v104v3 = typMapMapUint8Int64(v104v1)
  5852. v104v4 = typMapMapUint8Int64(v104v2)
  5853. bs104 = testMarshalErr(v104v3, h, t, "enc-map-v104-custom")
  5854. testUnmarshalErr(v104v4, bs104, h, t, "dec-map-v104-p-len")
  5855. testDeepEqualErr(v104v3, v104v4, t, "equal-map-v104-p-len")
  5856. }
  5857. for _, v := range []map[uint8]float32{nil, {}, {44: 0, 33: 22.2}} {
  5858. // fmt.Printf(">>>> running mammoth map v105: %v\n", v)
  5859. var v105v1, v105v2 map[uint8]float32
  5860. v105v1 = v
  5861. bs105 := testMarshalErr(v105v1, h, t, "enc-map-v105")
  5862. if v == nil {
  5863. v105v2 = nil
  5864. } else {
  5865. v105v2 = make(map[uint8]float32, len(v))
  5866. } // reset map
  5867. testUnmarshalErr(v105v2, bs105, h, t, "dec-map-v105")
  5868. testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105")
  5869. if v == nil {
  5870. v105v2 = nil
  5871. } else {
  5872. v105v2 = make(map[uint8]float32, len(v))
  5873. } // reset map
  5874. testUnmarshalErr(reflect.ValueOf(v105v2), bs105, h, t, "dec-map-v105-noaddr") // decode into non-addressable map value
  5875. testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-noaddr")
  5876. if v == nil {
  5877. v105v2 = nil
  5878. } else {
  5879. v105v2 = make(map[uint8]float32, len(v))
  5880. } // reset map
  5881. testUnmarshalErr(&v105v2, bs105, h, t, "dec-map-v105-p-len")
  5882. testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-p-len")
  5883. bs105 = testMarshalErr(&v105v1, h, t, "enc-map-v105-p")
  5884. v105v2 = nil
  5885. testUnmarshalErr(&v105v2, bs105, h, t, "dec-map-v105-p-nil")
  5886. testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-p-nil")
  5887. // ...
  5888. if v == nil {
  5889. v105v2 = nil
  5890. } else {
  5891. v105v2 = make(map[uint8]float32, len(v))
  5892. } // reset map
  5893. var v105v3, v105v4 typMapMapUint8Float32
  5894. v105v3 = typMapMapUint8Float32(v105v1)
  5895. v105v4 = typMapMapUint8Float32(v105v2)
  5896. bs105 = testMarshalErr(v105v3, h, t, "enc-map-v105-custom")
  5897. testUnmarshalErr(v105v4, bs105, h, t, "dec-map-v105-p-len")
  5898. testDeepEqualErr(v105v3, v105v4, t, "equal-map-v105-p-len")
  5899. }
  5900. for _, v := range []map[uint8]float64{nil, {}, {44: 0, 33: 11.1}} {
  5901. // fmt.Printf(">>>> running mammoth map v106: %v\n", v)
  5902. var v106v1, v106v2 map[uint8]float64
  5903. v106v1 = v
  5904. bs106 := testMarshalErr(v106v1, h, t, "enc-map-v106")
  5905. if v == nil {
  5906. v106v2 = nil
  5907. } else {
  5908. v106v2 = make(map[uint8]float64, len(v))
  5909. } // reset map
  5910. testUnmarshalErr(v106v2, bs106, h, t, "dec-map-v106")
  5911. testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106")
  5912. if v == nil {
  5913. v106v2 = nil
  5914. } else {
  5915. v106v2 = make(map[uint8]float64, len(v))
  5916. } // reset map
  5917. testUnmarshalErr(reflect.ValueOf(v106v2), bs106, h, t, "dec-map-v106-noaddr") // decode into non-addressable map value
  5918. testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-noaddr")
  5919. if v == nil {
  5920. v106v2 = nil
  5921. } else {
  5922. v106v2 = make(map[uint8]float64, len(v))
  5923. } // reset map
  5924. testUnmarshalErr(&v106v2, bs106, h, t, "dec-map-v106-p-len")
  5925. testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-p-len")
  5926. bs106 = testMarshalErr(&v106v1, h, t, "enc-map-v106-p")
  5927. v106v2 = nil
  5928. testUnmarshalErr(&v106v2, bs106, h, t, "dec-map-v106-p-nil")
  5929. testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-p-nil")
  5930. // ...
  5931. if v == nil {
  5932. v106v2 = nil
  5933. } else {
  5934. v106v2 = make(map[uint8]float64, len(v))
  5935. } // reset map
  5936. var v106v3, v106v4 typMapMapUint8Float64
  5937. v106v3 = typMapMapUint8Float64(v106v1)
  5938. v106v4 = typMapMapUint8Float64(v106v2)
  5939. bs106 = testMarshalErr(v106v3, h, t, "enc-map-v106-custom")
  5940. testUnmarshalErr(v106v4, bs106, h, t, "dec-map-v106-p-len")
  5941. testDeepEqualErr(v106v3, v106v4, t, "equal-map-v106-p-len")
  5942. }
  5943. for _, v := range []map[uint8]bool{nil, {}, {44: false, 33: true}} {
  5944. // fmt.Printf(">>>> running mammoth map v107: %v\n", v)
  5945. var v107v1, v107v2 map[uint8]bool
  5946. v107v1 = v
  5947. bs107 := testMarshalErr(v107v1, h, t, "enc-map-v107")
  5948. if v == nil {
  5949. v107v2 = nil
  5950. } else {
  5951. v107v2 = make(map[uint8]bool, len(v))
  5952. } // reset map
  5953. testUnmarshalErr(v107v2, bs107, h, t, "dec-map-v107")
  5954. testDeepEqualErr(v107v1, v107v2, t, "equal-map-v107")
  5955. if v == nil {
  5956. v107v2 = nil
  5957. } else {
  5958. v107v2 = make(map[uint8]bool, len(v))
  5959. } // reset map
  5960. testUnmarshalErr(reflect.ValueOf(v107v2), bs107, h, t, "dec-map-v107-noaddr") // decode into non-addressable map value
  5961. testDeepEqualErr(v107v1, v107v2, t, "equal-map-v107-noaddr")
  5962. if v == nil {
  5963. v107v2 = nil
  5964. } else {
  5965. v107v2 = make(map[uint8]bool, len(v))
  5966. } // reset map
  5967. testUnmarshalErr(&v107v2, bs107, h, t, "dec-map-v107-p-len")
  5968. testDeepEqualErr(v107v1, v107v2, t, "equal-map-v107-p-len")
  5969. bs107 = testMarshalErr(&v107v1, h, t, "enc-map-v107-p")
  5970. v107v2 = nil
  5971. testUnmarshalErr(&v107v2, bs107, h, t, "dec-map-v107-p-nil")
  5972. testDeepEqualErr(v107v1, v107v2, t, "equal-map-v107-p-nil")
  5973. // ...
  5974. if v == nil {
  5975. v107v2 = nil
  5976. } else {
  5977. v107v2 = make(map[uint8]bool, len(v))
  5978. } // reset map
  5979. var v107v3, v107v4 typMapMapUint8Bool
  5980. v107v3 = typMapMapUint8Bool(v107v1)
  5981. v107v4 = typMapMapUint8Bool(v107v2)
  5982. bs107 = testMarshalErr(v107v3, h, t, "enc-map-v107-custom")
  5983. testUnmarshalErr(v107v4, bs107, h, t, "dec-map-v107-p-len")
  5984. testDeepEqualErr(v107v3, v107v4, t, "equal-map-v107-p-len")
  5985. }
  5986. for _, v := range []map[uint16]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  5987. // fmt.Printf(">>>> running mammoth map v110: %v\n", v)
  5988. var v110v1, v110v2 map[uint16]interface{}
  5989. v110v1 = v
  5990. bs110 := testMarshalErr(v110v1, h, t, "enc-map-v110")
  5991. if v == nil {
  5992. v110v2 = nil
  5993. } else {
  5994. v110v2 = make(map[uint16]interface{}, len(v))
  5995. } // reset map
  5996. testUnmarshalErr(v110v2, bs110, h, t, "dec-map-v110")
  5997. testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110")
  5998. if v == nil {
  5999. v110v2 = nil
  6000. } else {
  6001. v110v2 = make(map[uint16]interface{}, len(v))
  6002. } // reset map
  6003. testUnmarshalErr(reflect.ValueOf(v110v2), bs110, h, t, "dec-map-v110-noaddr") // decode into non-addressable map value
  6004. testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-noaddr")
  6005. if v == nil {
  6006. v110v2 = nil
  6007. } else {
  6008. v110v2 = make(map[uint16]interface{}, len(v))
  6009. } // reset map
  6010. testUnmarshalErr(&v110v2, bs110, h, t, "dec-map-v110-p-len")
  6011. testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-p-len")
  6012. bs110 = testMarshalErr(&v110v1, h, t, "enc-map-v110-p")
  6013. v110v2 = nil
  6014. testUnmarshalErr(&v110v2, bs110, h, t, "dec-map-v110-p-nil")
  6015. testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-p-nil")
  6016. // ...
  6017. if v == nil {
  6018. v110v2 = nil
  6019. } else {
  6020. v110v2 = make(map[uint16]interface{}, len(v))
  6021. } // reset map
  6022. var v110v3, v110v4 typMapMapUint16Intf
  6023. v110v3 = typMapMapUint16Intf(v110v1)
  6024. v110v4 = typMapMapUint16Intf(v110v2)
  6025. bs110 = testMarshalErr(v110v3, h, t, "enc-map-v110-custom")
  6026. testUnmarshalErr(v110v4, bs110, h, t, "dec-map-v110-p-len")
  6027. testDeepEqualErr(v110v3, v110v4, t, "equal-map-v110-p-len")
  6028. }
  6029. for _, v := range []map[uint16]string{nil, {}, {44: "", 33: "some-string-2"}} {
  6030. // fmt.Printf(">>>> running mammoth map v111: %v\n", v)
  6031. var v111v1, v111v2 map[uint16]string
  6032. v111v1 = v
  6033. bs111 := testMarshalErr(v111v1, h, t, "enc-map-v111")
  6034. if v == nil {
  6035. v111v2 = nil
  6036. } else {
  6037. v111v2 = make(map[uint16]string, len(v))
  6038. } // reset map
  6039. testUnmarshalErr(v111v2, bs111, h, t, "dec-map-v111")
  6040. testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111")
  6041. if v == nil {
  6042. v111v2 = nil
  6043. } else {
  6044. v111v2 = make(map[uint16]string, len(v))
  6045. } // reset map
  6046. testUnmarshalErr(reflect.ValueOf(v111v2), bs111, h, t, "dec-map-v111-noaddr") // decode into non-addressable map value
  6047. testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-noaddr")
  6048. if v == nil {
  6049. v111v2 = nil
  6050. } else {
  6051. v111v2 = make(map[uint16]string, len(v))
  6052. } // reset map
  6053. testUnmarshalErr(&v111v2, bs111, h, t, "dec-map-v111-p-len")
  6054. testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-p-len")
  6055. bs111 = testMarshalErr(&v111v1, h, t, "enc-map-v111-p")
  6056. v111v2 = nil
  6057. testUnmarshalErr(&v111v2, bs111, h, t, "dec-map-v111-p-nil")
  6058. testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-p-nil")
  6059. // ...
  6060. if v == nil {
  6061. v111v2 = nil
  6062. } else {
  6063. v111v2 = make(map[uint16]string, len(v))
  6064. } // reset map
  6065. var v111v3, v111v4 typMapMapUint16String
  6066. v111v3 = typMapMapUint16String(v111v1)
  6067. v111v4 = typMapMapUint16String(v111v2)
  6068. bs111 = testMarshalErr(v111v3, h, t, "enc-map-v111-custom")
  6069. testUnmarshalErr(v111v4, bs111, h, t, "dec-map-v111-p-len")
  6070. testDeepEqualErr(v111v3, v111v4, t, "equal-map-v111-p-len")
  6071. }
  6072. for _, v := range []map[uint16]uint{nil, {}, {44: 0, 33: 44}} {
  6073. // fmt.Printf(">>>> running mammoth map v112: %v\n", v)
  6074. var v112v1, v112v2 map[uint16]uint
  6075. v112v1 = v
  6076. bs112 := testMarshalErr(v112v1, h, t, "enc-map-v112")
  6077. if v == nil {
  6078. v112v2 = nil
  6079. } else {
  6080. v112v2 = make(map[uint16]uint, len(v))
  6081. } // reset map
  6082. testUnmarshalErr(v112v2, bs112, h, t, "dec-map-v112")
  6083. testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112")
  6084. if v == nil {
  6085. v112v2 = nil
  6086. } else {
  6087. v112v2 = make(map[uint16]uint, len(v))
  6088. } // reset map
  6089. testUnmarshalErr(reflect.ValueOf(v112v2), bs112, h, t, "dec-map-v112-noaddr") // decode into non-addressable map value
  6090. testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-noaddr")
  6091. if v == nil {
  6092. v112v2 = nil
  6093. } else {
  6094. v112v2 = make(map[uint16]uint, len(v))
  6095. } // reset map
  6096. testUnmarshalErr(&v112v2, bs112, h, t, "dec-map-v112-p-len")
  6097. testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-p-len")
  6098. bs112 = testMarshalErr(&v112v1, h, t, "enc-map-v112-p")
  6099. v112v2 = nil
  6100. testUnmarshalErr(&v112v2, bs112, h, t, "dec-map-v112-p-nil")
  6101. testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-p-nil")
  6102. // ...
  6103. if v == nil {
  6104. v112v2 = nil
  6105. } else {
  6106. v112v2 = make(map[uint16]uint, len(v))
  6107. } // reset map
  6108. var v112v3, v112v4 typMapMapUint16Uint
  6109. v112v3 = typMapMapUint16Uint(v112v1)
  6110. v112v4 = typMapMapUint16Uint(v112v2)
  6111. bs112 = testMarshalErr(v112v3, h, t, "enc-map-v112-custom")
  6112. testUnmarshalErr(v112v4, bs112, h, t, "dec-map-v112-p-len")
  6113. testDeepEqualErr(v112v3, v112v4, t, "equal-map-v112-p-len")
  6114. }
  6115. for _, v := range []map[uint16]uint8{nil, {}, {33: 0, 44: 33}} {
  6116. // fmt.Printf(">>>> running mammoth map v113: %v\n", v)
  6117. var v113v1, v113v2 map[uint16]uint8
  6118. v113v1 = v
  6119. bs113 := testMarshalErr(v113v1, h, t, "enc-map-v113")
  6120. if v == nil {
  6121. v113v2 = nil
  6122. } else {
  6123. v113v2 = make(map[uint16]uint8, len(v))
  6124. } // reset map
  6125. testUnmarshalErr(v113v2, bs113, h, t, "dec-map-v113")
  6126. testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113")
  6127. if v == nil {
  6128. v113v2 = nil
  6129. } else {
  6130. v113v2 = make(map[uint16]uint8, len(v))
  6131. } // reset map
  6132. testUnmarshalErr(reflect.ValueOf(v113v2), bs113, h, t, "dec-map-v113-noaddr") // decode into non-addressable map value
  6133. testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-noaddr")
  6134. if v == nil {
  6135. v113v2 = nil
  6136. } else {
  6137. v113v2 = make(map[uint16]uint8, len(v))
  6138. } // reset map
  6139. testUnmarshalErr(&v113v2, bs113, h, t, "dec-map-v113-p-len")
  6140. testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-p-len")
  6141. bs113 = testMarshalErr(&v113v1, h, t, "enc-map-v113-p")
  6142. v113v2 = nil
  6143. testUnmarshalErr(&v113v2, bs113, h, t, "dec-map-v113-p-nil")
  6144. testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-p-nil")
  6145. // ...
  6146. if v == nil {
  6147. v113v2 = nil
  6148. } else {
  6149. v113v2 = make(map[uint16]uint8, len(v))
  6150. } // reset map
  6151. var v113v3, v113v4 typMapMapUint16Uint8
  6152. v113v3 = typMapMapUint16Uint8(v113v1)
  6153. v113v4 = typMapMapUint16Uint8(v113v2)
  6154. bs113 = testMarshalErr(v113v3, h, t, "enc-map-v113-custom")
  6155. testUnmarshalErr(v113v4, bs113, h, t, "dec-map-v113-p-len")
  6156. testDeepEqualErr(v113v3, v113v4, t, "equal-map-v113-p-len")
  6157. }
  6158. for _, v := range []map[uint16]uint16{nil, {}, {44: 0, 33: 44}} {
  6159. // fmt.Printf(">>>> running mammoth map v114: %v\n", v)
  6160. var v114v1, v114v2 map[uint16]uint16
  6161. v114v1 = v
  6162. bs114 := testMarshalErr(v114v1, h, t, "enc-map-v114")
  6163. if v == nil {
  6164. v114v2 = nil
  6165. } else {
  6166. v114v2 = make(map[uint16]uint16, len(v))
  6167. } // reset map
  6168. testUnmarshalErr(v114v2, bs114, h, t, "dec-map-v114")
  6169. testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114")
  6170. if v == nil {
  6171. v114v2 = nil
  6172. } else {
  6173. v114v2 = make(map[uint16]uint16, len(v))
  6174. } // reset map
  6175. testUnmarshalErr(reflect.ValueOf(v114v2), bs114, h, t, "dec-map-v114-noaddr") // decode into non-addressable map value
  6176. testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-noaddr")
  6177. if v == nil {
  6178. v114v2 = nil
  6179. } else {
  6180. v114v2 = make(map[uint16]uint16, len(v))
  6181. } // reset map
  6182. testUnmarshalErr(&v114v2, bs114, h, t, "dec-map-v114-p-len")
  6183. testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-p-len")
  6184. bs114 = testMarshalErr(&v114v1, h, t, "enc-map-v114-p")
  6185. v114v2 = nil
  6186. testUnmarshalErr(&v114v2, bs114, h, t, "dec-map-v114-p-nil")
  6187. testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-p-nil")
  6188. // ...
  6189. if v == nil {
  6190. v114v2 = nil
  6191. } else {
  6192. v114v2 = make(map[uint16]uint16, len(v))
  6193. } // reset map
  6194. var v114v3, v114v4 typMapMapUint16Uint16
  6195. v114v3 = typMapMapUint16Uint16(v114v1)
  6196. v114v4 = typMapMapUint16Uint16(v114v2)
  6197. bs114 = testMarshalErr(v114v3, h, t, "enc-map-v114-custom")
  6198. testUnmarshalErr(v114v4, bs114, h, t, "dec-map-v114-p-len")
  6199. testDeepEqualErr(v114v3, v114v4, t, "equal-map-v114-p-len")
  6200. }
  6201. for _, v := range []map[uint16]uint32{nil, {}, {33: 0, 44: 33}} {
  6202. // fmt.Printf(">>>> running mammoth map v115: %v\n", v)
  6203. var v115v1, v115v2 map[uint16]uint32
  6204. v115v1 = v
  6205. bs115 := testMarshalErr(v115v1, h, t, "enc-map-v115")
  6206. if v == nil {
  6207. v115v2 = nil
  6208. } else {
  6209. v115v2 = make(map[uint16]uint32, len(v))
  6210. } // reset map
  6211. testUnmarshalErr(v115v2, bs115, h, t, "dec-map-v115")
  6212. testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115")
  6213. if v == nil {
  6214. v115v2 = nil
  6215. } else {
  6216. v115v2 = make(map[uint16]uint32, len(v))
  6217. } // reset map
  6218. testUnmarshalErr(reflect.ValueOf(v115v2), bs115, h, t, "dec-map-v115-noaddr") // decode into non-addressable map value
  6219. testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-noaddr")
  6220. if v == nil {
  6221. v115v2 = nil
  6222. } else {
  6223. v115v2 = make(map[uint16]uint32, len(v))
  6224. } // reset map
  6225. testUnmarshalErr(&v115v2, bs115, h, t, "dec-map-v115-p-len")
  6226. testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-p-len")
  6227. bs115 = testMarshalErr(&v115v1, h, t, "enc-map-v115-p")
  6228. v115v2 = nil
  6229. testUnmarshalErr(&v115v2, bs115, h, t, "dec-map-v115-p-nil")
  6230. testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-p-nil")
  6231. // ...
  6232. if v == nil {
  6233. v115v2 = nil
  6234. } else {
  6235. v115v2 = make(map[uint16]uint32, len(v))
  6236. } // reset map
  6237. var v115v3, v115v4 typMapMapUint16Uint32
  6238. v115v3 = typMapMapUint16Uint32(v115v1)
  6239. v115v4 = typMapMapUint16Uint32(v115v2)
  6240. bs115 = testMarshalErr(v115v3, h, t, "enc-map-v115-custom")
  6241. testUnmarshalErr(v115v4, bs115, h, t, "dec-map-v115-p-len")
  6242. testDeepEqualErr(v115v3, v115v4, t, "equal-map-v115-p-len")
  6243. }
  6244. for _, v := range []map[uint16]uint64{nil, {}, {44: 0, 33: 44}} {
  6245. // fmt.Printf(">>>> running mammoth map v116: %v\n", v)
  6246. var v116v1, v116v2 map[uint16]uint64
  6247. v116v1 = v
  6248. bs116 := testMarshalErr(v116v1, h, t, "enc-map-v116")
  6249. if v == nil {
  6250. v116v2 = nil
  6251. } else {
  6252. v116v2 = make(map[uint16]uint64, len(v))
  6253. } // reset map
  6254. testUnmarshalErr(v116v2, bs116, h, t, "dec-map-v116")
  6255. testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116")
  6256. if v == nil {
  6257. v116v2 = nil
  6258. } else {
  6259. v116v2 = make(map[uint16]uint64, len(v))
  6260. } // reset map
  6261. testUnmarshalErr(reflect.ValueOf(v116v2), bs116, h, t, "dec-map-v116-noaddr") // decode into non-addressable map value
  6262. testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-noaddr")
  6263. if v == nil {
  6264. v116v2 = nil
  6265. } else {
  6266. v116v2 = make(map[uint16]uint64, len(v))
  6267. } // reset map
  6268. testUnmarshalErr(&v116v2, bs116, h, t, "dec-map-v116-p-len")
  6269. testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-p-len")
  6270. bs116 = testMarshalErr(&v116v1, h, t, "enc-map-v116-p")
  6271. v116v2 = nil
  6272. testUnmarshalErr(&v116v2, bs116, h, t, "dec-map-v116-p-nil")
  6273. testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-p-nil")
  6274. // ...
  6275. if v == nil {
  6276. v116v2 = nil
  6277. } else {
  6278. v116v2 = make(map[uint16]uint64, len(v))
  6279. } // reset map
  6280. var v116v3, v116v4 typMapMapUint16Uint64
  6281. v116v3 = typMapMapUint16Uint64(v116v1)
  6282. v116v4 = typMapMapUint16Uint64(v116v2)
  6283. bs116 = testMarshalErr(v116v3, h, t, "enc-map-v116-custom")
  6284. testUnmarshalErr(v116v4, bs116, h, t, "dec-map-v116-p-len")
  6285. testDeepEqualErr(v116v3, v116v4, t, "equal-map-v116-p-len")
  6286. }
  6287. for _, v := range []map[uint16]uintptr{nil, {}, {33: 0, 44: 33}} {
  6288. // fmt.Printf(">>>> running mammoth map v117: %v\n", v)
  6289. var v117v1, v117v2 map[uint16]uintptr
  6290. v117v1 = v
  6291. bs117 := testMarshalErr(v117v1, h, t, "enc-map-v117")
  6292. if v == nil {
  6293. v117v2 = nil
  6294. } else {
  6295. v117v2 = make(map[uint16]uintptr, len(v))
  6296. } // reset map
  6297. testUnmarshalErr(v117v2, bs117, h, t, "dec-map-v117")
  6298. testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117")
  6299. if v == nil {
  6300. v117v2 = nil
  6301. } else {
  6302. v117v2 = make(map[uint16]uintptr, len(v))
  6303. } // reset map
  6304. testUnmarshalErr(reflect.ValueOf(v117v2), bs117, h, t, "dec-map-v117-noaddr") // decode into non-addressable map value
  6305. testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-noaddr")
  6306. if v == nil {
  6307. v117v2 = nil
  6308. } else {
  6309. v117v2 = make(map[uint16]uintptr, len(v))
  6310. } // reset map
  6311. testUnmarshalErr(&v117v2, bs117, h, t, "dec-map-v117-p-len")
  6312. testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-p-len")
  6313. bs117 = testMarshalErr(&v117v1, h, t, "enc-map-v117-p")
  6314. v117v2 = nil
  6315. testUnmarshalErr(&v117v2, bs117, h, t, "dec-map-v117-p-nil")
  6316. testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-p-nil")
  6317. // ...
  6318. if v == nil {
  6319. v117v2 = nil
  6320. } else {
  6321. v117v2 = make(map[uint16]uintptr, len(v))
  6322. } // reset map
  6323. var v117v3, v117v4 typMapMapUint16Uintptr
  6324. v117v3 = typMapMapUint16Uintptr(v117v1)
  6325. v117v4 = typMapMapUint16Uintptr(v117v2)
  6326. bs117 = testMarshalErr(v117v3, h, t, "enc-map-v117-custom")
  6327. testUnmarshalErr(v117v4, bs117, h, t, "dec-map-v117-p-len")
  6328. testDeepEqualErr(v117v3, v117v4, t, "equal-map-v117-p-len")
  6329. }
  6330. for _, v := range []map[uint16]int{nil, {}, {44: 0, 33: 44}} {
  6331. // fmt.Printf(">>>> running mammoth map v118: %v\n", v)
  6332. var v118v1, v118v2 map[uint16]int
  6333. v118v1 = v
  6334. bs118 := testMarshalErr(v118v1, h, t, "enc-map-v118")
  6335. if v == nil {
  6336. v118v2 = nil
  6337. } else {
  6338. v118v2 = make(map[uint16]int, len(v))
  6339. } // reset map
  6340. testUnmarshalErr(v118v2, bs118, h, t, "dec-map-v118")
  6341. testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118")
  6342. if v == nil {
  6343. v118v2 = nil
  6344. } else {
  6345. v118v2 = make(map[uint16]int, len(v))
  6346. } // reset map
  6347. testUnmarshalErr(reflect.ValueOf(v118v2), bs118, h, t, "dec-map-v118-noaddr") // decode into non-addressable map value
  6348. testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-noaddr")
  6349. if v == nil {
  6350. v118v2 = nil
  6351. } else {
  6352. v118v2 = make(map[uint16]int, len(v))
  6353. } // reset map
  6354. testUnmarshalErr(&v118v2, bs118, h, t, "dec-map-v118-p-len")
  6355. testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-p-len")
  6356. bs118 = testMarshalErr(&v118v1, h, t, "enc-map-v118-p")
  6357. v118v2 = nil
  6358. testUnmarshalErr(&v118v2, bs118, h, t, "dec-map-v118-p-nil")
  6359. testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-p-nil")
  6360. // ...
  6361. if v == nil {
  6362. v118v2 = nil
  6363. } else {
  6364. v118v2 = make(map[uint16]int, len(v))
  6365. } // reset map
  6366. var v118v3, v118v4 typMapMapUint16Int
  6367. v118v3 = typMapMapUint16Int(v118v1)
  6368. v118v4 = typMapMapUint16Int(v118v2)
  6369. bs118 = testMarshalErr(v118v3, h, t, "enc-map-v118-custom")
  6370. testUnmarshalErr(v118v4, bs118, h, t, "dec-map-v118-p-len")
  6371. testDeepEqualErr(v118v3, v118v4, t, "equal-map-v118-p-len")
  6372. }
  6373. for _, v := range []map[uint16]int8{nil, {}, {33: 0, 44: 33}} {
  6374. // fmt.Printf(">>>> running mammoth map v119: %v\n", v)
  6375. var v119v1, v119v2 map[uint16]int8
  6376. v119v1 = v
  6377. bs119 := testMarshalErr(v119v1, h, t, "enc-map-v119")
  6378. if v == nil {
  6379. v119v2 = nil
  6380. } else {
  6381. v119v2 = make(map[uint16]int8, len(v))
  6382. } // reset map
  6383. testUnmarshalErr(v119v2, bs119, h, t, "dec-map-v119")
  6384. testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119")
  6385. if v == nil {
  6386. v119v2 = nil
  6387. } else {
  6388. v119v2 = make(map[uint16]int8, len(v))
  6389. } // reset map
  6390. testUnmarshalErr(reflect.ValueOf(v119v2), bs119, h, t, "dec-map-v119-noaddr") // decode into non-addressable map value
  6391. testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-noaddr")
  6392. if v == nil {
  6393. v119v2 = nil
  6394. } else {
  6395. v119v2 = make(map[uint16]int8, len(v))
  6396. } // reset map
  6397. testUnmarshalErr(&v119v2, bs119, h, t, "dec-map-v119-p-len")
  6398. testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-p-len")
  6399. bs119 = testMarshalErr(&v119v1, h, t, "enc-map-v119-p")
  6400. v119v2 = nil
  6401. testUnmarshalErr(&v119v2, bs119, h, t, "dec-map-v119-p-nil")
  6402. testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-p-nil")
  6403. // ...
  6404. if v == nil {
  6405. v119v2 = nil
  6406. } else {
  6407. v119v2 = make(map[uint16]int8, len(v))
  6408. } // reset map
  6409. var v119v3, v119v4 typMapMapUint16Int8
  6410. v119v3 = typMapMapUint16Int8(v119v1)
  6411. v119v4 = typMapMapUint16Int8(v119v2)
  6412. bs119 = testMarshalErr(v119v3, h, t, "enc-map-v119-custom")
  6413. testUnmarshalErr(v119v4, bs119, h, t, "dec-map-v119-p-len")
  6414. testDeepEqualErr(v119v3, v119v4, t, "equal-map-v119-p-len")
  6415. }
  6416. for _, v := range []map[uint16]int16{nil, {}, {44: 0, 33: 44}} {
  6417. // fmt.Printf(">>>> running mammoth map v120: %v\n", v)
  6418. var v120v1, v120v2 map[uint16]int16
  6419. v120v1 = v
  6420. bs120 := testMarshalErr(v120v1, h, t, "enc-map-v120")
  6421. if v == nil {
  6422. v120v2 = nil
  6423. } else {
  6424. v120v2 = make(map[uint16]int16, len(v))
  6425. } // reset map
  6426. testUnmarshalErr(v120v2, bs120, h, t, "dec-map-v120")
  6427. testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120")
  6428. if v == nil {
  6429. v120v2 = nil
  6430. } else {
  6431. v120v2 = make(map[uint16]int16, len(v))
  6432. } // reset map
  6433. testUnmarshalErr(reflect.ValueOf(v120v2), bs120, h, t, "dec-map-v120-noaddr") // decode into non-addressable map value
  6434. testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-noaddr")
  6435. if v == nil {
  6436. v120v2 = nil
  6437. } else {
  6438. v120v2 = make(map[uint16]int16, len(v))
  6439. } // reset map
  6440. testUnmarshalErr(&v120v2, bs120, h, t, "dec-map-v120-p-len")
  6441. testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-p-len")
  6442. bs120 = testMarshalErr(&v120v1, h, t, "enc-map-v120-p")
  6443. v120v2 = nil
  6444. testUnmarshalErr(&v120v2, bs120, h, t, "dec-map-v120-p-nil")
  6445. testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-p-nil")
  6446. // ...
  6447. if v == nil {
  6448. v120v2 = nil
  6449. } else {
  6450. v120v2 = make(map[uint16]int16, len(v))
  6451. } // reset map
  6452. var v120v3, v120v4 typMapMapUint16Int16
  6453. v120v3 = typMapMapUint16Int16(v120v1)
  6454. v120v4 = typMapMapUint16Int16(v120v2)
  6455. bs120 = testMarshalErr(v120v3, h, t, "enc-map-v120-custom")
  6456. testUnmarshalErr(v120v4, bs120, h, t, "dec-map-v120-p-len")
  6457. testDeepEqualErr(v120v3, v120v4, t, "equal-map-v120-p-len")
  6458. }
  6459. for _, v := range []map[uint16]int32{nil, {}, {33: 0, 44: 33}} {
  6460. // fmt.Printf(">>>> running mammoth map v121: %v\n", v)
  6461. var v121v1, v121v2 map[uint16]int32
  6462. v121v1 = v
  6463. bs121 := testMarshalErr(v121v1, h, t, "enc-map-v121")
  6464. if v == nil {
  6465. v121v2 = nil
  6466. } else {
  6467. v121v2 = make(map[uint16]int32, len(v))
  6468. } // reset map
  6469. testUnmarshalErr(v121v2, bs121, h, t, "dec-map-v121")
  6470. testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121")
  6471. if v == nil {
  6472. v121v2 = nil
  6473. } else {
  6474. v121v2 = make(map[uint16]int32, len(v))
  6475. } // reset map
  6476. testUnmarshalErr(reflect.ValueOf(v121v2), bs121, h, t, "dec-map-v121-noaddr") // decode into non-addressable map value
  6477. testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-noaddr")
  6478. if v == nil {
  6479. v121v2 = nil
  6480. } else {
  6481. v121v2 = make(map[uint16]int32, len(v))
  6482. } // reset map
  6483. testUnmarshalErr(&v121v2, bs121, h, t, "dec-map-v121-p-len")
  6484. testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-p-len")
  6485. bs121 = testMarshalErr(&v121v1, h, t, "enc-map-v121-p")
  6486. v121v2 = nil
  6487. testUnmarshalErr(&v121v2, bs121, h, t, "dec-map-v121-p-nil")
  6488. testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-p-nil")
  6489. // ...
  6490. if v == nil {
  6491. v121v2 = nil
  6492. } else {
  6493. v121v2 = make(map[uint16]int32, len(v))
  6494. } // reset map
  6495. var v121v3, v121v4 typMapMapUint16Int32
  6496. v121v3 = typMapMapUint16Int32(v121v1)
  6497. v121v4 = typMapMapUint16Int32(v121v2)
  6498. bs121 = testMarshalErr(v121v3, h, t, "enc-map-v121-custom")
  6499. testUnmarshalErr(v121v4, bs121, h, t, "dec-map-v121-p-len")
  6500. testDeepEqualErr(v121v3, v121v4, t, "equal-map-v121-p-len")
  6501. }
  6502. for _, v := range []map[uint16]int64{nil, {}, {44: 0, 33: 44}} {
  6503. // fmt.Printf(">>>> running mammoth map v122: %v\n", v)
  6504. var v122v1, v122v2 map[uint16]int64
  6505. v122v1 = v
  6506. bs122 := testMarshalErr(v122v1, h, t, "enc-map-v122")
  6507. if v == nil {
  6508. v122v2 = nil
  6509. } else {
  6510. v122v2 = make(map[uint16]int64, len(v))
  6511. } // reset map
  6512. testUnmarshalErr(v122v2, bs122, h, t, "dec-map-v122")
  6513. testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122")
  6514. if v == nil {
  6515. v122v2 = nil
  6516. } else {
  6517. v122v2 = make(map[uint16]int64, len(v))
  6518. } // reset map
  6519. testUnmarshalErr(reflect.ValueOf(v122v2), bs122, h, t, "dec-map-v122-noaddr") // decode into non-addressable map value
  6520. testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-noaddr")
  6521. if v == nil {
  6522. v122v2 = nil
  6523. } else {
  6524. v122v2 = make(map[uint16]int64, len(v))
  6525. } // reset map
  6526. testUnmarshalErr(&v122v2, bs122, h, t, "dec-map-v122-p-len")
  6527. testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-p-len")
  6528. bs122 = testMarshalErr(&v122v1, h, t, "enc-map-v122-p")
  6529. v122v2 = nil
  6530. testUnmarshalErr(&v122v2, bs122, h, t, "dec-map-v122-p-nil")
  6531. testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-p-nil")
  6532. // ...
  6533. if v == nil {
  6534. v122v2 = nil
  6535. } else {
  6536. v122v2 = make(map[uint16]int64, len(v))
  6537. } // reset map
  6538. var v122v3, v122v4 typMapMapUint16Int64
  6539. v122v3 = typMapMapUint16Int64(v122v1)
  6540. v122v4 = typMapMapUint16Int64(v122v2)
  6541. bs122 = testMarshalErr(v122v3, h, t, "enc-map-v122-custom")
  6542. testUnmarshalErr(v122v4, bs122, h, t, "dec-map-v122-p-len")
  6543. testDeepEqualErr(v122v3, v122v4, t, "equal-map-v122-p-len")
  6544. }
  6545. for _, v := range []map[uint16]float32{nil, {}, {33: 0, 44: 22.2}} {
  6546. // fmt.Printf(">>>> running mammoth map v123: %v\n", v)
  6547. var v123v1, v123v2 map[uint16]float32
  6548. v123v1 = v
  6549. bs123 := testMarshalErr(v123v1, h, t, "enc-map-v123")
  6550. if v == nil {
  6551. v123v2 = nil
  6552. } else {
  6553. v123v2 = make(map[uint16]float32, len(v))
  6554. } // reset map
  6555. testUnmarshalErr(v123v2, bs123, h, t, "dec-map-v123")
  6556. testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123")
  6557. if v == nil {
  6558. v123v2 = nil
  6559. } else {
  6560. v123v2 = make(map[uint16]float32, len(v))
  6561. } // reset map
  6562. testUnmarshalErr(reflect.ValueOf(v123v2), bs123, h, t, "dec-map-v123-noaddr") // decode into non-addressable map value
  6563. testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-noaddr")
  6564. if v == nil {
  6565. v123v2 = nil
  6566. } else {
  6567. v123v2 = make(map[uint16]float32, len(v))
  6568. } // reset map
  6569. testUnmarshalErr(&v123v2, bs123, h, t, "dec-map-v123-p-len")
  6570. testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-p-len")
  6571. bs123 = testMarshalErr(&v123v1, h, t, "enc-map-v123-p")
  6572. v123v2 = nil
  6573. testUnmarshalErr(&v123v2, bs123, h, t, "dec-map-v123-p-nil")
  6574. testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-p-nil")
  6575. // ...
  6576. if v == nil {
  6577. v123v2 = nil
  6578. } else {
  6579. v123v2 = make(map[uint16]float32, len(v))
  6580. } // reset map
  6581. var v123v3, v123v4 typMapMapUint16Float32
  6582. v123v3 = typMapMapUint16Float32(v123v1)
  6583. v123v4 = typMapMapUint16Float32(v123v2)
  6584. bs123 = testMarshalErr(v123v3, h, t, "enc-map-v123-custom")
  6585. testUnmarshalErr(v123v4, bs123, h, t, "dec-map-v123-p-len")
  6586. testDeepEqualErr(v123v3, v123v4, t, "equal-map-v123-p-len")
  6587. }
  6588. for _, v := range []map[uint16]float64{nil, {}, {33: 0, 44: 11.1}} {
  6589. // fmt.Printf(">>>> running mammoth map v124: %v\n", v)
  6590. var v124v1, v124v2 map[uint16]float64
  6591. v124v1 = v
  6592. bs124 := testMarshalErr(v124v1, h, t, "enc-map-v124")
  6593. if v == nil {
  6594. v124v2 = nil
  6595. } else {
  6596. v124v2 = make(map[uint16]float64, len(v))
  6597. } // reset map
  6598. testUnmarshalErr(v124v2, bs124, h, t, "dec-map-v124")
  6599. testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124")
  6600. if v == nil {
  6601. v124v2 = nil
  6602. } else {
  6603. v124v2 = make(map[uint16]float64, len(v))
  6604. } // reset map
  6605. testUnmarshalErr(reflect.ValueOf(v124v2), bs124, h, t, "dec-map-v124-noaddr") // decode into non-addressable map value
  6606. testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-noaddr")
  6607. if v == nil {
  6608. v124v2 = nil
  6609. } else {
  6610. v124v2 = make(map[uint16]float64, len(v))
  6611. } // reset map
  6612. testUnmarshalErr(&v124v2, bs124, h, t, "dec-map-v124-p-len")
  6613. testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-p-len")
  6614. bs124 = testMarshalErr(&v124v1, h, t, "enc-map-v124-p")
  6615. v124v2 = nil
  6616. testUnmarshalErr(&v124v2, bs124, h, t, "dec-map-v124-p-nil")
  6617. testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-p-nil")
  6618. // ...
  6619. if v == nil {
  6620. v124v2 = nil
  6621. } else {
  6622. v124v2 = make(map[uint16]float64, len(v))
  6623. } // reset map
  6624. var v124v3, v124v4 typMapMapUint16Float64
  6625. v124v3 = typMapMapUint16Float64(v124v1)
  6626. v124v4 = typMapMapUint16Float64(v124v2)
  6627. bs124 = testMarshalErr(v124v3, h, t, "enc-map-v124-custom")
  6628. testUnmarshalErr(v124v4, bs124, h, t, "dec-map-v124-p-len")
  6629. testDeepEqualErr(v124v3, v124v4, t, "equal-map-v124-p-len")
  6630. }
  6631. for _, v := range []map[uint16]bool{nil, {}, {33: false, 44: true}} {
  6632. // fmt.Printf(">>>> running mammoth map v125: %v\n", v)
  6633. var v125v1, v125v2 map[uint16]bool
  6634. v125v1 = v
  6635. bs125 := testMarshalErr(v125v1, h, t, "enc-map-v125")
  6636. if v == nil {
  6637. v125v2 = nil
  6638. } else {
  6639. v125v2 = make(map[uint16]bool, len(v))
  6640. } // reset map
  6641. testUnmarshalErr(v125v2, bs125, h, t, "dec-map-v125")
  6642. testDeepEqualErr(v125v1, v125v2, t, "equal-map-v125")
  6643. if v == nil {
  6644. v125v2 = nil
  6645. } else {
  6646. v125v2 = make(map[uint16]bool, len(v))
  6647. } // reset map
  6648. testUnmarshalErr(reflect.ValueOf(v125v2), bs125, h, t, "dec-map-v125-noaddr") // decode into non-addressable map value
  6649. testDeepEqualErr(v125v1, v125v2, t, "equal-map-v125-noaddr")
  6650. if v == nil {
  6651. v125v2 = nil
  6652. } else {
  6653. v125v2 = make(map[uint16]bool, len(v))
  6654. } // reset map
  6655. testUnmarshalErr(&v125v2, bs125, h, t, "dec-map-v125-p-len")
  6656. testDeepEqualErr(v125v1, v125v2, t, "equal-map-v125-p-len")
  6657. bs125 = testMarshalErr(&v125v1, h, t, "enc-map-v125-p")
  6658. v125v2 = nil
  6659. testUnmarshalErr(&v125v2, bs125, h, t, "dec-map-v125-p-nil")
  6660. testDeepEqualErr(v125v1, v125v2, t, "equal-map-v125-p-nil")
  6661. // ...
  6662. if v == nil {
  6663. v125v2 = nil
  6664. } else {
  6665. v125v2 = make(map[uint16]bool, len(v))
  6666. } // reset map
  6667. var v125v3, v125v4 typMapMapUint16Bool
  6668. v125v3 = typMapMapUint16Bool(v125v1)
  6669. v125v4 = typMapMapUint16Bool(v125v2)
  6670. bs125 = testMarshalErr(v125v3, h, t, "enc-map-v125-custom")
  6671. testUnmarshalErr(v125v4, bs125, h, t, "dec-map-v125-p-len")
  6672. testDeepEqualErr(v125v3, v125v4, t, "equal-map-v125-p-len")
  6673. }
  6674. for _, v := range []map[uint32]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  6675. // fmt.Printf(">>>> running mammoth map v128: %v\n", v)
  6676. var v128v1, v128v2 map[uint32]interface{}
  6677. v128v1 = v
  6678. bs128 := testMarshalErr(v128v1, h, t, "enc-map-v128")
  6679. if v == nil {
  6680. v128v2 = nil
  6681. } else {
  6682. v128v2 = make(map[uint32]interface{}, len(v))
  6683. } // reset map
  6684. testUnmarshalErr(v128v2, bs128, h, t, "dec-map-v128")
  6685. testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128")
  6686. if v == nil {
  6687. v128v2 = nil
  6688. } else {
  6689. v128v2 = make(map[uint32]interface{}, len(v))
  6690. } // reset map
  6691. testUnmarshalErr(reflect.ValueOf(v128v2), bs128, h, t, "dec-map-v128-noaddr") // decode into non-addressable map value
  6692. testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-noaddr")
  6693. if v == nil {
  6694. v128v2 = nil
  6695. } else {
  6696. v128v2 = make(map[uint32]interface{}, len(v))
  6697. } // reset map
  6698. testUnmarshalErr(&v128v2, bs128, h, t, "dec-map-v128-p-len")
  6699. testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-p-len")
  6700. bs128 = testMarshalErr(&v128v1, h, t, "enc-map-v128-p")
  6701. v128v2 = nil
  6702. testUnmarshalErr(&v128v2, bs128, h, t, "dec-map-v128-p-nil")
  6703. testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-p-nil")
  6704. // ...
  6705. if v == nil {
  6706. v128v2 = nil
  6707. } else {
  6708. v128v2 = make(map[uint32]interface{}, len(v))
  6709. } // reset map
  6710. var v128v3, v128v4 typMapMapUint32Intf
  6711. v128v3 = typMapMapUint32Intf(v128v1)
  6712. v128v4 = typMapMapUint32Intf(v128v2)
  6713. bs128 = testMarshalErr(v128v3, h, t, "enc-map-v128-custom")
  6714. testUnmarshalErr(v128v4, bs128, h, t, "dec-map-v128-p-len")
  6715. testDeepEqualErr(v128v3, v128v4, t, "equal-map-v128-p-len")
  6716. }
  6717. for _, v := range []map[uint32]string{nil, {}, {33: "", 44: "some-string"}} {
  6718. // fmt.Printf(">>>> running mammoth map v129: %v\n", v)
  6719. var v129v1, v129v2 map[uint32]string
  6720. v129v1 = v
  6721. bs129 := testMarshalErr(v129v1, h, t, "enc-map-v129")
  6722. if v == nil {
  6723. v129v2 = nil
  6724. } else {
  6725. v129v2 = make(map[uint32]string, len(v))
  6726. } // reset map
  6727. testUnmarshalErr(v129v2, bs129, h, t, "dec-map-v129")
  6728. testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129")
  6729. if v == nil {
  6730. v129v2 = nil
  6731. } else {
  6732. v129v2 = make(map[uint32]string, len(v))
  6733. } // reset map
  6734. testUnmarshalErr(reflect.ValueOf(v129v2), bs129, h, t, "dec-map-v129-noaddr") // decode into non-addressable map value
  6735. testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-noaddr")
  6736. if v == nil {
  6737. v129v2 = nil
  6738. } else {
  6739. v129v2 = make(map[uint32]string, len(v))
  6740. } // reset map
  6741. testUnmarshalErr(&v129v2, bs129, h, t, "dec-map-v129-p-len")
  6742. testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-p-len")
  6743. bs129 = testMarshalErr(&v129v1, h, t, "enc-map-v129-p")
  6744. v129v2 = nil
  6745. testUnmarshalErr(&v129v2, bs129, h, t, "dec-map-v129-p-nil")
  6746. testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-p-nil")
  6747. // ...
  6748. if v == nil {
  6749. v129v2 = nil
  6750. } else {
  6751. v129v2 = make(map[uint32]string, len(v))
  6752. } // reset map
  6753. var v129v3, v129v4 typMapMapUint32String
  6754. v129v3 = typMapMapUint32String(v129v1)
  6755. v129v4 = typMapMapUint32String(v129v2)
  6756. bs129 = testMarshalErr(v129v3, h, t, "enc-map-v129-custom")
  6757. testUnmarshalErr(v129v4, bs129, h, t, "dec-map-v129-p-len")
  6758. testDeepEqualErr(v129v3, v129v4, t, "equal-map-v129-p-len")
  6759. }
  6760. for _, v := range []map[uint32]uint{nil, {}, {33: 0, 44: 33}} {
  6761. // fmt.Printf(">>>> running mammoth map v130: %v\n", v)
  6762. var v130v1, v130v2 map[uint32]uint
  6763. v130v1 = v
  6764. bs130 := testMarshalErr(v130v1, h, t, "enc-map-v130")
  6765. if v == nil {
  6766. v130v2 = nil
  6767. } else {
  6768. v130v2 = make(map[uint32]uint, len(v))
  6769. } // reset map
  6770. testUnmarshalErr(v130v2, bs130, h, t, "dec-map-v130")
  6771. testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130")
  6772. if v == nil {
  6773. v130v2 = nil
  6774. } else {
  6775. v130v2 = make(map[uint32]uint, len(v))
  6776. } // reset map
  6777. testUnmarshalErr(reflect.ValueOf(v130v2), bs130, h, t, "dec-map-v130-noaddr") // decode into non-addressable map value
  6778. testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-noaddr")
  6779. if v == nil {
  6780. v130v2 = nil
  6781. } else {
  6782. v130v2 = make(map[uint32]uint, len(v))
  6783. } // reset map
  6784. testUnmarshalErr(&v130v2, bs130, h, t, "dec-map-v130-p-len")
  6785. testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-p-len")
  6786. bs130 = testMarshalErr(&v130v1, h, t, "enc-map-v130-p")
  6787. v130v2 = nil
  6788. testUnmarshalErr(&v130v2, bs130, h, t, "dec-map-v130-p-nil")
  6789. testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-p-nil")
  6790. // ...
  6791. if v == nil {
  6792. v130v2 = nil
  6793. } else {
  6794. v130v2 = make(map[uint32]uint, len(v))
  6795. } // reset map
  6796. var v130v3, v130v4 typMapMapUint32Uint
  6797. v130v3 = typMapMapUint32Uint(v130v1)
  6798. v130v4 = typMapMapUint32Uint(v130v2)
  6799. bs130 = testMarshalErr(v130v3, h, t, "enc-map-v130-custom")
  6800. testUnmarshalErr(v130v4, bs130, h, t, "dec-map-v130-p-len")
  6801. testDeepEqualErr(v130v3, v130v4, t, "equal-map-v130-p-len")
  6802. }
  6803. for _, v := range []map[uint32]uint8{nil, {}, {44: 0, 33: 44}} {
  6804. // fmt.Printf(">>>> running mammoth map v131: %v\n", v)
  6805. var v131v1, v131v2 map[uint32]uint8
  6806. v131v1 = v
  6807. bs131 := testMarshalErr(v131v1, h, t, "enc-map-v131")
  6808. if v == nil {
  6809. v131v2 = nil
  6810. } else {
  6811. v131v2 = make(map[uint32]uint8, len(v))
  6812. } // reset map
  6813. testUnmarshalErr(v131v2, bs131, h, t, "dec-map-v131")
  6814. testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131")
  6815. if v == nil {
  6816. v131v2 = nil
  6817. } else {
  6818. v131v2 = make(map[uint32]uint8, len(v))
  6819. } // reset map
  6820. testUnmarshalErr(reflect.ValueOf(v131v2), bs131, h, t, "dec-map-v131-noaddr") // decode into non-addressable map value
  6821. testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-noaddr")
  6822. if v == nil {
  6823. v131v2 = nil
  6824. } else {
  6825. v131v2 = make(map[uint32]uint8, len(v))
  6826. } // reset map
  6827. testUnmarshalErr(&v131v2, bs131, h, t, "dec-map-v131-p-len")
  6828. testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-p-len")
  6829. bs131 = testMarshalErr(&v131v1, h, t, "enc-map-v131-p")
  6830. v131v2 = nil
  6831. testUnmarshalErr(&v131v2, bs131, h, t, "dec-map-v131-p-nil")
  6832. testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-p-nil")
  6833. // ...
  6834. if v == nil {
  6835. v131v2 = nil
  6836. } else {
  6837. v131v2 = make(map[uint32]uint8, len(v))
  6838. } // reset map
  6839. var v131v3, v131v4 typMapMapUint32Uint8
  6840. v131v3 = typMapMapUint32Uint8(v131v1)
  6841. v131v4 = typMapMapUint32Uint8(v131v2)
  6842. bs131 = testMarshalErr(v131v3, h, t, "enc-map-v131-custom")
  6843. testUnmarshalErr(v131v4, bs131, h, t, "dec-map-v131-p-len")
  6844. testDeepEqualErr(v131v3, v131v4, t, "equal-map-v131-p-len")
  6845. }
  6846. for _, v := range []map[uint32]uint16{nil, {}, {33: 0, 44: 33}} {
  6847. // fmt.Printf(">>>> running mammoth map v132: %v\n", v)
  6848. var v132v1, v132v2 map[uint32]uint16
  6849. v132v1 = v
  6850. bs132 := testMarshalErr(v132v1, h, t, "enc-map-v132")
  6851. if v == nil {
  6852. v132v2 = nil
  6853. } else {
  6854. v132v2 = make(map[uint32]uint16, len(v))
  6855. } // reset map
  6856. testUnmarshalErr(v132v2, bs132, h, t, "dec-map-v132")
  6857. testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132")
  6858. if v == nil {
  6859. v132v2 = nil
  6860. } else {
  6861. v132v2 = make(map[uint32]uint16, len(v))
  6862. } // reset map
  6863. testUnmarshalErr(reflect.ValueOf(v132v2), bs132, h, t, "dec-map-v132-noaddr") // decode into non-addressable map value
  6864. testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-noaddr")
  6865. if v == nil {
  6866. v132v2 = nil
  6867. } else {
  6868. v132v2 = make(map[uint32]uint16, len(v))
  6869. } // reset map
  6870. testUnmarshalErr(&v132v2, bs132, h, t, "dec-map-v132-p-len")
  6871. testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-p-len")
  6872. bs132 = testMarshalErr(&v132v1, h, t, "enc-map-v132-p")
  6873. v132v2 = nil
  6874. testUnmarshalErr(&v132v2, bs132, h, t, "dec-map-v132-p-nil")
  6875. testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-p-nil")
  6876. // ...
  6877. if v == nil {
  6878. v132v2 = nil
  6879. } else {
  6880. v132v2 = make(map[uint32]uint16, len(v))
  6881. } // reset map
  6882. var v132v3, v132v4 typMapMapUint32Uint16
  6883. v132v3 = typMapMapUint32Uint16(v132v1)
  6884. v132v4 = typMapMapUint32Uint16(v132v2)
  6885. bs132 = testMarshalErr(v132v3, h, t, "enc-map-v132-custom")
  6886. testUnmarshalErr(v132v4, bs132, h, t, "dec-map-v132-p-len")
  6887. testDeepEqualErr(v132v3, v132v4, t, "equal-map-v132-p-len")
  6888. }
  6889. for _, v := range []map[uint32]uint32{nil, {}, {44: 0, 33: 44}} {
  6890. // fmt.Printf(">>>> running mammoth map v133: %v\n", v)
  6891. var v133v1, v133v2 map[uint32]uint32
  6892. v133v1 = v
  6893. bs133 := testMarshalErr(v133v1, h, t, "enc-map-v133")
  6894. if v == nil {
  6895. v133v2 = nil
  6896. } else {
  6897. v133v2 = make(map[uint32]uint32, len(v))
  6898. } // reset map
  6899. testUnmarshalErr(v133v2, bs133, h, t, "dec-map-v133")
  6900. testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133")
  6901. if v == nil {
  6902. v133v2 = nil
  6903. } else {
  6904. v133v2 = make(map[uint32]uint32, len(v))
  6905. } // reset map
  6906. testUnmarshalErr(reflect.ValueOf(v133v2), bs133, h, t, "dec-map-v133-noaddr") // decode into non-addressable map value
  6907. testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-noaddr")
  6908. if v == nil {
  6909. v133v2 = nil
  6910. } else {
  6911. v133v2 = make(map[uint32]uint32, len(v))
  6912. } // reset map
  6913. testUnmarshalErr(&v133v2, bs133, h, t, "dec-map-v133-p-len")
  6914. testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-p-len")
  6915. bs133 = testMarshalErr(&v133v1, h, t, "enc-map-v133-p")
  6916. v133v2 = nil
  6917. testUnmarshalErr(&v133v2, bs133, h, t, "dec-map-v133-p-nil")
  6918. testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-p-nil")
  6919. // ...
  6920. if v == nil {
  6921. v133v2 = nil
  6922. } else {
  6923. v133v2 = make(map[uint32]uint32, len(v))
  6924. } // reset map
  6925. var v133v3, v133v4 typMapMapUint32Uint32
  6926. v133v3 = typMapMapUint32Uint32(v133v1)
  6927. v133v4 = typMapMapUint32Uint32(v133v2)
  6928. bs133 = testMarshalErr(v133v3, h, t, "enc-map-v133-custom")
  6929. testUnmarshalErr(v133v4, bs133, h, t, "dec-map-v133-p-len")
  6930. testDeepEqualErr(v133v3, v133v4, t, "equal-map-v133-p-len")
  6931. }
  6932. for _, v := range []map[uint32]uint64{nil, {}, {33: 0, 44: 33}} {
  6933. // fmt.Printf(">>>> running mammoth map v134: %v\n", v)
  6934. var v134v1, v134v2 map[uint32]uint64
  6935. v134v1 = v
  6936. bs134 := testMarshalErr(v134v1, h, t, "enc-map-v134")
  6937. if v == nil {
  6938. v134v2 = nil
  6939. } else {
  6940. v134v2 = make(map[uint32]uint64, len(v))
  6941. } // reset map
  6942. testUnmarshalErr(v134v2, bs134, h, t, "dec-map-v134")
  6943. testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134")
  6944. if v == nil {
  6945. v134v2 = nil
  6946. } else {
  6947. v134v2 = make(map[uint32]uint64, len(v))
  6948. } // reset map
  6949. testUnmarshalErr(reflect.ValueOf(v134v2), bs134, h, t, "dec-map-v134-noaddr") // decode into non-addressable map value
  6950. testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-noaddr")
  6951. if v == nil {
  6952. v134v2 = nil
  6953. } else {
  6954. v134v2 = make(map[uint32]uint64, len(v))
  6955. } // reset map
  6956. testUnmarshalErr(&v134v2, bs134, h, t, "dec-map-v134-p-len")
  6957. testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-p-len")
  6958. bs134 = testMarshalErr(&v134v1, h, t, "enc-map-v134-p")
  6959. v134v2 = nil
  6960. testUnmarshalErr(&v134v2, bs134, h, t, "dec-map-v134-p-nil")
  6961. testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-p-nil")
  6962. // ...
  6963. if v == nil {
  6964. v134v2 = nil
  6965. } else {
  6966. v134v2 = make(map[uint32]uint64, len(v))
  6967. } // reset map
  6968. var v134v3, v134v4 typMapMapUint32Uint64
  6969. v134v3 = typMapMapUint32Uint64(v134v1)
  6970. v134v4 = typMapMapUint32Uint64(v134v2)
  6971. bs134 = testMarshalErr(v134v3, h, t, "enc-map-v134-custom")
  6972. testUnmarshalErr(v134v4, bs134, h, t, "dec-map-v134-p-len")
  6973. testDeepEqualErr(v134v3, v134v4, t, "equal-map-v134-p-len")
  6974. }
  6975. for _, v := range []map[uint32]uintptr{nil, {}, {44: 0, 33: 44}} {
  6976. // fmt.Printf(">>>> running mammoth map v135: %v\n", v)
  6977. var v135v1, v135v2 map[uint32]uintptr
  6978. v135v1 = v
  6979. bs135 := testMarshalErr(v135v1, h, t, "enc-map-v135")
  6980. if v == nil {
  6981. v135v2 = nil
  6982. } else {
  6983. v135v2 = make(map[uint32]uintptr, len(v))
  6984. } // reset map
  6985. testUnmarshalErr(v135v2, bs135, h, t, "dec-map-v135")
  6986. testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135")
  6987. if v == nil {
  6988. v135v2 = nil
  6989. } else {
  6990. v135v2 = make(map[uint32]uintptr, len(v))
  6991. } // reset map
  6992. testUnmarshalErr(reflect.ValueOf(v135v2), bs135, h, t, "dec-map-v135-noaddr") // decode into non-addressable map value
  6993. testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-noaddr")
  6994. if v == nil {
  6995. v135v2 = nil
  6996. } else {
  6997. v135v2 = make(map[uint32]uintptr, len(v))
  6998. } // reset map
  6999. testUnmarshalErr(&v135v2, bs135, h, t, "dec-map-v135-p-len")
  7000. testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-p-len")
  7001. bs135 = testMarshalErr(&v135v1, h, t, "enc-map-v135-p")
  7002. v135v2 = nil
  7003. testUnmarshalErr(&v135v2, bs135, h, t, "dec-map-v135-p-nil")
  7004. testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-p-nil")
  7005. // ...
  7006. if v == nil {
  7007. v135v2 = nil
  7008. } else {
  7009. v135v2 = make(map[uint32]uintptr, len(v))
  7010. } // reset map
  7011. var v135v3, v135v4 typMapMapUint32Uintptr
  7012. v135v3 = typMapMapUint32Uintptr(v135v1)
  7013. v135v4 = typMapMapUint32Uintptr(v135v2)
  7014. bs135 = testMarshalErr(v135v3, h, t, "enc-map-v135-custom")
  7015. testUnmarshalErr(v135v4, bs135, h, t, "dec-map-v135-p-len")
  7016. testDeepEqualErr(v135v3, v135v4, t, "equal-map-v135-p-len")
  7017. }
  7018. for _, v := range []map[uint32]int{nil, {}, {33: 0, 44: 33}} {
  7019. // fmt.Printf(">>>> running mammoth map v136: %v\n", v)
  7020. var v136v1, v136v2 map[uint32]int
  7021. v136v1 = v
  7022. bs136 := testMarshalErr(v136v1, h, t, "enc-map-v136")
  7023. if v == nil {
  7024. v136v2 = nil
  7025. } else {
  7026. v136v2 = make(map[uint32]int, len(v))
  7027. } // reset map
  7028. testUnmarshalErr(v136v2, bs136, h, t, "dec-map-v136")
  7029. testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136")
  7030. if v == nil {
  7031. v136v2 = nil
  7032. } else {
  7033. v136v2 = make(map[uint32]int, len(v))
  7034. } // reset map
  7035. testUnmarshalErr(reflect.ValueOf(v136v2), bs136, h, t, "dec-map-v136-noaddr") // decode into non-addressable map value
  7036. testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-noaddr")
  7037. if v == nil {
  7038. v136v2 = nil
  7039. } else {
  7040. v136v2 = make(map[uint32]int, len(v))
  7041. } // reset map
  7042. testUnmarshalErr(&v136v2, bs136, h, t, "dec-map-v136-p-len")
  7043. testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-p-len")
  7044. bs136 = testMarshalErr(&v136v1, h, t, "enc-map-v136-p")
  7045. v136v2 = nil
  7046. testUnmarshalErr(&v136v2, bs136, h, t, "dec-map-v136-p-nil")
  7047. testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-p-nil")
  7048. // ...
  7049. if v == nil {
  7050. v136v2 = nil
  7051. } else {
  7052. v136v2 = make(map[uint32]int, len(v))
  7053. } // reset map
  7054. var v136v3, v136v4 typMapMapUint32Int
  7055. v136v3 = typMapMapUint32Int(v136v1)
  7056. v136v4 = typMapMapUint32Int(v136v2)
  7057. bs136 = testMarshalErr(v136v3, h, t, "enc-map-v136-custom")
  7058. testUnmarshalErr(v136v4, bs136, h, t, "dec-map-v136-p-len")
  7059. testDeepEqualErr(v136v3, v136v4, t, "equal-map-v136-p-len")
  7060. }
  7061. for _, v := range []map[uint32]int8{nil, {}, {44: 0, 33: 44}} {
  7062. // fmt.Printf(">>>> running mammoth map v137: %v\n", v)
  7063. var v137v1, v137v2 map[uint32]int8
  7064. v137v1 = v
  7065. bs137 := testMarshalErr(v137v1, h, t, "enc-map-v137")
  7066. if v == nil {
  7067. v137v2 = nil
  7068. } else {
  7069. v137v2 = make(map[uint32]int8, len(v))
  7070. } // reset map
  7071. testUnmarshalErr(v137v2, bs137, h, t, "dec-map-v137")
  7072. testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137")
  7073. if v == nil {
  7074. v137v2 = nil
  7075. } else {
  7076. v137v2 = make(map[uint32]int8, len(v))
  7077. } // reset map
  7078. testUnmarshalErr(reflect.ValueOf(v137v2), bs137, h, t, "dec-map-v137-noaddr") // decode into non-addressable map value
  7079. testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-noaddr")
  7080. if v == nil {
  7081. v137v2 = nil
  7082. } else {
  7083. v137v2 = make(map[uint32]int8, len(v))
  7084. } // reset map
  7085. testUnmarshalErr(&v137v2, bs137, h, t, "dec-map-v137-p-len")
  7086. testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-p-len")
  7087. bs137 = testMarshalErr(&v137v1, h, t, "enc-map-v137-p")
  7088. v137v2 = nil
  7089. testUnmarshalErr(&v137v2, bs137, h, t, "dec-map-v137-p-nil")
  7090. testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-p-nil")
  7091. // ...
  7092. if v == nil {
  7093. v137v2 = nil
  7094. } else {
  7095. v137v2 = make(map[uint32]int8, len(v))
  7096. } // reset map
  7097. var v137v3, v137v4 typMapMapUint32Int8
  7098. v137v3 = typMapMapUint32Int8(v137v1)
  7099. v137v4 = typMapMapUint32Int8(v137v2)
  7100. bs137 = testMarshalErr(v137v3, h, t, "enc-map-v137-custom")
  7101. testUnmarshalErr(v137v4, bs137, h, t, "dec-map-v137-p-len")
  7102. testDeepEqualErr(v137v3, v137v4, t, "equal-map-v137-p-len")
  7103. }
  7104. for _, v := range []map[uint32]int16{nil, {}, {33: 0, 44: 33}} {
  7105. // fmt.Printf(">>>> running mammoth map v138: %v\n", v)
  7106. var v138v1, v138v2 map[uint32]int16
  7107. v138v1 = v
  7108. bs138 := testMarshalErr(v138v1, h, t, "enc-map-v138")
  7109. if v == nil {
  7110. v138v2 = nil
  7111. } else {
  7112. v138v2 = make(map[uint32]int16, len(v))
  7113. } // reset map
  7114. testUnmarshalErr(v138v2, bs138, h, t, "dec-map-v138")
  7115. testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138")
  7116. if v == nil {
  7117. v138v2 = nil
  7118. } else {
  7119. v138v2 = make(map[uint32]int16, len(v))
  7120. } // reset map
  7121. testUnmarshalErr(reflect.ValueOf(v138v2), bs138, h, t, "dec-map-v138-noaddr") // decode into non-addressable map value
  7122. testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-noaddr")
  7123. if v == nil {
  7124. v138v2 = nil
  7125. } else {
  7126. v138v2 = make(map[uint32]int16, len(v))
  7127. } // reset map
  7128. testUnmarshalErr(&v138v2, bs138, h, t, "dec-map-v138-p-len")
  7129. testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-p-len")
  7130. bs138 = testMarshalErr(&v138v1, h, t, "enc-map-v138-p")
  7131. v138v2 = nil
  7132. testUnmarshalErr(&v138v2, bs138, h, t, "dec-map-v138-p-nil")
  7133. testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-p-nil")
  7134. // ...
  7135. if v == nil {
  7136. v138v2 = nil
  7137. } else {
  7138. v138v2 = make(map[uint32]int16, len(v))
  7139. } // reset map
  7140. var v138v3, v138v4 typMapMapUint32Int16
  7141. v138v3 = typMapMapUint32Int16(v138v1)
  7142. v138v4 = typMapMapUint32Int16(v138v2)
  7143. bs138 = testMarshalErr(v138v3, h, t, "enc-map-v138-custom")
  7144. testUnmarshalErr(v138v4, bs138, h, t, "dec-map-v138-p-len")
  7145. testDeepEqualErr(v138v3, v138v4, t, "equal-map-v138-p-len")
  7146. }
  7147. for _, v := range []map[uint32]int32{nil, {}, {44: 0, 33: 44}} {
  7148. // fmt.Printf(">>>> running mammoth map v139: %v\n", v)
  7149. var v139v1, v139v2 map[uint32]int32
  7150. v139v1 = v
  7151. bs139 := testMarshalErr(v139v1, h, t, "enc-map-v139")
  7152. if v == nil {
  7153. v139v2 = nil
  7154. } else {
  7155. v139v2 = make(map[uint32]int32, len(v))
  7156. } // reset map
  7157. testUnmarshalErr(v139v2, bs139, h, t, "dec-map-v139")
  7158. testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139")
  7159. if v == nil {
  7160. v139v2 = nil
  7161. } else {
  7162. v139v2 = make(map[uint32]int32, len(v))
  7163. } // reset map
  7164. testUnmarshalErr(reflect.ValueOf(v139v2), bs139, h, t, "dec-map-v139-noaddr") // decode into non-addressable map value
  7165. testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-noaddr")
  7166. if v == nil {
  7167. v139v2 = nil
  7168. } else {
  7169. v139v2 = make(map[uint32]int32, len(v))
  7170. } // reset map
  7171. testUnmarshalErr(&v139v2, bs139, h, t, "dec-map-v139-p-len")
  7172. testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-p-len")
  7173. bs139 = testMarshalErr(&v139v1, h, t, "enc-map-v139-p")
  7174. v139v2 = nil
  7175. testUnmarshalErr(&v139v2, bs139, h, t, "dec-map-v139-p-nil")
  7176. testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-p-nil")
  7177. // ...
  7178. if v == nil {
  7179. v139v2 = nil
  7180. } else {
  7181. v139v2 = make(map[uint32]int32, len(v))
  7182. } // reset map
  7183. var v139v3, v139v4 typMapMapUint32Int32
  7184. v139v3 = typMapMapUint32Int32(v139v1)
  7185. v139v4 = typMapMapUint32Int32(v139v2)
  7186. bs139 = testMarshalErr(v139v3, h, t, "enc-map-v139-custom")
  7187. testUnmarshalErr(v139v4, bs139, h, t, "dec-map-v139-p-len")
  7188. testDeepEqualErr(v139v3, v139v4, t, "equal-map-v139-p-len")
  7189. }
  7190. for _, v := range []map[uint32]int64{nil, {}, {33: 0, 44: 33}} {
  7191. // fmt.Printf(">>>> running mammoth map v140: %v\n", v)
  7192. var v140v1, v140v2 map[uint32]int64
  7193. v140v1 = v
  7194. bs140 := testMarshalErr(v140v1, h, t, "enc-map-v140")
  7195. if v == nil {
  7196. v140v2 = nil
  7197. } else {
  7198. v140v2 = make(map[uint32]int64, len(v))
  7199. } // reset map
  7200. testUnmarshalErr(v140v2, bs140, h, t, "dec-map-v140")
  7201. testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140")
  7202. if v == nil {
  7203. v140v2 = nil
  7204. } else {
  7205. v140v2 = make(map[uint32]int64, len(v))
  7206. } // reset map
  7207. testUnmarshalErr(reflect.ValueOf(v140v2), bs140, h, t, "dec-map-v140-noaddr") // decode into non-addressable map value
  7208. testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-noaddr")
  7209. if v == nil {
  7210. v140v2 = nil
  7211. } else {
  7212. v140v2 = make(map[uint32]int64, len(v))
  7213. } // reset map
  7214. testUnmarshalErr(&v140v2, bs140, h, t, "dec-map-v140-p-len")
  7215. testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-p-len")
  7216. bs140 = testMarshalErr(&v140v1, h, t, "enc-map-v140-p")
  7217. v140v2 = nil
  7218. testUnmarshalErr(&v140v2, bs140, h, t, "dec-map-v140-p-nil")
  7219. testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-p-nil")
  7220. // ...
  7221. if v == nil {
  7222. v140v2 = nil
  7223. } else {
  7224. v140v2 = make(map[uint32]int64, len(v))
  7225. } // reset map
  7226. var v140v3, v140v4 typMapMapUint32Int64
  7227. v140v3 = typMapMapUint32Int64(v140v1)
  7228. v140v4 = typMapMapUint32Int64(v140v2)
  7229. bs140 = testMarshalErr(v140v3, h, t, "enc-map-v140-custom")
  7230. testUnmarshalErr(v140v4, bs140, h, t, "dec-map-v140-p-len")
  7231. testDeepEqualErr(v140v3, v140v4, t, "equal-map-v140-p-len")
  7232. }
  7233. for _, v := range []map[uint32]float32{nil, {}, {44: 0, 33: 22.2}} {
  7234. // fmt.Printf(">>>> running mammoth map v141: %v\n", v)
  7235. var v141v1, v141v2 map[uint32]float32
  7236. v141v1 = v
  7237. bs141 := testMarshalErr(v141v1, h, t, "enc-map-v141")
  7238. if v == nil {
  7239. v141v2 = nil
  7240. } else {
  7241. v141v2 = make(map[uint32]float32, len(v))
  7242. } // reset map
  7243. testUnmarshalErr(v141v2, bs141, h, t, "dec-map-v141")
  7244. testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141")
  7245. if v == nil {
  7246. v141v2 = nil
  7247. } else {
  7248. v141v2 = make(map[uint32]float32, len(v))
  7249. } // reset map
  7250. testUnmarshalErr(reflect.ValueOf(v141v2), bs141, h, t, "dec-map-v141-noaddr") // decode into non-addressable map value
  7251. testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-noaddr")
  7252. if v == nil {
  7253. v141v2 = nil
  7254. } else {
  7255. v141v2 = make(map[uint32]float32, len(v))
  7256. } // reset map
  7257. testUnmarshalErr(&v141v2, bs141, h, t, "dec-map-v141-p-len")
  7258. testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-p-len")
  7259. bs141 = testMarshalErr(&v141v1, h, t, "enc-map-v141-p")
  7260. v141v2 = nil
  7261. testUnmarshalErr(&v141v2, bs141, h, t, "dec-map-v141-p-nil")
  7262. testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-p-nil")
  7263. // ...
  7264. if v == nil {
  7265. v141v2 = nil
  7266. } else {
  7267. v141v2 = make(map[uint32]float32, len(v))
  7268. } // reset map
  7269. var v141v3, v141v4 typMapMapUint32Float32
  7270. v141v3 = typMapMapUint32Float32(v141v1)
  7271. v141v4 = typMapMapUint32Float32(v141v2)
  7272. bs141 = testMarshalErr(v141v3, h, t, "enc-map-v141-custom")
  7273. testUnmarshalErr(v141v4, bs141, h, t, "dec-map-v141-p-len")
  7274. testDeepEqualErr(v141v3, v141v4, t, "equal-map-v141-p-len")
  7275. }
  7276. for _, v := range []map[uint32]float64{nil, {}, {44: 0, 33: 11.1}} {
  7277. // fmt.Printf(">>>> running mammoth map v142: %v\n", v)
  7278. var v142v1, v142v2 map[uint32]float64
  7279. v142v1 = v
  7280. bs142 := testMarshalErr(v142v1, h, t, "enc-map-v142")
  7281. if v == nil {
  7282. v142v2 = nil
  7283. } else {
  7284. v142v2 = make(map[uint32]float64, len(v))
  7285. } // reset map
  7286. testUnmarshalErr(v142v2, bs142, h, t, "dec-map-v142")
  7287. testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142")
  7288. if v == nil {
  7289. v142v2 = nil
  7290. } else {
  7291. v142v2 = make(map[uint32]float64, len(v))
  7292. } // reset map
  7293. testUnmarshalErr(reflect.ValueOf(v142v2), bs142, h, t, "dec-map-v142-noaddr") // decode into non-addressable map value
  7294. testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-noaddr")
  7295. if v == nil {
  7296. v142v2 = nil
  7297. } else {
  7298. v142v2 = make(map[uint32]float64, len(v))
  7299. } // reset map
  7300. testUnmarshalErr(&v142v2, bs142, h, t, "dec-map-v142-p-len")
  7301. testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-p-len")
  7302. bs142 = testMarshalErr(&v142v1, h, t, "enc-map-v142-p")
  7303. v142v2 = nil
  7304. testUnmarshalErr(&v142v2, bs142, h, t, "dec-map-v142-p-nil")
  7305. testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-p-nil")
  7306. // ...
  7307. if v == nil {
  7308. v142v2 = nil
  7309. } else {
  7310. v142v2 = make(map[uint32]float64, len(v))
  7311. } // reset map
  7312. var v142v3, v142v4 typMapMapUint32Float64
  7313. v142v3 = typMapMapUint32Float64(v142v1)
  7314. v142v4 = typMapMapUint32Float64(v142v2)
  7315. bs142 = testMarshalErr(v142v3, h, t, "enc-map-v142-custom")
  7316. testUnmarshalErr(v142v4, bs142, h, t, "dec-map-v142-p-len")
  7317. testDeepEqualErr(v142v3, v142v4, t, "equal-map-v142-p-len")
  7318. }
  7319. for _, v := range []map[uint32]bool{nil, {}, {44: false, 33: true}} {
  7320. // fmt.Printf(">>>> running mammoth map v143: %v\n", v)
  7321. var v143v1, v143v2 map[uint32]bool
  7322. v143v1 = v
  7323. bs143 := testMarshalErr(v143v1, h, t, "enc-map-v143")
  7324. if v == nil {
  7325. v143v2 = nil
  7326. } else {
  7327. v143v2 = make(map[uint32]bool, len(v))
  7328. } // reset map
  7329. testUnmarshalErr(v143v2, bs143, h, t, "dec-map-v143")
  7330. testDeepEqualErr(v143v1, v143v2, t, "equal-map-v143")
  7331. if v == nil {
  7332. v143v2 = nil
  7333. } else {
  7334. v143v2 = make(map[uint32]bool, len(v))
  7335. } // reset map
  7336. testUnmarshalErr(reflect.ValueOf(v143v2), bs143, h, t, "dec-map-v143-noaddr") // decode into non-addressable map value
  7337. testDeepEqualErr(v143v1, v143v2, t, "equal-map-v143-noaddr")
  7338. if v == nil {
  7339. v143v2 = nil
  7340. } else {
  7341. v143v2 = make(map[uint32]bool, len(v))
  7342. } // reset map
  7343. testUnmarshalErr(&v143v2, bs143, h, t, "dec-map-v143-p-len")
  7344. testDeepEqualErr(v143v1, v143v2, t, "equal-map-v143-p-len")
  7345. bs143 = testMarshalErr(&v143v1, h, t, "enc-map-v143-p")
  7346. v143v2 = nil
  7347. testUnmarshalErr(&v143v2, bs143, h, t, "dec-map-v143-p-nil")
  7348. testDeepEqualErr(v143v1, v143v2, t, "equal-map-v143-p-nil")
  7349. // ...
  7350. if v == nil {
  7351. v143v2 = nil
  7352. } else {
  7353. v143v2 = make(map[uint32]bool, len(v))
  7354. } // reset map
  7355. var v143v3, v143v4 typMapMapUint32Bool
  7356. v143v3 = typMapMapUint32Bool(v143v1)
  7357. v143v4 = typMapMapUint32Bool(v143v2)
  7358. bs143 = testMarshalErr(v143v3, h, t, "enc-map-v143-custom")
  7359. testUnmarshalErr(v143v4, bs143, h, t, "dec-map-v143-p-len")
  7360. testDeepEqualErr(v143v3, v143v4, t, "equal-map-v143-p-len")
  7361. }
  7362. for _, v := range []map[uint64]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  7363. // fmt.Printf(">>>> running mammoth map v146: %v\n", v)
  7364. var v146v1, v146v2 map[uint64]interface{}
  7365. v146v1 = v
  7366. bs146 := testMarshalErr(v146v1, h, t, "enc-map-v146")
  7367. if v == nil {
  7368. v146v2 = nil
  7369. } else {
  7370. v146v2 = make(map[uint64]interface{}, len(v))
  7371. } // reset map
  7372. testUnmarshalErr(v146v2, bs146, h, t, "dec-map-v146")
  7373. testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146")
  7374. if v == nil {
  7375. v146v2 = nil
  7376. } else {
  7377. v146v2 = make(map[uint64]interface{}, len(v))
  7378. } // reset map
  7379. testUnmarshalErr(reflect.ValueOf(v146v2), bs146, h, t, "dec-map-v146-noaddr") // decode into non-addressable map value
  7380. testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-noaddr")
  7381. if v == nil {
  7382. v146v2 = nil
  7383. } else {
  7384. v146v2 = make(map[uint64]interface{}, len(v))
  7385. } // reset map
  7386. testUnmarshalErr(&v146v2, bs146, h, t, "dec-map-v146-p-len")
  7387. testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-p-len")
  7388. bs146 = testMarshalErr(&v146v1, h, t, "enc-map-v146-p")
  7389. v146v2 = nil
  7390. testUnmarshalErr(&v146v2, bs146, h, t, "dec-map-v146-p-nil")
  7391. testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-p-nil")
  7392. // ...
  7393. if v == nil {
  7394. v146v2 = nil
  7395. } else {
  7396. v146v2 = make(map[uint64]interface{}, len(v))
  7397. } // reset map
  7398. var v146v3, v146v4 typMapMapUint64Intf
  7399. v146v3 = typMapMapUint64Intf(v146v1)
  7400. v146v4 = typMapMapUint64Intf(v146v2)
  7401. bs146 = testMarshalErr(v146v3, h, t, "enc-map-v146-custom")
  7402. testUnmarshalErr(v146v4, bs146, h, t, "dec-map-v146-p-len")
  7403. testDeepEqualErr(v146v3, v146v4, t, "equal-map-v146-p-len")
  7404. }
  7405. for _, v := range []map[uint64]string{nil, {}, {44: "", 33: "some-string-2"}} {
  7406. // fmt.Printf(">>>> running mammoth map v147: %v\n", v)
  7407. var v147v1, v147v2 map[uint64]string
  7408. v147v1 = v
  7409. bs147 := testMarshalErr(v147v1, h, t, "enc-map-v147")
  7410. if v == nil {
  7411. v147v2 = nil
  7412. } else {
  7413. v147v2 = make(map[uint64]string, len(v))
  7414. } // reset map
  7415. testUnmarshalErr(v147v2, bs147, h, t, "dec-map-v147")
  7416. testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147")
  7417. if v == nil {
  7418. v147v2 = nil
  7419. } else {
  7420. v147v2 = make(map[uint64]string, len(v))
  7421. } // reset map
  7422. testUnmarshalErr(reflect.ValueOf(v147v2), bs147, h, t, "dec-map-v147-noaddr") // decode into non-addressable map value
  7423. testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-noaddr")
  7424. if v == nil {
  7425. v147v2 = nil
  7426. } else {
  7427. v147v2 = make(map[uint64]string, len(v))
  7428. } // reset map
  7429. testUnmarshalErr(&v147v2, bs147, h, t, "dec-map-v147-p-len")
  7430. testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-p-len")
  7431. bs147 = testMarshalErr(&v147v1, h, t, "enc-map-v147-p")
  7432. v147v2 = nil
  7433. testUnmarshalErr(&v147v2, bs147, h, t, "dec-map-v147-p-nil")
  7434. testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-p-nil")
  7435. // ...
  7436. if v == nil {
  7437. v147v2 = nil
  7438. } else {
  7439. v147v2 = make(map[uint64]string, len(v))
  7440. } // reset map
  7441. var v147v3, v147v4 typMapMapUint64String
  7442. v147v3 = typMapMapUint64String(v147v1)
  7443. v147v4 = typMapMapUint64String(v147v2)
  7444. bs147 = testMarshalErr(v147v3, h, t, "enc-map-v147-custom")
  7445. testUnmarshalErr(v147v4, bs147, h, t, "dec-map-v147-p-len")
  7446. testDeepEqualErr(v147v3, v147v4, t, "equal-map-v147-p-len")
  7447. }
  7448. for _, v := range []map[uint64]uint{nil, {}, {44: 0, 33: 44}} {
  7449. // fmt.Printf(">>>> running mammoth map v148: %v\n", v)
  7450. var v148v1, v148v2 map[uint64]uint
  7451. v148v1 = v
  7452. bs148 := testMarshalErr(v148v1, h, t, "enc-map-v148")
  7453. if v == nil {
  7454. v148v2 = nil
  7455. } else {
  7456. v148v2 = make(map[uint64]uint, len(v))
  7457. } // reset map
  7458. testUnmarshalErr(v148v2, bs148, h, t, "dec-map-v148")
  7459. testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148")
  7460. if v == nil {
  7461. v148v2 = nil
  7462. } else {
  7463. v148v2 = make(map[uint64]uint, len(v))
  7464. } // reset map
  7465. testUnmarshalErr(reflect.ValueOf(v148v2), bs148, h, t, "dec-map-v148-noaddr") // decode into non-addressable map value
  7466. testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-noaddr")
  7467. if v == nil {
  7468. v148v2 = nil
  7469. } else {
  7470. v148v2 = make(map[uint64]uint, len(v))
  7471. } // reset map
  7472. testUnmarshalErr(&v148v2, bs148, h, t, "dec-map-v148-p-len")
  7473. testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-p-len")
  7474. bs148 = testMarshalErr(&v148v1, h, t, "enc-map-v148-p")
  7475. v148v2 = nil
  7476. testUnmarshalErr(&v148v2, bs148, h, t, "dec-map-v148-p-nil")
  7477. testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-p-nil")
  7478. // ...
  7479. if v == nil {
  7480. v148v2 = nil
  7481. } else {
  7482. v148v2 = make(map[uint64]uint, len(v))
  7483. } // reset map
  7484. var v148v3, v148v4 typMapMapUint64Uint
  7485. v148v3 = typMapMapUint64Uint(v148v1)
  7486. v148v4 = typMapMapUint64Uint(v148v2)
  7487. bs148 = testMarshalErr(v148v3, h, t, "enc-map-v148-custom")
  7488. testUnmarshalErr(v148v4, bs148, h, t, "dec-map-v148-p-len")
  7489. testDeepEqualErr(v148v3, v148v4, t, "equal-map-v148-p-len")
  7490. }
  7491. for _, v := range []map[uint64]uint8{nil, {}, {33: 0, 44: 33}} {
  7492. // fmt.Printf(">>>> running mammoth map v149: %v\n", v)
  7493. var v149v1, v149v2 map[uint64]uint8
  7494. v149v1 = v
  7495. bs149 := testMarshalErr(v149v1, h, t, "enc-map-v149")
  7496. if v == nil {
  7497. v149v2 = nil
  7498. } else {
  7499. v149v2 = make(map[uint64]uint8, len(v))
  7500. } // reset map
  7501. testUnmarshalErr(v149v2, bs149, h, t, "dec-map-v149")
  7502. testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149")
  7503. if v == nil {
  7504. v149v2 = nil
  7505. } else {
  7506. v149v2 = make(map[uint64]uint8, len(v))
  7507. } // reset map
  7508. testUnmarshalErr(reflect.ValueOf(v149v2), bs149, h, t, "dec-map-v149-noaddr") // decode into non-addressable map value
  7509. testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-noaddr")
  7510. if v == nil {
  7511. v149v2 = nil
  7512. } else {
  7513. v149v2 = make(map[uint64]uint8, len(v))
  7514. } // reset map
  7515. testUnmarshalErr(&v149v2, bs149, h, t, "dec-map-v149-p-len")
  7516. testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-p-len")
  7517. bs149 = testMarshalErr(&v149v1, h, t, "enc-map-v149-p")
  7518. v149v2 = nil
  7519. testUnmarshalErr(&v149v2, bs149, h, t, "dec-map-v149-p-nil")
  7520. testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-p-nil")
  7521. // ...
  7522. if v == nil {
  7523. v149v2 = nil
  7524. } else {
  7525. v149v2 = make(map[uint64]uint8, len(v))
  7526. } // reset map
  7527. var v149v3, v149v4 typMapMapUint64Uint8
  7528. v149v3 = typMapMapUint64Uint8(v149v1)
  7529. v149v4 = typMapMapUint64Uint8(v149v2)
  7530. bs149 = testMarshalErr(v149v3, h, t, "enc-map-v149-custom")
  7531. testUnmarshalErr(v149v4, bs149, h, t, "dec-map-v149-p-len")
  7532. testDeepEqualErr(v149v3, v149v4, t, "equal-map-v149-p-len")
  7533. }
  7534. for _, v := range []map[uint64]uint16{nil, {}, {44: 0, 33: 44}} {
  7535. // fmt.Printf(">>>> running mammoth map v150: %v\n", v)
  7536. var v150v1, v150v2 map[uint64]uint16
  7537. v150v1 = v
  7538. bs150 := testMarshalErr(v150v1, h, t, "enc-map-v150")
  7539. if v == nil {
  7540. v150v2 = nil
  7541. } else {
  7542. v150v2 = make(map[uint64]uint16, len(v))
  7543. } // reset map
  7544. testUnmarshalErr(v150v2, bs150, h, t, "dec-map-v150")
  7545. testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150")
  7546. if v == nil {
  7547. v150v2 = nil
  7548. } else {
  7549. v150v2 = make(map[uint64]uint16, len(v))
  7550. } // reset map
  7551. testUnmarshalErr(reflect.ValueOf(v150v2), bs150, h, t, "dec-map-v150-noaddr") // decode into non-addressable map value
  7552. testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-noaddr")
  7553. if v == nil {
  7554. v150v2 = nil
  7555. } else {
  7556. v150v2 = make(map[uint64]uint16, len(v))
  7557. } // reset map
  7558. testUnmarshalErr(&v150v2, bs150, h, t, "dec-map-v150-p-len")
  7559. testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-p-len")
  7560. bs150 = testMarshalErr(&v150v1, h, t, "enc-map-v150-p")
  7561. v150v2 = nil
  7562. testUnmarshalErr(&v150v2, bs150, h, t, "dec-map-v150-p-nil")
  7563. testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-p-nil")
  7564. // ...
  7565. if v == nil {
  7566. v150v2 = nil
  7567. } else {
  7568. v150v2 = make(map[uint64]uint16, len(v))
  7569. } // reset map
  7570. var v150v3, v150v4 typMapMapUint64Uint16
  7571. v150v3 = typMapMapUint64Uint16(v150v1)
  7572. v150v4 = typMapMapUint64Uint16(v150v2)
  7573. bs150 = testMarshalErr(v150v3, h, t, "enc-map-v150-custom")
  7574. testUnmarshalErr(v150v4, bs150, h, t, "dec-map-v150-p-len")
  7575. testDeepEqualErr(v150v3, v150v4, t, "equal-map-v150-p-len")
  7576. }
  7577. for _, v := range []map[uint64]uint32{nil, {}, {33: 0, 44: 33}} {
  7578. // fmt.Printf(">>>> running mammoth map v151: %v\n", v)
  7579. var v151v1, v151v2 map[uint64]uint32
  7580. v151v1 = v
  7581. bs151 := testMarshalErr(v151v1, h, t, "enc-map-v151")
  7582. if v == nil {
  7583. v151v2 = nil
  7584. } else {
  7585. v151v2 = make(map[uint64]uint32, len(v))
  7586. } // reset map
  7587. testUnmarshalErr(v151v2, bs151, h, t, "dec-map-v151")
  7588. testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151")
  7589. if v == nil {
  7590. v151v2 = nil
  7591. } else {
  7592. v151v2 = make(map[uint64]uint32, len(v))
  7593. } // reset map
  7594. testUnmarshalErr(reflect.ValueOf(v151v2), bs151, h, t, "dec-map-v151-noaddr") // decode into non-addressable map value
  7595. testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-noaddr")
  7596. if v == nil {
  7597. v151v2 = nil
  7598. } else {
  7599. v151v2 = make(map[uint64]uint32, len(v))
  7600. } // reset map
  7601. testUnmarshalErr(&v151v2, bs151, h, t, "dec-map-v151-p-len")
  7602. testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-p-len")
  7603. bs151 = testMarshalErr(&v151v1, h, t, "enc-map-v151-p")
  7604. v151v2 = nil
  7605. testUnmarshalErr(&v151v2, bs151, h, t, "dec-map-v151-p-nil")
  7606. testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-p-nil")
  7607. // ...
  7608. if v == nil {
  7609. v151v2 = nil
  7610. } else {
  7611. v151v2 = make(map[uint64]uint32, len(v))
  7612. } // reset map
  7613. var v151v3, v151v4 typMapMapUint64Uint32
  7614. v151v3 = typMapMapUint64Uint32(v151v1)
  7615. v151v4 = typMapMapUint64Uint32(v151v2)
  7616. bs151 = testMarshalErr(v151v3, h, t, "enc-map-v151-custom")
  7617. testUnmarshalErr(v151v4, bs151, h, t, "dec-map-v151-p-len")
  7618. testDeepEqualErr(v151v3, v151v4, t, "equal-map-v151-p-len")
  7619. }
  7620. for _, v := range []map[uint64]uint64{nil, {}, {44: 0, 33: 44}} {
  7621. // fmt.Printf(">>>> running mammoth map v152: %v\n", v)
  7622. var v152v1, v152v2 map[uint64]uint64
  7623. v152v1 = v
  7624. bs152 := testMarshalErr(v152v1, h, t, "enc-map-v152")
  7625. if v == nil {
  7626. v152v2 = nil
  7627. } else {
  7628. v152v2 = make(map[uint64]uint64, len(v))
  7629. } // reset map
  7630. testUnmarshalErr(v152v2, bs152, h, t, "dec-map-v152")
  7631. testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152")
  7632. if v == nil {
  7633. v152v2 = nil
  7634. } else {
  7635. v152v2 = make(map[uint64]uint64, len(v))
  7636. } // reset map
  7637. testUnmarshalErr(reflect.ValueOf(v152v2), bs152, h, t, "dec-map-v152-noaddr") // decode into non-addressable map value
  7638. testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-noaddr")
  7639. if v == nil {
  7640. v152v2 = nil
  7641. } else {
  7642. v152v2 = make(map[uint64]uint64, len(v))
  7643. } // reset map
  7644. testUnmarshalErr(&v152v2, bs152, h, t, "dec-map-v152-p-len")
  7645. testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-p-len")
  7646. bs152 = testMarshalErr(&v152v1, h, t, "enc-map-v152-p")
  7647. v152v2 = nil
  7648. testUnmarshalErr(&v152v2, bs152, h, t, "dec-map-v152-p-nil")
  7649. testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-p-nil")
  7650. // ...
  7651. if v == nil {
  7652. v152v2 = nil
  7653. } else {
  7654. v152v2 = make(map[uint64]uint64, len(v))
  7655. } // reset map
  7656. var v152v3, v152v4 typMapMapUint64Uint64
  7657. v152v3 = typMapMapUint64Uint64(v152v1)
  7658. v152v4 = typMapMapUint64Uint64(v152v2)
  7659. bs152 = testMarshalErr(v152v3, h, t, "enc-map-v152-custom")
  7660. testUnmarshalErr(v152v4, bs152, h, t, "dec-map-v152-p-len")
  7661. testDeepEqualErr(v152v3, v152v4, t, "equal-map-v152-p-len")
  7662. }
  7663. for _, v := range []map[uint64]uintptr{nil, {}, {33: 0, 44: 33}} {
  7664. // fmt.Printf(">>>> running mammoth map v153: %v\n", v)
  7665. var v153v1, v153v2 map[uint64]uintptr
  7666. v153v1 = v
  7667. bs153 := testMarshalErr(v153v1, h, t, "enc-map-v153")
  7668. if v == nil {
  7669. v153v2 = nil
  7670. } else {
  7671. v153v2 = make(map[uint64]uintptr, len(v))
  7672. } // reset map
  7673. testUnmarshalErr(v153v2, bs153, h, t, "dec-map-v153")
  7674. testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153")
  7675. if v == nil {
  7676. v153v2 = nil
  7677. } else {
  7678. v153v2 = make(map[uint64]uintptr, len(v))
  7679. } // reset map
  7680. testUnmarshalErr(reflect.ValueOf(v153v2), bs153, h, t, "dec-map-v153-noaddr") // decode into non-addressable map value
  7681. testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-noaddr")
  7682. if v == nil {
  7683. v153v2 = nil
  7684. } else {
  7685. v153v2 = make(map[uint64]uintptr, len(v))
  7686. } // reset map
  7687. testUnmarshalErr(&v153v2, bs153, h, t, "dec-map-v153-p-len")
  7688. testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-p-len")
  7689. bs153 = testMarshalErr(&v153v1, h, t, "enc-map-v153-p")
  7690. v153v2 = nil
  7691. testUnmarshalErr(&v153v2, bs153, h, t, "dec-map-v153-p-nil")
  7692. testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-p-nil")
  7693. // ...
  7694. if v == nil {
  7695. v153v2 = nil
  7696. } else {
  7697. v153v2 = make(map[uint64]uintptr, len(v))
  7698. } // reset map
  7699. var v153v3, v153v4 typMapMapUint64Uintptr
  7700. v153v3 = typMapMapUint64Uintptr(v153v1)
  7701. v153v4 = typMapMapUint64Uintptr(v153v2)
  7702. bs153 = testMarshalErr(v153v3, h, t, "enc-map-v153-custom")
  7703. testUnmarshalErr(v153v4, bs153, h, t, "dec-map-v153-p-len")
  7704. testDeepEqualErr(v153v3, v153v4, t, "equal-map-v153-p-len")
  7705. }
  7706. for _, v := range []map[uint64]int{nil, {}, {44: 0, 33: 44}} {
  7707. // fmt.Printf(">>>> running mammoth map v154: %v\n", v)
  7708. var v154v1, v154v2 map[uint64]int
  7709. v154v1 = v
  7710. bs154 := testMarshalErr(v154v1, h, t, "enc-map-v154")
  7711. if v == nil {
  7712. v154v2 = nil
  7713. } else {
  7714. v154v2 = make(map[uint64]int, len(v))
  7715. } // reset map
  7716. testUnmarshalErr(v154v2, bs154, h, t, "dec-map-v154")
  7717. testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154")
  7718. if v == nil {
  7719. v154v2 = nil
  7720. } else {
  7721. v154v2 = make(map[uint64]int, len(v))
  7722. } // reset map
  7723. testUnmarshalErr(reflect.ValueOf(v154v2), bs154, h, t, "dec-map-v154-noaddr") // decode into non-addressable map value
  7724. testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-noaddr")
  7725. if v == nil {
  7726. v154v2 = nil
  7727. } else {
  7728. v154v2 = make(map[uint64]int, len(v))
  7729. } // reset map
  7730. testUnmarshalErr(&v154v2, bs154, h, t, "dec-map-v154-p-len")
  7731. testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-p-len")
  7732. bs154 = testMarshalErr(&v154v1, h, t, "enc-map-v154-p")
  7733. v154v2 = nil
  7734. testUnmarshalErr(&v154v2, bs154, h, t, "dec-map-v154-p-nil")
  7735. testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-p-nil")
  7736. // ...
  7737. if v == nil {
  7738. v154v2 = nil
  7739. } else {
  7740. v154v2 = make(map[uint64]int, len(v))
  7741. } // reset map
  7742. var v154v3, v154v4 typMapMapUint64Int
  7743. v154v3 = typMapMapUint64Int(v154v1)
  7744. v154v4 = typMapMapUint64Int(v154v2)
  7745. bs154 = testMarshalErr(v154v3, h, t, "enc-map-v154-custom")
  7746. testUnmarshalErr(v154v4, bs154, h, t, "dec-map-v154-p-len")
  7747. testDeepEqualErr(v154v3, v154v4, t, "equal-map-v154-p-len")
  7748. }
  7749. for _, v := range []map[uint64]int8{nil, {}, {33: 0, 44: 33}} {
  7750. // fmt.Printf(">>>> running mammoth map v155: %v\n", v)
  7751. var v155v1, v155v2 map[uint64]int8
  7752. v155v1 = v
  7753. bs155 := testMarshalErr(v155v1, h, t, "enc-map-v155")
  7754. if v == nil {
  7755. v155v2 = nil
  7756. } else {
  7757. v155v2 = make(map[uint64]int8, len(v))
  7758. } // reset map
  7759. testUnmarshalErr(v155v2, bs155, h, t, "dec-map-v155")
  7760. testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155")
  7761. if v == nil {
  7762. v155v2 = nil
  7763. } else {
  7764. v155v2 = make(map[uint64]int8, len(v))
  7765. } // reset map
  7766. testUnmarshalErr(reflect.ValueOf(v155v2), bs155, h, t, "dec-map-v155-noaddr") // decode into non-addressable map value
  7767. testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-noaddr")
  7768. if v == nil {
  7769. v155v2 = nil
  7770. } else {
  7771. v155v2 = make(map[uint64]int8, len(v))
  7772. } // reset map
  7773. testUnmarshalErr(&v155v2, bs155, h, t, "dec-map-v155-p-len")
  7774. testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-p-len")
  7775. bs155 = testMarshalErr(&v155v1, h, t, "enc-map-v155-p")
  7776. v155v2 = nil
  7777. testUnmarshalErr(&v155v2, bs155, h, t, "dec-map-v155-p-nil")
  7778. testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-p-nil")
  7779. // ...
  7780. if v == nil {
  7781. v155v2 = nil
  7782. } else {
  7783. v155v2 = make(map[uint64]int8, len(v))
  7784. } // reset map
  7785. var v155v3, v155v4 typMapMapUint64Int8
  7786. v155v3 = typMapMapUint64Int8(v155v1)
  7787. v155v4 = typMapMapUint64Int8(v155v2)
  7788. bs155 = testMarshalErr(v155v3, h, t, "enc-map-v155-custom")
  7789. testUnmarshalErr(v155v4, bs155, h, t, "dec-map-v155-p-len")
  7790. testDeepEqualErr(v155v3, v155v4, t, "equal-map-v155-p-len")
  7791. }
  7792. for _, v := range []map[uint64]int16{nil, {}, {44: 0, 33: 44}} {
  7793. // fmt.Printf(">>>> running mammoth map v156: %v\n", v)
  7794. var v156v1, v156v2 map[uint64]int16
  7795. v156v1 = v
  7796. bs156 := testMarshalErr(v156v1, h, t, "enc-map-v156")
  7797. if v == nil {
  7798. v156v2 = nil
  7799. } else {
  7800. v156v2 = make(map[uint64]int16, len(v))
  7801. } // reset map
  7802. testUnmarshalErr(v156v2, bs156, h, t, "dec-map-v156")
  7803. testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156")
  7804. if v == nil {
  7805. v156v2 = nil
  7806. } else {
  7807. v156v2 = make(map[uint64]int16, len(v))
  7808. } // reset map
  7809. testUnmarshalErr(reflect.ValueOf(v156v2), bs156, h, t, "dec-map-v156-noaddr") // decode into non-addressable map value
  7810. testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-noaddr")
  7811. if v == nil {
  7812. v156v2 = nil
  7813. } else {
  7814. v156v2 = make(map[uint64]int16, len(v))
  7815. } // reset map
  7816. testUnmarshalErr(&v156v2, bs156, h, t, "dec-map-v156-p-len")
  7817. testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-p-len")
  7818. bs156 = testMarshalErr(&v156v1, h, t, "enc-map-v156-p")
  7819. v156v2 = nil
  7820. testUnmarshalErr(&v156v2, bs156, h, t, "dec-map-v156-p-nil")
  7821. testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-p-nil")
  7822. // ...
  7823. if v == nil {
  7824. v156v2 = nil
  7825. } else {
  7826. v156v2 = make(map[uint64]int16, len(v))
  7827. } // reset map
  7828. var v156v3, v156v4 typMapMapUint64Int16
  7829. v156v3 = typMapMapUint64Int16(v156v1)
  7830. v156v4 = typMapMapUint64Int16(v156v2)
  7831. bs156 = testMarshalErr(v156v3, h, t, "enc-map-v156-custom")
  7832. testUnmarshalErr(v156v4, bs156, h, t, "dec-map-v156-p-len")
  7833. testDeepEqualErr(v156v3, v156v4, t, "equal-map-v156-p-len")
  7834. }
  7835. for _, v := range []map[uint64]int32{nil, {}, {33: 0, 44: 33}} {
  7836. // fmt.Printf(">>>> running mammoth map v157: %v\n", v)
  7837. var v157v1, v157v2 map[uint64]int32
  7838. v157v1 = v
  7839. bs157 := testMarshalErr(v157v1, h, t, "enc-map-v157")
  7840. if v == nil {
  7841. v157v2 = nil
  7842. } else {
  7843. v157v2 = make(map[uint64]int32, len(v))
  7844. } // reset map
  7845. testUnmarshalErr(v157v2, bs157, h, t, "dec-map-v157")
  7846. testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157")
  7847. if v == nil {
  7848. v157v2 = nil
  7849. } else {
  7850. v157v2 = make(map[uint64]int32, len(v))
  7851. } // reset map
  7852. testUnmarshalErr(reflect.ValueOf(v157v2), bs157, h, t, "dec-map-v157-noaddr") // decode into non-addressable map value
  7853. testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-noaddr")
  7854. if v == nil {
  7855. v157v2 = nil
  7856. } else {
  7857. v157v2 = make(map[uint64]int32, len(v))
  7858. } // reset map
  7859. testUnmarshalErr(&v157v2, bs157, h, t, "dec-map-v157-p-len")
  7860. testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-p-len")
  7861. bs157 = testMarshalErr(&v157v1, h, t, "enc-map-v157-p")
  7862. v157v2 = nil
  7863. testUnmarshalErr(&v157v2, bs157, h, t, "dec-map-v157-p-nil")
  7864. testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-p-nil")
  7865. // ...
  7866. if v == nil {
  7867. v157v2 = nil
  7868. } else {
  7869. v157v2 = make(map[uint64]int32, len(v))
  7870. } // reset map
  7871. var v157v3, v157v4 typMapMapUint64Int32
  7872. v157v3 = typMapMapUint64Int32(v157v1)
  7873. v157v4 = typMapMapUint64Int32(v157v2)
  7874. bs157 = testMarshalErr(v157v3, h, t, "enc-map-v157-custom")
  7875. testUnmarshalErr(v157v4, bs157, h, t, "dec-map-v157-p-len")
  7876. testDeepEqualErr(v157v3, v157v4, t, "equal-map-v157-p-len")
  7877. }
  7878. for _, v := range []map[uint64]int64{nil, {}, {44: 0, 33: 44}} {
  7879. // fmt.Printf(">>>> running mammoth map v158: %v\n", v)
  7880. var v158v1, v158v2 map[uint64]int64
  7881. v158v1 = v
  7882. bs158 := testMarshalErr(v158v1, h, t, "enc-map-v158")
  7883. if v == nil {
  7884. v158v2 = nil
  7885. } else {
  7886. v158v2 = make(map[uint64]int64, len(v))
  7887. } // reset map
  7888. testUnmarshalErr(v158v2, bs158, h, t, "dec-map-v158")
  7889. testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158")
  7890. if v == nil {
  7891. v158v2 = nil
  7892. } else {
  7893. v158v2 = make(map[uint64]int64, len(v))
  7894. } // reset map
  7895. testUnmarshalErr(reflect.ValueOf(v158v2), bs158, h, t, "dec-map-v158-noaddr") // decode into non-addressable map value
  7896. testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-noaddr")
  7897. if v == nil {
  7898. v158v2 = nil
  7899. } else {
  7900. v158v2 = make(map[uint64]int64, len(v))
  7901. } // reset map
  7902. testUnmarshalErr(&v158v2, bs158, h, t, "dec-map-v158-p-len")
  7903. testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-p-len")
  7904. bs158 = testMarshalErr(&v158v1, h, t, "enc-map-v158-p")
  7905. v158v2 = nil
  7906. testUnmarshalErr(&v158v2, bs158, h, t, "dec-map-v158-p-nil")
  7907. testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-p-nil")
  7908. // ...
  7909. if v == nil {
  7910. v158v2 = nil
  7911. } else {
  7912. v158v2 = make(map[uint64]int64, len(v))
  7913. } // reset map
  7914. var v158v3, v158v4 typMapMapUint64Int64
  7915. v158v3 = typMapMapUint64Int64(v158v1)
  7916. v158v4 = typMapMapUint64Int64(v158v2)
  7917. bs158 = testMarshalErr(v158v3, h, t, "enc-map-v158-custom")
  7918. testUnmarshalErr(v158v4, bs158, h, t, "dec-map-v158-p-len")
  7919. testDeepEqualErr(v158v3, v158v4, t, "equal-map-v158-p-len")
  7920. }
  7921. for _, v := range []map[uint64]float32{nil, {}, {33: 0, 44: 22.2}} {
  7922. // fmt.Printf(">>>> running mammoth map v159: %v\n", v)
  7923. var v159v1, v159v2 map[uint64]float32
  7924. v159v1 = v
  7925. bs159 := testMarshalErr(v159v1, h, t, "enc-map-v159")
  7926. if v == nil {
  7927. v159v2 = nil
  7928. } else {
  7929. v159v2 = make(map[uint64]float32, len(v))
  7930. } // reset map
  7931. testUnmarshalErr(v159v2, bs159, h, t, "dec-map-v159")
  7932. testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159")
  7933. if v == nil {
  7934. v159v2 = nil
  7935. } else {
  7936. v159v2 = make(map[uint64]float32, len(v))
  7937. } // reset map
  7938. testUnmarshalErr(reflect.ValueOf(v159v2), bs159, h, t, "dec-map-v159-noaddr") // decode into non-addressable map value
  7939. testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-noaddr")
  7940. if v == nil {
  7941. v159v2 = nil
  7942. } else {
  7943. v159v2 = make(map[uint64]float32, len(v))
  7944. } // reset map
  7945. testUnmarshalErr(&v159v2, bs159, h, t, "dec-map-v159-p-len")
  7946. testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-p-len")
  7947. bs159 = testMarshalErr(&v159v1, h, t, "enc-map-v159-p")
  7948. v159v2 = nil
  7949. testUnmarshalErr(&v159v2, bs159, h, t, "dec-map-v159-p-nil")
  7950. testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-p-nil")
  7951. // ...
  7952. if v == nil {
  7953. v159v2 = nil
  7954. } else {
  7955. v159v2 = make(map[uint64]float32, len(v))
  7956. } // reset map
  7957. var v159v3, v159v4 typMapMapUint64Float32
  7958. v159v3 = typMapMapUint64Float32(v159v1)
  7959. v159v4 = typMapMapUint64Float32(v159v2)
  7960. bs159 = testMarshalErr(v159v3, h, t, "enc-map-v159-custom")
  7961. testUnmarshalErr(v159v4, bs159, h, t, "dec-map-v159-p-len")
  7962. testDeepEqualErr(v159v3, v159v4, t, "equal-map-v159-p-len")
  7963. }
  7964. for _, v := range []map[uint64]float64{nil, {}, {33: 0, 44: 11.1}} {
  7965. // fmt.Printf(">>>> running mammoth map v160: %v\n", v)
  7966. var v160v1, v160v2 map[uint64]float64
  7967. v160v1 = v
  7968. bs160 := testMarshalErr(v160v1, h, t, "enc-map-v160")
  7969. if v == nil {
  7970. v160v2 = nil
  7971. } else {
  7972. v160v2 = make(map[uint64]float64, len(v))
  7973. } // reset map
  7974. testUnmarshalErr(v160v2, bs160, h, t, "dec-map-v160")
  7975. testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160")
  7976. if v == nil {
  7977. v160v2 = nil
  7978. } else {
  7979. v160v2 = make(map[uint64]float64, len(v))
  7980. } // reset map
  7981. testUnmarshalErr(reflect.ValueOf(v160v2), bs160, h, t, "dec-map-v160-noaddr") // decode into non-addressable map value
  7982. testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-noaddr")
  7983. if v == nil {
  7984. v160v2 = nil
  7985. } else {
  7986. v160v2 = make(map[uint64]float64, len(v))
  7987. } // reset map
  7988. testUnmarshalErr(&v160v2, bs160, h, t, "dec-map-v160-p-len")
  7989. testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-p-len")
  7990. bs160 = testMarshalErr(&v160v1, h, t, "enc-map-v160-p")
  7991. v160v2 = nil
  7992. testUnmarshalErr(&v160v2, bs160, h, t, "dec-map-v160-p-nil")
  7993. testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-p-nil")
  7994. // ...
  7995. if v == nil {
  7996. v160v2 = nil
  7997. } else {
  7998. v160v2 = make(map[uint64]float64, len(v))
  7999. } // reset map
  8000. var v160v3, v160v4 typMapMapUint64Float64
  8001. v160v3 = typMapMapUint64Float64(v160v1)
  8002. v160v4 = typMapMapUint64Float64(v160v2)
  8003. bs160 = testMarshalErr(v160v3, h, t, "enc-map-v160-custom")
  8004. testUnmarshalErr(v160v4, bs160, h, t, "dec-map-v160-p-len")
  8005. testDeepEqualErr(v160v3, v160v4, t, "equal-map-v160-p-len")
  8006. }
  8007. for _, v := range []map[uint64]bool{nil, {}, {33: false, 44: true}} {
  8008. // fmt.Printf(">>>> running mammoth map v161: %v\n", v)
  8009. var v161v1, v161v2 map[uint64]bool
  8010. v161v1 = v
  8011. bs161 := testMarshalErr(v161v1, h, t, "enc-map-v161")
  8012. if v == nil {
  8013. v161v2 = nil
  8014. } else {
  8015. v161v2 = make(map[uint64]bool, len(v))
  8016. } // reset map
  8017. testUnmarshalErr(v161v2, bs161, h, t, "dec-map-v161")
  8018. testDeepEqualErr(v161v1, v161v2, t, "equal-map-v161")
  8019. if v == nil {
  8020. v161v2 = nil
  8021. } else {
  8022. v161v2 = make(map[uint64]bool, len(v))
  8023. } // reset map
  8024. testUnmarshalErr(reflect.ValueOf(v161v2), bs161, h, t, "dec-map-v161-noaddr") // decode into non-addressable map value
  8025. testDeepEqualErr(v161v1, v161v2, t, "equal-map-v161-noaddr")
  8026. if v == nil {
  8027. v161v2 = nil
  8028. } else {
  8029. v161v2 = make(map[uint64]bool, len(v))
  8030. } // reset map
  8031. testUnmarshalErr(&v161v2, bs161, h, t, "dec-map-v161-p-len")
  8032. testDeepEqualErr(v161v1, v161v2, t, "equal-map-v161-p-len")
  8033. bs161 = testMarshalErr(&v161v1, h, t, "enc-map-v161-p")
  8034. v161v2 = nil
  8035. testUnmarshalErr(&v161v2, bs161, h, t, "dec-map-v161-p-nil")
  8036. testDeepEqualErr(v161v1, v161v2, t, "equal-map-v161-p-nil")
  8037. // ...
  8038. if v == nil {
  8039. v161v2 = nil
  8040. } else {
  8041. v161v2 = make(map[uint64]bool, len(v))
  8042. } // reset map
  8043. var v161v3, v161v4 typMapMapUint64Bool
  8044. v161v3 = typMapMapUint64Bool(v161v1)
  8045. v161v4 = typMapMapUint64Bool(v161v2)
  8046. bs161 = testMarshalErr(v161v3, h, t, "enc-map-v161-custom")
  8047. testUnmarshalErr(v161v4, bs161, h, t, "dec-map-v161-p-len")
  8048. testDeepEqualErr(v161v3, v161v4, t, "equal-map-v161-p-len")
  8049. }
  8050. for _, v := range []map[uintptr]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  8051. // fmt.Printf(">>>> running mammoth map v164: %v\n", v)
  8052. var v164v1, v164v2 map[uintptr]interface{}
  8053. v164v1 = v
  8054. bs164 := testMarshalErr(v164v1, h, t, "enc-map-v164")
  8055. if v == nil {
  8056. v164v2 = nil
  8057. } else {
  8058. v164v2 = make(map[uintptr]interface{}, len(v))
  8059. } // reset map
  8060. testUnmarshalErr(v164v2, bs164, h, t, "dec-map-v164")
  8061. testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164")
  8062. if v == nil {
  8063. v164v2 = nil
  8064. } else {
  8065. v164v2 = make(map[uintptr]interface{}, len(v))
  8066. } // reset map
  8067. testUnmarshalErr(reflect.ValueOf(v164v2), bs164, h, t, "dec-map-v164-noaddr") // decode into non-addressable map value
  8068. testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-noaddr")
  8069. if v == nil {
  8070. v164v2 = nil
  8071. } else {
  8072. v164v2 = make(map[uintptr]interface{}, len(v))
  8073. } // reset map
  8074. testUnmarshalErr(&v164v2, bs164, h, t, "dec-map-v164-p-len")
  8075. testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-p-len")
  8076. bs164 = testMarshalErr(&v164v1, h, t, "enc-map-v164-p")
  8077. v164v2 = nil
  8078. testUnmarshalErr(&v164v2, bs164, h, t, "dec-map-v164-p-nil")
  8079. testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-p-nil")
  8080. // ...
  8081. if v == nil {
  8082. v164v2 = nil
  8083. } else {
  8084. v164v2 = make(map[uintptr]interface{}, len(v))
  8085. } // reset map
  8086. var v164v3, v164v4 typMapMapUintptrIntf
  8087. v164v3 = typMapMapUintptrIntf(v164v1)
  8088. v164v4 = typMapMapUintptrIntf(v164v2)
  8089. bs164 = testMarshalErr(v164v3, h, t, "enc-map-v164-custom")
  8090. testUnmarshalErr(v164v4, bs164, h, t, "dec-map-v164-p-len")
  8091. testDeepEqualErr(v164v3, v164v4, t, "equal-map-v164-p-len")
  8092. }
  8093. for _, v := range []map[uintptr]string{nil, {}, {33: "", 44: "some-string"}} {
  8094. // fmt.Printf(">>>> running mammoth map v165: %v\n", v)
  8095. var v165v1, v165v2 map[uintptr]string
  8096. v165v1 = v
  8097. bs165 := testMarshalErr(v165v1, h, t, "enc-map-v165")
  8098. if v == nil {
  8099. v165v2 = nil
  8100. } else {
  8101. v165v2 = make(map[uintptr]string, len(v))
  8102. } // reset map
  8103. testUnmarshalErr(v165v2, bs165, h, t, "dec-map-v165")
  8104. testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165")
  8105. if v == nil {
  8106. v165v2 = nil
  8107. } else {
  8108. v165v2 = make(map[uintptr]string, len(v))
  8109. } // reset map
  8110. testUnmarshalErr(reflect.ValueOf(v165v2), bs165, h, t, "dec-map-v165-noaddr") // decode into non-addressable map value
  8111. testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-noaddr")
  8112. if v == nil {
  8113. v165v2 = nil
  8114. } else {
  8115. v165v2 = make(map[uintptr]string, len(v))
  8116. } // reset map
  8117. testUnmarshalErr(&v165v2, bs165, h, t, "dec-map-v165-p-len")
  8118. testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-p-len")
  8119. bs165 = testMarshalErr(&v165v1, h, t, "enc-map-v165-p")
  8120. v165v2 = nil
  8121. testUnmarshalErr(&v165v2, bs165, h, t, "dec-map-v165-p-nil")
  8122. testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-p-nil")
  8123. // ...
  8124. if v == nil {
  8125. v165v2 = nil
  8126. } else {
  8127. v165v2 = make(map[uintptr]string, len(v))
  8128. } // reset map
  8129. var v165v3, v165v4 typMapMapUintptrString
  8130. v165v3 = typMapMapUintptrString(v165v1)
  8131. v165v4 = typMapMapUintptrString(v165v2)
  8132. bs165 = testMarshalErr(v165v3, h, t, "enc-map-v165-custom")
  8133. testUnmarshalErr(v165v4, bs165, h, t, "dec-map-v165-p-len")
  8134. testDeepEqualErr(v165v3, v165v4, t, "equal-map-v165-p-len")
  8135. }
  8136. for _, v := range []map[uintptr]uint{nil, {}, {33: 0, 44: 33}} {
  8137. // fmt.Printf(">>>> running mammoth map v166: %v\n", v)
  8138. var v166v1, v166v2 map[uintptr]uint
  8139. v166v1 = v
  8140. bs166 := testMarshalErr(v166v1, h, t, "enc-map-v166")
  8141. if v == nil {
  8142. v166v2 = nil
  8143. } else {
  8144. v166v2 = make(map[uintptr]uint, len(v))
  8145. } // reset map
  8146. testUnmarshalErr(v166v2, bs166, h, t, "dec-map-v166")
  8147. testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166")
  8148. if v == nil {
  8149. v166v2 = nil
  8150. } else {
  8151. v166v2 = make(map[uintptr]uint, len(v))
  8152. } // reset map
  8153. testUnmarshalErr(reflect.ValueOf(v166v2), bs166, h, t, "dec-map-v166-noaddr") // decode into non-addressable map value
  8154. testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-noaddr")
  8155. if v == nil {
  8156. v166v2 = nil
  8157. } else {
  8158. v166v2 = make(map[uintptr]uint, len(v))
  8159. } // reset map
  8160. testUnmarshalErr(&v166v2, bs166, h, t, "dec-map-v166-p-len")
  8161. testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-p-len")
  8162. bs166 = testMarshalErr(&v166v1, h, t, "enc-map-v166-p")
  8163. v166v2 = nil
  8164. testUnmarshalErr(&v166v2, bs166, h, t, "dec-map-v166-p-nil")
  8165. testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-p-nil")
  8166. // ...
  8167. if v == nil {
  8168. v166v2 = nil
  8169. } else {
  8170. v166v2 = make(map[uintptr]uint, len(v))
  8171. } // reset map
  8172. var v166v3, v166v4 typMapMapUintptrUint
  8173. v166v3 = typMapMapUintptrUint(v166v1)
  8174. v166v4 = typMapMapUintptrUint(v166v2)
  8175. bs166 = testMarshalErr(v166v3, h, t, "enc-map-v166-custom")
  8176. testUnmarshalErr(v166v4, bs166, h, t, "dec-map-v166-p-len")
  8177. testDeepEqualErr(v166v3, v166v4, t, "equal-map-v166-p-len")
  8178. }
  8179. for _, v := range []map[uintptr]uint8{nil, {}, {44: 0, 33: 44}} {
  8180. // fmt.Printf(">>>> running mammoth map v167: %v\n", v)
  8181. var v167v1, v167v2 map[uintptr]uint8
  8182. v167v1 = v
  8183. bs167 := testMarshalErr(v167v1, h, t, "enc-map-v167")
  8184. if v == nil {
  8185. v167v2 = nil
  8186. } else {
  8187. v167v2 = make(map[uintptr]uint8, len(v))
  8188. } // reset map
  8189. testUnmarshalErr(v167v2, bs167, h, t, "dec-map-v167")
  8190. testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167")
  8191. if v == nil {
  8192. v167v2 = nil
  8193. } else {
  8194. v167v2 = make(map[uintptr]uint8, len(v))
  8195. } // reset map
  8196. testUnmarshalErr(reflect.ValueOf(v167v2), bs167, h, t, "dec-map-v167-noaddr") // decode into non-addressable map value
  8197. testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-noaddr")
  8198. if v == nil {
  8199. v167v2 = nil
  8200. } else {
  8201. v167v2 = make(map[uintptr]uint8, len(v))
  8202. } // reset map
  8203. testUnmarshalErr(&v167v2, bs167, h, t, "dec-map-v167-p-len")
  8204. testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-p-len")
  8205. bs167 = testMarshalErr(&v167v1, h, t, "enc-map-v167-p")
  8206. v167v2 = nil
  8207. testUnmarshalErr(&v167v2, bs167, h, t, "dec-map-v167-p-nil")
  8208. testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-p-nil")
  8209. // ...
  8210. if v == nil {
  8211. v167v2 = nil
  8212. } else {
  8213. v167v2 = make(map[uintptr]uint8, len(v))
  8214. } // reset map
  8215. var v167v3, v167v4 typMapMapUintptrUint8
  8216. v167v3 = typMapMapUintptrUint8(v167v1)
  8217. v167v4 = typMapMapUintptrUint8(v167v2)
  8218. bs167 = testMarshalErr(v167v3, h, t, "enc-map-v167-custom")
  8219. testUnmarshalErr(v167v4, bs167, h, t, "dec-map-v167-p-len")
  8220. testDeepEqualErr(v167v3, v167v4, t, "equal-map-v167-p-len")
  8221. }
  8222. for _, v := range []map[uintptr]uint16{nil, {}, {33: 0, 44: 33}} {
  8223. // fmt.Printf(">>>> running mammoth map v168: %v\n", v)
  8224. var v168v1, v168v2 map[uintptr]uint16
  8225. v168v1 = v
  8226. bs168 := testMarshalErr(v168v1, h, t, "enc-map-v168")
  8227. if v == nil {
  8228. v168v2 = nil
  8229. } else {
  8230. v168v2 = make(map[uintptr]uint16, len(v))
  8231. } // reset map
  8232. testUnmarshalErr(v168v2, bs168, h, t, "dec-map-v168")
  8233. testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168")
  8234. if v == nil {
  8235. v168v2 = nil
  8236. } else {
  8237. v168v2 = make(map[uintptr]uint16, len(v))
  8238. } // reset map
  8239. testUnmarshalErr(reflect.ValueOf(v168v2), bs168, h, t, "dec-map-v168-noaddr") // decode into non-addressable map value
  8240. testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-noaddr")
  8241. if v == nil {
  8242. v168v2 = nil
  8243. } else {
  8244. v168v2 = make(map[uintptr]uint16, len(v))
  8245. } // reset map
  8246. testUnmarshalErr(&v168v2, bs168, h, t, "dec-map-v168-p-len")
  8247. testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-p-len")
  8248. bs168 = testMarshalErr(&v168v1, h, t, "enc-map-v168-p")
  8249. v168v2 = nil
  8250. testUnmarshalErr(&v168v2, bs168, h, t, "dec-map-v168-p-nil")
  8251. testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-p-nil")
  8252. // ...
  8253. if v == nil {
  8254. v168v2 = nil
  8255. } else {
  8256. v168v2 = make(map[uintptr]uint16, len(v))
  8257. } // reset map
  8258. var v168v3, v168v4 typMapMapUintptrUint16
  8259. v168v3 = typMapMapUintptrUint16(v168v1)
  8260. v168v4 = typMapMapUintptrUint16(v168v2)
  8261. bs168 = testMarshalErr(v168v3, h, t, "enc-map-v168-custom")
  8262. testUnmarshalErr(v168v4, bs168, h, t, "dec-map-v168-p-len")
  8263. testDeepEqualErr(v168v3, v168v4, t, "equal-map-v168-p-len")
  8264. }
  8265. for _, v := range []map[uintptr]uint32{nil, {}, {44: 0, 33: 44}} {
  8266. // fmt.Printf(">>>> running mammoth map v169: %v\n", v)
  8267. var v169v1, v169v2 map[uintptr]uint32
  8268. v169v1 = v
  8269. bs169 := testMarshalErr(v169v1, h, t, "enc-map-v169")
  8270. if v == nil {
  8271. v169v2 = nil
  8272. } else {
  8273. v169v2 = make(map[uintptr]uint32, len(v))
  8274. } // reset map
  8275. testUnmarshalErr(v169v2, bs169, h, t, "dec-map-v169")
  8276. testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169")
  8277. if v == nil {
  8278. v169v2 = nil
  8279. } else {
  8280. v169v2 = make(map[uintptr]uint32, len(v))
  8281. } // reset map
  8282. testUnmarshalErr(reflect.ValueOf(v169v2), bs169, h, t, "dec-map-v169-noaddr") // decode into non-addressable map value
  8283. testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-noaddr")
  8284. if v == nil {
  8285. v169v2 = nil
  8286. } else {
  8287. v169v2 = make(map[uintptr]uint32, len(v))
  8288. } // reset map
  8289. testUnmarshalErr(&v169v2, bs169, h, t, "dec-map-v169-p-len")
  8290. testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-p-len")
  8291. bs169 = testMarshalErr(&v169v1, h, t, "enc-map-v169-p")
  8292. v169v2 = nil
  8293. testUnmarshalErr(&v169v2, bs169, h, t, "dec-map-v169-p-nil")
  8294. testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-p-nil")
  8295. // ...
  8296. if v == nil {
  8297. v169v2 = nil
  8298. } else {
  8299. v169v2 = make(map[uintptr]uint32, len(v))
  8300. } // reset map
  8301. var v169v3, v169v4 typMapMapUintptrUint32
  8302. v169v3 = typMapMapUintptrUint32(v169v1)
  8303. v169v4 = typMapMapUintptrUint32(v169v2)
  8304. bs169 = testMarshalErr(v169v3, h, t, "enc-map-v169-custom")
  8305. testUnmarshalErr(v169v4, bs169, h, t, "dec-map-v169-p-len")
  8306. testDeepEqualErr(v169v3, v169v4, t, "equal-map-v169-p-len")
  8307. }
  8308. for _, v := range []map[uintptr]uint64{nil, {}, {33: 0, 44: 33}} {
  8309. // fmt.Printf(">>>> running mammoth map v170: %v\n", v)
  8310. var v170v1, v170v2 map[uintptr]uint64
  8311. v170v1 = v
  8312. bs170 := testMarshalErr(v170v1, h, t, "enc-map-v170")
  8313. if v == nil {
  8314. v170v2 = nil
  8315. } else {
  8316. v170v2 = make(map[uintptr]uint64, len(v))
  8317. } // reset map
  8318. testUnmarshalErr(v170v2, bs170, h, t, "dec-map-v170")
  8319. testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170")
  8320. if v == nil {
  8321. v170v2 = nil
  8322. } else {
  8323. v170v2 = make(map[uintptr]uint64, len(v))
  8324. } // reset map
  8325. testUnmarshalErr(reflect.ValueOf(v170v2), bs170, h, t, "dec-map-v170-noaddr") // decode into non-addressable map value
  8326. testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-noaddr")
  8327. if v == nil {
  8328. v170v2 = nil
  8329. } else {
  8330. v170v2 = make(map[uintptr]uint64, len(v))
  8331. } // reset map
  8332. testUnmarshalErr(&v170v2, bs170, h, t, "dec-map-v170-p-len")
  8333. testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-p-len")
  8334. bs170 = testMarshalErr(&v170v1, h, t, "enc-map-v170-p")
  8335. v170v2 = nil
  8336. testUnmarshalErr(&v170v2, bs170, h, t, "dec-map-v170-p-nil")
  8337. testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-p-nil")
  8338. // ...
  8339. if v == nil {
  8340. v170v2 = nil
  8341. } else {
  8342. v170v2 = make(map[uintptr]uint64, len(v))
  8343. } // reset map
  8344. var v170v3, v170v4 typMapMapUintptrUint64
  8345. v170v3 = typMapMapUintptrUint64(v170v1)
  8346. v170v4 = typMapMapUintptrUint64(v170v2)
  8347. bs170 = testMarshalErr(v170v3, h, t, "enc-map-v170-custom")
  8348. testUnmarshalErr(v170v4, bs170, h, t, "dec-map-v170-p-len")
  8349. testDeepEqualErr(v170v3, v170v4, t, "equal-map-v170-p-len")
  8350. }
  8351. for _, v := range []map[uintptr]uintptr{nil, {}, {44: 0, 33: 44}} {
  8352. // fmt.Printf(">>>> running mammoth map v171: %v\n", v)
  8353. var v171v1, v171v2 map[uintptr]uintptr
  8354. v171v1 = v
  8355. bs171 := testMarshalErr(v171v1, h, t, "enc-map-v171")
  8356. if v == nil {
  8357. v171v2 = nil
  8358. } else {
  8359. v171v2 = make(map[uintptr]uintptr, len(v))
  8360. } // reset map
  8361. testUnmarshalErr(v171v2, bs171, h, t, "dec-map-v171")
  8362. testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171")
  8363. if v == nil {
  8364. v171v2 = nil
  8365. } else {
  8366. v171v2 = make(map[uintptr]uintptr, len(v))
  8367. } // reset map
  8368. testUnmarshalErr(reflect.ValueOf(v171v2), bs171, h, t, "dec-map-v171-noaddr") // decode into non-addressable map value
  8369. testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-noaddr")
  8370. if v == nil {
  8371. v171v2 = nil
  8372. } else {
  8373. v171v2 = make(map[uintptr]uintptr, len(v))
  8374. } // reset map
  8375. testUnmarshalErr(&v171v2, bs171, h, t, "dec-map-v171-p-len")
  8376. testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-p-len")
  8377. bs171 = testMarshalErr(&v171v1, h, t, "enc-map-v171-p")
  8378. v171v2 = nil
  8379. testUnmarshalErr(&v171v2, bs171, h, t, "dec-map-v171-p-nil")
  8380. testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-p-nil")
  8381. // ...
  8382. if v == nil {
  8383. v171v2 = nil
  8384. } else {
  8385. v171v2 = make(map[uintptr]uintptr, len(v))
  8386. } // reset map
  8387. var v171v3, v171v4 typMapMapUintptrUintptr
  8388. v171v3 = typMapMapUintptrUintptr(v171v1)
  8389. v171v4 = typMapMapUintptrUintptr(v171v2)
  8390. bs171 = testMarshalErr(v171v3, h, t, "enc-map-v171-custom")
  8391. testUnmarshalErr(v171v4, bs171, h, t, "dec-map-v171-p-len")
  8392. testDeepEqualErr(v171v3, v171v4, t, "equal-map-v171-p-len")
  8393. }
  8394. for _, v := range []map[uintptr]int{nil, {}, {33: 0, 44: 33}} {
  8395. // fmt.Printf(">>>> running mammoth map v172: %v\n", v)
  8396. var v172v1, v172v2 map[uintptr]int
  8397. v172v1 = v
  8398. bs172 := testMarshalErr(v172v1, h, t, "enc-map-v172")
  8399. if v == nil {
  8400. v172v2 = nil
  8401. } else {
  8402. v172v2 = make(map[uintptr]int, len(v))
  8403. } // reset map
  8404. testUnmarshalErr(v172v2, bs172, h, t, "dec-map-v172")
  8405. testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172")
  8406. if v == nil {
  8407. v172v2 = nil
  8408. } else {
  8409. v172v2 = make(map[uintptr]int, len(v))
  8410. } // reset map
  8411. testUnmarshalErr(reflect.ValueOf(v172v2), bs172, h, t, "dec-map-v172-noaddr") // decode into non-addressable map value
  8412. testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-noaddr")
  8413. if v == nil {
  8414. v172v2 = nil
  8415. } else {
  8416. v172v2 = make(map[uintptr]int, len(v))
  8417. } // reset map
  8418. testUnmarshalErr(&v172v2, bs172, h, t, "dec-map-v172-p-len")
  8419. testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-p-len")
  8420. bs172 = testMarshalErr(&v172v1, h, t, "enc-map-v172-p")
  8421. v172v2 = nil
  8422. testUnmarshalErr(&v172v2, bs172, h, t, "dec-map-v172-p-nil")
  8423. testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-p-nil")
  8424. // ...
  8425. if v == nil {
  8426. v172v2 = nil
  8427. } else {
  8428. v172v2 = make(map[uintptr]int, len(v))
  8429. } // reset map
  8430. var v172v3, v172v4 typMapMapUintptrInt
  8431. v172v3 = typMapMapUintptrInt(v172v1)
  8432. v172v4 = typMapMapUintptrInt(v172v2)
  8433. bs172 = testMarshalErr(v172v3, h, t, "enc-map-v172-custom")
  8434. testUnmarshalErr(v172v4, bs172, h, t, "dec-map-v172-p-len")
  8435. testDeepEqualErr(v172v3, v172v4, t, "equal-map-v172-p-len")
  8436. }
  8437. for _, v := range []map[uintptr]int8{nil, {}, {44: 0, 33: 44}} {
  8438. // fmt.Printf(">>>> running mammoth map v173: %v\n", v)
  8439. var v173v1, v173v2 map[uintptr]int8
  8440. v173v1 = v
  8441. bs173 := testMarshalErr(v173v1, h, t, "enc-map-v173")
  8442. if v == nil {
  8443. v173v2 = nil
  8444. } else {
  8445. v173v2 = make(map[uintptr]int8, len(v))
  8446. } // reset map
  8447. testUnmarshalErr(v173v2, bs173, h, t, "dec-map-v173")
  8448. testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173")
  8449. if v == nil {
  8450. v173v2 = nil
  8451. } else {
  8452. v173v2 = make(map[uintptr]int8, len(v))
  8453. } // reset map
  8454. testUnmarshalErr(reflect.ValueOf(v173v2), bs173, h, t, "dec-map-v173-noaddr") // decode into non-addressable map value
  8455. testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-noaddr")
  8456. if v == nil {
  8457. v173v2 = nil
  8458. } else {
  8459. v173v2 = make(map[uintptr]int8, len(v))
  8460. } // reset map
  8461. testUnmarshalErr(&v173v2, bs173, h, t, "dec-map-v173-p-len")
  8462. testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-p-len")
  8463. bs173 = testMarshalErr(&v173v1, h, t, "enc-map-v173-p")
  8464. v173v2 = nil
  8465. testUnmarshalErr(&v173v2, bs173, h, t, "dec-map-v173-p-nil")
  8466. testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-p-nil")
  8467. // ...
  8468. if v == nil {
  8469. v173v2 = nil
  8470. } else {
  8471. v173v2 = make(map[uintptr]int8, len(v))
  8472. } // reset map
  8473. var v173v3, v173v4 typMapMapUintptrInt8
  8474. v173v3 = typMapMapUintptrInt8(v173v1)
  8475. v173v4 = typMapMapUintptrInt8(v173v2)
  8476. bs173 = testMarshalErr(v173v3, h, t, "enc-map-v173-custom")
  8477. testUnmarshalErr(v173v4, bs173, h, t, "dec-map-v173-p-len")
  8478. testDeepEqualErr(v173v3, v173v4, t, "equal-map-v173-p-len")
  8479. }
  8480. for _, v := range []map[uintptr]int16{nil, {}, {33: 0, 44: 33}} {
  8481. // fmt.Printf(">>>> running mammoth map v174: %v\n", v)
  8482. var v174v1, v174v2 map[uintptr]int16
  8483. v174v1 = v
  8484. bs174 := testMarshalErr(v174v1, h, t, "enc-map-v174")
  8485. if v == nil {
  8486. v174v2 = nil
  8487. } else {
  8488. v174v2 = make(map[uintptr]int16, len(v))
  8489. } // reset map
  8490. testUnmarshalErr(v174v2, bs174, h, t, "dec-map-v174")
  8491. testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174")
  8492. if v == nil {
  8493. v174v2 = nil
  8494. } else {
  8495. v174v2 = make(map[uintptr]int16, len(v))
  8496. } // reset map
  8497. testUnmarshalErr(reflect.ValueOf(v174v2), bs174, h, t, "dec-map-v174-noaddr") // decode into non-addressable map value
  8498. testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-noaddr")
  8499. if v == nil {
  8500. v174v2 = nil
  8501. } else {
  8502. v174v2 = make(map[uintptr]int16, len(v))
  8503. } // reset map
  8504. testUnmarshalErr(&v174v2, bs174, h, t, "dec-map-v174-p-len")
  8505. testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-p-len")
  8506. bs174 = testMarshalErr(&v174v1, h, t, "enc-map-v174-p")
  8507. v174v2 = nil
  8508. testUnmarshalErr(&v174v2, bs174, h, t, "dec-map-v174-p-nil")
  8509. testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-p-nil")
  8510. // ...
  8511. if v == nil {
  8512. v174v2 = nil
  8513. } else {
  8514. v174v2 = make(map[uintptr]int16, len(v))
  8515. } // reset map
  8516. var v174v3, v174v4 typMapMapUintptrInt16
  8517. v174v3 = typMapMapUintptrInt16(v174v1)
  8518. v174v4 = typMapMapUintptrInt16(v174v2)
  8519. bs174 = testMarshalErr(v174v3, h, t, "enc-map-v174-custom")
  8520. testUnmarshalErr(v174v4, bs174, h, t, "dec-map-v174-p-len")
  8521. testDeepEqualErr(v174v3, v174v4, t, "equal-map-v174-p-len")
  8522. }
  8523. for _, v := range []map[uintptr]int32{nil, {}, {44: 0, 33: 44}} {
  8524. // fmt.Printf(">>>> running mammoth map v175: %v\n", v)
  8525. var v175v1, v175v2 map[uintptr]int32
  8526. v175v1 = v
  8527. bs175 := testMarshalErr(v175v1, h, t, "enc-map-v175")
  8528. if v == nil {
  8529. v175v2 = nil
  8530. } else {
  8531. v175v2 = make(map[uintptr]int32, len(v))
  8532. } // reset map
  8533. testUnmarshalErr(v175v2, bs175, h, t, "dec-map-v175")
  8534. testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175")
  8535. if v == nil {
  8536. v175v2 = nil
  8537. } else {
  8538. v175v2 = make(map[uintptr]int32, len(v))
  8539. } // reset map
  8540. testUnmarshalErr(reflect.ValueOf(v175v2), bs175, h, t, "dec-map-v175-noaddr") // decode into non-addressable map value
  8541. testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-noaddr")
  8542. if v == nil {
  8543. v175v2 = nil
  8544. } else {
  8545. v175v2 = make(map[uintptr]int32, len(v))
  8546. } // reset map
  8547. testUnmarshalErr(&v175v2, bs175, h, t, "dec-map-v175-p-len")
  8548. testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-p-len")
  8549. bs175 = testMarshalErr(&v175v1, h, t, "enc-map-v175-p")
  8550. v175v2 = nil
  8551. testUnmarshalErr(&v175v2, bs175, h, t, "dec-map-v175-p-nil")
  8552. testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-p-nil")
  8553. // ...
  8554. if v == nil {
  8555. v175v2 = nil
  8556. } else {
  8557. v175v2 = make(map[uintptr]int32, len(v))
  8558. } // reset map
  8559. var v175v3, v175v4 typMapMapUintptrInt32
  8560. v175v3 = typMapMapUintptrInt32(v175v1)
  8561. v175v4 = typMapMapUintptrInt32(v175v2)
  8562. bs175 = testMarshalErr(v175v3, h, t, "enc-map-v175-custom")
  8563. testUnmarshalErr(v175v4, bs175, h, t, "dec-map-v175-p-len")
  8564. testDeepEqualErr(v175v3, v175v4, t, "equal-map-v175-p-len")
  8565. }
  8566. for _, v := range []map[uintptr]int64{nil, {}, {33: 0, 44: 33}} {
  8567. // fmt.Printf(">>>> running mammoth map v176: %v\n", v)
  8568. var v176v1, v176v2 map[uintptr]int64
  8569. v176v1 = v
  8570. bs176 := testMarshalErr(v176v1, h, t, "enc-map-v176")
  8571. if v == nil {
  8572. v176v2 = nil
  8573. } else {
  8574. v176v2 = make(map[uintptr]int64, len(v))
  8575. } // reset map
  8576. testUnmarshalErr(v176v2, bs176, h, t, "dec-map-v176")
  8577. testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176")
  8578. if v == nil {
  8579. v176v2 = nil
  8580. } else {
  8581. v176v2 = make(map[uintptr]int64, len(v))
  8582. } // reset map
  8583. testUnmarshalErr(reflect.ValueOf(v176v2), bs176, h, t, "dec-map-v176-noaddr") // decode into non-addressable map value
  8584. testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-noaddr")
  8585. if v == nil {
  8586. v176v2 = nil
  8587. } else {
  8588. v176v2 = make(map[uintptr]int64, len(v))
  8589. } // reset map
  8590. testUnmarshalErr(&v176v2, bs176, h, t, "dec-map-v176-p-len")
  8591. testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-p-len")
  8592. bs176 = testMarshalErr(&v176v1, h, t, "enc-map-v176-p")
  8593. v176v2 = nil
  8594. testUnmarshalErr(&v176v2, bs176, h, t, "dec-map-v176-p-nil")
  8595. testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-p-nil")
  8596. // ...
  8597. if v == nil {
  8598. v176v2 = nil
  8599. } else {
  8600. v176v2 = make(map[uintptr]int64, len(v))
  8601. } // reset map
  8602. var v176v3, v176v4 typMapMapUintptrInt64
  8603. v176v3 = typMapMapUintptrInt64(v176v1)
  8604. v176v4 = typMapMapUintptrInt64(v176v2)
  8605. bs176 = testMarshalErr(v176v3, h, t, "enc-map-v176-custom")
  8606. testUnmarshalErr(v176v4, bs176, h, t, "dec-map-v176-p-len")
  8607. testDeepEqualErr(v176v3, v176v4, t, "equal-map-v176-p-len")
  8608. }
  8609. for _, v := range []map[uintptr]float32{nil, {}, {44: 0, 33: 22.2}} {
  8610. // fmt.Printf(">>>> running mammoth map v177: %v\n", v)
  8611. var v177v1, v177v2 map[uintptr]float32
  8612. v177v1 = v
  8613. bs177 := testMarshalErr(v177v1, h, t, "enc-map-v177")
  8614. if v == nil {
  8615. v177v2 = nil
  8616. } else {
  8617. v177v2 = make(map[uintptr]float32, len(v))
  8618. } // reset map
  8619. testUnmarshalErr(v177v2, bs177, h, t, "dec-map-v177")
  8620. testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177")
  8621. if v == nil {
  8622. v177v2 = nil
  8623. } else {
  8624. v177v2 = make(map[uintptr]float32, len(v))
  8625. } // reset map
  8626. testUnmarshalErr(reflect.ValueOf(v177v2), bs177, h, t, "dec-map-v177-noaddr") // decode into non-addressable map value
  8627. testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-noaddr")
  8628. if v == nil {
  8629. v177v2 = nil
  8630. } else {
  8631. v177v2 = make(map[uintptr]float32, len(v))
  8632. } // reset map
  8633. testUnmarshalErr(&v177v2, bs177, h, t, "dec-map-v177-p-len")
  8634. testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-p-len")
  8635. bs177 = testMarshalErr(&v177v1, h, t, "enc-map-v177-p")
  8636. v177v2 = nil
  8637. testUnmarshalErr(&v177v2, bs177, h, t, "dec-map-v177-p-nil")
  8638. testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-p-nil")
  8639. // ...
  8640. if v == nil {
  8641. v177v2 = nil
  8642. } else {
  8643. v177v2 = make(map[uintptr]float32, len(v))
  8644. } // reset map
  8645. var v177v3, v177v4 typMapMapUintptrFloat32
  8646. v177v3 = typMapMapUintptrFloat32(v177v1)
  8647. v177v4 = typMapMapUintptrFloat32(v177v2)
  8648. bs177 = testMarshalErr(v177v3, h, t, "enc-map-v177-custom")
  8649. testUnmarshalErr(v177v4, bs177, h, t, "dec-map-v177-p-len")
  8650. testDeepEqualErr(v177v3, v177v4, t, "equal-map-v177-p-len")
  8651. }
  8652. for _, v := range []map[uintptr]float64{nil, {}, {44: 0, 33: 11.1}} {
  8653. // fmt.Printf(">>>> running mammoth map v178: %v\n", v)
  8654. var v178v1, v178v2 map[uintptr]float64
  8655. v178v1 = v
  8656. bs178 := testMarshalErr(v178v1, h, t, "enc-map-v178")
  8657. if v == nil {
  8658. v178v2 = nil
  8659. } else {
  8660. v178v2 = make(map[uintptr]float64, len(v))
  8661. } // reset map
  8662. testUnmarshalErr(v178v2, bs178, h, t, "dec-map-v178")
  8663. testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178")
  8664. if v == nil {
  8665. v178v2 = nil
  8666. } else {
  8667. v178v2 = make(map[uintptr]float64, len(v))
  8668. } // reset map
  8669. testUnmarshalErr(reflect.ValueOf(v178v2), bs178, h, t, "dec-map-v178-noaddr") // decode into non-addressable map value
  8670. testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-noaddr")
  8671. if v == nil {
  8672. v178v2 = nil
  8673. } else {
  8674. v178v2 = make(map[uintptr]float64, len(v))
  8675. } // reset map
  8676. testUnmarshalErr(&v178v2, bs178, h, t, "dec-map-v178-p-len")
  8677. testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-p-len")
  8678. bs178 = testMarshalErr(&v178v1, h, t, "enc-map-v178-p")
  8679. v178v2 = nil
  8680. testUnmarshalErr(&v178v2, bs178, h, t, "dec-map-v178-p-nil")
  8681. testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-p-nil")
  8682. // ...
  8683. if v == nil {
  8684. v178v2 = nil
  8685. } else {
  8686. v178v2 = make(map[uintptr]float64, len(v))
  8687. } // reset map
  8688. var v178v3, v178v4 typMapMapUintptrFloat64
  8689. v178v3 = typMapMapUintptrFloat64(v178v1)
  8690. v178v4 = typMapMapUintptrFloat64(v178v2)
  8691. bs178 = testMarshalErr(v178v3, h, t, "enc-map-v178-custom")
  8692. testUnmarshalErr(v178v4, bs178, h, t, "dec-map-v178-p-len")
  8693. testDeepEqualErr(v178v3, v178v4, t, "equal-map-v178-p-len")
  8694. }
  8695. for _, v := range []map[uintptr]bool{nil, {}, {44: false, 33: true}} {
  8696. // fmt.Printf(">>>> running mammoth map v179: %v\n", v)
  8697. var v179v1, v179v2 map[uintptr]bool
  8698. v179v1 = v
  8699. bs179 := testMarshalErr(v179v1, h, t, "enc-map-v179")
  8700. if v == nil {
  8701. v179v2 = nil
  8702. } else {
  8703. v179v2 = make(map[uintptr]bool, len(v))
  8704. } // reset map
  8705. testUnmarshalErr(v179v2, bs179, h, t, "dec-map-v179")
  8706. testDeepEqualErr(v179v1, v179v2, t, "equal-map-v179")
  8707. if v == nil {
  8708. v179v2 = nil
  8709. } else {
  8710. v179v2 = make(map[uintptr]bool, len(v))
  8711. } // reset map
  8712. testUnmarshalErr(reflect.ValueOf(v179v2), bs179, h, t, "dec-map-v179-noaddr") // decode into non-addressable map value
  8713. testDeepEqualErr(v179v1, v179v2, t, "equal-map-v179-noaddr")
  8714. if v == nil {
  8715. v179v2 = nil
  8716. } else {
  8717. v179v2 = make(map[uintptr]bool, len(v))
  8718. } // reset map
  8719. testUnmarshalErr(&v179v2, bs179, h, t, "dec-map-v179-p-len")
  8720. testDeepEqualErr(v179v1, v179v2, t, "equal-map-v179-p-len")
  8721. bs179 = testMarshalErr(&v179v1, h, t, "enc-map-v179-p")
  8722. v179v2 = nil
  8723. testUnmarshalErr(&v179v2, bs179, h, t, "dec-map-v179-p-nil")
  8724. testDeepEqualErr(v179v1, v179v2, t, "equal-map-v179-p-nil")
  8725. // ...
  8726. if v == nil {
  8727. v179v2 = nil
  8728. } else {
  8729. v179v2 = make(map[uintptr]bool, len(v))
  8730. } // reset map
  8731. var v179v3, v179v4 typMapMapUintptrBool
  8732. v179v3 = typMapMapUintptrBool(v179v1)
  8733. v179v4 = typMapMapUintptrBool(v179v2)
  8734. bs179 = testMarshalErr(v179v3, h, t, "enc-map-v179-custom")
  8735. testUnmarshalErr(v179v4, bs179, h, t, "dec-map-v179-p-len")
  8736. testDeepEqualErr(v179v3, v179v4, t, "equal-map-v179-p-len")
  8737. }
  8738. for _, v := range []map[int]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  8739. // fmt.Printf(">>>> running mammoth map v182: %v\n", v)
  8740. var v182v1, v182v2 map[int]interface{}
  8741. v182v1 = v
  8742. bs182 := testMarshalErr(v182v1, h, t, "enc-map-v182")
  8743. if v == nil {
  8744. v182v2 = nil
  8745. } else {
  8746. v182v2 = make(map[int]interface{}, len(v))
  8747. } // reset map
  8748. testUnmarshalErr(v182v2, bs182, h, t, "dec-map-v182")
  8749. testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182")
  8750. if v == nil {
  8751. v182v2 = nil
  8752. } else {
  8753. v182v2 = make(map[int]interface{}, len(v))
  8754. } // reset map
  8755. testUnmarshalErr(reflect.ValueOf(v182v2), bs182, h, t, "dec-map-v182-noaddr") // decode into non-addressable map value
  8756. testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-noaddr")
  8757. if v == nil {
  8758. v182v2 = nil
  8759. } else {
  8760. v182v2 = make(map[int]interface{}, len(v))
  8761. } // reset map
  8762. testUnmarshalErr(&v182v2, bs182, h, t, "dec-map-v182-p-len")
  8763. testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-p-len")
  8764. bs182 = testMarshalErr(&v182v1, h, t, "enc-map-v182-p")
  8765. v182v2 = nil
  8766. testUnmarshalErr(&v182v2, bs182, h, t, "dec-map-v182-p-nil")
  8767. testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-p-nil")
  8768. // ...
  8769. if v == nil {
  8770. v182v2 = nil
  8771. } else {
  8772. v182v2 = make(map[int]interface{}, len(v))
  8773. } // reset map
  8774. var v182v3, v182v4 typMapMapIntIntf
  8775. v182v3 = typMapMapIntIntf(v182v1)
  8776. v182v4 = typMapMapIntIntf(v182v2)
  8777. bs182 = testMarshalErr(v182v3, h, t, "enc-map-v182-custom")
  8778. testUnmarshalErr(v182v4, bs182, h, t, "dec-map-v182-p-len")
  8779. testDeepEqualErr(v182v3, v182v4, t, "equal-map-v182-p-len")
  8780. }
  8781. for _, v := range []map[int]string{nil, {}, {44: "", 33: "some-string-2"}} {
  8782. // fmt.Printf(">>>> running mammoth map v183: %v\n", v)
  8783. var v183v1, v183v2 map[int]string
  8784. v183v1 = v
  8785. bs183 := testMarshalErr(v183v1, h, t, "enc-map-v183")
  8786. if v == nil {
  8787. v183v2 = nil
  8788. } else {
  8789. v183v2 = make(map[int]string, len(v))
  8790. } // reset map
  8791. testUnmarshalErr(v183v2, bs183, h, t, "dec-map-v183")
  8792. testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183")
  8793. if v == nil {
  8794. v183v2 = nil
  8795. } else {
  8796. v183v2 = make(map[int]string, len(v))
  8797. } // reset map
  8798. testUnmarshalErr(reflect.ValueOf(v183v2), bs183, h, t, "dec-map-v183-noaddr") // decode into non-addressable map value
  8799. testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-noaddr")
  8800. if v == nil {
  8801. v183v2 = nil
  8802. } else {
  8803. v183v2 = make(map[int]string, len(v))
  8804. } // reset map
  8805. testUnmarshalErr(&v183v2, bs183, h, t, "dec-map-v183-p-len")
  8806. testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-p-len")
  8807. bs183 = testMarshalErr(&v183v1, h, t, "enc-map-v183-p")
  8808. v183v2 = nil
  8809. testUnmarshalErr(&v183v2, bs183, h, t, "dec-map-v183-p-nil")
  8810. testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-p-nil")
  8811. // ...
  8812. if v == nil {
  8813. v183v2 = nil
  8814. } else {
  8815. v183v2 = make(map[int]string, len(v))
  8816. } // reset map
  8817. var v183v3, v183v4 typMapMapIntString
  8818. v183v3 = typMapMapIntString(v183v1)
  8819. v183v4 = typMapMapIntString(v183v2)
  8820. bs183 = testMarshalErr(v183v3, h, t, "enc-map-v183-custom")
  8821. testUnmarshalErr(v183v4, bs183, h, t, "dec-map-v183-p-len")
  8822. testDeepEqualErr(v183v3, v183v4, t, "equal-map-v183-p-len")
  8823. }
  8824. for _, v := range []map[int]uint{nil, {}, {44: 0, 33: 44}} {
  8825. // fmt.Printf(">>>> running mammoth map v184: %v\n", v)
  8826. var v184v1, v184v2 map[int]uint
  8827. v184v1 = v
  8828. bs184 := testMarshalErr(v184v1, h, t, "enc-map-v184")
  8829. if v == nil {
  8830. v184v2 = nil
  8831. } else {
  8832. v184v2 = make(map[int]uint, len(v))
  8833. } // reset map
  8834. testUnmarshalErr(v184v2, bs184, h, t, "dec-map-v184")
  8835. testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184")
  8836. if v == nil {
  8837. v184v2 = nil
  8838. } else {
  8839. v184v2 = make(map[int]uint, len(v))
  8840. } // reset map
  8841. testUnmarshalErr(reflect.ValueOf(v184v2), bs184, h, t, "dec-map-v184-noaddr") // decode into non-addressable map value
  8842. testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-noaddr")
  8843. if v == nil {
  8844. v184v2 = nil
  8845. } else {
  8846. v184v2 = make(map[int]uint, len(v))
  8847. } // reset map
  8848. testUnmarshalErr(&v184v2, bs184, h, t, "dec-map-v184-p-len")
  8849. testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-p-len")
  8850. bs184 = testMarshalErr(&v184v1, h, t, "enc-map-v184-p")
  8851. v184v2 = nil
  8852. testUnmarshalErr(&v184v2, bs184, h, t, "dec-map-v184-p-nil")
  8853. testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-p-nil")
  8854. // ...
  8855. if v == nil {
  8856. v184v2 = nil
  8857. } else {
  8858. v184v2 = make(map[int]uint, len(v))
  8859. } // reset map
  8860. var v184v3, v184v4 typMapMapIntUint
  8861. v184v3 = typMapMapIntUint(v184v1)
  8862. v184v4 = typMapMapIntUint(v184v2)
  8863. bs184 = testMarshalErr(v184v3, h, t, "enc-map-v184-custom")
  8864. testUnmarshalErr(v184v4, bs184, h, t, "dec-map-v184-p-len")
  8865. testDeepEqualErr(v184v3, v184v4, t, "equal-map-v184-p-len")
  8866. }
  8867. for _, v := range []map[int]uint8{nil, {}, {33: 0, 44: 33}} {
  8868. // fmt.Printf(">>>> running mammoth map v185: %v\n", v)
  8869. var v185v1, v185v2 map[int]uint8
  8870. v185v1 = v
  8871. bs185 := testMarshalErr(v185v1, h, t, "enc-map-v185")
  8872. if v == nil {
  8873. v185v2 = nil
  8874. } else {
  8875. v185v2 = make(map[int]uint8, len(v))
  8876. } // reset map
  8877. testUnmarshalErr(v185v2, bs185, h, t, "dec-map-v185")
  8878. testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185")
  8879. if v == nil {
  8880. v185v2 = nil
  8881. } else {
  8882. v185v2 = make(map[int]uint8, len(v))
  8883. } // reset map
  8884. testUnmarshalErr(reflect.ValueOf(v185v2), bs185, h, t, "dec-map-v185-noaddr") // decode into non-addressable map value
  8885. testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-noaddr")
  8886. if v == nil {
  8887. v185v2 = nil
  8888. } else {
  8889. v185v2 = make(map[int]uint8, len(v))
  8890. } // reset map
  8891. testUnmarshalErr(&v185v2, bs185, h, t, "dec-map-v185-p-len")
  8892. testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-p-len")
  8893. bs185 = testMarshalErr(&v185v1, h, t, "enc-map-v185-p")
  8894. v185v2 = nil
  8895. testUnmarshalErr(&v185v2, bs185, h, t, "dec-map-v185-p-nil")
  8896. testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-p-nil")
  8897. // ...
  8898. if v == nil {
  8899. v185v2 = nil
  8900. } else {
  8901. v185v2 = make(map[int]uint8, len(v))
  8902. } // reset map
  8903. var v185v3, v185v4 typMapMapIntUint8
  8904. v185v3 = typMapMapIntUint8(v185v1)
  8905. v185v4 = typMapMapIntUint8(v185v2)
  8906. bs185 = testMarshalErr(v185v3, h, t, "enc-map-v185-custom")
  8907. testUnmarshalErr(v185v4, bs185, h, t, "dec-map-v185-p-len")
  8908. testDeepEqualErr(v185v3, v185v4, t, "equal-map-v185-p-len")
  8909. }
  8910. for _, v := range []map[int]uint16{nil, {}, {44: 0, 33: 44}} {
  8911. // fmt.Printf(">>>> running mammoth map v186: %v\n", v)
  8912. var v186v1, v186v2 map[int]uint16
  8913. v186v1 = v
  8914. bs186 := testMarshalErr(v186v1, h, t, "enc-map-v186")
  8915. if v == nil {
  8916. v186v2 = nil
  8917. } else {
  8918. v186v2 = make(map[int]uint16, len(v))
  8919. } // reset map
  8920. testUnmarshalErr(v186v2, bs186, h, t, "dec-map-v186")
  8921. testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186")
  8922. if v == nil {
  8923. v186v2 = nil
  8924. } else {
  8925. v186v2 = make(map[int]uint16, len(v))
  8926. } // reset map
  8927. testUnmarshalErr(reflect.ValueOf(v186v2), bs186, h, t, "dec-map-v186-noaddr") // decode into non-addressable map value
  8928. testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-noaddr")
  8929. if v == nil {
  8930. v186v2 = nil
  8931. } else {
  8932. v186v2 = make(map[int]uint16, len(v))
  8933. } // reset map
  8934. testUnmarshalErr(&v186v2, bs186, h, t, "dec-map-v186-p-len")
  8935. testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-p-len")
  8936. bs186 = testMarshalErr(&v186v1, h, t, "enc-map-v186-p")
  8937. v186v2 = nil
  8938. testUnmarshalErr(&v186v2, bs186, h, t, "dec-map-v186-p-nil")
  8939. testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-p-nil")
  8940. // ...
  8941. if v == nil {
  8942. v186v2 = nil
  8943. } else {
  8944. v186v2 = make(map[int]uint16, len(v))
  8945. } // reset map
  8946. var v186v3, v186v4 typMapMapIntUint16
  8947. v186v3 = typMapMapIntUint16(v186v1)
  8948. v186v4 = typMapMapIntUint16(v186v2)
  8949. bs186 = testMarshalErr(v186v3, h, t, "enc-map-v186-custom")
  8950. testUnmarshalErr(v186v4, bs186, h, t, "dec-map-v186-p-len")
  8951. testDeepEqualErr(v186v3, v186v4, t, "equal-map-v186-p-len")
  8952. }
  8953. for _, v := range []map[int]uint32{nil, {}, {33: 0, 44: 33}} {
  8954. // fmt.Printf(">>>> running mammoth map v187: %v\n", v)
  8955. var v187v1, v187v2 map[int]uint32
  8956. v187v1 = v
  8957. bs187 := testMarshalErr(v187v1, h, t, "enc-map-v187")
  8958. if v == nil {
  8959. v187v2 = nil
  8960. } else {
  8961. v187v2 = make(map[int]uint32, len(v))
  8962. } // reset map
  8963. testUnmarshalErr(v187v2, bs187, h, t, "dec-map-v187")
  8964. testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187")
  8965. if v == nil {
  8966. v187v2 = nil
  8967. } else {
  8968. v187v2 = make(map[int]uint32, len(v))
  8969. } // reset map
  8970. testUnmarshalErr(reflect.ValueOf(v187v2), bs187, h, t, "dec-map-v187-noaddr") // decode into non-addressable map value
  8971. testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-noaddr")
  8972. if v == nil {
  8973. v187v2 = nil
  8974. } else {
  8975. v187v2 = make(map[int]uint32, len(v))
  8976. } // reset map
  8977. testUnmarshalErr(&v187v2, bs187, h, t, "dec-map-v187-p-len")
  8978. testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-p-len")
  8979. bs187 = testMarshalErr(&v187v1, h, t, "enc-map-v187-p")
  8980. v187v2 = nil
  8981. testUnmarshalErr(&v187v2, bs187, h, t, "dec-map-v187-p-nil")
  8982. testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-p-nil")
  8983. // ...
  8984. if v == nil {
  8985. v187v2 = nil
  8986. } else {
  8987. v187v2 = make(map[int]uint32, len(v))
  8988. } // reset map
  8989. var v187v3, v187v4 typMapMapIntUint32
  8990. v187v3 = typMapMapIntUint32(v187v1)
  8991. v187v4 = typMapMapIntUint32(v187v2)
  8992. bs187 = testMarshalErr(v187v3, h, t, "enc-map-v187-custom")
  8993. testUnmarshalErr(v187v4, bs187, h, t, "dec-map-v187-p-len")
  8994. testDeepEqualErr(v187v3, v187v4, t, "equal-map-v187-p-len")
  8995. }
  8996. for _, v := range []map[int]uint64{nil, {}, {44: 0, 33: 44}} {
  8997. // fmt.Printf(">>>> running mammoth map v188: %v\n", v)
  8998. var v188v1, v188v2 map[int]uint64
  8999. v188v1 = v
  9000. bs188 := testMarshalErr(v188v1, h, t, "enc-map-v188")
  9001. if v == nil {
  9002. v188v2 = nil
  9003. } else {
  9004. v188v2 = make(map[int]uint64, len(v))
  9005. } // reset map
  9006. testUnmarshalErr(v188v2, bs188, h, t, "dec-map-v188")
  9007. testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188")
  9008. if v == nil {
  9009. v188v2 = nil
  9010. } else {
  9011. v188v2 = make(map[int]uint64, len(v))
  9012. } // reset map
  9013. testUnmarshalErr(reflect.ValueOf(v188v2), bs188, h, t, "dec-map-v188-noaddr") // decode into non-addressable map value
  9014. testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-noaddr")
  9015. if v == nil {
  9016. v188v2 = nil
  9017. } else {
  9018. v188v2 = make(map[int]uint64, len(v))
  9019. } // reset map
  9020. testUnmarshalErr(&v188v2, bs188, h, t, "dec-map-v188-p-len")
  9021. testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-p-len")
  9022. bs188 = testMarshalErr(&v188v1, h, t, "enc-map-v188-p")
  9023. v188v2 = nil
  9024. testUnmarshalErr(&v188v2, bs188, h, t, "dec-map-v188-p-nil")
  9025. testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-p-nil")
  9026. // ...
  9027. if v == nil {
  9028. v188v2 = nil
  9029. } else {
  9030. v188v2 = make(map[int]uint64, len(v))
  9031. } // reset map
  9032. var v188v3, v188v4 typMapMapIntUint64
  9033. v188v3 = typMapMapIntUint64(v188v1)
  9034. v188v4 = typMapMapIntUint64(v188v2)
  9035. bs188 = testMarshalErr(v188v3, h, t, "enc-map-v188-custom")
  9036. testUnmarshalErr(v188v4, bs188, h, t, "dec-map-v188-p-len")
  9037. testDeepEqualErr(v188v3, v188v4, t, "equal-map-v188-p-len")
  9038. }
  9039. for _, v := range []map[int]uintptr{nil, {}, {33: 0, 44: 33}} {
  9040. // fmt.Printf(">>>> running mammoth map v189: %v\n", v)
  9041. var v189v1, v189v2 map[int]uintptr
  9042. v189v1 = v
  9043. bs189 := testMarshalErr(v189v1, h, t, "enc-map-v189")
  9044. if v == nil {
  9045. v189v2 = nil
  9046. } else {
  9047. v189v2 = make(map[int]uintptr, len(v))
  9048. } // reset map
  9049. testUnmarshalErr(v189v2, bs189, h, t, "dec-map-v189")
  9050. testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189")
  9051. if v == nil {
  9052. v189v2 = nil
  9053. } else {
  9054. v189v2 = make(map[int]uintptr, len(v))
  9055. } // reset map
  9056. testUnmarshalErr(reflect.ValueOf(v189v2), bs189, h, t, "dec-map-v189-noaddr") // decode into non-addressable map value
  9057. testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-noaddr")
  9058. if v == nil {
  9059. v189v2 = nil
  9060. } else {
  9061. v189v2 = make(map[int]uintptr, len(v))
  9062. } // reset map
  9063. testUnmarshalErr(&v189v2, bs189, h, t, "dec-map-v189-p-len")
  9064. testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-p-len")
  9065. bs189 = testMarshalErr(&v189v1, h, t, "enc-map-v189-p")
  9066. v189v2 = nil
  9067. testUnmarshalErr(&v189v2, bs189, h, t, "dec-map-v189-p-nil")
  9068. testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-p-nil")
  9069. // ...
  9070. if v == nil {
  9071. v189v2 = nil
  9072. } else {
  9073. v189v2 = make(map[int]uintptr, len(v))
  9074. } // reset map
  9075. var v189v3, v189v4 typMapMapIntUintptr
  9076. v189v3 = typMapMapIntUintptr(v189v1)
  9077. v189v4 = typMapMapIntUintptr(v189v2)
  9078. bs189 = testMarshalErr(v189v3, h, t, "enc-map-v189-custom")
  9079. testUnmarshalErr(v189v4, bs189, h, t, "dec-map-v189-p-len")
  9080. testDeepEqualErr(v189v3, v189v4, t, "equal-map-v189-p-len")
  9081. }
  9082. for _, v := range []map[int]int{nil, {}, {44: 0, 33: 44}} {
  9083. // fmt.Printf(">>>> running mammoth map v190: %v\n", v)
  9084. var v190v1, v190v2 map[int]int
  9085. v190v1 = v
  9086. bs190 := testMarshalErr(v190v1, h, t, "enc-map-v190")
  9087. if v == nil {
  9088. v190v2 = nil
  9089. } else {
  9090. v190v2 = make(map[int]int, len(v))
  9091. } // reset map
  9092. testUnmarshalErr(v190v2, bs190, h, t, "dec-map-v190")
  9093. testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190")
  9094. if v == nil {
  9095. v190v2 = nil
  9096. } else {
  9097. v190v2 = make(map[int]int, len(v))
  9098. } // reset map
  9099. testUnmarshalErr(reflect.ValueOf(v190v2), bs190, h, t, "dec-map-v190-noaddr") // decode into non-addressable map value
  9100. testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-noaddr")
  9101. if v == nil {
  9102. v190v2 = nil
  9103. } else {
  9104. v190v2 = make(map[int]int, len(v))
  9105. } // reset map
  9106. testUnmarshalErr(&v190v2, bs190, h, t, "dec-map-v190-p-len")
  9107. testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-p-len")
  9108. bs190 = testMarshalErr(&v190v1, h, t, "enc-map-v190-p")
  9109. v190v2 = nil
  9110. testUnmarshalErr(&v190v2, bs190, h, t, "dec-map-v190-p-nil")
  9111. testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-p-nil")
  9112. // ...
  9113. if v == nil {
  9114. v190v2 = nil
  9115. } else {
  9116. v190v2 = make(map[int]int, len(v))
  9117. } // reset map
  9118. var v190v3, v190v4 typMapMapIntInt
  9119. v190v3 = typMapMapIntInt(v190v1)
  9120. v190v4 = typMapMapIntInt(v190v2)
  9121. bs190 = testMarshalErr(v190v3, h, t, "enc-map-v190-custom")
  9122. testUnmarshalErr(v190v4, bs190, h, t, "dec-map-v190-p-len")
  9123. testDeepEqualErr(v190v3, v190v4, t, "equal-map-v190-p-len")
  9124. }
  9125. for _, v := range []map[int]int8{nil, {}, {33: 0, 44: 33}} {
  9126. // fmt.Printf(">>>> running mammoth map v191: %v\n", v)
  9127. var v191v1, v191v2 map[int]int8
  9128. v191v1 = v
  9129. bs191 := testMarshalErr(v191v1, h, t, "enc-map-v191")
  9130. if v == nil {
  9131. v191v2 = nil
  9132. } else {
  9133. v191v2 = make(map[int]int8, len(v))
  9134. } // reset map
  9135. testUnmarshalErr(v191v2, bs191, h, t, "dec-map-v191")
  9136. testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191")
  9137. if v == nil {
  9138. v191v2 = nil
  9139. } else {
  9140. v191v2 = make(map[int]int8, len(v))
  9141. } // reset map
  9142. testUnmarshalErr(reflect.ValueOf(v191v2), bs191, h, t, "dec-map-v191-noaddr") // decode into non-addressable map value
  9143. testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-noaddr")
  9144. if v == nil {
  9145. v191v2 = nil
  9146. } else {
  9147. v191v2 = make(map[int]int8, len(v))
  9148. } // reset map
  9149. testUnmarshalErr(&v191v2, bs191, h, t, "dec-map-v191-p-len")
  9150. testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-p-len")
  9151. bs191 = testMarshalErr(&v191v1, h, t, "enc-map-v191-p")
  9152. v191v2 = nil
  9153. testUnmarshalErr(&v191v2, bs191, h, t, "dec-map-v191-p-nil")
  9154. testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-p-nil")
  9155. // ...
  9156. if v == nil {
  9157. v191v2 = nil
  9158. } else {
  9159. v191v2 = make(map[int]int8, len(v))
  9160. } // reset map
  9161. var v191v3, v191v4 typMapMapIntInt8
  9162. v191v3 = typMapMapIntInt8(v191v1)
  9163. v191v4 = typMapMapIntInt8(v191v2)
  9164. bs191 = testMarshalErr(v191v3, h, t, "enc-map-v191-custom")
  9165. testUnmarshalErr(v191v4, bs191, h, t, "dec-map-v191-p-len")
  9166. testDeepEqualErr(v191v3, v191v4, t, "equal-map-v191-p-len")
  9167. }
  9168. for _, v := range []map[int]int16{nil, {}, {44: 0, 33: 44}} {
  9169. // fmt.Printf(">>>> running mammoth map v192: %v\n", v)
  9170. var v192v1, v192v2 map[int]int16
  9171. v192v1 = v
  9172. bs192 := testMarshalErr(v192v1, h, t, "enc-map-v192")
  9173. if v == nil {
  9174. v192v2 = nil
  9175. } else {
  9176. v192v2 = make(map[int]int16, len(v))
  9177. } // reset map
  9178. testUnmarshalErr(v192v2, bs192, h, t, "dec-map-v192")
  9179. testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192")
  9180. if v == nil {
  9181. v192v2 = nil
  9182. } else {
  9183. v192v2 = make(map[int]int16, len(v))
  9184. } // reset map
  9185. testUnmarshalErr(reflect.ValueOf(v192v2), bs192, h, t, "dec-map-v192-noaddr") // decode into non-addressable map value
  9186. testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-noaddr")
  9187. if v == nil {
  9188. v192v2 = nil
  9189. } else {
  9190. v192v2 = make(map[int]int16, len(v))
  9191. } // reset map
  9192. testUnmarshalErr(&v192v2, bs192, h, t, "dec-map-v192-p-len")
  9193. testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-p-len")
  9194. bs192 = testMarshalErr(&v192v1, h, t, "enc-map-v192-p")
  9195. v192v2 = nil
  9196. testUnmarshalErr(&v192v2, bs192, h, t, "dec-map-v192-p-nil")
  9197. testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-p-nil")
  9198. // ...
  9199. if v == nil {
  9200. v192v2 = nil
  9201. } else {
  9202. v192v2 = make(map[int]int16, len(v))
  9203. } // reset map
  9204. var v192v3, v192v4 typMapMapIntInt16
  9205. v192v3 = typMapMapIntInt16(v192v1)
  9206. v192v4 = typMapMapIntInt16(v192v2)
  9207. bs192 = testMarshalErr(v192v3, h, t, "enc-map-v192-custom")
  9208. testUnmarshalErr(v192v4, bs192, h, t, "dec-map-v192-p-len")
  9209. testDeepEqualErr(v192v3, v192v4, t, "equal-map-v192-p-len")
  9210. }
  9211. for _, v := range []map[int]int32{nil, {}, {33: 0, 44: 33}} {
  9212. // fmt.Printf(">>>> running mammoth map v193: %v\n", v)
  9213. var v193v1, v193v2 map[int]int32
  9214. v193v1 = v
  9215. bs193 := testMarshalErr(v193v1, h, t, "enc-map-v193")
  9216. if v == nil {
  9217. v193v2 = nil
  9218. } else {
  9219. v193v2 = make(map[int]int32, len(v))
  9220. } // reset map
  9221. testUnmarshalErr(v193v2, bs193, h, t, "dec-map-v193")
  9222. testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193")
  9223. if v == nil {
  9224. v193v2 = nil
  9225. } else {
  9226. v193v2 = make(map[int]int32, len(v))
  9227. } // reset map
  9228. testUnmarshalErr(reflect.ValueOf(v193v2), bs193, h, t, "dec-map-v193-noaddr") // decode into non-addressable map value
  9229. testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-noaddr")
  9230. if v == nil {
  9231. v193v2 = nil
  9232. } else {
  9233. v193v2 = make(map[int]int32, len(v))
  9234. } // reset map
  9235. testUnmarshalErr(&v193v2, bs193, h, t, "dec-map-v193-p-len")
  9236. testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-p-len")
  9237. bs193 = testMarshalErr(&v193v1, h, t, "enc-map-v193-p")
  9238. v193v2 = nil
  9239. testUnmarshalErr(&v193v2, bs193, h, t, "dec-map-v193-p-nil")
  9240. testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-p-nil")
  9241. // ...
  9242. if v == nil {
  9243. v193v2 = nil
  9244. } else {
  9245. v193v2 = make(map[int]int32, len(v))
  9246. } // reset map
  9247. var v193v3, v193v4 typMapMapIntInt32
  9248. v193v3 = typMapMapIntInt32(v193v1)
  9249. v193v4 = typMapMapIntInt32(v193v2)
  9250. bs193 = testMarshalErr(v193v3, h, t, "enc-map-v193-custom")
  9251. testUnmarshalErr(v193v4, bs193, h, t, "dec-map-v193-p-len")
  9252. testDeepEqualErr(v193v3, v193v4, t, "equal-map-v193-p-len")
  9253. }
  9254. for _, v := range []map[int]int64{nil, {}, {44: 0, 33: 44}} {
  9255. // fmt.Printf(">>>> running mammoth map v194: %v\n", v)
  9256. var v194v1, v194v2 map[int]int64
  9257. v194v1 = v
  9258. bs194 := testMarshalErr(v194v1, h, t, "enc-map-v194")
  9259. if v == nil {
  9260. v194v2 = nil
  9261. } else {
  9262. v194v2 = make(map[int]int64, len(v))
  9263. } // reset map
  9264. testUnmarshalErr(v194v2, bs194, h, t, "dec-map-v194")
  9265. testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194")
  9266. if v == nil {
  9267. v194v2 = nil
  9268. } else {
  9269. v194v2 = make(map[int]int64, len(v))
  9270. } // reset map
  9271. testUnmarshalErr(reflect.ValueOf(v194v2), bs194, h, t, "dec-map-v194-noaddr") // decode into non-addressable map value
  9272. testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-noaddr")
  9273. if v == nil {
  9274. v194v2 = nil
  9275. } else {
  9276. v194v2 = make(map[int]int64, len(v))
  9277. } // reset map
  9278. testUnmarshalErr(&v194v2, bs194, h, t, "dec-map-v194-p-len")
  9279. testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-p-len")
  9280. bs194 = testMarshalErr(&v194v1, h, t, "enc-map-v194-p")
  9281. v194v2 = nil
  9282. testUnmarshalErr(&v194v2, bs194, h, t, "dec-map-v194-p-nil")
  9283. testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-p-nil")
  9284. // ...
  9285. if v == nil {
  9286. v194v2 = nil
  9287. } else {
  9288. v194v2 = make(map[int]int64, len(v))
  9289. } // reset map
  9290. var v194v3, v194v4 typMapMapIntInt64
  9291. v194v3 = typMapMapIntInt64(v194v1)
  9292. v194v4 = typMapMapIntInt64(v194v2)
  9293. bs194 = testMarshalErr(v194v3, h, t, "enc-map-v194-custom")
  9294. testUnmarshalErr(v194v4, bs194, h, t, "dec-map-v194-p-len")
  9295. testDeepEqualErr(v194v3, v194v4, t, "equal-map-v194-p-len")
  9296. }
  9297. for _, v := range []map[int]float32{nil, {}, {33: 0, 44: 22.2}} {
  9298. // fmt.Printf(">>>> running mammoth map v195: %v\n", v)
  9299. var v195v1, v195v2 map[int]float32
  9300. v195v1 = v
  9301. bs195 := testMarshalErr(v195v1, h, t, "enc-map-v195")
  9302. if v == nil {
  9303. v195v2 = nil
  9304. } else {
  9305. v195v2 = make(map[int]float32, len(v))
  9306. } // reset map
  9307. testUnmarshalErr(v195v2, bs195, h, t, "dec-map-v195")
  9308. testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195")
  9309. if v == nil {
  9310. v195v2 = nil
  9311. } else {
  9312. v195v2 = make(map[int]float32, len(v))
  9313. } // reset map
  9314. testUnmarshalErr(reflect.ValueOf(v195v2), bs195, h, t, "dec-map-v195-noaddr") // decode into non-addressable map value
  9315. testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-noaddr")
  9316. if v == nil {
  9317. v195v2 = nil
  9318. } else {
  9319. v195v2 = make(map[int]float32, len(v))
  9320. } // reset map
  9321. testUnmarshalErr(&v195v2, bs195, h, t, "dec-map-v195-p-len")
  9322. testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-p-len")
  9323. bs195 = testMarshalErr(&v195v1, h, t, "enc-map-v195-p")
  9324. v195v2 = nil
  9325. testUnmarshalErr(&v195v2, bs195, h, t, "dec-map-v195-p-nil")
  9326. testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-p-nil")
  9327. // ...
  9328. if v == nil {
  9329. v195v2 = nil
  9330. } else {
  9331. v195v2 = make(map[int]float32, len(v))
  9332. } // reset map
  9333. var v195v3, v195v4 typMapMapIntFloat32
  9334. v195v3 = typMapMapIntFloat32(v195v1)
  9335. v195v4 = typMapMapIntFloat32(v195v2)
  9336. bs195 = testMarshalErr(v195v3, h, t, "enc-map-v195-custom")
  9337. testUnmarshalErr(v195v4, bs195, h, t, "dec-map-v195-p-len")
  9338. testDeepEqualErr(v195v3, v195v4, t, "equal-map-v195-p-len")
  9339. }
  9340. for _, v := range []map[int]float64{nil, {}, {33: 0, 44: 11.1}} {
  9341. // fmt.Printf(">>>> running mammoth map v196: %v\n", v)
  9342. var v196v1, v196v2 map[int]float64
  9343. v196v1 = v
  9344. bs196 := testMarshalErr(v196v1, h, t, "enc-map-v196")
  9345. if v == nil {
  9346. v196v2 = nil
  9347. } else {
  9348. v196v2 = make(map[int]float64, len(v))
  9349. } // reset map
  9350. testUnmarshalErr(v196v2, bs196, h, t, "dec-map-v196")
  9351. testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196")
  9352. if v == nil {
  9353. v196v2 = nil
  9354. } else {
  9355. v196v2 = make(map[int]float64, len(v))
  9356. } // reset map
  9357. testUnmarshalErr(reflect.ValueOf(v196v2), bs196, h, t, "dec-map-v196-noaddr") // decode into non-addressable map value
  9358. testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-noaddr")
  9359. if v == nil {
  9360. v196v2 = nil
  9361. } else {
  9362. v196v2 = make(map[int]float64, len(v))
  9363. } // reset map
  9364. testUnmarshalErr(&v196v2, bs196, h, t, "dec-map-v196-p-len")
  9365. testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-p-len")
  9366. bs196 = testMarshalErr(&v196v1, h, t, "enc-map-v196-p")
  9367. v196v2 = nil
  9368. testUnmarshalErr(&v196v2, bs196, h, t, "dec-map-v196-p-nil")
  9369. testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-p-nil")
  9370. // ...
  9371. if v == nil {
  9372. v196v2 = nil
  9373. } else {
  9374. v196v2 = make(map[int]float64, len(v))
  9375. } // reset map
  9376. var v196v3, v196v4 typMapMapIntFloat64
  9377. v196v3 = typMapMapIntFloat64(v196v1)
  9378. v196v4 = typMapMapIntFloat64(v196v2)
  9379. bs196 = testMarshalErr(v196v3, h, t, "enc-map-v196-custom")
  9380. testUnmarshalErr(v196v4, bs196, h, t, "dec-map-v196-p-len")
  9381. testDeepEqualErr(v196v3, v196v4, t, "equal-map-v196-p-len")
  9382. }
  9383. for _, v := range []map[int]bool{nil, {}, {33: false, 44: true}} {
  9384. // fmt.Printf(">>>> running mammoth map v197: %v\n", v)
  9385. var v197v1, v197v2 map[int]bool
  9386. v197v1 = v
  9387. bs197 := testMarshalErr(v197v1, h, t, "enc-map-v197")
  9388. if v == nil {
  9389. v197v2 = nil
  9390. } else {
  9391. v197v2 = make(map[int]bool, len(v))
  9392. } // reset map
  9393. testUnmarshalErr(v197v2, bs197, h, t, "dec-map-v197")
  9394. testDeepEqualErr(v197v1, v197v2, t, "equal-map-v197")
  9395. if v == nil {
  9396. v197v2 = nil
  9397. } else {
  9398. v197v2 = make(map[int]bool, len(v))
  9399. } // reset map
  9400. testUnmarshalErr(reflect.ValueOf(v197v2), bs197, h, t, "dec-map-v197-noaddr") // decode into non-addressable map value
  9401. testDeepEqualErr(v197v1, v197v2, t, "equal-map-v197-noaddr")
  9402. if v == nil {
  9403. v197v2 = nil
  9404. } else {
  9405. v197v2 = make(map[int]bool, len(v))
  9406. } // reset map
  9407. testUnmarshalErr(&v197v2, bs197, h, t, "dec-map-v197-p-len")
  9408. testDeepEqualErr(v197v1, v197v2, t, "equal-map-v197-p-len")
  9409. bs197 = testMarshalErr(&v197v1, h, t, "enc-map-v197-p")
  9410. v197v2 = nil
  9411. testUnmarshalErr(&v197v2, bs197, h, t, "dec-map-v197-p-nil")
  9412. testDeepEqualErr(v197v1, v197v2, t, "equal-map-v197-p-nil")
  9413. // ...
  9414. if v == nil {
  9415. v197v2 = nil
  9416. } else {
  9417. v197v2 = make(map[int]bool, len(v))
  9418. } // reset map
  9419. var v197v3, v197v4 typMapMapIntBool
  9420. v197v3 = typMapMapIntBool(v197v1)
  9421. v197v4 = typMapMapIntBool(v197v2)
  9422. bs197 = testMarshalErr(v197v3, h, t, "enc-map-v197-custom")
  9423. testUnmarshalErr(v197v4, bs197, h, t, "dec-map-v197-p-len")
  9424. testDeepEqualErr(v197v3, v197v4, t, "equal-map-v197-p-len")
  9425. }
  9426. for _, v := range []map[int8]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  9427. // fmt.Printf(">>>> running mammoth map v200: %v\n", v)
  9428. var v200v1, v200v2 map[int8]interface{}
  9429. v200v1 = v
  9430. bs200 := testMarshalErr(v200v1, h, t, "enc-map-v200")
  9431. if v == nil {
  9432. v200v2 = nil
  9433. } else {
  9434. v200v2 = make(map[int8]interface{}, len(v))
  9435. } // reset map
  9436. testUnmarshalErr(v200v2, bs200, h, t, "dec-map-v200")
  9437. testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200")
  9438. if v == nil {
  9439. v200v2 = nil
  9440. } else {
  9441. v200v2 = make(map[int8]interface{}, len(v))
  9442. } // reset map
  9443. testUnmarshalErr(reflect.ValueOf(v200v2), bs200, h, t, "dec-map-v200-noaddr") // decode into non-addressable map value
  9444. testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-noaddr")
  9445. if v == nil {
  9446. v200v2 = nil
  9447. } else {
  9448. v200v2 = make(map[int8]interface{}, len(v))
  9449. } // reset map
  9450. testUnmarshalErr(&v200v2, bs200, h, t, "dec-map-v200-p-len")
  9451. testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-p-len")
  9452. bs200 = testMarshalErr(&v200v1, h, t, "enc-map-v200-p")
  9453. v200v2 = nil
  9454. testUnmarshalErr(&v200v2, bs200, h, t, "dec-map-v200-p-nil")
  9455. testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-p-nil")
  9456. // ...
  9457. if v == nil {
  9458. v200v2 = nil
  9459. } else {
  9460. v200v2 = make(map[int8]interface{}, len(v))
  9461. } // reset map
  9462. var v200v3, v200v4 typMapMapInt8Intf
  9463. v200v3 = typMapMapInt8Intf(v200v1)
  9464. v200v4 = typMapMapInt8Intf(v200v2)
  9465. bs200 = testMarshalErr(v200v3, h, t, "enc-map-v200-custom")
  9466. testUnmarshalErr(v200v4, bs200, h, t, "dec-map-v200-p-len")
  9467. testDeepEqualErr(v200v3, v200v4, t, "equal-map-v200-p-len")
  9468. }
  9469. for _, v := range []map[int8]string{nil, {}, {33: "", 44: "some-string"}} {
  9470. // fmt.Printf(">>>> running mammoth map v201: %v\n", v)
  9471. var v201v1, v201v2 map[int8]string
  9472. v201v1 = v
  9473. bs201 := testMarshalErr(v201v1, h, t, "enc-map-v201")
  9474. if v == nil {
  9475. v201v2 = nil
  9476. } else {
  9477. v201v2 = make(map[int8]string, len(v))
  9478. } // reset map
  9479. testUnmarshalErr(v201v2, bs201, h, t, "dec-map-v201")
  9480. testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201")
  9481. if v == nil {
  9482. v201v2 = nil
  9483. } else {
  9484. v201v2 = make(map[int8]string, len(v))
  9485. } // reset map
  9486. testUnmarshalErr(reflect.ValueOf(v201v2), bs201, h, t, "dec-map-v201-noaddr") // decode into non-addressable map value
  9487. testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-noaddr")
  9488. if v == nil {
  9489. v201v2 = nil
  9490. } else {
  9491. v201v2 = make(map[int8]string, len(v))
  9492. } // reset map
  9493. testUnmarshalErr(&v201v2, bs201, h, t, "dec-map-v201-p-len")
  9494. testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-p-len")
  9495. bs201 = testMarshalErr(&v201v1, h, t, "enc-map-v201-p")
  9496. v201v2 = nil
  9497. testUnmarshalErr(&v201v2, bs201, h, t, "dec-map-v201-p-nil")
  9498. testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-p-nil")
  9499. // ...
  9500. if v == nil {
  9501. v201v2 = nil
  9502. } else {
  9503. v201v2 = make(map[int8]string, len(v))
  9504. } // reset map
  9505. var v201v3, v201v4 typMapMapInt8String
  9506. v201v3 = typMapMapInt8String(v201v1)
  9507. v201v4 = typMapMapInt8String(v201v2)
  9508. bs201 = testMarshalErr(v201v3, h, t, "enc-map-v201-custom")
  9509. testUnmarshalErr(v201v4, bs201, h, t, "dec-map-v201-p-len")
  9510. testDeepEqualErr(v201v3, v201v4, t, "equal-map-v201-p-len")
  9511. }
  9512. for _, v := range []map[int8]uint{nil, {}, {33: 0, 44: 33}} {
  9513. // fmt.Printf(">>>> running mammoth map v202: %v\n", v)
  9514. var v202v1, v202v2 map[int8]uint
  9515. v202v1 = v
  9516. bs202 := testMarshalErr(v202v1, h, t, "enc-map-v202")
  9517. if v == nil {
  9518. v202v2 = nil
  9519. } else {
  9520. v202v2 = make(map[int8]uint, len(v))
  9521. } // reset map
  9522. testUnmarshalErr(v202v2, bs202, h, t, "dec-map-v202")
  9523. testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202")
  9524. if v == nil {
  9525. v202v2 = nil
  9526. } else {
  9527. v202v2 = make(map[int8]uint, len(v))
  9528. } // reset map
  9529. testUnmarshalErr(reflect.ValueOf(v202v2), bs202, h, t, "dec-map-v202-noaddr") // decode into non-addressable map value
  9530. testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-noaddr")
  9531. if v == nil {
  9532. v202v2 = nil
  9533. } else {
  9534. v202v2 = make(map[int8]uint, len(v))
  9535. } // reset map
  9536. testUnmarshalErr(&v202v2, bs202, h, t, "dec-map-v202-p-len")
  9537. testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-p-len")
  9538. bs202 = testMarshalErr(&v202v1, h, t, "enc-map-v202-p")
  9539. v202v2 = nil
  9540. testUnmarshalErr(&v202v2, bs202, h, t, "dec-map-v202-p-nil")
  9541. testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-p-nil")
  9542. // ...
  9543. if v == nil {
  9544. v202v2 = nil
  9545. } else {
  9546. v202v2 = make(map[int8]uint, len(v))
  9547. } // reset map
  9548. var v202v3, v202v4 typMapMapInt8Uint
  9549. v202v3 = typMapMapInt8Uint(v202v1)
  9550. v202v4 = typMapMapInt8Uint(v202v2)
  9551. bs202 = testMarshalErr(v202v3, h, t, "enc-map-v202-custom")
  9552. testUnmarshalErr(v202v4, bs202, h, t, "dec-map-v202-p-len")
  9553. testDeepEqualErr(v202v3, v202v4, t, "equal-map-v202-p-len")
  9554. }
  9555. for _, v := range []map[int8]uint8{nil, {}, {44: 0, 33: 44}} {
  9556. // fmt.Printf(">>>> running mammoth map v203: %v\n", v)
  9557. var v203v1, v203v2 map[int8]uint8
  9558. v203v1 = v
  9559. bs203 := testMarshalErr(v203v1, h, t, "enc-map-v203")
  9560. if v == nil {
  9561. v203v2 = nil
  9562. } else {
  9563. v203v2 = make(map[int8]uint8, len(v))
  9564. } // reset map
  9565. testUnmarshalErr(v203v2, bs203, h, t, "dec-map-v203")
  9566. testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203")
  9567. if v == nil {
  9568. v203v2 = nil
  9569. } else {
  9570. v203v2 = make(map[int8]uint8, len(v))
  9571. } // reset map
  9572. testUnmarshalErr(reflect.ValueOf(v203v2), bs203, h, t, "dec-map-v203-noaddr") // decode into non-addressable map value
  9573. testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-noaddr")
  9574. if v == nil {
  9575. v203v2 = nil
  9576. } else {
  9577. v203v2 = make(map[int8]uint8, len(v))
  9578. } // reset map
  9579. testUnmarshalErr(&v203v2, bs203, h, t, "dec-map-v203-p-len")
  9580. testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-p-len")
  9581. bs203 = testMarshalErr(&v203v1, h, t, "enc-map-v203-p")
  9582. v203v2 = nil
  9583. testUnmarshalErr(&v203v2, bs203, h, t, "dec-map-v203-p-nil")
  9584. testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-p-nil")
  9585. // ...
  9586. if v == nil {
  9587. v203v2 = nil
  9588. } else {
  9589. v203v2 = make(map[int8]uint8, len(v))
  9590. } // reset map
  9591. var v203v3, v203v4 typMapMapInt8Uint8
  9592. v203v3 = typMapMapInt8Uint8(v203v1)
  9593. v203v4 = typMapMapInt8Uint8(v203v2)
  9594. bs203 = testMarshalErr(v203v3, h, t, "enc-map-v203-custom")
  9595. testUnmarshalErr(v203v4, bs203, h, t, "dec-map-v203-p-len")
  9596. testDeepEqualErr(v203v3, v203v4, t, "equal-map-v203-p-len")
  9597. }
  9598. for _, v := range []map[int8]uint16{nil, {}, {33: 0, 44: 33}} {
  9599. // fmt.Printf(">>>> running mammoth map v204: %v\n", v)
  9600. var v204v1, v204v2 map[int8]uint16
  9601. v204v1 = v
  9602. bs204 := testMarshalErr(v204v1, h, t, "enc-map-v204")
  9603. if v == nil {
  9604. v204v2 = nil
  9605. } else {
  9606. v204v2 = make(map[int8]uint16, len(v))
  9607. } // reset map
  9608. testUnmarshalErr(v204v2, bs204, h, t, "dec-map-v204")
  9609. testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204")
  9610. if v == nil {
  9611. v204v2 = nil
  9612. } else {
  9613. v204v2 = make(map[int8]uint16, len(v))
  9614. } // reset map
  9615. testUnmarshalErr(reflect.ValueOf(v204v2), bs204, h, t, "dec-map-v204-noaddr") // decode into non-addressable map value
  9616. testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-noaddr")
  9617. if v == nil {
  9618. v204v2 = nil
  9619. } else {
  9620. v204v2 = make(map[int8]uint16, len(v))
  9621. } // reset map
  9622. testUnmarshalErr(&v204v2, bs204, h, t, "dec-map-v204-p-len")
  9623. testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-p-len")
  9624. bs204 = testMarshalErr(&v204v1, h, t, "enc-map-v204-p")
  9625. v204v2 = nil
  9626. testUnmarshalErr(&v204v2, bs204, h, t, "dec-map-v204-p-nil")
  9627. testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-p-nil")
  9628. // ...
  9629. if v == nil {
  9630. v204v2 = nil
  9631. } else {
  9632. v204v2 = make(map[int8]uint16, len(v))
  9633. } // reset map
  9634. var v204v3, v204v4 typMapMapInt8Uint16
  9635. v204v3 = typMapMapInt8Uint16(v204v1)
  9636. v204v4 = typMapMapInt8Uint16(v204v2)
  9637. bs204 = testMarshalErr(v204v3, h, t, "enc-map-v204-custom")
  9638. testUnmarshalErr(v204v4, bs204, h, t, "dec-map-v204-p-len")
  9639. testDeepEqualErr(v204v3, v204v4, t, "equal-map-v204-p-len")
  9640. }
  9641. for _, v := range []map[int8]uint32{nil, {}, {44: 0, 33: 44}} {
  9642. // fmt.Printf(">>>> running mammoth map v205: %v\n", v)
  9643. var v205v1, v205v2 map[int8]uint32
  9644. v205v1 = v
  9645. bs205 := testMarshalErr(v205v1, h, t, "enc-map-v205")
  9646. if v == nil {
  9647. v205v2 = nil
  9648. } else {
  9649. v205v2 = make(map[int8]uint32, len(v))
  9650. } // reset map
  9651. testUnmarshalErr(v205v2, bs205, h, t, "dec-map-v205")
  9652. testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205")
  9653. if v == nil {
  9654. v205v2 = nil
  9655. } else {
  9656. v205v2 = make(map[int8]uint32, len(v))
  9657. } // reset map
  9658. testUnmarshalErr(reflect.ValueOf(v205v2), bs205, h, t, "dec-map-v205-noaddr") // decode into non-addressable map value
  9659. testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-noaddr")
  9660. if v == nil {
  9661. v205v2 = nil
  9662. } else {
  9663. v205v2 = make(map[int8]uint32, len(v))
  9664. } // reset map
  9665. testUnmarshalErr(&v205v2, bs205, h, t, "dec-map-v205-p-len")
  9666. testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-p-len")
  9667. bs205 = testMarshalErr(&v205v1, h, t, "enc-map-v205-p")
  9668. v205v2 = nil
  9669. testUnmarshalErr(&v205v2, bs205, h, t, "dec-map-v205-p-nil")
  9670. testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-p-nil")
  9671. // ...
  9672. if v == nil {
  9673. v205v2 = nil
  9674. } else {
  9675. v205v2 = make(map[int8]uint32, len(v))
  9676. } // reset map
  9677. var v205v3, v205v4 typMapMapInt8Uint32
  9678. v205v3 = typMapMapInt8Uint32(v205v1)
  9679. v205v4 = typMapMapInt8Uint32(v205v2)
  9680. bs205 = testMarshalErr(v205v3, h, t, "enc-map-v205-custom")
  9681. testUnmarshalErr(v205v4, bs205, h, t, "dec-map-v205-p-len")
  9682. testDeepEqualErr(v205v3, v205v4, t, "equal-map-v205-p-len")
  9683. }
  9684. for _, v := range []map[int8]uint64{nil, {}, {33: 0, 44: 33}} {
  9685. // fmt.Printf(">>>> running mammoth map v206: %v\n", v)
  9686. var v206v1, v206v2 map[int8]uint64
  9687. v206v1 = v
  9688. bs206 := testMarshalErr(v206v1, h, t, "enc-map-v206")
  9689. if v == nil {
  9690. v206v2 = nil
  9691. } else {
  9692. v206v2 = make(map[int8]uint64, len(v))
  9693. } // reset map
  9694. testUnmarshalErr(v206v2, bs206, h, t, "dec-map-v206")
  9695. testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206")
  9696. if v == nil {
  9697. v206v2 = nil
  9698. } else {
  9699. v206v2 = make(map[int8]uint64, len(v))
  9700. } // reset map
  9701. testUnmarshalErr(reflect.ValueOf(v206v2), bs206, h, t, "dec-map-v206-noaddr") // decode into non-addressable map value
  9702. testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-noaddr")
  9703. if v == nil {
  9704. v206v2 = nil
  9705. } else {
  9706. v206v2 = make(map[int8]uint64, len(v))
  9707. } // reset map
  9708. testUnmarshalErr(&v206v2, bs206, h, t, "dec-map-v206-p-len")
  9709. testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-p-len")
  9710. bs206 = testMarshalErr(&v206v1, h, t, "enc-map-v206-p")
  9711. v206v2 = nil
  9712. testUnmarshalErr(&v206v2, bs206, h, t, "dec-map-v206-p-nil")
  9713. testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-p-nil")
  9714. // ...
  9715. if v == nil {
  9716. v206v2 = nil
  9717. } else {
  9718. v206v2 = make(map[int8]uint64, len(v))
  9719. } // reset map
  9720. var v206v3, v206v4 typMapMapInt8Uint64
  9721. v206v3 = typMapMapInt8Uint64(v206v1)
  9722. v206v4 = typMapMapInt8Uint64(v206v2)
  9723. bs206 = testMarshalErr(v206v3, h, t, "enc-map-v206-custom")
  9724. testUnmarshalErr(v206v4, bs206, h, t, "dec-map-v206-p-len")
  9725. testDeepEqualErr(v206v3, v206v4, t, "equal-map-v206-p-len")
  9726. }
  9727. for _, v := range []map[int8]uintptr{nil, {}, {44: 0, 33: 44}} {
  9728. // fmt.Printf(">>>> running mammoth map v207: %v\n", v)
  9729. var v207v1, v207v2 map[int8]uintptr
  9730. v207v1 = v
  9731. bs207 := testMarshalErr(v207v1, h, t, "enc-map-v207")
  9732. if v == nil {
  9733. v207v2 = nil
  9734. } else {
  9735. v207v2 = make(map[int8]uintptr, len(v))
  9736. } // reset map
  9737. testUnmarshalErr(v207v2, bs207, h, t, "dec-map-v207")
  9738. testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207")
  9739. if v == nil {
  9740. v207v2 = nil
  9741. } else {
  9742. v207v2 = make(map[int8]uintptr, len(v))
  9743. } // reset map
  9744. testUnmarshalErr(reflect.ValueOf(v207v2), bs207, h, t, "dec-map-v207-noaddr") // decode into non-addressable map value
  9745. testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-noaddr")
  9746. if v == nil {
  9747. v207v2 = nil
  9748. } else {
  9749. v207v2 = make(map[int8]uintptr, len(v))
  9750. } // reset map
  9751. testUnmarshalErr(&v207v2, bs207, h, t, "dec-map-v207-p-len")
  9752. testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-p-len")
  9753. bs207 = testMarshalErr(&v207v1, h, t, "enc-map-v207-p")
  9754. v207v2 = nil
  9755. testUnmarshalErr(&v207v2, bs207, h, t, "dec-map-v207-p-nil")
  9756. testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-p-nil")
  9757. // ...
  9758. if v == nil {
  9759. v207v2 = nil
  9760. } else {
  9761. v207v2 = make(map[int8]uintptr, len(v))
  9762. } // reset map
  9763. var v207v3, v207v4 typMapMapInt8Uintptr
  9764. v207v3 = typMapMapInt8Uintptr(v207v1)
  9765. v207v4 = typMapMapInt8Uintptr(v207v2)
  9766. bs207 = testMarshalErr(v207v3, h, t, "enc-map-v207-custom")
  9767. testUnmarshalErr(v207v4, bs207, h, t, "dec-map-v207-p-len")
  9768. testDeepEqualErr(v207v3, v207v4, t, "equal-map-v207-p-len")
  9769. }
  9770. for _, v := range []map[int8]int{nil, {}, {33: 0, 44: 33}} {
  9771. // fmt.Printf(">>>> running mammoth map v208: %v\n", v)
  9772. var v208v1, v208v2 map[int8]int
  9773. v208v1 = v
  9774. bs208 := testMarshalErr(v208v1, h, t, "enc-map-v208")
  9775. if v == nil {
  9776. v208v2 = nil
  9777. } else {
  9778. v208v2 = make(map[int8]int, len(v))
  9779. } // reset map
  9780. testUnmarshalErr(v208v2, bs208, h, t, "dec-map-v208")
  9781. testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208")
  9782. if v == nil {
  9783. v208v2 = nil
  9784. } else {
  9785. v208v2 = make(map[int8]int, len(v))
  9786. } // reset map
  9787. testUnmarshalErr(reflect.ValueOf(v208v2), bs208, h, t, "dec-map-v208-noaddr") // decode into non-addressable map value
  9788. testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-noaddr")
  9789. if v == nil {
  9790. v208v2 = nil
  9791. } else {
  9792. v208v2 = make(map[int8]int, len(v))
  9793. } // reset map
  9794. testUnmarshalErr(&v208v2, bs208, h, t, "dec-map-v208-p-len")
  9795. testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-p-len")
  9796. bs208 = testMarshalErr(&v208v1, h, t, "enc-map-v208-p")
  9797. v208v2 = nil
  9798. testUnmarshalErr(&v208v2, bs208, h, t, "dec-map-v208-p-nil")
  9799. testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-p-nil")
  9800. // ...
  9801. if v == nil {
  9802. v208v2 = nil
  9803. } else {
  9804. v208v2 = make(map[int8]int, len(v))
  9805. } // reset map
  9806. var v208v3, v208v4 typMapMapInt8Int
  9807. v208v3 = typMapMapInt8Int(v208v1)
  9808. v208v4 = typMapMapInt8Int(v208v2)
  9809. bs208 = testMarshalErr(v208v3, h, t, "enc-map-v208-custom")
  9810. testUnmarshalErr(v208v4, bs208, h, t, "dec-map-v208-p-len")
  9811. testDeepEqualErr(v208v3, v208v4, t, "equal-map-v208-p-len")
  9812. }
  9813. for _, v := range []map[int8]int8{nil, {}, {44: 0, 33: 44}} {
  9814. // fmt.Printf(">>>> running mammoth map v209: %v\n", v)
  9815. var v209v1, v209v2 map[int8]int8
  9816. v209v1 = v
  9817. bs209 := testMarshalErr(v209v1, h, t, "enc-map-v209")
  9818. if v == nil {
  9819. v209v2 = nil
  9820. } else {
  9821. v209v2 = make(map[int8]int8, len(v))
  9822. } // reset map
  9823. testUnmarshalErr(v209v2, bs209, h, t, "dec-map-v209")
  9824. testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209")
  9825. if v == nil {
  9826. v209v2 = nil
  9827. } else {
  9828. v209v2 = make(map[int8]int8, len(v))
  9829. } // reset map
  9830. testUnmarshalErr(reflect.ValueOf(v209v2), bs209, h, t, "dec-map-v209-noaddr") // decode into non-addressable map value
  9831. testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-noaddr")
  9832. if v == nil {
  9833. v209v2 = nil
  9834. } else {
  9835. v209v2 = make(map[int8]int8, len(v))
  9836. } // reset map
  9837. testUnmarshalErr(&v209v2, bs209, h, t, "dec-map-v209-p-len")
  9838. testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-p-len")
  9839. bs209 = testMarshalErr(&v209v1, h, t, "enc-map-v209-p")
  9840. v209v2 = nil
  9841. testUnmarshalErr(&v209v2, bs209, h, t, "dec-map-v209-p-nil")
  9842. testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-p-nil")
  9843. // ...
  9844. if v == nil {
  9845. v209v2 = nil
  9846. } else {
  9847. v209v2 = make(map[int8]int8, len(v))
  9848. } // reset map
  9849. var v209v3, v209v4 typMapMapInt8Int8
  9850. v209v3 = typMapMapInt8Int8(v209v1)
  9851. v209v4 = typMapMapInt8Int8(v209v2)
  9852. bs209 = testMarshalErr(v209v3, h, t, "enc-map-v209-custom")
  9853. testUnmarshalErr(v209v4, bs209, h, t, "dec-map-v209-p-len")
  9854. testDeepEqualErr(v209v3, v209v4, t, "equal-map-v209-p-len")
  9855. }
  9856. for _, v := range []map[int8]int16{nil, {}, {33: 0, 44: 33}} {
  9857. // fmt.Printf(">>>> running mammoth map v210: %v\n", v)
  9858. var v210v1, v210v2 map[int8]int16
  9859. v210v1 = v
  9860. bs210 := testMarshalErr(v210v1, h, t, "enc-map-v210")
  9861. if v == nil {
  9862. v210v2 = nil
  9863. } else {
  9864. v210v2 = make(map[int8]int16, len(v))
  9865. } // reset map
  9866. testUnmarshalErr(v210v2, bs210, h, t, "dec-map-v210")
  9867. testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210")
  9868. if v == nil {
  9869. v210v2 = nil
  9870. } else {
  9871. v210v2 = make(map[int8]int16, len(v))
  9872. } // reset map
  9873. testUnmarshalErr(reflect.ValueOf(v210v2), bs210, h, t, "dec-map-v210-noaddr") // decode into non-addressable map value
  9874. testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-noaddr")
  9875. if v == nil {
  9876. v210v2 = nil
  9877. } else {
  9878. v210v2 = make(map[int8]int16, len(v))
  9879. } // reset map
  9880. testUnmarshalErr(&v210v2, bs210, h, t, "dec-map-v210-p-len")
  9881. testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-p-len")
  9882. bs210 = testMarshalErr(&v210v1, h, t, "enc-map-v210-p")
  9883. v210v2 = nil
  9884. testUnmarshalErr(&v210v2, bs210, h, t, "dec-map-v210-p-nil")
  9885. testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-p-nil")
  9886. // ...
  9887. if v == nil {
  9888. v210v2 = nil
  9889. } else {
  9890. v210v2 = make(map[int8]int16, len(v))
  9891. } // reset map
  9892. var v210v3, v210v4 typMapMapInt8Int16
  9893. v210v3 = typMapMapInt8Int16(v210v1)
  9894. v210v4 = typMapMapInt8Int16(v210v2)
  9895. bs210 = testMarshalErr(v210v3, h, t, "enc-map-v210-custom")
  9896. testUnmarshalErr(v210v4, bs210, h, t, "dec-map-v210-p-len")
  9897. testDeepEqualErr(v210v3, v210v4, t, "equal-map-v210-p-len")
  9898. }
  9899. for _, v := range []map[int8]int32{nil, {}, {44: 0, 33: 44}} {
  9900. // fmt.Printf(">>>> running mammoth map v211: %v\n", v)
  9901. var v211v1, v211v2 map[int8]int32
  9902. v211v1 = v
  9903. bs211 := testMarshalErr(v211v1, h, t, "enc-map-v211")
  9904. if v == nil {
  9905. v211v2 = nil
  9906. } else {
  9907. v211v2 = make(map[int8]int32, len(v))
  9908. } // reset map
  9909. testUnmarshalErr(v211v2, bs211, h, t, "dec-map-v211")
  9910. testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211")
  9911. if v == nil {
  9912. v211v2 = nil
  9913. } else {
  9914. v211v2 = make(map[int8]int32, len(v))
  9915. } // reset map
  9916. testUnmarshalErr(reflect.ValueOf(v211v2), bs211, h, t, "dec-map-v211-noaddr") // decode into non-addressable map value
  9917. testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-noaddr")
  9918. if v == nil {
  9919. v211v2 = nil
  9920. } else {
  9921. v211v2 = make(map[int8]int32, len(v))
  9922. } // reset map
  9923. testUnmarshalErr(&v211v2, bs211, h, t, "dec-map-v211-p-len")
  9924. testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-p-len")
  9925. bs211 = testMarshalErr(&v211v1, h, t, "enc-map-v211-p")
  9926. v211v2 = nil
  9927. testUnmarshalErr(&v211v2, bs211, h, t, "dec-map-v211-p-nil")
  9928. testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-p-nil")
  9929. // ...
  9930. if v == nil {
  9931. v211v2 = nil
  9932. } else {
  9933. v211v2 = make(map[int8]int32, len(v))
  9934. } // reset map
  9935. var v211v3, v211v4 typMapMapInt8Int32
  9936. v211v3 = typMapMapInt8Int32(v211v1)
  9937. v211v4 = typMapMapInt8Int32(v211v2)
  9938. bs211 = testMarshalErr(v211v3, h, t, "enc-map-v211-custom")
  9939. testUnmarshalErr(v211v4, bs211, h, t, "dec-map-v211-p-len")
  9940. testDeepEqualErr(v211v3, v211v4, t, "equal-map-v211-p-len")
  9941. }
  9942. for _, v := range []map[int8]int64{nil, {}, {33: 0, 44: 33}} {
  9943. // fmt.Printf(">>>> running mammoth map v212: %v\n", v)
  9944. var v212v1, v212v2 map[int8]int64
  9945. v212v1 = v
  9946. bs212 := testMarshalErr(v212v1, h, t, "enc-map-v212")
  9947. if v == nil {
  9948. v212v2 = nil
  9949. } else {
  9950. v212v2 = make(map[int8]int64, len(v))
  9951. } // reset map
  9952. testUnmarshalErr(v212v2, bs212, h, t, "dec-map-v212")
  9953. testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212")
  9954. if v == nil {
  9955. v212v2 = nil
  9956. } else {
  9957. v212v2 = make(map[int8]int64, len(v))
  9958. } // reset map
  9959. testUnmarshalErr(reflect.ValueOf(v212v2), bs212, h, t, "dec-map-v212-noaddr") // decode into non-addressable map value
  9960. testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-noaddr")
  9961. if v == nil {
  9962. v212v2 = nil
  9963. } else {
  9964. v212v2 = make(map[int8]int64, len(v))
  9965. } // reset map
  9966. testUnmarshalErr(&v212v2, bs212, h, t, "dec-map-v212-p-len")
  9967. testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-p-len")
  9968. bs212 = testMarshalErr(&v212v1, h, t, "enc-map-v212-p")
  9969. v212v2 = nil
  9970. testUnmarshalErr(&v212v2, bs212, h, t, "dec-map-v212-p-nil")
  9971. testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-p-nil")
  9972. // ...
  9973. if v == nil {
  9974. v212v2 = nil
  9975. } else {
  9976. v212v2 = make(map[int8]int64, len(v))
  9977. } // reset map
  9978. var v212v3, v212v4 typMapMapInt8Int64
  9979. v212v3 = typMapMapInt8Int64(v212v1)
  9980. v212v4 = typMapMapInt8Int64(v212v2)
  9981. bs212 = testMarshalErr(v212v3, h, t, "enc-map-v212-custom")
  9982. testUnmarshalErr(v212v4, bs212, h, t, "dec-map-v212-p-len")
  9983. testDeepEqualErr(v212v3, v212v4, t, "equal-map-v212-p-len")
  9984. }
  9985. for _, v := range []map[int8]float32{nil, {}, {44: 0, 33: 22.2}} {
  9986. // fmt.Printf(">>>> running mammoth map v213: %v\n", v)
  9987. var v213v1, v213v2 map[int8]float32
  9988. v213v1 = v
  9989. bs213 := testMarshalErr(v213v1, h, t, "enc-map-v213")
  9990. if v == nil {
  9991. v213v2 = nil
  9992. } else {
  9993. v213v2 = make(map[int8]float32, len(v))
  9994. } // reset map
  9995. testUnmarshalErr(v213v2, bs213, h, t, "dec-map-v213")
  9996. testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213")
  9997. if v == nil {
  9998. v213v2 = nil
  9999. } else {
  10000. v213v2 = make(map[int8]float32, len(v))
  10001. } // reset map
  10002. testUnmarshalErr(reflect.ValueOf(v213v2), bs213, h, t, "dec-map-v213-noaddr") // decode into non-addressable map value
  10003. testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-noaddr")
  10004. if v == nil {
  10005. v213v2 = nil
  10006. } else {
  10007. v213v2 = make(map[int8]float32, len(v))
  10008. } // reset map
  10009. testUnmarshalErr(&v213v2, bs213, h, t, "dec-map-v213-p-len")
  10010. testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-p-len")
  10011. bs213 = testMarshalErr(&v213v1, h, t, "enc-map-v213-p")
  10012. v213v2 = nil
  10013. testUnmarshalErr(&v213v2, bs213, h, t, "dec-map-v213-p-nil")
  10014. testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-p-nil")
  10015. // ...
  10016. if v == nil {
  10017. v213v2 = nil
  10018. } else {
  10019. v213v2 = make(map[int8]float32, len(v))
  10020. } // reset map
  10021. var v213v3, v213v4 typMapMapInt8Float32
  10022. v213v3 = typMapMapInt8Float32(v213v1)
  10023. v213v4 = typMapMapInt8Float32(v213v2)
  10024. bs213 = testMarshalErr(v213v3, h, t, "enc-map-v213-custom")
  10025. testUnmarshalErr(v213v4, bs213, h, t, "dec-map-v213-p-len")
  10026. testDeepEqualErr(v213v3, v213v4, t, "equal-map-v213-p-len")
  10027. }
  10028. for _, v := range []map[int8]float64{nil, {}, {44: 0, 33: 11.1}} {
  10029. // fmt.Printf(">>>> running mammoth map v214: %v\n", v)
  10030. var v214v1, v214v2 map[int8]float64
  10031. v214v1 = v
  10032. bs214 := testMarshalErr(v214v1, h, t, "enc-map-v214")
  10033. if v == nil {
  10034. v214v2 = nil
  10035. } else {
  10036. v214v2 = make(map[int8]float64, len(v))
  10037. } // reset map
  10038. testUnmarshalErr(v214v2, bs214, h, t, "dec-map-v214")
  10039. testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214")
  10040. if v == nil {
  10041. v214v2 = nil
  10042. } else {
  10043. v214v2 = make(map[int8]float64, len(v))
  10044. } // reset map
  10045. testUnmarshalErr(reflect.ValueOf(v214v2), bs214, h, t, "dec-map-v214-noaddr") // decode into non-addressable map value
  10046. testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-noaddr")
  10047. if v == nil {
  10048. v214v2 = nil
  10049. } else {
  10050. v214v2 = make(map[int8]float64, len(v))
  10051. } // reset map
  10052. testUnmarshalErr(&v214v2, bs214, h, t, "dec-map-v214-p-len")
  10053. testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-p-len")
  10054. bs214 = testMarshalErr(&v214v1, h, t, "enc-map-v214-p")
  10055. v214v2 = nil
  10056. testUnmarshalErr(&v214v2, bs214, h, t, "dec-map-v214-p-nil")
  10057. testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-p-nil")
  10058. // ...
  10059. if v == nil {
  10060. v214v2 = nil
  10061. } else {
  10062. v214v2 = make(map[int8]float64, len(v))
  10063. } // reset map
  10064. var v214v3, v214v4 typMapMapInt8Float64
  10065. v214v3 = typMapMapInt8Float64(v214v1)
  10066. v214v4 = typMapMapInt8Float64(v214v2)
  10067. bs214 = testMarshalErr(v214v3, h, t, "enc-map-v214-custom")
  10068. testUnmarshalErr(v214v4, bs214, h, t, "dec-map-v214-p-len")
  10069. testDeepEqualErr(v214v3, v214v4, t, "equal-map-v214-p-len")
  10070. }
  10071. for _, v := range []map[int8]bool{nil, {}, {44: false, 33: true}} {
  10072. // fmt.Printf(">>>> running mammoth map v215: %v\n", v)
  10073. var v215v1, v215v2 map[int8]bool
  10074. v215v1 = v
  10075. bs215 := testMarshalErr(v215v1, h, t, "enc-map-v215")
  10076. if v == nil {
  10077. v215v2 = nil
  10078. } else {
  10079. v215v2 = make(map[int8]bool, len(v))
  10080. } // reset map
  10081. testUnmarshalErr(v215v2, bs215, h, t, "dec-map-v215")
  10082. testDeepEqualErr(v215v1, v215v2, t, "equal-map-v215")
  10083. if v == nil {
  10084. v215v2 = nil
  10085. } else {
  10086. v215v2 = make(map[int8]bool, len(v))
  10087. } // reset map
  10088. testUnmarshalErr(reflect.ValueOf(v215v2), bs215, h, t, "dec-map-v215-noaddr") // decode into non-addressable map value
  10089. testDeepEqualErr(v215v1, v215v2, t, "equal-map-v215-noaddr")
  10090. if v == nil {
  10091. v215v2 = nil
  10092. } else {
  10093. v215v2 = make(map[int8]bool, len(v))
  10094. } // reset map
  10095. testUnmarshalErr(&v215v2, bs215, h, t, "dec-map-v215-p-len")
  10096. testDeepEqualErr(v215v1, v215v2, t, "equal-map-v215-p-len")
  10097. bs215 = testMarshalErr(&v215v1, h, t, "enc-map-v215-p")
  10098. v215v2 = nil
  10099. testUnmarshalErr(&v215v2, bs215, h, t, "dec-map-v215-p-nil")
  10100. testDeepEqualErr(v215v1, v215v2, t, "equal-map-v215-p-nil")
  10101. // ...
  10102. if v == nil {
  10103. v215v2 = nil
  10104. } else {
  10105. v215v2 = make(map[int8]bool, len(v))
  10106. } // reset map
  10107. var v215v3, v215v4 typMapMapInt8Bool
  10108. v215v3 = typMapMapInt8Bool(v215v1)
  10109. v215v4 = typMapMapInt8Bool(v215v2)
  10110. bs215 = testMarshalErr(v215v3, h, t, "enc-map-v215-custom")
  10111. testUnmarshalErr(v215v4, bs215, h, t, "dec-map-v215-p-len")
  10112. testDeepEqualErr(v215v3, v215v4, t, "equal-map-v215-p-len")
  10113. }
  10114. for _, v := range []map[int16]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  10115. // fmt.Printf(">>>> running mammoth map v218: %v\n", v)
  10116. var v218v1, v218v2 map[int16]interface{}
  10117. v218v1 = v
  10118. bs218 := testMarshalErr(v218v1, h, t, "enc-map-v218")
  10119. if v == nil {
  10120. v218v2 = nil
  10121. } else {
  10122. v218v2 = make(map[int16]interface{}, len(v))
  10123. } // reset map
  10124. testUnmarshalErr(v218v2, bs218, h, t, "dec-map-v218")
  10125. testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218")
  10126. if v == nil {
  10127. v218v2 = nil
  10128. } else {
  10129. v218v2 = make(map[int16]interface{}, len(v))
  10130. } // reset map
  10131. testUnmarshalErr(reflect.ValueOf(v218v2), bs218, h, t, "dec-map-v218-noaddr") // decode into non-addressable map value
  10132. testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-noaddr")
  10133. if v == nil {
  10134. v218v2 = nil
  10135. } else {
  10136. v218v2 = make(map[int16]interface{}, len(v))
  10137. } // reset map
  10138. testUnmarshalErr(&v218v2, bs218, h, t, "dec-map-v218-p-len")
  10139. testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-p-len")
  10140. bs218 = testMarshalErr(&v218v1, h, t, "enc-map-v218-p")
  10141. v218v2 = nil
  10142. testUnmarshalErr(&v218v2, bs218, h, t, "dec-map-v218-p-nil")
  10143. testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-p-nil")
  10144. // ...
  10145. if v == nil {
  10146. v218v2 = nil
  10147. } else {
  10148. v218v2 = make(map[int16]interface{}, len(v))
  10149. } // reset map
  10150. var v218v3, v218v4 typMapMapInt16Intf
  10151. v218v3 = typMapMapInt16Intf(v218v1)
  10152. v218v4 = typMapMapInt16Intf(v218v2)
  10153. bs218 = testMarshalErr(v218v3, h, t, "enc-map-v218-custom")
  10154. testUnmarshalErr(v218v4, bs218, h, t, "dec-map-v218-p-len")
  10155. testDeepEqualErr(v218v3, v218v4, t, "equal-map-v218-p-len")
  10156. }
  10157. for _, v := range []map[int16]string{nil, {}, {44: "", 33: "some-string-2"}} {
  10158. // fmt.Printf(">>>> running mammoth map v219: %v\n", v)
  10159. var v219v1, v219v2 map[int16]string
  10160. v219v1 = v
  10161. bs219 := testMarshalErr(v219v1, h, t, "enc-map-v219")
  10162. if v == nil {
  10163. v219v2 = nil
  10164. } else {
  10165. v219v2 = make(map[int16]string, len(v))
  10166. } // reset map
  10167. testUnmarshalErr(v219v2, bs219, h, t, "dec-map-v219")
  10168. testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219")
  10169. if v == nil {
  10170. v219v2 = nil
  10171. } else {
  10172. v219v2 = make(map[int16]string, len(v))
  10173. } // reset map
  10174. testUnmarshalErr(reflect.ValueOf(v219v2), bs219, h, t, "dec-map-v219-noaddr") // decode into non-addressable map value
  10175. testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-noaddr")
  10176. if v == nil {
  10177. v219v2 = nil
  10178. } else {
  10179. v219v2 = make(map[int16]string, len(v))
  10180. } // reset map
  10181. testUnmarshalErr(&v219v2, bs219, h, t, "dec-map-v219-p-len")
  10182. testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-p-len")
  10183. bs219 = testMarshalErr(&v219v1, h, t, "enc-map-v219-p")
  10184. v219v2 = nil
  10185. testUnmarshalErr(&v219v2, bs219, h, t, "dec-map-v219-p-nil")
  10186. testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-p-nil")
  10187. // ...
  10188. if v == nil {
  10189. v219v2 = nil
  10190. } else {
  10191. v219v2 = make(map[int16]string, len(v))
  10192. } // reset map
  10193. var v219v3, v219v4 typMapMapInt16String
  10194. v219v3 = typMapMapInt16String(v219v1)
  10195. v219v4 = typMapMapInt16String(v219v2)
  10196. bs219 = testMarshalErr(v219v3, h, t, "enc-map-v219-custom")
  10197. testUnmarshalErr(v219v4, bs219, h, t, "dec-map-v219-p-len")
  10198. testDeepEqualErr(v219v3, v219v4, t, "equal-map-v219-p-len")
  10199. }
  10200. for _, v := range []map[int16]uint{nil, {}, {44: 0, 33: 44}} {
  10201. // fmt.Printf(">>>> running mammoth map v220: %v\n", v)
  10202. var v220v1, v220v2 map[int16]uint
  10203. v220v1 = v
  10204. bs220 := testMarshalErr(v220v1, h, t, "enc-map-v220")
  10205. if v == nil {
  10206. v220v2 = nil
  10207. } else {
  10208. v220v2 = make(map[int16]uint, len(v))
  10209. } // reset map
  10210. testUnmarshalErr(v220v2, bs220, h, t, "dec-map-v220")
  10211. testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220")
  10212. if v == nil {
  10213. v220v2 = nil
  10214. } else {
  10215. v220v2 = make(map[int16]uint, len(v))
  10216. } // reset map
  10217. testUnmarshalErr(reflect.ValueOf(v220v2), bs220, h, t, "dec-map-v220-noaddr") // decode into non-addressable map value
  10218. testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-noaddr")
  10219. if v == nil {
  10220. v220v2 = nil
  10221. } else {
  10222. v220v2 = make(map[int16]uint, len(v))
  10223. } // reset map
  10224. testUnmarshalErr(&v220v2, bs220, h, t, "dec-map-v220-p-len")
  10225. testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-p-len")
  10226. bs220 = testMarshalErr(&v220v1, h, t, "enc-map-v220-p")
  10227. v220v2 = nil
  10228. testUnmarshalErr(&v220v2, bs220, h, t, "dec-map-v220-p-nil")
  10229. testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-p-nil")
  10230. // ...
  10231. if v == nil {
  10232. v220v2 = nil
  10233. } else {
  10234. v220v2 = make(map[int16]uint, len(v))
  10235. } // reset map
  10236. var v220v3, v220v4 typMapMapInt16Uint
  10237. v220v3 = typMapMapInt16Uint(v220v1)
  10238. v220v4 = typMapMapInt16Uint(v220v2)
  10239. bs220 = testMarshalErr(v220v3, h, t, "enc-map-v220-custom")
  10240. testUnmarshalErr(v220v4, bs220, h, t, "dec-map-v220-p-len")
  10241. testDeepEqualErr(v220v3, v220v4, t, "equal-map-v220-p-len")
  10242. }
  10243. for _, v := range []map[int16]uint8{nil, {}, {33: 0, 44: 33}} {
  10244. // fmt.Printf(">>>> running mammoth map v221: %v\n", v)
  10245. var v221v1, v221v2 map[int16]uint8
  10246. v221v1 = v
  10247. bs221 := testMarshalErr(v221v1, h, t, "enc-map-v221")
  10248. if v == nil {
  10249. v221v2 = nil
  10250. } else {
  10251. v221v2 = make(map[int16]uint8, len(v))
  10252. } // reset map
  10253. testUnmarshalErr(v221v2, bs221, h, t, "dec-map-v221")
  10254. testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221")
  10255. if v == nil {
  10256. v221v2 = nil
  10257. } else {
  10258. v221v2 = make(map[int16]uint8, len(v))
  10259. } // reset map
  10260. testUnmarshalErr(reflect.ValueOf(v221v2), bs221, h, t, "dec-map-v221-noaddr") // decode into non-addressable map value
  10261. testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-noaddr")
  10262. if v == nil {
  10263. v221v2 = nil
  10264. } else {
  10265. v221v2 = make(map[int16]uint8, len(v))
  10266. } // reset map
  10267. testUnmarshalErr(&v221v2, bs221, h, t, "dec-map-v221-p-len")
  10268. testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-p-len")
  10269. bs221 = testMarshalErr(&v221v1, h, t, "enc-map-v221-p")
  10270. v221v2 = nil
  10271. testUnmarshalErr(&v221v2, bs221, h, t, "dec-map-v221-p-nil")
  10272. testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-p-nil")
  10273. // ...
  10274. if v == nil {
  10275. v221v2 = nil
  10276. } else {
  10277. v221v2 = make(map[int16]uint8, len(v))
  10278. } // reset map
  10279. var v221v3, v221v4 typMapMapInt16Uint8
  10280. v221v3 = typMapMapInt16Uint8(v221v1)
  10281. v221v4 = typMapMapInt16Uint8(v221v2)
  10282. bs221 = testMarshalErr(v221v3, h, t, "enc-map-v221-custom")
  10283. testUnmarshalErr(v221v4, bs221, h, t, "dec-map-v221-p-len")
  10284. testDeepEqualErr(v221v3, v221v4, t, "equal-map-v221-p-len")
  10285. }
  10286. for _, v := range []map[int16]uint16{nil, {}, {44: 0, 33: 44}} {
  10287. // fmt.Printf(">>>> running mammoth map v222: %v\n", v)
  10288. var v222v1, v222v2 map[int16]uint16
  10289. v222v1 = v
  10290. bs222 := testMarshalErr(v222v1, h, t, "enc-map-v222")
  10291. if v == nil {
  10292. v222v2 = nil
  10293. } else {
  10294. v222v2 = make(map[int16]uint16, len(v))
  10295. } // reset map
  10296. testUnmarshalErr(v222v2, bs222, h, t, "dec-map-v222")
  10297. testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222")
  10298. if v == nil {
  10299. v222v2 = nil
  10300. } else {
  10301. v222v2 = make(map[int16]uint16, len(v))
  10302. } // reset map
  10303. testUnmarshalErr(reflect.ValueOf(v222v2), bs222, h, t, "dec-map-v222-noaddr") // decode into non-addressable map value
  10304. testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-noaddr")
  10305. if v == nil {
  10306. v222v2 = nil
  10307. } else {
  10308. v222v2 = make(map[int16]uint16, len(v))
  10309. } // reset map
  10310. testUnmarshalErr(&v222v2, bs222, h, t, "dec-map-v222-p-len")
  10311. testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-p-len")
  10312. bs222 = testMarshalErr(&v222v1, h, t, "enc-map-v222-p")
  10313. v222v2 = nil
  10314. testUnmarshalErr(&v222v2, bs222, h, t, "dec-map-v222-p-nil")
  10315. testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-p-nil")
  10316. // ...
  10317. if v == nil {
  10318. v222v2 = nil
  10319. } else {
  10320. v222v2 = make(map[int16]uint16, len(v))
  10321. } // reset map
  10322. var v222v3, v222v4 typMapMapInt16Uint16
  10323. v222v3 = typMapMapInt16Uint16(v222v1)
  10324. v222v4 = typMapMapInt16Uint16(v222v2)
  10325. bs222 = testMarshalErr(v222v3, h, t, "enc-map-v222-custom")
  10326. testUnmarshalErr(v222v4, bs222, h, t, "dec-map-v222-p-len")
  10327. testDeepEqualErr(v222v3, v222v4, t, "equal-map-v222-p-len")
  10328. }
  10329. for _, v := range []map[int16]uint32{nil, {}, {33: 0, 44: 33}} {
  10330. // fmt.Printf(">>>> running mammoth map v223: %v\n", v)
  10331. var v223v1, v223v2 map[int16]uint32
  10332. v223v1 = v
  10333. bs223 := testMarshalErr(v223v1, h, t, "enc-map-v223")
  10334. if v == nil {
  10335. v223v2 = nil
  10336. } else {
  10337. v223v2 = make(map[int16]uint32, len(v))
  10338. } // reset map
  10339. testUnmarshalErr(v223v2, bs223, h, t, "dec-map-v223")
  10340. testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223")
  10341. if v == nil {
  10342. v223v2 = nil
  10343. } else {
  10344. v223v2 = make(map[int16]uint32, len(v))
  10345. } // reset map
  10346. testUnmarshalErr(reflect.ValueOf(v223v2), bs223, h, t, "dec-map-v223-noaddr") // decode into non-addressable map value
  10347. testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-noaddr")
  10348. if v == nil {
  10349. v223v2 = nil
  10350. } else {
  10351. v223v2 = make(map[int16]uint32, len(v))
  10352. } // reset map
  10353. testUnmarshalErr(&v223v2, bs223, h, t, "dec-map-v223-p-len")
  10354. testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-p-len")
  10355. bs223 = testMarshalErr(&v223v1, h, t, "enc-map-v223-p")
  10356. v223v2 = nil
  10357. testUnmarshalErr(&v223v2, bs223, h, t, "dec-map-v223-p-nil")
  10358. testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-p-nil")
  10359. // ...
  10360. if v == nil {
  10361. v223v2 = nil
  10362. } else {
  10363. v223v2 = make(map[int16]uint32, len(v))
  10364. } // reset map
  10365. var v223v3, v223v4 typMapMapInt16Uint32
  10366. v223v3 = typMapMapInt16Uint32(v223v1)
  10367. v223v4 = typMapMapInt16Uint32(v223v2)
  10368. bs223 = testMarshalErr(v223v3, h, t, "enc-map-v223-custom")
  10369. testUnmarshalErr(v223v4, bs223, h, t, "dec-map-v223-p-len")
  10370. testDeepEqualErr(v223v3, v223v4, t, "equal-map-v223-p-len")
  10371. }
  10372. for _, v := range []map[int16]uint64{nil, {}, {44: 0, 33: 44}} {
  10373. // fmt.Printf(">>>> running mammoth map v224: %v\n", v)
  10374. var v224v1, v224v2 map[int16]uint64
  10375. v224v1 = v
  10376. bs224 := testMarshalErr(v224v1, h, t, "enc-map-v224")
  10377. if v == nil {
  10378. v224v2 = nil
  10379. } else {
  10380. v224v2 = make(map[int16]uint64, len(v))
  10381. } // reset map
  10382. testUnmarshalErr(v224v2, bs224, h, t, "dec-map-v224")
  10383. testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224")
  10384. if v == nil {
  10385. v224v2 = nil
  10386. } else {
  10387. v224v2 = make(map[int16]uint64, len(v))
  10388. } // reset map
  10389. testUnmarshalErr(reflect.ValueOf(v224v2), bs224, h, t, "dec-map-v224-noaddr") // decode into non-addressable map value
  10390. testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-noaddr")
  10391. if v == nil {
  10392. v224v2 = nil
  10393. } else {
  10394. v224v2 = make(map[int16]uint64, len(v))
  10395. } // reset map
  10396. testUnmarshalErr(&v224v2, bs224, h, t, "dec-map-v224-p-len")
  10397. testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-p-len")
  10398. bs224 = testMarshalErr(&v224v1, h, t, "enc-map-v224-p")
  10399. v224v2 = nil
  10400. testUnmarshalErr(&v224v2, bs224, h, t, "dec-map-v224-p-nil")
  10401. testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-p-nil")
  10402. // ...
  10403. if v == nil {
  10404. v224v2 = nil
  10405. } else {
  10406. v224v2 = make(map[int16]uint64, len(v))
  10407. } // reset map
  10408. var v224v3, v224v4 typMapMapInt16Uint64
  10409. v224v3 = typMapMapInt16Uint64(v224v1)
  10410. v224v4 = typMapMapInt16Uint64(v224v2)
  10411. bs224 = testMarshalErr(v224v3, h, t, "enc-map-v224-custom")
  10412. testUnmarshalErr(v224v4, bs224, h, t, "dec-map-v224-p-len")
  10413. testDeepEqualErr(v224v3, v224v4, t, "equal-map-v224-p-len")
  10414. }
  10415. for _, v := range []map[int16]uintptr{nil, {}, {33: 0, 44: 33}} {
  10416. // fmt.Printf(">>>> running mammoth map v225: %v\n", v)
  10417. var v225v1, v225v2 map[int16]uintptr
  10418. v225v1 = v
  10419. bs225 := testMarshalErr(v225v1, h, t, "enc-map-v225")
  10420. if v == nil {
  10421. v225v2 = nil
  10422. } else {
  10423. v225v2 = make(map[int16]uintptr, len(v))
  10424. } // reset map
  10425. testUnmarshalErr(v225v2, bs225, h, t, "dec-map-v225")
  10426. testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225")
  10427. if v == nil {
  10428. v225v2 = nil
  10429. } else {
  10430. v225v2 = make(map[int16]uintptr, len(v))
  10431. } // reset map
  10432. testUnmarshalErr(reflect.ValueOf(v225v2), bs225, h, t, "dec-map-v225-noaddr") // decode into non-addressable map value
  10433. testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-noaddr")
  10434. if v == nil {
  10435. v225v2 = nil
  10436. } else {
  10437. v225v2 = make(map[int16]uintptr, len(v))
  10438. } // reset map
  10439. testUnmarshalErr(&v225v2, bs225, h, t, "dec-map-v225-p-len")
  10440. testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-p-len")
  10441. bs225 = testMarshalErr(&v225v1, h, t, "enc-map-v225-p")
  10442. v225v2 = nil
  10443. testUnmarshalErr(&v225v2, bs225, h, t, "dec-map-v225-p-nil")
  10444. testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-p-nil")
  10445. // ...
  10446. if v == nil {
  10447. v225v2 = nil
  10448. } else {
  10449. v225v2 = make(map[int16]uintptr, len(v))
  10450. } // reset map
  10451. var v225v3, v225v4 typMapMapInt16Uintptr
  10452. v225v3 = typMapMapInt16Uintptr(v225v1)
  10453. v225v4 = typMapMapInt16Uintptr(v225v2)
  10454. bs225 = testMarshalErr(v225v3, h, t, "enc-map-v225-custom")
  10455. testUnmarshalErr(v225v4, bs225, h, t, "dec-map-v225-p-len")
  10456. testDeepEqualErr(v225v3, v225v4, t, "equal-map-v225-p-len")
  10457. }
  10458. for _, v := range []map[int16]int{nil, {}, {44: 0, 33: 44}} {
  10459. // fmt.Printf(">>>> running mammoth map v226: %v\n", v)
  10460. var v226v1, v226v2 map[int16]int
  10461. v226v1 = v
  10462. bs226 := testMarshalErr(v226v1, h, t, "enc-map-v226")
  10463. if v == nil {
  10464. v226v2 = nil
  10465. } else {
  10466. v226v2 = make(map[int16]int, len(v))
  10467. } // reset map
  10468. testUnmarshalErr(v226v2, bs226, h, t, "dec-map-v226")
  10469. testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226")
  10470. if v == nil {
  10471. v226v2 = nil
  10472. } else {
  10473. v226v2 = make(map[int16]int, len(v))
  10474. } // reset map
  10475. testUnmarshalErr(reflect.ValueOf(v226v2), bs226, h, t, "dec-map-v226-noaddr") // decode into non-addressable map value
  10476. testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-noaddr")
  10477. if v == nil {
  10478. v226v2 = nil
  10479. } else {
  10480. v226v2 = make(map[int16]int, len(v))
  10481. } // reset map
  10482. testUnmarshalErr(&v226v2, bs226, h, t, "dec-map-v226-p-len")
  10483. testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-p-len")
  10484. bs226 = testMarshalErr(&v226v1, h, t, "enc-map-v226-p")
  10485. v226v2 = nil
  10486. testUnmarshalErr(&v226v2, bs226, h, t, "dec-map-v226-p-nil")
  10487. testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-p-nil")
  10488. // ...
  10489. if v == nil {
  10490. v226v2 = nil
  10491. } else {
  10492. v226v2 = make(map[int16]int, len(v))
  10493. } // reset map
  10494. var v226v3, v226v4 typMapMapInt16Int
  10495. v226v3 = typMapMapInt16Int(v226v1)
  10496. v226v4 = typMapMapInt16Int(v226v2)
  10497. bs226 = testMarshalErr(v226v3, h, t, "enc-map-v226-custom")
  10498. testUnmarshalErr(v226v4, bs226, h, t, "dec-map-v226-p-len")
  10499. testDeepEqualErr(v226v3, v226v4, t, "equal-map-v226-p-len")
  10500. }
  10501. for _, v := range []map[int16]int8{nil, {}, {33: 0, 44: 33}} {
  10502. // fmt.Printf(">>>> running mammoth map v227: %v\n", v)
  10503. var v227v1, v227v2 map[int16]int8
  10504. v227v1 = v
  10505. bs227 := testMarshalErr(v227v1, h, t, "enc-map-v227")
  10506. if v == nil {
  10507. v227v2 = nil
  10508. } else {
  10509. v227v2 = make(map[int16]int8, len(v))
  10510. } // reset map
  10511. testUnmarshalErr(v227v2, bs227, h, t, "dec-map-v227")
  10512. testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227")
  10513. if v == nil {
  10514. v227v2 = nil
  10515. } else {
  10516. v227v2 = make(map[int16]int8, len(v))
  10517. } // reset map
  10518. testUnmarshalErr(reflect.ValueOf(v227v2), bs227, h, t, "dec-map-v227-noaddr") // decode into non-addressable map value
  10519. testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-noaddr")
  10520. if v == nil {
  10521. v227v2 = nil
  10522. } else {
  10523. v227v2 = make(map[int16]int8, len(v))
  10524. } // reset map
  10525. testUnmarshalErr(&v227v2, bs227, h, t, "dec-map-v227-p-len")
  10526. testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-p-len")
  10527. bs227 = testMarshalErr(&v227v1, h, t, "enc-map-v227-p")
  10528. v227v2 = nil
  10529. testUnmarshalErr(&v227v2, bs227, h, t, "dec-map-v227-p-nil")
  10530. testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-p-nil")
  10531. // ...
  10532. if v == nil {
  10533. v227v2 = nil
  10534. } else {
  10535. v227v2 = make(map[int16]int8, len(v))
  10536. } // reset map
  10537. var v227v3, v227v4 typMapMapInt16Int8
  10538. v227v3 = typMapMapInt16Int8(v227v1)
  10539. v227v4 = typMapMapInt16Int8(v227v2)
  10540. bs227 = testMarshalErr(v227v3, h, t, "enc-map-v227-custom")
  10541. testUnmarshalErr(v227v4, bs227, h, t, "dec-map-v227-p-len")
  10542. testDeepEqualErr(v227v3, v227v4, t, "equal-map-v227-p-len")
  10543. }
  10544. for _, v := range []map[int16]int16{nil, {}, {44: 0, 33: 44}} {
  10545. // fmt.Printf(">>>> running mammoth map v228: %v\n", v)
  10546. var v228v1, v228v2 map[int16]int16
  10547. v228v1 = v
  10548. bs228 := testMarshalErr(v228v1, h, t, "enc-map-v228")
  10549. if v == nil {
  10550. v228v2 = nil
  10551. } else {
  10552. v228v2 = make(map[int16]int16, len(v))
  10553. } // reset map
  10554. testUnmarshalErr(v228v2, bs228, h, t, "dec-map-v228")
  10555. testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228")
  10556. if v == nil {
  10557. v228v2 = nil
  10558. } else {
  10559. v228v2 = make(map[int16]int16, len(v))
  10560. } // reset map
  10561. testUnmarshalErr(reflect.ValueOf(v228v2), bs228, h, t, "dec-map-v228-noaddr") // decode into non-addressable map value
  10562. testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-noaddr")
  10563. if v == nil {
  10564. v228v2 = nil
  10565. } else {
  10566. v228v2 = make(map[int16]int16, len(v))
  10567. } // reset map
  10568. testUnmarshalErr(&v228v2, bs228, h, t, "dec-map-v228-p-len")
  10569. testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-p-len")
  10570. bs228 = testMarshalErr(&v228v1, h, t, "enc-map-v228-p")
  10571. v228v2 = nil
  10572. testUnmarshalErr(&v228v2, bs228, h, t, "dec-map-v228-p-nil")
  10573. testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-p-nil")
  10574. // ...
  10575. if v == nil {
  10576. v228v2 = nil
  10577. } else {
  10578. v228v2 = make(map[int16]int16, len(v))
  10579. } // reset map
  10580. var v228v3, v228v4 typMapMapInt16Int16
  10581. v228v3 = typMapMapInt16Int16(v228v1)
  10582. v228v4 = typMapMapInt16Int16(v228v2)
  10583. bs228 = testMarshalErr(v228v3, h, t, "enc-map-v228-custom")
  10584. testUnmarshalErr(v228v4, bs228, h, t, "dec-map-v228-p-len")
  10585. testDeepEqualErr(v228v3, v228v4, t, "equal-map-v228-p-len")
  10586. }
  10587. for _, v := range []map[int16]int32{nil, {}, {33: 0, 44: 33}} {
  10588. // fmt.Printf(">>>> running mammoth map v229: %v\n", v)
  10589. var v229v1, v229v2 map[int16]int32
  10590. v229v1 = v
  10591. bs229 := testMarshalErr(v229v1, h, t, "enc-map-v229")
  10592. if v == nil {
  10593. v229v2 = nil
  10594. } else {
  10595. v229v2 = make(map[int16]int32, len(v))
  10596. } // reset map
  10597. testUnmarshalErr(v229v2, bs229, h, t, "dec-map-v229")
  10598. testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229")
  10599. if v == nil {
  10600. v229v2 = nil
  10601. } else {
  10602. v229v2 = make(map[int16]int32, len(v))
  10603. } // reset map
  10604. testUnmarshalErr(reflect.ValueOf(v229v2), bs229, h, t, "dec-map-v229-noaddr") // decode into non-addressable map value
  10605. testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-noaddr")
  10606. if v == nil {
  10607. v229v2 = nil
  10608. } else {
  10609. v229v2 = make(map[int16]int32, len(v))
  10610. } // reset map
  10611. testUnmarshalErr(&v229v2, bs229, h, t, "dec-map-v229-p-len")
  10612. testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-p-len")
  10613. bs229 = testMarshalErr(&v229v1, h, t, "enc-map-v229-p")
  10614. v229v2 = nil
  10615. testUnmarshalErr(&v229v2, bs229, h, t, "dec-map-v229-p-nil")
  10616. testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-p-nil")
  10617. // ...
  10618. if v == nil {
  10619. v229v2 = nil
  10620. } else {
  10621. v229v2 = make(map[int16]int32, len(v))
  10622. } // reset map
  10623. var v229v3, v229v4 typMapMapInt16Int32
  10624. v229v3 = typMapMapInt16Int32(v229v1)
  10625. v229v4 = typMapMapInt16Int32(v229v2)
  10626. bs229 = testMarshalErr(v229v3, h, t, "enc-map-v229-custom")
  10627. testUnmarshalErr(v229v4, bs229, h, t, "dec-map-v229-p-len")
  10628. testDeepEqualErr(v229v3, v229v4, t, "equal-map-v229-p-len")
  10629. }
  10630. for _, v := range []map[int16]int64{nil, {}, {44: 0, 33: 44}} {
  10631. // fmt.Printf(">>>> running mammoth map v230: %v\n", v)
  10632. var v230v1, v230v2 map[int16]int64
  10633. v230v1 = v
  10634. bs230 := testMarshalErr(v230v1, h, t, "enc-map-v230")
  10635. if v == nil {
  10636. v230v2 = nil
  10637. } else {
  10638. v230v2 = make(map[int16]int64, len(v))
  10639. } // reset map
  10640. testUnmarshalErr(v230v2, bs230, h, t, "dec-map-v230")
  10641. testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230")
  10642. if v == nil {
  10643. v230v2 = nil
  10644. } else {
  10645. v230v2 = make(map[int16]int64, len(v))
  10646. } // reset map
  10647. testUnmarshalErr(reflect.ValueOf(v230v2), bs230, h, t, "dec-map-v230-noaddr") // decode into non-addressable map value
  10648. testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-noaddr")
  10649. if v == nil {
  10650. v230v2 = nil
  10651. } else {
  10652. v230v2 = make(map[int16]int64, len(v))
  10653. } // reset map
  10654. testUnmarshalErr(&v230v2, bs230, h, t, "dec-map-v230-p-len")
  10655. testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-p-len")
  10656. bs230 = testMarshalErr(&v230v1, h, t, "enc-map-v230-p")
  10657. v230v2 = nil
  10658. testUnmarshalErr(&v230v2, bs230, h, t, "dec-map-v230-p-nil")
  10659. testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-p-nil")
  10660. // ...
  10661. if v == nil {
  10662. v230v2 = nil
  10663. } else {
  10664. v230v2 = make(map[int16]int64, len(v))
  10665. } // reset map
  10666. var v230v3, v230v4 typMapMapInt16Int64
  10667. v230v3 = typMapMapInt16Int64(v230v1)
  10668. v230v4 = typMapMapInt16Int64(v230v2)
  10669. bs230 = testMarshalErr(v230v3, h, t, "enc-map-v230-custom")
  10670. testUnmarshalErr(v230v4, bs230, h, t, "dec-map-v230-p-len")
  10671. testDeepEqualErr(v230v3, v230v4, t, "equal-map-v230-p-len")
  10672. }
  10673. for _, v := range []map[int16]float32{nil, {}, {33: 0, 44: 22.2}} {
  10674. // fmt.Printf(">>>> running mammoth map v231: %v\n", v)
  10675. var v231v1, v231v2 map[int16]float32
  10676. v231v1 = v
  10677. bs231 := testMarshalErr(v231v1, h, t, "enc-map-v231")
  10678. if v == nil {
  10679. v231v2 = nil
  10680. } else {
  10681. v231v2 = make(map[int16]float32, len(v))
  10682. } // reset map
  10683. testUnmarshalErr(v231v2, bs231, h, t, "dec-map-v231")
  10684. testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231")
  10685. if v == nil {
  10686. v231v2 = nil
  10687. } else {
  10688. v231v2 = make(map[int16]float32, len(v))
  10689. } // reset map
  10690. testUnmarshalErr(reflect.ValueOf(v231v2), bs231, h, t, "dec-map-v231-noaddr") // decode into non-addressable map value
  10691. testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-noaddr")
  10692. if v == nil {
  10693. v231v2 = nil
  10694. } else {
  10695. v231v2 = make(map[int16]float32, len(v))
  10696. } // reset map
  10697. testUnmarshalErr(&v231v2, bs231, h, t, "dec-map-v231-p-len")
  10698. testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-p-len")
  10699. bs231 = testMarshalErr(&v231v1, h, t, "enc-map-v231-p")
  10700. v231v2 = nil
  10701. testUnmarshalErr(&v231v2, bs231, h, t, "dec-map-v231-p-nil")
  10702. testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-p-nil")
  10703. // ...
  10704. if v == nil {
  10705. v231v2 = nil
  10706. } else {
  10707. v231v2 = make(map[int16]float32, len(v))
  10708. } // reset map
  10709. var v231v3, v231v4 typMapMapInt16Float32
  10710. v231v3 = typMapMapInt16Float32(v231v1)
  10711. v231v4 = typMapMapInt16Float32(v231v2)
  10712. bs231 = testMarshalErr(v231v3, h, t, "enc-map-v231-custom")
  10713. testUnmarshalErr(v231v4, bs231, h, t, "dec-map-v231-p-len")
  10714. testDeepEqualErr(v231v3, v231v4, t, "equal-map-v231-p-len")
  10715. }
  10716. for _, v := range []map[int16]float64{nil, {}, {33: 0, 44: 11.1}} {
  10717. // fmt.Printf(">>>> running mammoth map v232: %v\n", v)
  10718. var v232v1, v232v2 map[int16]float64
  10719. v232v1 = v
  10720. bs232 := testMarshalErr(v232v1, h, t, "enc-map-v232")
  10721. if v == nil {
  10722. v232v2 = nil
  10723. } else {
  10724. v232v2 = make(map[int16]float64, len(v))
  10725. } // reset map
  10726. testUnmarshalErr(v232v2, bs232, h, t, "dec-map-v232")
  10727. testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232")
  10728. if v == nil {
  10729. v232v2 = nil
  10730. } else {
  10731. v232v2 = make(map[int16]float64, len(v))
  10732. } // reset map
  10733. testUnmarshalErr(reflect.ValueOf(v232v2), bs232, h, t, "dec-map-v232-noaddr") // decode into non-addressable map value
  10734. testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-noaddr")
  10735. if v == nil {
  10736. v232v2 = nil
  10737. } else {
  10738. v232v2 = make(map[int16]float64, len(v))
  10739. } // reset map
  10740. testUnmarshalErr(&v232v2, bs232, h, t, "dec-map-v232-p-len")
  10741. testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-p-len")
  10742. bs232 = testMarshalErr(&v232v1, h, t, "enc-map-v232-p")
  10743. v232v2 = nil
  10744. testUnmarshalErr(&v232v2, bs232, h, t, "dec-map-v232-p-nil")
  10745. testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-p-nil")
  10746. // ...
  10747. if v == nil {
  10748. v232v2 = nil
  10749. } else {
  10750. v232v2 = make(map[int16]float64, len(v))
  10751. } // reset map
  10752. var v232v3, v232v4 typMapMapInt16Float64
  10753. v232v3 = typMapMapInt16Float64(v232v1)
  10754. v232v4 = typMapMapInt16Float64(v232v2)
  10755. bs232 = testMarshalErr(v232v3, h, t, "enc-map-v232-custom")
  10756. testUnmarshalErr(v232v4, bs232, h, t, "dec-map-v232-p-len")
  10757. testDeepEqualErr(v232v3, v232v4, t, "equal-map-v232-p-len")
  10758. }
  10759. for _, v := range []map[int16]bool{nil, {}, {33: false, 44: true}} {
  10760. // fmt.Printf(">>>> running mammoth map v233: %v\n", v)
  10761. var v233v1, v233v2 map[int16]bool
  10762. v233v1 = v
  10763. bs233 := testMarshalErr(v233v1, h, t, "enc-map-v233")
  10764. if v == nil {
  10765. v233v2 = nil
  10766. } else {
  10767. v233v2 = make(map[int16]bool, len(v))
  10768. } // reset map
  10769. testUnmarshalErr(v233v2, bs233, h, t, "dec-map-v233")
  10770. testDeepEqualErr(v233v1, v233v2, t, "equal-map-v233")
  10771. if v == nil {
  10772. v233v2 = nil
  10773. } else {
  10774. v233v2 = make(map[int16]bool, len(v))
  10775. } // reset map
  10776. testUnmarshalErr(reflect.ValueOf(v233v2), bs233, h, t, "dec-map-v233-noaddr") // decode into non-addressable map value
  10777. testDeepEqualErr(v233v1, v233v2, t, "equal-map-v233-noaddr")
  10778. if v == nil {
  10779. v233v2 = nil
  10780. } else {
  10781. v233v2 = make(map[int16]bool, len(v))
  10782. } // reset map
  10783. testUnmarshalErr(&v233v2, bs233, h, t, "dec-map-v233-p-len")
  10784. testDeepEqualErr(v233v1, v233v2, t, "equal-map-v233-p-len")
  10785. bs233 = testMarshalErr(&v233v1, h, t, "enc-map-v233-p")
  10786. v233v2 = nil
  10787. testUnmarshalErr(&v233v2, bs233, h, t, "dec-map-v233-p-nil")
  10788. testDeepEqualErr(v233v1, v233v2, t, "equal-map-v233-p-nil")
  10789. // ...
  10790. if v == nil {
  10791. v233v2 = nil
  10792. } else {
  10793. v233v2 = make(map[int16]bool, len(v))
  10794. } // reset map
  10795. var v233v3, v233v4 typMapMapInt16Bool
  10796. v233v3 = typMapMapInt16Bool(v233v1)
  10797. v233v4 = typMapMapInt16Bool(v233v2)
  10798. bs233 = testMarshalErr(v233v3, h, t, "enc-map-v233-custom")
  10799. testUnmarshalErr(v233v4, bs233, h, t, "dec-map-v233-p-len")
  10800. testDeepEqualErr(v233v3, v233v4, t, "equal-map-v233-p-len")
  10801. }
  10802. for _, v := range []map[int32]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} {
  10803. // fmt.Printf(">>>> running mammoth map v236: %v\n", v)
  10804. var v236v1, v236v2 map[int32]interface{}
  10805. v236v1 = v
  10806. bs236 := testMarshalErr(v236v1, h, t, "enc-map-v236")
  10807. if v == nil {
  10808. v236v2 = nil
  10809. } else {
  10810. v236v2 = make(map[int32]interface{}, len(v))
  10811. } // reset map
  10812. testUnmarshalErr(v236v2, bs236, h, t, "dec-map-v236")
  10813. testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236")
  10814. if v == nil {
  10815. v236v2 = nil
  10816. } else {
  10817. v236v2 = make(map[int32]interface{}, len(v))
  10818. } // reset map
  10819. testUnmarshalErr(reflect.ValueOf(v236v2), bs236, h, t, "dec-map-v236-noaddr") // decode into non-addressable map value
  10820. testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-noaddr")
  10821. if v == nil {
  10822. v236v2 = nil
  10823. } else {
  10824. v236v2 = make(map[int32]interface{}, len(v))
  10825. } // reset map
  10826. testUnmarshalErr(&v236v2, bs236, h, t, "dec-map-v236-p-len")
  10827. testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-p-len")
  10828. bs236 = testMarshalErr(&v236v1, h, t, "enc-map-v236-p")
  10829. v236v2 = nil
  10830. testUnmarshalErr(&v236v2, bs236, h, t, "dec-map-v236-p-nil")
  10831. testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-p-nil")
  10832. // ...
  10833. if v == nil {
  10834. v236v2 = nil
  10835. } else {
  10836. v236v2 = make(map[int32]interface{}, len(v))
  10837. } // reset map
  10838. var v236v3, v236v4 typMapMapInt32Intf
  10839. v236v3 = typMapMapInt32Intf(v236v1)
  10840. v236v4 = typMapMapInt32Intf(v236v2)
  10841. bs236 = testMarshalErr(v236v3, h, t, "enc-map-v236-custom")
  10842. testUnmarshalErr(v236v4, bs236, h, t, "dec-map-v236-p-len")
  10843. testDeepEqualErr(v236v3, v236v4, t, "equal-map-v236-p-len")
  10844. }
  10845. for _, v := range []map[int32]string{nil, {}, {33: "", 44: "some-string"}} {
  10846. // fmt.Printf(">>>> running mammoth map v237: %v\n", v)
  10847. var v237v1, v237v2 map[int32]string
  10848. v237v1 = v
  10849. bs237 := testMarshalErr(v237v1, h, t, "enc-map-v237")
  10850. if v == nil {
  10851. v237v2 = nil
  10852. } else {
  10853. v237v2 = make(map[int32]string, len(v))
  10854. } // reset map
  10855. testUnmarshalErr(v237v2, bs237, h, t, "dec-map-v237")
  10856. testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237")
  10857. if v == nil {
  10858. v237v2 = nil
  10859. } else {
  10860. v237v2 = make(map[int32]string, len(v))
  10861. } // reset map
  10862. testUnmarshalErr(reflect.ValueOf(v237v2), bs237, h, t, "dec-map-v237-noaddr") // decode into non-addressable map value
  10863. testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-noaddr")
  10864. if v == nil {
  10865. v237v2 = nil
  10866. } else {
  10867. v237v2 = make(map[int32]string, len(v))
  10868. } // reset map
  10869. testUnmarshalErr(&v237v2, bs237, h, t, "dec-map-v237-p-len")
  10870. testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-p-len")
  10871. bs237 = testMarshalErr(&v237v1, h, t, "enc-map-v237-p")
  10872. v237v2 = nil
  10873. testUnmarshalErr(&v237v2, bs237, h, t, "dec-map-v237-p-nil")
  10874. testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-p-nil")
  10875. // ...
  10876. if v == nil {
  10877. v237v2 = nil
  10878. } else {
  10879. v237v2 = make(map[int32]string, len(v))
  10880. } // reset map
  10881. var v237v3, v237v4 typMapMapInt32String
  10882. v237v3 = typMapMapInt32String(v237v1)
  10883. v237v4 = typMapMapInt32String(v237v2)
  10884. bs237 = testMarshalErr(v237v3, h, t, "enc-map-v237-custom")
  10885. testUnmarshalErr(v237v4, bs237, h, t, "dec-map-v237-p-len")
  10886. testDeepEqualErr(v237v3, v237v4, t, "equal-map-v237-p-len")
  10887. }
  10888. for _, v := range []map[int32]uint{nil, {}, {33: 0, 44: 33}} {
  10889. // fmt.Printf(">>>> running mammoth map v238: %v\n", v)
  10890. var v238v1, v238v2 map[int32]uint
  10891. v238v1 = v
  10892. bs238 := testMarshalErr(v238v1, h, t, "enc-map-v238")
  10893. if v == nil {
  10894. v238v2 = nil
  10895. } else {
  10896. v238v2 = make(map[int32]uint, len(v))
  10897. } // reset map
  10898. testUnmarshalErr(v238v2, bs238, h, t, "dec-map-v238")
  10899. testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238")
  10900. if v == nil {
  10901. v238v2 = nil
  10902. } else {
  10903. v238v2 = make(map[int32]uint, len(v))
  10904. } // reset map
  10905. testUnmarshalErr(reflect.ValueOf(v238v2), bs238, h, t, "dec-map-v238-noaddr") // decode into non-addressable map value
  10906. testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-noaddr")
  10907. if v == nil {
  10908. v238v2 = nil
  10909. } else {
  10910. v238v2 = make(map[int32]uint, len(v))
  10911. } // reset map
  10912. testUnmarshalErr(&v238v2, bs238, h, t, "dec-map-v238-p-len")
  10913. testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-p-len")
  10914. bs238 = testMarshalErr(&v238v1, h, t, "enc-map-v238-p")
  10915. v238v2 = nil
  10916. testUnmarshalErr(&v238v2, bs238, h, t, "dec-map-v238-p-nil")
  10917. testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-p-nil")
  10918. // ...
  10919. if v == nil {
  10920. v238v2 = nil
  10921. } else {
  10922. v238v2 = make(map[int32]uint, len(v))
  10923. } // reset map
  10924. var v238v3, v238v4 typMapMapInt32Uint
  10925. v238v3 = typMapMapInt32Uint(v238v1)
  10926. v238v4 = typMapMapInt32Uint(v238v2)
  10927. bs238 = testMarshalErr(v238v3, h, t, "enc-map-v238-custom")
  10928. testUnmarshalErr(v238v4, bs238, h, t, "dec-map-v238-p-len")
  10929. testDeepEqualErr(v238v3, v238v4, t, "equal-map-v238-p-len")
  10930. }
  10931. for _, v := range []map[int32]uint8{nil, {}, {44: 0, 33: 44}} {
  10932. // fmt.Printf(">>>> running mammoth map v239: %v\n", v)
  10933. var v239v1, v239v2 map[int32]uint8
  10934. v239v1 = v
  10935. bs239 := testMarshalErr(v239v1, h, t, "enc-map-v239")
  10936. if v == nil {
  10937. v239v2 = nil
  10938. } else {
  10939. v239v2 = make(map[int32]uint8, len(v))
  10940. } // reset map
  10941. testUnmarshalErr(v239v2, bs239, h, t, "dec-map-v239")
  10942. testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239")
  10943. if v == nil {
  10944. v239v2 = nil
  10945. } else {
  10946. v239v2 = make(map[int32]uint8, len(v))
  10947. } // reset map
  10948. testUnmarshalErr(reflect.ValueOf(v239v2), bs239, h, t, "dec-map-v239-noaddr") // decode into non-addressable map value
  10949. testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-noaddr")
  10950. if v == nil {
  10951. v239v2 = nil
  10952. } else {
  10953. v239v2 = make(map[int32]uint8, len(v))
  10954. } // reset map
  10955. testUnmarshalErr(&v239v2, bs239, h, t, "dec-map-v239-p-len")
  10956. testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-p-len")
  10957. bs239 = testMarshalErr(&v239v1, h, t, "enc-map-v239-p")
  10958. v239v2 = nil
  10959. testUnmarshalErr(&v239v2, bs239, h, t, "dec-map-v239-p-nil")
  10960. testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-p-nil")
  10961. // ...
  10962. if v == nil {
  10963. v239v2 = nil
  10964. } else {
  10965. v239v2 = make(map[int32]uint8, len(v))
  10966. } // reset map
  10967. var v239v3, v239v4 typMapMapInt32Uint8
  10968. v239v3 = typMapMapInt32Uint8(v239v1)
  10969. v239v4 = typMapMapInt32Uint8(v239v2)
  10970. bs239 = testMarshalErr(v239v3, h, t, "enc-map-v239-custom")
  10971. testUnmarshalErr(v239v4, bs239, h, t, "dec-map-v239-p-len")
  10972. testDeepEqualErr(v239v3, v239v4, t, "equal-map-v239-p-len")
  10973. }
  10974. for _, v := range []map[int32]uint16{nil, {}, {33: 0, 44: 33}} {
  10975. // fmt.Printf(">>>> running mammoth map v240: %v\n", v)
  10976. var v240v1, v240v2 map[int32]uint16
  10977. v240v1 = v
  10978. bs240 := testMarshalErr(v240v1, h, t, "enc-map-v240")
  10979. if v == nil {
  10980. v240v2 = nil
  10981. } else {
  10982. v240v2 = make(map[int32]uint16, len(v))
  10983. } // reset map
  10984. testUnmarshalErr(v240v2, bs240, h, t, "dec-map-v240")
  10985. testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240")
  10986. if v == nil {
  10987. v240v2 = nil
  10988. } else {
  10989. v240v2 = make(map[int32]uint16, len(v))
  10990. } // reset map
  10991. testUnmarshalErr(reflect.ValueOf(v240v2), bs240, h, t, "dec-map-v240-noaddr") // decode into non-addressable map value
  10992. testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-noaddr")
  10993. if v == nil {
  10994. v240v2 = nil
  10995. } else {
  10996. v240v2 = make(map[int32]uint16, len(v))
  10997. } // reset map
  10998. testUnmarshalErr(&v240v2, bs240, h, t, "dec-map-v240-p-len")
  10999. testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-p-len")
  11000. bs240 = testMarshalErr(&v240v1, h, t, "enc-map-v240-p")
  11001. v240v2 = nil
  11002. testUnmarshalErr(&v240v2, bs240, h, t, "dec-map-v240-p-nil")
  11003. testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-p-nil")
  11004. // ...
  11005. if v == nil {
  11006. v240v2 = nil
  11007. } else {
  11008. v240v2 = make(map[int32]uint16, len(v))
  11009. } // reset map
  11010. var v240v3, v240v4 typMapMapInt32Uint16
  11011. v240v3 = typMapMapInt32Uint16(v240v1)
  11012. v240v4 = typMapMapInt32Uint16(v240v2)
  11013. bs240 = testMarshalErr(v240v3, h, t, "enc-map-v240-custom")
  11014. testUnmarshalErr(v240v4, bs240, h, t, "dec-map-v240-p-len")
  11015. testDeepEqualErr(v240v3, v240v4, t, "equal-map-v240-p-len")
  11016. }
  11017. for _, v := range []map[int32]uint32{nil, {}, {44: 0, 33: 44}} {
  11018. // fmt.Printf(">>>> running mammoth map v241: %v\n", v)
  11019. var v241v1, v241v2 map[int32]uint32
  11020. v241v1 = v
  11021. bs241 := testMarshalErr(v241v1, h, t, "enc-map-v241")
  11022. if v == nil {
  11023. v241v2 = nil
  11024. } else {
  11025. v241v2 = make(map[int32]uint32, len(v))
  11026. } // reset map
  11027. testUnmarshalErr(v241v2, bs241, h, t, "dec-map-v241")
  11028. testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241")
  11029. if v == nil {
  11030. v241v2 = nil
  11031. } else {
  11032. v241v2 = make(map[int32]uint32, len(v))
  11033. } // reset map
  11034. testUnmarshalErr(reflect.ValueOf(v241v2), bs241, h, t, "dec-map-v241-noaddr") // decode into non-addressable map value
  11035. testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-noaddr")
  11036. if v == nil {
  11037. v241v2 = nil
  11038. } else {
  11039. v241v2 = make(map[int32]uint32, len(v))
  11040. } // reset map
  11041. testUnmarshalErr(&v241v2, bs241, h, t, "dec-map-v241-p-len")
  11042. testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-p-len")
  11043. bs241 = testMarshalErr(&v241v1, h, t, "enc-map-v241-p")
  11044. v241v2 = nil
  11045. testUnmarshalErr(&v241v2, bs241, h, t, "dec-map-v241-p-nil")
  11046. testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-p-nil")
  11047. // ...
  11048. if v == nil {
  11049. v241v2 = nil
  11050. } else {
  11051. v241v2 = make(map[int32]uint32, len(v))
  11052. } // reset map
  11053. var v241v3, v241v4 typMapMapInt32Uint32
  11054. v241v3 = typMapMapInt32Uint32(v241v1)
  11055. v241v4 = typMapMapInt32Uint32(v241v2)
  11056. bs241 = testMarshalErr(v241v3, h, t, "enc-map-v241-custom")
  11057. testUnmarshalErr(v241v4, bs241, h, t, "dec-map-v241-p-len")
  11058. testDeepEqualErr(v241v3, v241v4, t, "equal-map-v241-p-len")
  11059. }
  11060. for _, v := range []map[int32]uint64{nil, {}, {33: 0, 44: 33}} {
  11061. // fmt.Printf(">>>> running mammoth map v242: %v\n", v)
  11062. var v242v1, v242v2 map[int32]uint64
  11063. v242v1 = v
  11064. bs242 := testMarshalErr(v242v1, h, t, "enc-map-v242")
  11065. if v == nil {
  11066. v242v2 = nil
  11067. } else {
  11068. v242v2 = make(map[int32]uint64, len(v))
  11069. } // reset map
  11070. testUnmarshalErr(v242v2, bs242, h, t, "dec-map-v242")
  11071. testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242")
  11072. if v == nil {
  11073. v242v2 = nil
  11074. } else {
  11075. v242v2 = make(map[int32]uint64, len(v))
  11076. } // reset map
  11077. testUnmarshalErr(reflect.ValueOf(v242v2), bs242, h, t, "dec-map-v242-noaddr") // decode into non-addressable map value
  11078. testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-noaddr")
  11079. if v == nil {
  11080. v242v2 = nil
  11081. } else {
  11082. v242v2 = make(map[int32]uint64, len(v))
  11083. } // reset map
  11084. testUnmarshalErr(&v242v2, bs242, h, t, "dec-map-v242-p-len")
  11085. testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-p-len")
  11086. bs242 = testMarshalErr(&v242v1, h, t, "enc-map-v242-p")
  11087. v242v2 = nil
  11088. testUnmarshalErr(&v242v2, bs242, h, t, "dec-map-v242-p-nil")
  11089. testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-p-nil")
  11090. // ...
  11091. if v == nil {
  11092. v242v2 = nil
  11093. } else {
  11094. v242v2 = make(map[int32]uint64, len(v))
  11095. } // reset map
  11096. var v242v3, v242v4 typMapMapInt32Uint64
  11097. v242v3 = typMapMapInt32Uint64(v242v1)
  11098. v242v4 = typMapMapInt32Uint64(v242v2)
  11099. bs242 = testMarshalErr(v242v3, h, t, "enc-map-v242-custom")
  11100. testUnmarshalErr(v242v4, bs242, h, t, "dec-map-v242-p-len")
  11101. testDeepEqualErr(v242v3, v242v4, t, "equal-map-v242-p-len")
  11102. }
  11103. for _, v := range []map[int32]uintptr{nil, {}, {44: 0, 33: 44}} {
  11104. // fmt.Printf(">>>> running mammoth map v243: %v\n", v)
  11105. var v243v1, v243v2 map[int32]uintptr
  11106. v243v1 = v
  11107. bs243 := testMarshalErr(v243v1, h, t, "enc-map-v243")
  11108. if v == nil {
  11109. v243v2 = nil
  11110. } else {
  11111. v243v2 = make(map[int32]uintptr, len(v))
  11112. } // reset map
  11113. testUnmarshalErr(v243v2, bs243, h, t, "dec-map-v243")
  11114. testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243")
  11115. if v == nil {
  11116. v243v2 = nil
  11117. } else {
  11118. v243v2 = make(map[int32]uintptr, len(v))
  11119. } // reset map
  11120. testUnmarshalErr(reflect.ValueOf(v243v2), bs243, h, t, "dec-map-v243-noaddr") // decode into non-addressable map value
  11121. testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-noaddr")
  11122. if v == nil {
  11123. v243v2 = nil
  11124. } else {
  11125. v243v2 = make(map[int32]uintptr, len(v))
  11126. } // reset map
  11127. testUnmarshalErr(&v243v2, bs243, h, t, "dec-map-v243-p-len")
  11128. testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-p-len")
  11129. bs243 = testMarshalErr(&v243v1, h, t, "enc-map-v243-p")
  11130. v243v2 = nil
  11131. testUnmarshalErr(&v243v2, bs243, h, t, "dec-map-v243-p-nil")
  11132. testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-p-nil")
  11133. // ...
  11134. if v == nil {
  11135. v243v2 = nil
  11136. } else {
  11137. v243v2 = make(map[int32]uintptr, len(v))
  11138. } // reset map
  11139. var v243v3, v243v4 typMapMapInt32Uintptr
  11140. v243v3 = typMapMapInt32Uintptr(v243v1)
  11141. v243v4 = typMapMapInt32Uintptr(v243v2)
  11142. bs243 = testMarshalErr(v243v3, h, t, "enc-map-v243-custom")
  11143. testUnmarshalErr(v243v4, bs243, h, t, "dec-map-v243-p-len")
  11144. testDeepEqualErr(v243v3, v243v4, t, "equal-map-v243-p-len")
  11145. }
  11146. for _, v := range []map[int32]int{nil, {}, {33: 0, 44: 33}} {
  11147. // fmt.Printf(">>>> running mammoth map v244: %v\n", v)
  11148. var v244v1, v244v2 map[int32]int
  11149. v244v1 = v
  11150. bs244 := testMarshalErr(v244v1, h, t, "enc-map-v244")
  11151. if v == nil {
  11152. v244v2 = nil
  11153. } else {
  11154. v244v2 = make(map[int32]int, len(v))
  11155. } // reset map
  11156. testUnmarshalErr(v244v2, bs244, h, t, "dec-map-v244")
  11157. testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244")
  11158. if v == nil {
  11159. v244v2 = nil
  11160. } else {
  11161. v244v2 = make(map[int32]int, len(v))
  11162. } // reset map
  11163. testUnmarshalErr(reflect.ValueOf(v244v2), bs244, h, t, "dec-map-v244-noaddr") // decode into non-addressable map value
  11164. testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-noaddr")
  11165. if v == nil {
  11166. v244v2 = nil
  11167. } else {
  11168. v244v2 = make(map[int32]int, len(v))
  11169. } // reset map
  11170. testUnmarshalErr(&v244v2, bs244, h, t, "dec-map-v244-p-len")
  11171. testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-p-len")
  11172. bs244 = testMarshalErr(&v244v1, h, t, "enc-map-v244-p")
  11173. v244v2 = nil
  11174. testUnmarshalErr(&v244v2, bs244, h, t, "dec-map-v244-p-nil")
  11175. testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-p-nil")
  11176. // ...
  11177. if v == nil {
  11178. v244v2 = nil
  11179. } else {
  11180. v244v2 = make(map[int32]int, len(v))
  11181. } // reset map
  11182. var v244v3, v244v4 typMapMapInt32Int
  11183. v244v3 = typMapMapInt32Int(v244v1)
  11184. v244v4 = typMapMapInt32Int(v244v2)
  11185. bs244 = testMarshalErr(v244v3, h, t, "enc-map-v244-custom")
  11186. testUnmarshalErr(v244v4, bs244, h, t, "dec-map-v244-p-len")
  11187. testDeepEqualErr(v244v3, v244v4, t, "equal-map-v244-p-len")
  11188. }
  11189. for _, v := range []map[int32]int8{nil, {}, {44: 0, 33: 44}} {
  11190. // fmt.Printf(">>>> running mammoth map v245: %v\n", v)
  11191. var v245v1, v245v2 map[int32]int8
  11192. v245v1 = v
  11193. bs245 := testMarshalErr(v245v1, h, t, "enc-map-v245")
  11194. if v == nil {
  11195. v245v2 = nil
  11196. } else {
  11197. v245v2 = make(map[int32]int8, len(v))
  11198. } // reset map
  11199. testUnmarshalErr(v245v2, bs245, h, t, "dec-map-v245")
  11200. testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245")
  11201. if v == nil {
  11202. v245v2 = nil
  11203. } else {
  11204. v245v2 = make(map[int32]int8, len(v))
  11205. } // reset map
  11206. testUnmarshalErr(reflect.ValueOf(v245v2), bs245, h, t, "dec-map-v245-noaddr") // decode into non-addressable map value
  11207. testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-noaddr")
  11208. if v == nil {
  11209. v245v2 = nil
  11210. } else {
  11211. v245v2 = make(map[int32]int8, len(v))
  11212. } // reset map
  11213. testUnmarshalErr(&v245v2, bs245, h, t, "dec-map-v245-p-len")
  11214. testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-p-len")
  11215. bs245 = testMarshalErr(&v245v1, h, t, "enc-map-v245-p")
  11216. v245v2 = nil
  11217. testUnmarshalErr(&v245v2, bs245, h, t, "dec-map-v245-p-nil")
  11218. testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-p-nil")
  11219. // ...
  11220. if v == nil {
  11221. v245v2 = nil
  11222. } else {
  11223. v245v2 = make(map[int32]int8, len(v))
  11224. } // reset map
  11225. var v245v3, v245v4 typMapMapInt32Int8
  11226. v245v3 = typMapMapInt32Int8(v245v1)
  11227. v245v4 = typMapMapInt32Int8(v245v2)
  11228. bs245 = testMarshalErr(v245v3, h, t, "enc-map-v245-custom")
  11229. testUnmarshalErr(v245v4, bs245, h, t, "dec-map-v245-p-len")
  11230. testDeepEqualErr(v245v3, v245v4, t, "equal-map-v245-p-len")
  11231. }
  11232. for _, v := range []map[int32]int16{nil, {}, {33: 0, 44: 33}} {
  11233. // fmt.Printf(">>>> running mammoth map v246: %v\n", v)
  11234. var v246v1, v246v2 map[int32]int16
  11235. v246v1 = v
  11236. bs246 := testMarshalErr(v246v1, h, t, "enc-map-v246")
  11237. if v == nil {
  11238. v246v2 = nil
  11239. } else {
  11240. v246v2 = make(map[int32]int16, len(v))
  11241. } // reset map
  11242. testUnmarshalErr(v246v2, bs246, h, t, "dec-map-v246")
  11243. testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246")
  11244. if v == nil {
  11245. v246v2 = nil
  11246. } else {
  11247. v246v2 = make(map[int32]int16, len(v))
  11248. } // reset map
  11249. testUnmarshalErr(reflect.ValueOf(v246v2), bs246, h, t, "dec-map-v246-noaddr") // decode into non-addressable map value
  11250. testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-noaddr")
  11251. if v == nil {
  11252. v246v2 = nil
  11253. } else {
  11254. v246v2 = make(map[int32]int16, len(v))
  11255. } // reset map
  11256. testUnmarshalErr(&v246v2, bs246, h, t, "dec-map-v246-p-len")
  11257. testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-p-len")
  11258. bs246 = testMarshalErr(&v246v1, h, t, "enc-map-v246-p")
  11259. v246v2 = nil
  11260. testUnmarshalErr(&v246v2, bs246, h, t, "dec-map-v246-p-nil")
  11261. testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-p-nil")
  11262. // ...
  11263. if v == nil {
  11264. v246v2 = nil
  11265. } else {
  11266. v246v2 = make(map[int32]int16, len(v))
  11267. } // reset map
  11268. var v246v3, v246v4 typMapMapInt32Int16
  11269. v246v3 = typMapMapInt32Int16(v246v1)
  11270. v246v4 = typMapMapInt32Int16(v246v2)
  11271. bs246 = testMarshalErr(v246v3, h, t, "enc-map-v246-custom")
  11272. testUnmarshalErr(v246v4, bs246, h, t, "dec-map-v246-p-len")
  11273. testDeepEqualErr(v246v3, v246v4, t, "equal-map-v246-p-len")
  11274. }
  11275. for _, v := range []map[int32]int32{nil, {}, {44: 0, 33: 44}} {
  11276. // fmt.Printf(">>>> running mammoth map v247: %v\n", v)
  11277. var v247v1, v247v2 map[int32]int32
  11278. v247v1 = v
  11279. bs247 := testMarshalErr(v247v1, h, t, "enc-map-v247")
  11280. if v == nil {
  11281. v247v2 = nil
  11282. } else {
  11283. v247v2 = make(map[int32]int32, len(v))
  11284. } // reset map
  11285. testUnmarshalErr(v247v2, bs247, h, t, "dec-map-v247")
  11286. testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247")
  11287. if v == nil {
  11288. v247v2 = nil
  11289. } else {
  11290. v247v2 = make(map[int32]int32, len(v))
  11291. } // reset map
  11292. testUnmarshalErr(reflect.ValueOf(v247v2), bs247, h, t, "dec-map-v247-noaddr") // decode into non-addressable map value
  11293. testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-noaddr")
  11294. if v == nil {
  11295. v247v2 = nil
  11296. } else {
  11297. v247v2 = make(map[int32]int32, len(v))
  11298. } // reset map
  11299. testUnmarshalErr(&v247v2, bs247, h, t, "dec-map-v247-p-len")
  11300. testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-p-len")
  11301. bs247 = testMarshalErr(&v247v1, h, t, "enc-map-v247-p")
  11302. v247v2 = nil
  11303. testUnmarshalErr(&v247v2, bs247, h, t, "dec-map-v247-p-nil")
  11304. testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-p-nil")
  11305. // ...
  11306. if v == nil {
  11307. v247v2 = nil
  11308. } else {
  11309. v247v2 = make(map[int32]int32, len(v))
  11310. } // reset map
  11311. var v247v3, v247v4 typMapMapInt32Int32
  11312. v247v3 = typMapMapInt32Int32(v247v1)
  11313. v247v4 = typMapMapInt32Int32(v247v2)
  11314. bs247 = testMarshalErr(v247v3, h, t, "enc-map-v247-custom")
  11315. testUnmarshalErr(v247v4, bs247, h, t, "dec-map-v247-p-len")
  11316. testDeepEqualErr(v247v3, v247v4, t, "equal-map-v247-p-len")
  11317. }
  11318. for _, v := range []map[int32]int64{nil, {}, {33: 0, 44: 33}} {
  11319. // fmt.Printf(">>>> running mammoth map v248: %v\n", v)
  11320. var v248v1, v248v2 map[int32]int64
  11321. v248v1 = v
  11322. bs248 := testMarshalErr(v248v1, h, t, "enc-map-v248")
  11323. if v == nil {
  11324. v248v2 = nil
  11325. } else {
  11326. v248v2 = make(map[int32]int64, len(v))
  11327. } // reset map
  11328. testUnmarshalErr(v248v2, bs248, h, t, "dec-map-v248")
  11329. testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248")
  11330. if v == nil {
  11331. v248v2 = nil
  11332. } else {
  11333. v248v2 = make(map[int32]int64, len(v))
  11334. } // reset map
  11335. testUnmarshalErr(reflect.ValueOf(v248v2), bs248, h, t, "dec-map-v248-noaddr") // decode into non-addressable map value
  11336. testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-noaddr")
  11337. if v == nil {
  11338. v248v2 = nil
  11339. } else {
  11340. v248v2 = make(map[int32]int64, len(v))
  11341. } // reset map
  11342. testUnmarshalErr(&v248v2, bs248, h, t, "dec-map-v248-p-len")
  11343. testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-p-len")
  11344. bs248 = testMarshalErr(&v248v1, h, t, "enc-map-v248-p")
  11345. v248v2 = nil
  11346. testUnmarshalErr(&v248v2, bs248, h, t, "dec-map-v248-p-nil")
  11347. testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-p-nil")
  11348. // ...
  11349. if v == nil {
  11350. v248v2 = nil
  11351. } else {
  11352. v248v2 = make(map[int32]int64, len(v))
  11353. } // reset map
  11354. var v248v3, v248v4 typMapMapInt32Int64
  11355. v248v3 = typMapMapInt32Int64(v248v1)
  11356. v248v4 = typMapMapInt32Int64(v248v2)
  11357. bs248 = testMarshalErr(v248v3, h, t, "enc-map-v248-custom")
  11358. testUnmarshalErr(v248v4, bs248, h, t, "dec-map-v248-p-len")
  11359. testDeepEqualErr(v248v3, v248v4, t, "equal-map-v248-p-len")
  11360. }
  11361. for _, v := range []map[int32]float32{nil, {}, {44: 0, 33: 22.2}} {
  11362. // fmt.Printf(">>>> running mammoth map v249: %v\n", v)
  11363. var v249v1, v249v2 map[int32]float32
  11364. v249v1 = v
  11365. bs249 := testMarshalErr(v249v1, h, t, "enc-map-v249")
  11366. if v == nil {
  11367. v249v2 = nil
  11368. } else {
  11369. v249v2 = make(map[int32]float32, len(v))
  11370. } // reset map
  11371. testUnmarshalErr(v249v2, bs249, h, t, "dec-map-v249")
  11372. testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249")
  11373. if v == nil {
  11374. v249v2 = nil
  11375. } else {
  11376. v249v2 = make(map[int32]float32, len(v))
  11377. } // reset map
  11378. testUnmarshalErr(reflect.ValueOf(v249v2), bs249, h, t, "dec-map-v249-noaddr") // decode into non-addressable map value
  11379. testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-noaddr")
  11380. if v == nil {
  11381. v249v2 = nil
  11382. } else {
  11383. v249v2 = make(map[int32]float32, len(v))
  11384. } // reset map
  11385. testUnmarshalErr(&v249v2, bs249, h, t, "dec-map-v249-p-len")
  11386. testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-p-len")
  11387. bs249 = testMarshalErr(&v249v1, h, t, "enc-map-v249-p")
  11388. v249v2 = nil
  11389. testUnmarshalErr(&v249v2, bs249, h, t, "dec-map-v249-p-nil")
  11390. testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-p-nil")
  11391. // ...
  11392. if v == nil {
  11393. v249v2 = nil
  11394. } else {
  11395. v249v2 = make(map[int32]float32, len(v))
  11396. } // reset map
  11397. var v249v3, v249v4 typMapMapInt32Float32
  11398. v249v3 = typMapMapInt32Float32(v249v1)
  11399. v249v4 = typMapMapInt32Float32(v249v2)
  11400. bs249 = testMarshalErr(v249v3, h, t, "enc-map-v249-custom")
  11401. testUnmarshalErr(v249v4, bs249, h, t, "dec-map-v249-p-len")
  11402. testDeepEqualErr(v249v3, v249v4, t, "equal-map-v249-p-len")
  11403. }
  11404. for _, v := range []map[int32]float64{nil, {}, {44: 0, 33: 11.1}} {
  11405. // fmt.Printf(">>>> running mammoth map v250: %v\n", v)
  11406. var v250v1, v250v2 map[int32]float64
  11407. v250v1 = v
  11408. bs250 := testMarshalErr(v250v1, h, t, "enc-map-v250")
  11409. if v == nil {
  11410. v250v2 = nil
  11411. } else {
  11412. v250v2 = make(map[int32]float64, len(v))
  11413. } // reset map
  11414. testUnmarshalErr(v250v2, bs250, h, t, "dec-map-v250")
  11415. testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250")
  11416. if v == nil {
  11417. v250v2 = nil
  11418. } else {
  11419. v250v2 = make(map[int32]float64, len(v))
  11420. } // reset map
  11421. testUnmarshalErr(reflect.ValueOf(v250v2), bs250, h, t, "dec-map-v250-noaddr") // decode into non-addressable map value
  11422. testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-noaddr")
  11423. if v == nil {
  11424. v250v2 = nil
  11425. } else {
  11426. v250v2 = make(map[int32]float64, len(v))
  11427. } // reset map
  11428. testUnmarshalErr(&v250v2, bs250, h, t, "dec-map-v250-p-len")
  11429. testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-p-len")
  11430. bs250 = testMarshalErr(&v250v1, h, t, "enc-map-v250-p")
  11431. v250v2 = nil
  11432. testUnmarshalErr(&v250v2, bs250, h, t, "dec-map-v250-p-nil")
  11433. testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-p-nil")
  11434. // ...
  11435. if v == nil {
  11436. v250v2 = nil
  11437. } else {
  11438. v250v2 = make(map[int32]float64, len(v))
  11439. } // reset map
  11440. var v250v3, v250v4 typMapMapInt32Float64
  11441. v250v3 = typMapMapInt32Float64(v250v1)
  11442. v250v4 = typMapMapInt32Float64(v250v2)
  11443. bs250 = testMarshalErr(v250v3, h, t, "enc-map-v250-custom")
  11444. testUnmarshalErr(v250v4, bs250, h, t, "dec-map-v250-p-len")
  11445. testDeepEqualErr(v250v3, v250v4, t, "equal-map-v250-p-len")
  11446. }
  11447. for _, v := range []map[int32]bool{nil, {}, {44: false, 33: true}} {
  11448. // fmt.Printf(">>>> running mammoth map v251: %v\n", v)
  11449. var v251v1, v251v2 map[int32]bool
  11450. v251v1 = v
  11451. bs251 := testMarshalErr(v251v1, h, t, "enc-map-v251")
  11452. if v == nil {
  11453. v251v2 = nil
  11454. } else {
  11455. v251v2 = make(map[int32]bool, len(v))
  11456. } // reset map
  11457. testUnmarshalErr(v251v2, bs251, h, t, "dec-map-v251")
  11458. testDeepEqualErr(v251v1, v251v2, t, "equal-map-v251")
  11459. if v == nil {
  11460. v251v2 = nil
  11461. } else {
  11462. v251v2 = make(map[int32]bool, len(v))
  11463. } // reset map
  11464. testUnmarshalErr(reflect.ValueOf(v251v2), bs251, h, t, "dec-map-v251-noaddr") // decode into non-addressable map value
  11465. testDeepEqualErr(v251v1, v251v2, t, "equal-map-v251-noaddr")
  11466. if v == nil {
  11467. v251v2 = nil
  11468. } else {
  11469. v251v2 = make(map[int32]bool, len(v))
  11470. } // reset map
  11471. testUnmarshalErr(&v251v2, bs251, h, t, "dec-map-v251-p-len")
  11472. testDeepEqualErr(v251v1, v251v2, t, "equal-map-v251-p-len")
  11473. bs251 = testMarshalErr(&v251v1, h, t, "enc-map-v251-p")
  11474. v251v2 = nil
  11475. testUnmarshalErr(&v251v2, bs251, h, t, "dec-map-v251-p-nil")
  11476. testDeepEqualErr(v251v1, v251v2, t, "equal-map-v251-p-nil")
  11477. // ...
  11478. if v == nil {
  11479. v251v2 = nil
  11480. } else {
  11481. v251v2 = make(map[int32]bool, len(v))
  11482. } // reset map
  11483. var v251v3, v251v4 typMapMapInt32Bool
  11484. v251v3 = typMapMapInt32Bool(v251v1)
  11485. v251v4 = typMapMapInt32Bool(v251v2)
  11486. bs251 = testMarshalErr(v251v3, h, t, "enc-map-v251-custom")
  11487. testUnmarshalErr(v251v4, bs251, h, t, "dec-map-v251-p-len")
  11488. testDeepEqualErr(v251v3, v251v4, t, "equal-map-v251-p-len")
  11489. }
  11490. for _, v := range []map[int64]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} {
  11491. // fmt.Printf(">>>> running mammoth map v254: %v\n", v)
  11492. var v254v1, v254v2 map[int64]interface{}
  11493. v254v1 = v
  11494. bs254 := testMarshalErr(v254v1, h, t, "enc-map-v254")
  11495. if v == nil {
  11496. v254v2 = nil
  11497. } else {
  11498. v254v2 = make(map[int64]interface{}, len(v))
  11499. } // reset map
  11500. testUnmarshalErr(v254v2, bs254, h, t, "dec-map-v254")
  11501. testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254")
  11502. if v == nil {
  11503. v254v2 = nil
  11504. } else {
  11505. v254v2 = make(map[int64]interface{}, len(v))
  11506. } // reset map
  11507. testUnmarshalErr(reflect.ValueOf(v254v2), bs254, h, t, "dec-map-v254-noaddr") // decode into non-addressable map value
  11508. testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-noaddr")
  11509. if v == nil {
  11510. v254v2 = nil
  11511. } else {
  11512. v254v2 = make(map[int64]interface{}, len(v))
  11513. } // reset map
  11514. testUnmarshalErr(&v254v2, bs254, h, t, "dec-map-v254-p-len")
  11515. testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-p-len")
  11516. bs254 = testMarshalErr(&v254v1, h, t, "enc-map-v254-p")
  11517. v254v2 = nil
  11518. testUnmarshalErr(&v254v2, bs254, h, t, "dec-map-v254-p-nil")
  11519. testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-p-nil")
  11520. // ...
  11521. if v == nil {
  11522. v254v2 = nil
  11523. } else {
  11524. v254v2 = make(map[int64]interface{}, len(v))
  11525. } // reset map
  11526. var v254v3, v254v4 typMapMapInt64Intf
  11527. v254v3 = typMapMapInt64Intf(v254v1)
  11528. v254v4 = typMapMapInt64Intf(v254v2)
  11529. bs254 = testMarshalErr(v254v3, h, t, "enc-map-v254-custom")
  11530. testUnmarshalErr(v254v4, bs254, h, t, "dec-map-v254-p-len")
  11531. testDeepEqualErr(v254v3, v254v4, t, "equal-map-v254-p-len")
  11532. }
  11533. for _, v := range []map[int64]string{nil, {}, {44: "", 33: "some-string-2"}} {
  11534. // fmt.Printf(">>>> running mammoth map v255: %v\n", v)
  11535. var v255v1, v255v2 map[int64]string
  11536. v255v1 = v
  11537. bs255 := testMarshalErr(v255v1, h, t, "enc-map-v255")
  11538. if v == nil {
  11539. v255v2 = nil
  11540. } else {
  11541. v255v2 = make(map[int64]string, len(v))
  11542. } // reset map
  11543. testUnmarshalErr(v255v2, bs255, h, t, "dec-map-v255")
  11544. testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255")
  11545. if v == nil {
  11546. v255v2 = nil
  11547. } else {
  11548. v255v2 = make(map[int64]string, len(v))
  11549. } // reset map
  11550. testUnmarshalErr(reflect.ValueOf(v255v2), bs255, h, t, "dec-map-v255-noaddr") // decode into non-addressable map value
  11551. testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-noaddr")
  11552. if v == nil {
  11553. v255v2 = nil
  11554. } else {
  11555. v255v2 = make(map[int64]string, len(v))
  11556. } // reset map
  11557. testUnmarshalErr(&v255v2, bs255, h, t, "dec-map-v255-p-len")
  11558. testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-p-len")
  11559. bs255 = testMarshalErr(&v255v1, h, t, "enc-map-v255-p")
  11560. v255v2 = nil
  11561. testUnmarshalErr(&v255v2, bs255, h, t, "dec-map-v255-p-nil")
  11562. testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-p-nil")
  11563. // ...
  11564. if v == nil {
  11565. v255v2 = nil
  11566. } else {
  11567. v255v2 = make(map[int64]string, len(v))
  11568. } // reset map
  11569. var v255v3, v255v4 typMapMapInt64String
  11570. v255v3 = typMapMapInt64String(v255v1)
  11571. v255v4 = typMapMapInt64String(v255v2)
  11572. bs255 = testMarshalErr(v255v3, h, t, "enc-map-v255-custom")
  11573. testUnmarshalErr(v255v4, bs255, h, t, "dec-map-v255-p-len")
  11574. testDeepEqualErr(v255v3, v255v4, t, "equal-map-v255-p-len")
  11575. }
  11576. for _, v := range []map[int64]uint{nil, {}, {44: 0, 33: 44}} {
  11577. // fmt.Printf(">>>> running mammoth map v256: %v\n", v)
  11578. var v256v1, v256v2 map[int64]uint
  11579. v256v1 = v
  11580. bs256 := testMarshalErr(v256v1, h, t, "enc-map-v256")
  11581. if v == nil {
  11582. v256v2 = nil
  11583. } else {
  11584. v256v2 = make(map[int64]uint, len(v))
  11585. } // reset map
  11586. testUnmarshalErr(v256v2, bs256, h, t, "dec-map-v256")
  11587. testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256")
  11588. if v == nil {
  11589. v256v2 = nil
  11590. } else {
  11591. v256v2 = make(map[int64]uint, len(v))
  11592. } // reset map
  11593. testUnmarshalErr(reflect.ValueOf(v256v2), bs256, h, t, "dec-map-v256-noaddr") // decode into non-addressable map value
  11594. testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-noaddr")
  11595. if v == nil {
  11596. v256v2 = nil
  11597. } else {
  11598. v256v2 = make(map[int64]uint, len(v))
  11599. } // reset map
  11600. testUnmarshalErr(&v256v2, bs256, h, t, "dec-map-v256-p-len")
  11601. testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-p-len")
  11602. bs256 = testMarshalErr(&v256v1, h, t, "enc-map-v256-p")
  11603. v256v2 = nil
  11604. testUnmarshalErr(&v256v2, bs256, h, t, "dec-map-v256-p-nil")
  11605. testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-p-nil")
  11606. // ...
  11607. if v == nil {
  11608. v256v2 = nil
  11609. } else {
  11610. v256v2 = make(map[int64]uint, len(v))
  11611. } // reset map
  11612. var v256v3, v256v4 typMapMapInt64Uint
  11613. v256v3 = typMapMapInt64Uint(v256v1)
  11614. v256v4 = typMapMapInt64Uint(v256v2)
  11615. bs256 = testMarshalErr(v256v3, h, t, "enc-map-v256-custom")
  11616. testUnmarshalErr(v256v4, bs256, h, t, "dec-map-v256-p-len")
  11617. testDeepEqualErr(v256v3, v256v4, t, "equal-map-v256-p-len")
  11618. }
  11619. for _, v := range []map[int64]uint8{nil, {}, {33: 0, 44: 33}} {
  11620. // fmt.Printf(">>>> running mammoth map v257: %v\n", v)
  11621. var v257v1, v257v2 map[int64]uint8
  11622. v257v1 = v
  11623. bs257 := testMarshalErr(v257v1, h, t, "enc-map-v257")
  11624. if v == nil {
  11625. v257v2 = nil
  11626. } else {
  11627. v257v2 = make(map[int64]uint8, len(v))
  11628. } // reset map
  11629. testUnmarshalErr(v257v2, bs257, h, t, "dec-map-v257")
  11630. testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257")
  11631. if v == nil {
  11632. v257v2 = nil
  11633. } else {
  11634. v257v2 = make(map[int64]uint8, len(v))
  11635. } // reset map
  11636. testUnmarshalErr(reflect.ValueOf(v257v2), bs257, h, t, "dec-map-v257-noaddr") // decode into non-addressable map value
  11637. testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-noaddr")
  11638. if v == nil {
  11639. v257v2 = nil
  11640. } else {
  11641. v257v2 = make(map[int64]uint8, len(v))
  11642. } // reset map
  11643. testUnmarshalErr(&v257v2, bs257, h, t, "dec-map-v257-p-len")
  11644. testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-p-len")
  11645. bs257 = testMarshalErr(&v257v1, h, t, "enc-map-v257-p")
  11646. v257v2 = nil
  11647. testUnmarshalErr(&v257v2, bs257, h, t, "dec-map-v257-p-nil")
  11648. testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-p-nil")
  11649. // ...
  11650. if v == nil {
  11651. v257v2 = nil
  11652. } else {
  11653. v257v2 = make(map[int64]uint8, len(v))
  11654. } // reset map
  11655. var v257v3, v257v4 typMapMapInt64Uint8
  11656. v257v3 = typMapMapInt64Uint8(v257v1)
  11657. v257v4 = typMapMapInt64Uint8(v257v2)
  11658. bs257 = testMarshalErr(v257v3, h, t, "enc-map-v257-custom")
  11659. testUnmarshalErr(v257v4, bs257, h, t, "dec-map-v257-p-len")
  11660. testDeepEqualErr(v257v3, v257v4, t, "equal-map-v257-p-len")
  11661. }
  11662. for _, v := range []map[int64]uint16{nil, {}, {44: 0, 33: 44}} {
  11663. // fmt.Printf(">>>> running mammoth map v258: %v\n", v)
  11664. var v258v1, v258v2 map[int64]uint16
  11665. v258v1 = v
  11666. bs258 := testMarshalErr(v258v1, h, t, "enc-map-v258")
  11667. if v == nil {
  11668. v258v2 = nil
  11669. } else {
  11670. v258v2 = make(map[int64]uint16, len(v))
  11671. } // reset map
  11672. testUnmarshalErr(v258v2, bs258, h, t, "dec-map-v258")
  11673. testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258")
  11674. if v == nil {
  11675. v258v2 = nil
  11676. } else {
  11677. v258v2 = make(map[int64]uint16, len(v))
  11678. } // reset map
  11679. testUnmarshalErr(reflect.ValueOf(v258v2), bs258, h, t, "dec-map-v258-noaddr") // decode into non-addressable map value
  11680. testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-noaddr")
  11681. if v == nil {
  11682. v258v2 = nil
  11683. } else {
  11684. v258v2 = make(map[int64]uint16, len(v))
  11685. } // reset map
  11686. testUnmarshalErr(&v258v2, bs258, h, t, "dec-map-v258-p-len")
  11687. testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-p-len")
  11688. bs258 = testMarshalErr(&v258v1, h, t, "enc-map-v258-p")
  11689. v258v2 = nil
  11690. testUnmarshalErr(&v258v2, bs258, h, t, "dec-map-v258-p-nil")
  11691. testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-p-nil")
  11692. // ...
  11693. if v == nil {
  11694. v258v2 = nil
  11695. } else {
  11696. v258v2 = make(map[int64]uint16, len(v))
  11697. } // reset map
  11698. var v258v3, v258v4 typMapMapInt64Uint16
  11699. v258v3 = typMapMapInt64Uint16(v258v1)
  11700. v258v4 = typMapMapInt64Uint16(v258v2)
  11701. bs258 = testMarshalErr(v258v3, h, t, "enc-map-v258-custom")
  11702. testUnmarshalErr(v258v4, bs258, h, t, "dec-map-v258-p-len")
  11703. testDeepEqualErr(v258v3, v258v4, t, "equal-map-v258-p-len")
  11704. }
  11705. for _, v := range []map[int64]uint32{nil, {}, {33: 0, 44: 33}} {
  11706. // fmt.Printf(">>>> running mammoth map v259: %v\n", v)
  11707. var v259v1, v259v2 map[int64]uint32
  11708. v259v1 = v
  11709. bs259 := testMarshalErr(v259v1, h, t, "enc-map-v259")
  11710. if v == nil {
  11711. v259v2 = nil
  11712. } else {
  11713. v259v2 = make(map[int64]uint32, len(v))
  11714. } // reset map
  11715. testUnmarshalErr(v259v2, bs259, h, t, "dec-map-v259")
  11716. testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259")
  11717. if v == nil {
  11718. v259v2 = nil
  11719. } else {
  11720. v259v2 = make(map[int64]uint32, len(v))
  11721. } // reset map
  11722. testUnmarshalErr(reflect.ValueOf(v259v2), bs259, h, t, "dec-map-v259-noaddr") // decode into non-addressable map value
  11723. testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-noaddr")
  11724. if v == nil {
  11725. v259v2 = nil
  11726. } else {
  11727. v259v2 = make(map[int64]uint32, len(v))
  11728. } // reset map
  11729. testUnmarshalErr(&v259v2, bs259, h, t, "dec-map-v259-p-len")
  11730. testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-p-len")
  11731. bs259 = testMarshalErr(&v259v1, h, t, "enc-map-v259-p")
  11732. v259v2 = nil
  11733. testUnmarshalErr(&v259v2, bs259, h, t, "dec-map-v259-p-nil")
  11734. testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-p-nil")
  11735. // ...
  11736. if v == nil {
  11737. v259v2 = nil
  11738. } else {
  11739. v259v2 = make(map[int64]uint32, len(v))
  11740. } // reset map
  11741. var v259v3, v259v4 typMapMapInt64Uint32
  11742. v259v3 = typMapMapInt64Uint32(v259v1)
  11743. v259v4 = typMapMapInt64Uint32(v259v2)
  11744. bs259 = testMarshalErr(v259v3, h, t, "enc-map-v259-custom")
  11745. testUnmarshalErr(v259v4, bs259, h, t, "dec-map-v259-p-len")
  11746. testDeepEqualErr(v259v3, v259v4, t, "equal-map-v259-p-len")
  11747. }
  11748. for _, v := range []map[int64]uint64{nil, {}, {44: 0, 33: 44}} {
  11749. // fmt.Printf(">>>> running mammoth map v260: %v\n", v)
  11750. var v260v1, v260v2 map[int64]uint64
  11751. v260v1 = v
  11752. bs260 := testMarshalErr(v260v1, h, t, "enc-map-v260")
  11753. if v == nil {
  11754. v260v2 = nil
  11755. } else {
  11756. v260v2 = make(map[int64]uint64, len(v))
  11757. } // reset map
  11758. testUnmarshalErr(v260v2, bs260, h, t, "dec-map-v260")
  11759. testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260")
  11760. if v == nil {
  11761. v260v2 = nil
  11762. } else {
  11763. v260v2 = make(map[int64]uint64, len(v))
  11764. } // reset map
  11765. testUnmarshalErr(reflect.ValueOf(v260v2), bs260, h, t, "dec-map-v260-noaddr") // decode into non-addressable map value
  11766. testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-noaddr")
  11767. if v == nil {
  11768. v260v2 = nil
  11769. } else {
  11770. v260v2 = make(map[int64]uint64, len(v))
  11771. } // reset map
  11772. testUnmarshalErr(&v260v2, bs260, h, t, "dec-map-v260-p-len")
  11773. testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-p-len")
  11774. bs260 = testMarshalErr(&v260v1, h, t, "enc-map-v260-p")
  11775. v260v2 = nil
  11776. testUnmarshalErr(&v260v2, bs260, h, t, "dec-map-v260-p-nil")
  11777. testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-p-nil")
  11778. // ...
  11779. if v == nil {
  11780. v260v2 = nil
  11781. } else {
  11782. v260v2 = make(map[int64]uint64, len(v))
  11783. } // reset map
  11784. var v260v3, v260v4 typMapMapInt64Uint64
  11785. v260v3 = typMapMapInt64Uint64(v260v1)
  11786. v260v4 = typMapMapInt64Uint64(v260v2)
  11787. bs260 = testMarshalErr(v260v3, h, t, "enc-map-v260-custom")
  11788. testUnmarshalErr(v260v4, bs260, h, t, "dec-map-v260-p-len")
  11789. testDeepEqualErr(v260v3, v260v4, t, "equal-map-v260-p-len")
  11790. }
  11791. for _, v := range []map[int64]uintptr{nil, {}, {33: 0, 44: 33}} {
  11792. // fmt.Printf(">>>> running mammoth map v261: %v\n", v)
  11793. var v261v1, v261v2 map[int64]uintptr
  11794. v261v1 = v
  11795. bs261 := testMarshalErr(v261v1, h, t, "enc-map-v261")
  11796. if v == nil {
  11797. v261v2 = nil
  11798. } else {
  11799. v261v2 = make(map[int64]uintptr, len(v))
  11800. } // reset map
  11801. testUnmarshalErr(v261v2, bs261, h, t, "dec-map-v261")
  11802. testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261")
  11803. if v == nil {
  11804. v261v2 = nil
  11805. } else {
  11806. v261v2 = make(map[int64]uintptr, len(v))
  11807. } // reset map
  11808. testUnmarshalErr(reflect.ValueOf(v261v2), bs261, h, t, "dec-map-v261-noaddr") // decode into non-addressable map value
  11809. testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-noaddr")
  11810. if v == nil {
  11811. v261v2 = nil
  11812. } else {
  11813. v261v2 = make(map[int64]uintptr, len(v))
  11814. } // reset map
  11815. testUnmarshalErr(&v261v2, bs261, h, t, "dec-map-v261-p-len")
  11816. testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-p-len")
  11817. bs261 = testMarshalErr(&v261v1, h, t, "enc-map-v261-p")
  11818. v261v2 = nil
  11819. testUnmarshalErr(&v261v2, bs261, h, t, "dec-map-v261-p-nil")
  11820. testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-p-nil")
  11821. // ...
  11822. if v == nil {
  11823. v261v2 = nil
  11824. } else {
  11825. v261v2 = make(map[int64]uintptr, len(v))
  11826. } // reset map
  11827. var v261v3, v261v4 typMapMapInt64Uintptr
  11828. v261v3 = typMapMapInt64Uintptr(v261v1)
  11829. v261v4 = typMapMapInt64Uintptr(v261v2)
  11830. bs261 = testMarshalErr(v261v3, h, t, "enc-map-v261-custom")
  11831. testUnmarshalErr(v261v4, bs261, h, t, "dec-map-v261-p-len")
  11832. testDeepEqualErr(v261v3, v261v4, t, "equal-map-v261-p-len")
  11833. }
  11834. for _, v := range []map[int64]int{nil, {}, {44: 0, 33: 44}} {
  11835. // fmt.Printf(">>>> running mammoth map v262: %v\n", v)
  11836. var v262v1, v262v2 map[int64]int
  11837. v262v1 = v
  11838. bs262 := testMarshalErr(v262v1, h, t, "enc-map-v262")
  11839. if v == nil {
  11840. v262v2 = nil
  11841. } else {
  11842. v262v2 = make(map[int64]int, len(v))
  11843. } // reset map
  11844. testUnmarshalErr(v262v2, bs262, h, t, "dec-map-v262")
  11845. testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262")
  11846. if v == nil {
  11847. v262v2 = nil
  11848. } else {
  11849. v262v2 = make(map[int64]int, len(v))
  11850. } // reset map
  11851. testUnmarshalErr(reflect.ValueOf(v262v2), bs262, h, t, "dec-map-v262-noaddr") // decode into non-addressable map value
  11852. testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-noaddr")
  11853. if v == nil {
  11854. v262v2 = nil
  11855. } else {
  11856. v262v2 = make(map[int64]int, len(v))
  11857. } // reset map
  11858. testUnmarshalErr(&v262v2, bs262, h, t, "dec-map-v262-p-len")
  11859. testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-p-len")
  11860. bs262 = testMarshalErr(&v262v1, h, t, "enc-map-v262-p")
  11861. v262v2 = nil
  11862. testUnmarshalErr(&v262v2, bs262, h, t, "dec-map-v262-p-nil")
  11863. testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-p-nil")
  11864. // ...
  11865. if v == nil {
  11866. v262v2 = nil
  11867. } else {
  11868. v262v2 = make(map[int64]int, len(v))
  11869. } // reset map
  11870. var v262v3, v262v4 typMapMapInt64Int
  11871. v262v3 = typMapMapInt64Int(v262v1)
  11872. v262v4 = typMapMapInt64Int(v262v2)
  11873. bs262 = testMarshalErr(v262v3, h, t, "enc-map-v262-custom")
  11874. testUnmarshalErr(v262v4, bs262, h, t, "dec-map-v262-p-len")
  11875. testDeepEqualErr(v262v3, v262v4, t, "equal-map-v262-p-len")
  11876. }
  11877. for _, v := range []map[int64]int8{nil, {}, {33: 0, 44: 33}} {
  11878. // fmt.Printf(">>>> running mammoth map v263: %v\n", v)
  11879. var v263v1, v263v2 map[int64]int8
  11880. v263v1 = v
  11881. bs263 := testMarshalErr(v263v1, h, t, "enc-map-v263")
  11882. if v == nil {
  11883. v263v2 = nil
  11884. } else {
  11885. v263v2 = make(map[int64]int8, len(v))
  11886. } // reset map
  11887. testUnmarshalErr(v263v2, bs263, h, t, "dec-map-v263")
  11888. testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263")
  11889. if v == nil {
  11890. v263v2 = nil
  11891. } else {
  11892. v263v2 = make(map[int64]int8, len(v))
  11893. } // reset map
  11894. testUnmarshalErr(reflect.ValueOf(v263v2), bs263, h, t, "dec-map-v263-noaddr") // decode into non-addressable map value
  11895. testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-noaddr")
  11896. if v == nil {
  11897. v263v2 = nil
  11898. } else {
  11899. v263v2 = make(map[int64]int8, len(v))
  11900. } // reset map
  11901. testUnmarshalErr(&v263v2, bs263, h, t, "dec-map-v263-p-len")
  11902. testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-p-len")
  11903. bs263 = testMarshalErr(&v263v1, h, t, "enc-map-v263-p")
  11904. v263v2 = nil
  11905. testUnmarshalErr(&v263v2, bs263, h, t, "dec-map-v263-p-nil")
  11906. testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-p-nil")
  11907. // ...
  11908. if v == nil {
  11909. v263v2 = nil
  11910. } else {
  11911. v263v2 = make(map[int64]int8, len(v))
  11912. } // reset map
  11913. var v263v3, v263v4 typMapMapInt64Int8
  11914. v263v3 = typMapMapInt64Int8(v263v1)
  11915. v263v4 = typMapMapInt64Int8(v263v2)
  11916. bs263 = testMarshalErr(v263v3, h, t, "enc-map-v263-custom")
  11917. testUnmarshalErr(v263v4, bs263, h, t, "dec-map-v263-p-len")
  11918. testDeepEqualErr(v263v3, v263v4, t, "equal-map-v263-p-len")
  11919. }
  11920. for _, v := range []map[int64]int16{nil, {}, {44: 0, 33: 44}} {
  11921. // fmt.Printf(">>>> running mammoth map v264: %v\n", v)
  11922. var v264v1, v264v2 map[int64]int16
  11923. v264v1 = v
  11924. bs264 := testMarshalErr(v264v1, h, t, "enc-map-v264")
  11925. if v == nil {
  11926. v264v2 = nil
  11927. } else {
  11928. v264v2 = make(map[int64]int16, len(v))
  11929. } // reset map
  11930. testUnmarshalErr(v264v2, bs264, h, t, "dec-map-v264")
  11931. testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264")
  11932. if v == nil {
  11933. v264v2 = nil
  11934. } else {
  11935. v264v2 = make(map[int64]int16, len(v))
  11936. } // reset map
  11937. testUnmarshalErr(reflect.ValueOf(v264v2), bs264, h, t, "dec-map-v264-noaddr") // decode into non-addressable map value
  11938. testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-noaddr")
  11939. if v == nil {
  11940. v264v2 = nil
  11941. } else {
  11942. v264v2 = make(map[int64]int16, len(v))
  11943. } // reset map
  11944. testUnmarshalErr(&v264v2, bs264, h, t, "dec-map-v264-p-len")
  11945. testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-p-len")
  11946. bs264 = testMarshalErr(&v264v1, h, t, "enc-map-v264-p")
  11947. v264v2 = nil
  11948. testUnmarshalErr(&v264v2, bs264, h, t, "dec-map-v264-p-nil")
  11949. testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-p-nil")
  11950. // ...
  11951. if v == nil {
  11952. v264v2 = nil
  11953. } else {
  11954. v264v2 = make(map[int64]int16, len(v))
  11955. } // reset map
  11956. var v264v3, v264v4 typMapMapInt64Int16
  11957. v264v3 = typMapMapInt64Int16(v264v1)
  11958. v264v4 = typMapMapInt64Int16(v264v2)
  11959. bs264 = testMarshalErr(v264v3, h, t, "enc-map-v264-custom")
  11960. testUnmarshalErr(v264v4, bs264, h, t, "dec-map-v264-p-len")
  11961. testDeepEqualErr(v264v3, v264v4, t, "equal-map-v264-p-len")
  11962. }
  11963. for _, v := range []map[int64]int32{nil, {}, {33: 0, 44: 33}} {
  11964. // fmt.Printf(">>>> running mammoth map v265: %v\n", v)
  11965. var v265v1, v265v2 map[int64]int32
  11966. v265v1 = v
  11967. bs265 := testMarshalErr(v265v1, h, t, "enc-map-v265")
  11968. if v == nil {
  11969. v265v2 = nil
  11970. } else {
  11971. v265v2 = make(map[int64]int32, len(v))
  11972. } // reset map
  11973. testUnmarshalErr(v265v2, bs265, h, t, "dec-map-v265")
  11974. testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265")
  11975. if v == nil {
  11976. v265v2 = nil
  11977. } else {
  11978. v265v2 = make(map[int64]int32, len(v))
  11979. } // reset map
  11980. testUnmarshalErr(reflect.ValueOf(v265v2), bs265, h, t, "dec-map-v265-noaddr") // decode into non-addressable map value
  11981. testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-noaddr")
  11982. if v == nil {
  11983. v265v2 = nil
  11984. } else {
  11985. v265v2 = make(map[int64]int32, len(v))
  11986. } // reset map
  11987. testUnmarshalErr(&v265v2, bs265, h, t, "dec-map-v265-p-len")
  11988. testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-p-len")
  11989. bs265 = testMarshalErr(&v265v1, h, t, "enc-map-v265-p")
  11990. v265v2 = nil
  11991. testUnmarshalErr(&v265v2, bs265, h, t, "dec-map-v265-p-nil")
  11992. testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-p-nil")
  11993. // ...
  11994. if v == nil {
  11995. v265v2 = nil
  11996. } else {
  11997. v265v2 = make(map[int64]int32, len(v))
  11998. } // reset map
  11999. var v265v3, v265v4 typMapMapInt64Int32
  12000. v265v3 = typMapMapInt64Int32(v265v1)
  12001. v265v4 = typMapMapInt64Int32(v265v2)
  12002. bs265 = testMarshalErr(v265v3, h, t, "enc-map-v265-custom")
  12003. testUnmarshalErr(v265v4, bs265, h, t, "dec-map-v265-p-len")
  12004. testDeepEqualErr(v265v3, v265v4, t, "equal-map-v265-p-len")
  12005. }
  12006. for _, v := range []map[int64]int64{nil, {}, {44: 0, 33: 44}} {
  12007. // fmt.Printf(">>>> running mammoth map v266: %v\n", v)
  12008. var v266v1, v266v2 map[int64]int64
  12009. v266v1 = v
  12010. bs266 := testMarshalErr(v266v1, h, t, "enc-map-v266")
  12011. if v == nil {
  12012. v266v2 = nil
  12013. } else {
  12014. v266v2 = make(map[int64]int64, len(v))
  12015. } // reset map
  12016. testUnmarshalErr(v266v2, bs266, h, t, "dec-map-v266")
  12017. testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266")
  12018. if v == nil {
  12019. v266v2 = nil
  12020. } else {
  12021. v266v2 = make(map[int64]int64, len(v))
  12022. } // reset map
  12023. testUnmarshalErr(reflect.ValueOf(v266v2), bs266, h, t, "dec-map-v266-noaddr") // decode into non-addressable map value
  12024. testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-noaddr")
  12025. if v == nil {
  12026. v266v2 = nil
  12027. } else {
  12028. v266v2 = make(map[int64]int64, len(v))
  12029. } // reset map
  12030. testUnmarshalErr(&v266v2, bs266, h, t, "dec-map-v266-p-len")
  12031. testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-p-len")
  12032. bs266 = testMarshalErr(&v266v1, h, t, "enc-map-v266-p")
  12033. v266v2 = nil
  12034. testUnmarshalErr(&v266v2, bs266, h, t, "dec-map-v266-p-nil")
  12035. testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-p-nil")
  12036. // ...
  12037. if v == nil {
  12038. v266v2 = nil
  12039. } else {
  12040. v266v2 = make(map[int64]int64, len(v))
  12041. } // reset map
  12042. var v266v3, v266v4 typMapMapInt64Int64
  12043. v266v3 = typMapMapInt64Int64(v266v1)
  12044. v266v4 = typMapMapInt64Int64(v266v2)
  12045. bs266 = testMarshalErr(v266v3, h, t, "enc-map-v266-custom")
  12046. testUnmarshalErr(v266v4, bs266, h, t, "dec-map-v266-p-len")
  12047. testDeepEqualErr(v266v3, v266v4, t, "equal-map-v266-p-len")
  12048. }
  12049. for _, v := range []map[int64]float32{nil, {}, {33: 0, 44: 22.2}} {
  12050. // fmt.Printf(">>>> running mammoth map v267: %v\n", v)
  12051. var v267v1, v267v2 map[int64]float32
  12052. v267v1 = v
  12053. bs267 := testMarshalErr(v267v1, h, t, "enc-map-v267")
  12054. if v == nil {
  12055. v267v2 = nil
  12056. } else {
  12057. v267v2 = make(map[int64]float32, len(v))
  12058. } // reset map
  12059. testUnmarshalErr(v267v2, bs267, h, t, "dec-map-v267")
  12060. testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267")
  12061. if v == nil {
  12062. v267v2 = nil
  12063. } else {
  12064. v267v2 = make(map[int64]float32, len(v))
  12065. } // reset map
  12066. testUnmarshalErr(reflect.ValueOf(v267v2), bs267, h, t, "dec-map-v267-noaddr") // decode into non-addressable map value
  12067. testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-noaddr")
  12068. if v == nil {
  12069. v267v2 = nil
  12070. } else {
  12071. v267v2 = make(map[int64]float32, len(v))
  12072. } // reset map
  12073. testUnmarshalErr(&v267v2, bs267, h, t, "dec-map-v267-p-len")
  12074. testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-p-len")
  12075. bs267 = testMarshalErr(&v267v1, h, t, "enc-map-v267-p")
  12076. v267v2 = nil
  12077. testUnmarshalErr(&v267v2, bs267, h, t, "dec-map-v267-p-nil")
  12078. testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-p-nil")
  12079. // ...
  12080. if v == nil {
  12081. v267v2 = nil
  12082. } else {
  12083. v267v2 = make(map[int64]float32, len(v))
  12084. } // reset map
  12085. var v267v3, v267v4 typMapMapInt64Float32
  12086. v267v3 = typMapMapInt64Float32(v267v1)
  12087. v267v4 = typMapMapInt64Float32(v267v2)
  12088. bs267 = testMarshalErr(v267v3, h, t, "enc-map-v267-custom")
  12089. testUnmarshalErr(v267v4, bs267, h, t, "dec-map-v267-p-len")
  12090. testDeepEqualErr(v267v3, v267v4, t, "equal-map-v267-p-len")
  12091. }
  12092. for _, v := range []map[int64]float64{nil, {}, {33: 0, 44: 11.1}} {
  12093. // fmt.Printf(">>>> running mammoth map v268: %v\n", v)
  12094. var v268v1, v268v2 map[int64]float64
  12095. v268v1 = v
  12096. bs268 := testMarshalErr(v268v1, h, t, "enc-map-v268")
  12097. if v == nil {
  12098. v268v2 = nil
  12099. } else {
  12100. v268v2 = make(map[int64]float64, len(v))
  12101. } // reset map
  12102. testUnmarshalErr(v268v2, bs268, h, t, "dec-map-v268")
  12103. testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268")
  12104. if v == nil {
  12105. v268v2 = nil
  12106. } else {
  12107. v268v2 = make(map[int64]float64, len(v))
  12108. } // reset map
  12109. testUnmarshalErr(reflect.ValueOf(v268v2), bs268, h, t, "dec-map-v268-noaddr") // decode into non-addressable map value
  12110. testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-noaddr")
  12111. if v == nil {
  12112. v268v2 = nil
  12113. } else {
  12114. v268v2 = make(map[int64]float64, len(v))
  12115. } // reset map
  12116. testUnmarshalErr(&v268v2, bs268, h, t, "dec-map-v268-p-len")
  12117. testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-p-len")
  12118. bs268 = testMarshalErr(&v268v1, h, t, "enc-map-v268-p")
  12119. v268v2 = nil
  12120. testUnmarshalErr(&v268v2, bs268, h, t, "dec-map-v268-p-nil")
  12121. testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-p-nil")
  12122. // ...
  12123. if v == nil {
  12124. v268v2 = nil
  12125. } else {
  12126. v268v2 = make(map[int64]float64, len(v))
  12127. } // reset map
  12128. var v268v3, v268v4 typMapMapInt64Float64
  12129. v268v3 = typMapMapInt64Float64(v268v1)
  12130. v268v4 = typMapMapInt64Float64(v268v2)
  12131. bs268 = testMarshalErr(v268v3, h, t, "enc-map-v268-custom")
  12132. testUnmarshalErr(v268v4, bs268, h, t, "dec-map-v268-p-len")
  12133. testDeepEqualErr(v268v3, v268v4, t, "equal-map-v268-p-len")
  12134. }
  12135. for _, v := range []map[int64]bool{nil, {}, {33: false, 44: true}} {
  12136. // fmt.Printf(">>>> running mammoth map v269: %v\n", v)
  12137. var v269v1, v269v2 map[int64]bool
  12138. v269v1 = v
  12139. bs269 := testMarshalErr(v269v1, h, t, "enc-map-v269")
  12140. if v == nil {
  12141. v269v2 = nil
  12142. } else {
  12143. v269v2 = make(map[int64]bool, len(v))
  12144. } // reset map
  12145. testUnmarshalErr(v269v2, bs269, h, t, "dec-map-v269")
  12146. testDeepEqualErr(v269v1, v269v2, t, "equal-map-v269")
  12147. if v == nil {
  12148. v269v2 = nil
  12149. } else {
  12150. v269v2 = make(map[int64]bool, len(v))
  12151. } // reset map
  12152. testUnmarshalErr(reflect.ValueOf(v269v2), bs269, h, t, "dec-map-v269-noaddr") // decode into non-addressable map value
  12153. testDeepEqualErr(v269v1, v269v2, t, "equal-map-v269-noaddr")
  12154. if v == nil {
  12155. v269v2 = nil
  12156. } else {
  12157. v269v2 = make(map[int64]bool, len(v))
  12158. } // reset map
  12159. testUnmarshalErr(&v269v2, bs269, h, t, "dec-map-v269-p-len")
  12160. testDeepEqualErr(v269v1, v269v2, t, "equal-map-v269-p-len")
  12161. bs269 = testMarshalErr(&v269v1, h, t, "enc-map-v269-p")
  12162. v269v2 = nil
  12163. testUnmarshalErr(&v269v2, bs269, h, t, "dec-map-v269-p-nil")
  12164. testDeepEqualErr(v269v1, v269v2, t, "equal-map-v269-p-nil")
  12165. // ...
  12166. if v == nil {
  12167. v269v2 = nil
  12168. } else {
  12169. v269v2 = make(map[int64]bool, len(v))
  12170. } // reset map
  12171. var v269v3, v269v4 typMapMapInt64Bool
  12172. v269v3 = typMapMapInt64Bool(v269v1)
  12173. v269v4 = typMapMapInt64Bool(v269v2)
  12174. bs269 = testMarshalErr(v269v3, h, t, "enc-map-v269-custom")
  12175. testUnmarshalErr(v269v4, bs269, h, t, "dec-map-v269-p-len")
  12176. testDeepEqualErr(v269v3, v269v4, t, "equal-map-v269-p-len")
  12177. }
  12178. for _, v := range []map[bool]interface{}{nil, {}, {true: nil}} {
  12179. // fmt.Printf(">>>> running mammoth map v272: %v\n", v)
  12180. var v272v1, v272v2 map[bool]interface{}
  12181. v272v1 = v
  12182. bs272 := testMarshalErr(v272v1, h, t, "enc-map-v272")
  12183. if v == nil {
  12184. v272v2 = nil
  12185. } else {
  12186. v272v2 = make(map[bool]interface{}, len(v))
  12187. } // reset map
  12188. testUnmarshalErr(v272v2, bs272, h, t, "dec-map-v272")
  12189. testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272")
  12190. if v == nil {
  12191. v272v2 = nil
  12192. } else {
  12193. v272v2 = make(map[bool]interface{}, len(v))
  12194. } // reset map
  12195. testUnmarshalErr(reflect.ValueOf(v272v2), bs272, h, t, "dec-map-v272-noaddr") // decode into non-addressable map value
  12196. testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-noaddr")
  12197. if v == nil {
  12198. v272v2 = nil
  12199. } else {
  12200. v272v2 = make(map[bool]interface{}, len(v))
  12201. } // reset map
  12202. testUnmarshalErr(&v272v2, bs272, h, t, "dec-map-v272-p-len")
  12203. testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-p-len")
  12204. bs272 = testMarshalErr(&v272v1, h, t, "enc-map-v272-p")
  12205. v272v2 = nil
  12206. testUnmarshalErr(&v272v2, bs272, h, t, "dec-map-v272-p-nil")
  12207. testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-p-nil")
  12208. // ...
  12209. if v == nil {
  12210. v272v2 = nil
  12211. } else {
  12212. v272v2 = make(map[bool]interface{}, len(v))
  12213. } // reset map
  12214. var v272v3, v272v4 typMapMapBoolIntf
  12215. v272v3 = typMapMapBoolIntf(v272v1)
  12216. v272v4 = typMapMapBoolIntf(v272v2)
  12217. bs272 = testMarshalErr(v272v3, h, t, "enc-map-v272-custom")
  12218. testUnmarshalErr(v272v4, bs272, h, t, "dec-map-v272-p-len")
  12219. testDeepEqualErr(v272v3, v272v4, t, "equal-map-v272-p-len")
  12220. }
  12221. for _, v := range []map[bool]string{nil, {}, {true: ""}} {
  12222. // fmt.Printf(">>>> running mammoth map v273: %v\n", v)
  12223. var v273v1, v273v2 map[bool]string
  12224. v273v1 = v
  12225. bs273 := testMarshalErr(v273v1, h, t, "enc-map-v273")
  12226. if v == nil {
  12227. v273v2 = nil
  12228. } else {
  12229. v273v2 = make(map[bool]string, len(v))
  12230. } // reset map
  12231. testUnmarshalErr(v273v2, bs273, h, t, "dec-map-v273")
  12232. testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273")
  12233. if v == nil {
  12234. v273v2 = nil
  12235. } else {
  12236. v273v2 = make(map[bool]string, len(v))
  12237. } // reset map
  12238. testUnmarshalErr(reflect.ValueOf(v273v2), bs273, h, t, "dec-map-v273-noaddr") // decode into non-addressable map value
  12239. testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-noaddr")
  12240. if v == nil {
  12241. v273v2 = nil
  12242. } else {
  12243. v273v2 = make(map[bool]string, len(v))
  12244. } // reset map
  12245. testUnmarshalErr(&v273v2, bs273, h, t, "dec-map-v273-p-len")
  12246. testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-p-len")
  12247. bs273 = testMarshalErr(&v273v1, h, t, "enc-map-v273-p")
  12248. v273v2 = nil
  12249. testUnmarshalErr(&v273v2, bs273, h, t, "dec-map-v273-p-nil")
  12250. testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-p-nil")
  12251. // ...
  12252. if v == nil {
  12253. v273v2 = nil
  12254. } else {
  12255. v273v2 = make(map[bool]string, len(v))
  12256. } // reset map
  12257. var v273v3, v273v4 typMapMapBoolString
  12258. v273v3 = typMapMapBoolString(v273v1)
  12259. v273v4 = typMapMapBoolString(v273v2)
  12260. bs273 = testMarshalErr(v273v3, h, t, "enc-map-v273-custom")
  12261. testUnmarshalErr(v273v4, bs273, h, t, "dec-map-v273-p-len")
  12262. testDeepEqualErr(v273v3, v273v4, t, "equal-map-v273-p-len")
  12263. }
  12264. for _, v := range []map[bool]uint{nil, {}, {true: 0}} {
  12265. // fmt.Printf(">>>> running mammoth map v274: %v\n", v)
  12266. var v274v1, v274v2 map[bool]uint
  12267. v274v1 = v
  12268. bs274 := testMarshalErr(v274v1, h, t, "enc-map-v274")
  12269. if v == nil {
  12270. v274v2 = nil
  12271. } else {
  12272. v274v2 = make(map[bool]uint, len(v))
  12273. } // reset map
  12274. testUnmarshalErr(v274v2, bs274, h, t, "dec-map-v274")
  12275. testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274")
  12276. if v == nil {
  12277. v274v2 = nil
  12278. } else {
  12279. v274v2 = make(map[bool]uint, len(v))
  12280. } // reset map
  12281. testUnmarshalErr(reflect.ValueOf(v274v2), bs274, h, t, "dec-map-v274-noaddr") // decode into non-addressable map value
  12282. testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-noaddr")
  12283. if v == nil {
  12284. v274v2 = nil
  12285. } else {
  12286. v274v2 = make(map[bool]uint, len(v))
  12287. } // reset map
  12288. testUnmarshalErr(&v274v2, bs274, h, t, "dec-map-v274-p-len")
  12289. testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-p-len")
  12290. bs274 = testMarshalErr(&v274v1, h, t, "enc-map-v274-p")
  12291. v274v2 = nil
  12292. testUnmarshalErr(&v274v2, bs274, h, t, "dec-map-v274-p-nil")
  12293. testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-p-nil")
  12294. // ...
  12295. if v == nil {
  12296. v274v2 = nil
  12297. } else {
  12298. v274v2 = make(map[bool]uint, len(v))
  12299. } // reset map
  12300. var v274v3, v274v4 typMapMapBoolUint
  12301. v274v3 = typMapMapBoolUint(v274v1)
  12302. v274v4 = typMapMapBoolUint(v274v2)
  12303. bs274 = testMarshalErr(v274v3, h, t, "enc-map-v274-custom")
  12304. testUnmarshalErr(v274v4, bs274, h, t, "dec-map-v274-p-len")
  12305. testDeepEqualErr(v274v3, v274v4, t, "equal-map-v274-p-len")
  12306. }
  12307. for _, v := range []map[bool]uint8{nil, {}, {true: 0}} {
  12308. // fmt.Printf(">>>> running mammoth map v275: %v\n", v)
  12309. var v275v1, v275v2 map[bool]uint8
  12310. v275v1 = v
  12311. bs275 := testMarshalErr(v275v1, h, t, "enc-map-v275")
  12312. if v == nil {
  12313. v275v2 = nil
  12314. } else {
  12315. v275v2 = make(map[bool]uint8, len(v))
  12316. } // reset map
  12317. testUnmarshalErr(v275v2, bs275, h, t, "dec-map-v275")
  12318. testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275")
  12319. if v == nil {
  12320. v275v2 = nil
  12321. } else {
  12322. v275v2 = make(map[bool]uint8, len(v))
  12323. } // reset map
  12324. testUnmarshalErr(reflect.ValueOf(v275v2), bs275, h, t, "dec-map-v275-noaddr") // decode into non-addressable map value
  12325. testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-noaddr")
  12326. if v == nil {
  12327. v275v2 = nil
  12328. } else {
  12329. v275v2 = make(map[bool]uint8, len(v))
  12330. } // reset map
  12331. testUnmarshalErr(&v275v2, bs275, h, t, "dec-map-v275-p-len")
  12332. testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-p-len")
  12333. bs275 = testMarshalErr(&v275v1, h, t, "enc-map-v275-p")
  12334. v275v2 = nil
  12335. testUnmarshalErr(&v275v2, bs275, h, t, "dec-map-v275-p-nil")
  12336. testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-p-nil")
  12337. // ...
  12338. if v == nil {
  12339. v275v2 = nil
  12340. } else {
  12341. v275v2 = make(map[bool]uint8, len(v))
  12342. } // reset map
  12343. var v275v3, v275v4 typMapMapBoolUint8
  12344. v275v3 = typMapMapBoolUint8(v275v1)
  12345. v275v4 = typMapMapBoolUint8(v275v2)
  12346. bs275 = testMarshalErr(v275v3, h, t, "enc-map-v275-custom")
  12347. testUnmarshalErr(v275v4, bs275, h, t, "dec-map-v275-p-len")
  12348. testDeepEqualErr(v275v3, v275v4, t, "equal-map-v275-p-len")
  12349. }
  12350. for _, v := range []map[bool]uint16{nil, {}, {true: 0}} {
  12351. // fmt.Printf(">>>> running mammoth map v276: %v\n", v)
  12352. var v276v1, v276v2 map[bool]uint16
  12353. v276v1 = v
  12354. bs276 := testMarshalErr(v276v1, h, t, "enc-map-v276")
  12355. if v == nil {
  12356. v276v2 = nil
  12357. } else {
  12358. v276v2 = make(map[bool]uint16, len(v))
  12359. } // reset map
  12360. testUnmarshalErr(v276v2, bs276, h, t, "dec-map-v276")
  12361. testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276")
  12362. if v == nil {
  12363. v276v2 = nil
  12364. } else {
  12365. v276v2 = make(map[bool]uint16, len(v))
  12366. } // reset map
  12367. testUnmarshalErr(reflect.ValueOf(v276v2), bs276, h, t, "dec-map-v276-noaddr") // decode into non-addressable map value
  12368. testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-noaddr")
  12369. if v == nil {
  12370. v276v2 = nil
  12371. } else {
  12372. v276v2 = make(map[bool]uint16, len(v))
  12373. } // reset map
  12374. testUnmarshalErr(&v276v2, bs276, h, t, "dec-map-v276-p-len")
  12375. testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-p-len")
  12376. bs276 = testMarshalErr(&v276v1, h, t, "enc-map-v276-p")
  12377. v276v2 = nil
  12378. testUnmarshalErr(&v276v2, bs276, h, t, "dec-map-v276-p-nil")
  12379. testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-p-nil")
  12380. // ...
  12381. if v == nil {
  12382. v276v2 = nil
  12383. } else {
  12384. v276v2 = make(map[bool]uint16, len(v))
  12385. } // reset map
  12386. var v276v3, v276v4 typMapMapBoolUint16
  12387. v276v3 = typMapMapBoolUint16(v276v1)
  12388. v276v4 = typMapMapBoolUint16(v276v2)
  12389. bs276 = testMarshalErr(v276v3, h, t, "enc-map-v276-custom")
  12390. testUnmarshalErr(v276v4, bs276, h, t, "dec-map-v276-p-len")
  12391. testDeepEqualErr(v276v3, v276v4, t, "equal-map-v276-p-len")
  12392. }
  12393. for _, v := range []map[bool]uint32{nil, {}, {true: 0}} {
  12394. // fmt.Printf(">>>> running mammoth map v277: %v\n", v)
  12395. var v277v1, v277v2 map[bool]uint32
  12396. v277v1 = v
  12397. bs277 := testMarshalErr(v277v1, h, t, "enc-map-v277")
  12398. if v == nil {
  12399. v277v2 = nil
  12400. } else {
  12401. v277v2 = make(map[bool]uint32, len(v))
  12402. } // reset map
  12403. testUnmarshalErr(v277v2, bs277, h, t, "dec-map-v277")
  12404. testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277")
  12405. if v == nil {
  12406. v277v2 = nil
  12407. } else {
  12408. v277v2 = make(map[bool]uint32, len(v))
  12409. } // reset map
  12410. testUnmarshalErr(reflect.ValueOf(v277v2), bs277, h, t, "dec-map-v277-noaddr") // decode into non-addressable map value
  12411. testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-noaddr")
  12412. if v == nil {
  12413. v277v2 = nil
  12414. } else {
  12415. v277v2 = make(map[bool]uint32, len(v))
  12416. } // reset map
  12417. testUnmarshalErr(&v277v2, bs277, h, t, "dec-map-v277-p-len")
  12418. testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-p-len")
  12419. bs277 = testMarshalErr(&v277v1, h, t, "enc-map-v277-p")
  12420. v277v2 = nil
  12421. testUnmarshalErr(&v277v2, bs277, h, t, "dec-map-v277-p-nil")
  12422. testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-p-nil")
  12423. // ...
  12424. if v == nil {
  12425. v277v2 = nil
  12426. } else {
  12427. v277v2 = make(map[bool]uint32, len(v))
  12428. } // reset map
  12429. var v277v3, v277v4 typMapMapBoolUint32
  12430. v277v3 = typMapMapBoolUint32(v277v1)
  12431. v277v4 = typMapMapBoolUint32(v277v2)
  12432. bs277 = testMarshalErr(v277v3, h, t, "enc-map-v277-custom")
  12433. testUnmarshalErr(v277v4, bs277, h, t, "dec-map-v277-p-len")
  12434. testDeepEqualErr(v277v3, v277v4, t, "equal-map-v277-p-len")
  12435. }
  12436. for _, v := range []map[bool]uint64{nil, {}, {true: 0}} {
  12437. // fmt.Printf(">>>> running mammoth map v278: %v\n", v)
  12438. var v278v1, v278v2 map[bool]uint64
  12439. v278v1 = v
  12440. bs278 := testMarshalErr(v278v1, h, t, "enc-map-v278")
  12441. if v == nil {
  12442. v278v2 = nil
  12443. } else {
  12444. v278v2 = make(map[bool]uint64, len(v))
  12445. } // reset map
  12446. testUnmarshalErr(v278v2, bs278, h, t, "dec-map-v278")
  12447. testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278")
  12448. if v == nil {
  12449. v278v2 = nil
  12450. } else {
  12451. v278v2 = make(map[bool]uint64, len(v))
  12452. } // reset map
  12453. testUnmarshalErr(reflect.ValueOf(v278v2), bs278, h, t, "dec-map-v278-noaddr") // decode into non-addressable map value
  12454. testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-noaddr")
  12455. if v == nil {
  12456. v278v2 = nil
  12457. } else {
  12458. v278v2 = make(map[bool]uint64, len(v))
  12459. } // reset map
  12460. testUnmarshalErr(&v278v2, bs278, h, t, "dec-map-v278-p-len")
  12461. testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-p-len")
  12462. bs278 = testMarshalErr(&v278v1, h, t, "enc-map-v278-p")
  12463. v278v2 = nil
  12464. testUnmarshalErr(&v278v2, bs278, h, t, "dec-map-v278-p-nil")
  12465. testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-p-nil")
  12466. // ...
  12467. if v == nil {
  12468. v278v2 = nil
  12469. } else {
  12470. v278v2 = make(map[bool]uint64, len(v))
  12471. } // reset map
  12472. var v278v3, v278v4 typMapMapBoolUint64
  12473. v278v3 = typMapMapBoolUint64(v278v1)
  12474. v278v4 = typMapMapBoolUint64(v278v2)
  12475. bs278 = testMarshalErr(v278v3, h, t, "enc-map-v278-custom")
  12476. testUnmarshalErr(v278v4, bs278, h, t, "dec-map-v278-p-len")
  12477. testDeepEqualErr(v278v3, v278v4, t, "equal-map-v278-p-len")
  12478. }
  12479. for _, v := range []map[bool]uintptr{nil, {}, {true: 0}} {
  12480. // fmt.Printf(">>>> running mammoth map v279: %v\n", v)
  12481. var v279v1, v279v2 map[bool]uintptr
  12482. v279v1 = v
  12483. bs279 := testMarshalErr(v279v1, h, t, "enc-map-v279")
  12484. if v == nil {
  12485. v279v2 = nil
  12486. } else {
  12487. v279v2 = make(map[bool]uintptr, len(v))
  12488. } // reset map
  12489. testUnmarshalErr(v279v2, bs279, h, t, "dec-map-v279")
  12490. testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279")
  12491. if v == nil {
  12492. v279v2 = nil
  12493. } else {
  12494. v279v2 = make(map[bool]uintptr, len(v))
  12495. } // reset map
  12496. testUnmarshalErr(reflect.ValueOf(v279v2), bs279, h, t, "dec-map-v279-noaddr") // decode into non-addressable map value
  12497. testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-noaddr")
  12498. if v == nil {
  12499. v279v2 = nil
  12500. } else {
  12501. v279v2 = make(map[bool]uintptr, len(v))
  12502. } // reset map
  12503. testUnmarshalErr(&v279v2, bs279, h, t, "dec-map-v279-p-len")
  12504. testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-p-len")
  12505. bs279 = testMarshalErr(&v279v1, h, t, "enc-map-v279-p")
  12506. v279v2 = nil
  12507. testUnmarshalErr(&v279v2, bs279, h, t, "dec-map-v279-p-nil")
  12508. testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-p-nil")
  12509. // ...
  12510. if v == nil {
  12511. v279v2 = nil
  12512. } else {
  12513. v279v2 = make(map[bool]uintptr, len(v))
  12514. } // reset map
  12515. var v279v3, v279v4 typMapMapBoolUintptr
  12516. v279v3 = typMapMapBoolUintptr(v279v1)
  12517. v279v4 = typMapMapBoolUintptr(v279v2)
  12518. bs279 = testMarshalErr(v279v3, h, t, "enc-map-v279-custom")
  12519. testUnmarshalErr(v279v4, bs279, h, t, "dec-map-v279-p-len")
  12520. testDeepEqualErr(v279v3, v279v4, t, "equal-map-v279-p-len")
  12521. }
  12522. for _, v := range []map[bool]int{nil, {}, {true: 0}} {
  12523. // fmt.Printf(">>>> running mammoth map v280: %v\n", v)
  12524. var v280v1, v280v2 map[bool]int
  12525. v280v1 = v
  12526. bs280 := testMarshalErr(v280v1, h, t, "enc-map-v280")
  12527. if v == nil {
  12528. v280v2 = nil
  12529. } else {
  12530. v280v2 = make(map[bool]int, len(v))
  12531. } // reset map
  12532. testUnmarshalErr(v280v2, bs280, h, t, "dec-map-v280")
  12533. testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280")
  12534. if v == nil {
  12535. v280v2 = nil
  12536. } else {
  12537. v280v2 = make(map[bool]int, len(v))
  12538. } // reset map
  12539. testUnmarshalErr(reflect.ValueOf(v280v2), bs280, h, t, "dec-map-v280-noaddr") // decode into non-addressable map value
  12540. testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-noaddr")
  12541. if v == nil {
  12542. v280v2 = nil
  12543. } else {
  12544. v280v2 = make(map[bool]int, len(v))
  12545. } // reset map
  12546. testUnmarshalErr(&v280v2, bs280, h, t, "dec-map-v280-p-len")
  12547. testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-p-len")
  12548. bs280 = testMarshalErr(&v280v1, h, t, "enc-map-v280-p")
  12549. v280v2 = nil
  12550. testUnmarshalErr(&v280v2, bs280, h, t, "dec-map-v280-p-nil")
  12551. testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-p-nil")
  12552. // ...
  12553. if v == nil {
  12554. v280v2 = nil
  12555. } else {
  12556. v280v2 = make(map[bool]int, len(v))
  12557. } // reset map
  12558. var v280v3, v280v4 typMapMapBoolInt
  12559. v280v3 = typMapMapBoolInt(v280v1)
  12560. v280v4 = typMapMapBoolInt(v280v2)
  12561. bs280 = testMarshalErr(v280v3, h, t, "enc-map-v280-custom")
  12562. testUnmarshalErr(v280v4, bs280, h, t, "dec-map-v280-p-len")
  12563. testDeepEqualErr(v280v3, v280v4, t, "equal-map-v280-p-len")
  12564. }
  12565. for _, v := range []map[bool]int8{nil, {}, {true: 0}} {
  12566. // fmt.Printf(">>>> running mammoth map v281: %v\n", v)
  12567. var v281v1, v281v2 map[bool]int8
  12568. v281v1 = v
  12569. bs281 := testMarshalErr(v281v1, h, t, "enc-map-v281")
  12570. if v == nil {
  12571. v281v2 = nil
  12572. } else {
  12573. v281v2 = make(map[bool]int8, len(v))
  12574. } // reset map
  12575. testUnmarshalErr(v281v2, bs281, h, t, "dec-map-v281")
  12576. testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281")
  12577. if v == nil {
  12578. v281v2 = nil
  12579. } else {
  12580. v281v2 = make(map[bool]int8, len(v))
  12581. } // reset map
  12582. testUnmarshalErr(reflect.ValueOf(v281v2), bs281, h, t, "dec-map-v281-noaddr") // decode into non-addressable map value
  12583. testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-noaddr")
  12584. if v == nil {
  12585. v281v2 = nil
  12586. } else {
  12587. v281v2 = make(map[bool]int8, len(v))
  12588. } // reset map
  12589. testUnmarshalErr(&v281v2, bs281, h, t, "dec-map-v281-p-len")
  12590. testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-p-len")
  12591. bs281 = testMarshalErr(&v281v1, h, t, "enc-map-v281-p")
  12592. v281v2 = nil
  12593. testUnmarshalErr(&v281v2, bs281, h, t, "dec-map-v281-p-nil")
  12594. testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-p-nil")
  12595. // ...
  12596. if v == nil {
  12597. v281v2 = nil
  12598. } else {
  12599. v281v2 = make(map[bool]int8, len(v))
  12600. } // reset map
  12601. var v281v3, v281v4 typMapMapBoolInt8
  12602. v281v3 = typMapMapBoolInt8(v281v1)
  12603. v281v4 = typMapMapBoolInt8(v281v2)
  12604. bs281 = testMarshalErr(v281v3, h, t, "enc-map-v281-custom")
  12605. testUnmarshalErr(v281v4, bs281, h, t, "dec-map-v281-p-len")
  12606. testDeepEqualErr(v281v3, v281v4, t, "equal-map-v281-p-len")
  12607. }
  12608. for _, v := range []map[bool]int16{nil, {}, {true: 0}} {
  12609. // fmt.Printf(">>>> running mammoth map v282: %v\n", v)
  12610. var v282v1, v282v2 map[bool]int16
  12611. v282v1 = v
  12612. bs282 := testMarshalErr(v282v1, h, t, "enc-map-v282")
  12613. if v == nil {
  12614. v282v2 = nil
  12615. } else {
  12616. v282v2 = make(map[bool]int16, len(v))
  12617. } // reset map
  12618. testUnmarshalErr(v282v2, bs282, h, t, "dec-map-v282")
  12619. testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282")
  12620. if v == nil {
  12621. v282v2 = nil
  12622. } else {
  12623. v282v2 = make(map[bool]int16, len(v))
  12624. } // reset map
  12625. testUnmarshalErr(reflect.ValueOf(v282v2), bs282, h, t, "dec-map-v282-noaddr") // decode into non-addressable map value
  12626. testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-noaddr")
  12627. if v == nil {
  12628. v282v2 = nil
  12629. } else {
  12630. v282v2 = make(map[bool]int16, len(v))
  12631. } // reset map
  12632. testUnmarshalErr(&v282v2, bs282, h, t, "dec-map-v282-p-len")
  12633. testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-p-len")
  12634. bs282 = testMarshalErr(&v282v1, h, t, "enc-map-v282-p")
  12635. v282v2 = nil
  12636. testUnmarshalErr(&v282v2, bs282, h, t, "dec-map-v282-p-nil")
  12637. testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-p-nil")
  12638. // ...
  12639. if v == nil {
  12640. v282v2 = nil
  12641. } else {
  12642. v282v2 = make(map[bool]int16, len(v))
  12643. } // reset map
  12644. var v282v3, v282v4 typMapMapBoolInt16
  12645. v282v3 = typMapMapBoolInt16(v282v1)
  12646. v282v4 = typMapMapBoolInt16(v282v2)
  12647. bs282 = testMarshalErr(v282v3, h, t, "enc-map-v282-custom")
  12648. testUnmarshalErr(v282v4, bs282, h, t, "dec-map-v282-p-len")
  12649. testDeepEqualErr(v282v3, v282v4, t, "equal-map-v282-p-len")
  12650. }
  12651. for _, v := range []map[bool]int32{nil, {}, {true: 0}} {
  12652. // fmt.Printf(">>>> running mammoth map v283: %v\n", v)
  12653. var v283v1, v283v2 map[bool]int32
  12654. v283v1 = v
  12655. bs283 := testMarshalErr(v283v1, h, t, "enc-map-v283")
  12656. if v == nil {
  12657. v283v2 = nil
  12658. } else {
  12659. v283v2 = make(map[bool]int32, len(v))
  12660. } // reset map
  12661. testUnmarshalErr(v283v2, bs283, h, t, "dec-map-v283")
  12662. testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283")
  12663. if v == nil {
  12664. v283v2 = nil
  12665. } else {
  12666. v283v2 = make(map[bool]int32, len(v))
  12667. } // reset map
  12668. testUnmarshalErr(reflect.ValueOf(v283v2), bs283, h, t, "dec-map-v283-noaddr") // decode into non-addressable map value
  12669. testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-noaddr")
  12670. if v == nil {
  12671. v283v2 = nil
  12672. } else {
  12673. v283v2 = make(map[bool]int32, len(v))
  12674. } // reset map
  12675. testUnmarshalErr(&v283v2, bs283, h, t, "dec-map-v283-p-len")
  12676. testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-p-len")
  12677. bs283 = testMarshalErr(&v283v1, h, t, "enc-map-v283-p")
  12678. v283v2 = nil
  12679. testUnmarshalErr(&v283v2, bs283, h, t, "dec-map-v283-p-nil")
  12680. testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-p-nil")
  12681. // ...
  12682. if v == nil {
  12683. v283v2 = nil
  12684. } else {
  12685. v283v2 = make(map[bool]int32, len(v))
  12686. } // reset map
  12687. var v283v3, v283v4 typMapMapBoolInt32
  12688. v283v3 = typMapMapBoolInt32(v283v1)
  12689. v283v4 = typMapMapBoolInt32(v283v2)
  12690. bs283 = testMarshalErr(v283v3, h, t, "enc-map-v283-custom")
  12691. testUnmarshalErr(v283v4, bs283, h, t, "dec-map-v283-p-len")
  12692. testDeepEqualErr(v283v3, v283v4, t, "equal-map-v283-p-len")
  12693. }
  12694. for _, v := range []map[bool]int64{nil, {}, {true: 0}} {
  12695. // fmt.Printf(">>>> running mammoth map v284: %v\n", v)
  12696. var v284v1, v284v2 map[bool]int64
  12697. v284v1 = v
  12698. bs284 := testMarshalErr(v284v1, h, t, "enc-map-v284")
  12699. if v == nil {
  12700. v284v2 = nil
  12701. } else {
  12702. v284v2 = make(map[bool]int64, len(v))
  12703. } // reset map
  12704. testUnmarshalErr(v284v2, bs284, h, t, "dec-map-v284")
  12705. testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284")
  12706. if v == nil {
  12707. v284v2 = nil
  12708. } else {
  12709. v284v2 = make(map[bool]int64, len(v))
  12710. } // reset map
  12711. testUnmarshalErr(reflect.ValueOf(v284v2), bs284, h, t, "dec-map-v284-noaddr") // decode into non-addressable map value
  12712. testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-noaddr")
  12713. if v == nil {
  12714. v284v2 = nil
  12715. } else {
  12716. v284v2 = make(map[bool]int64, len(v))
  12717. } // reset map
  12718. testUnmarshalErr(&v284v2, bs284, h, t, "dec-map-v284-p-len")
  12719. testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-p-len")
  12720. bs284 = testMarshalErr(&v284v1, h, t, "enc-map-v284-p")
  12721. v284v2 = nil
  12722. testUnmarshalErr(&v284v2, bs284, h, t, "dec-map-v284-p-nil")
  12723. testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-p-nil")
  12724. // ...
  12725. if v == nil {
  12726. v284v2 = nil
  12727. } else {
  12728. v284v2 = make(map[bool]int64, len(v))
  12729. } // reset map
  12730. var v284v3, v284v4 typMapMapBoolInt64
  12731. v284v3 = typMapMapBoolInt64(v284v1)
  12732. v284v4 = typMapMapBoolInt64(v284v2)
  12733. bs284 = testMarshalErr(v284v3, h, t, "enc-map-v284-custom")
  12734. testUnmarshalErr(v284v4, bs284, h, t, "dec-map-v284-p-len")
  12735. testDeepEqualErr(v284v3, v284v4, t, "equal-map-v284-p-len")
  12736. }
  12737. for _, v := range []map[bool]float32{nil, {}, {true: 0}} {
  12738. // fmt.Printf(">>>> running mammoth map v285: %v\n", v)
  12739. var v285v1, v285v2 map[bool]float32
  12740. v285v1 = v
  12741. bs285 := testMarshalErr(v285v1, h, t, "enc-map-v285")
  12742. if v == nil {
  12743. v285v2 = nil
  12744. } else {
  12745. v285v2 = make(map[bool]float32, len(v))
  12746. } // reset map
  12747. testUnmarshalErr(v285v2, bs285, h, t, "dec-map-v285")
  12748. testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285")
  12749. if v == nil {
  12750. v285v2 = nil
  12751. } else {
  12752. v285v2 = make(map[bool]float32, len(v))
  12753. } // reset map
  12754. testUnmarshalErr(reflect.ValueOf(v285v2), bs285, h, t, "dec-map-v285-noaddr") // decode into non-addressable map value
  12755. testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-noaddr")
  12756. if v == nil {
  12757. v285v2 = nil
  12758. } else {
  12759. v285v2 = make(map[bool]float32, len(v))
  12760. } // reset map
  12761. testUnmarshalErr(&v285v2, bs285, h, t, "dec-map-v285-p-len")
  12762. testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-p-len")
  12763. bs285 = testMarshalErr(&v285v1, h, t, "enc-map-v285-p")
  12764. v285v2 = nil
  12765. testUnmarshalErr(&v285v2, bs285, h, t, "dec-map-v285-p-nil")
  12766. testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-p-nil")
  12767. // ...
  12768. if v == nil {
  12769. v285v2 = nil
  12770. } else {
  12771. v285v2 = make(map[bool]float32, len(v))
  12772. } // reset map
  12773. var v285v3, v285v4 typMapMapBoolFloat32
  12774. v285v3 = typMapMapBoolFloat32(v285v1)
  12775. v285v4 = typMapMapBoolFloat32(v285v2)
  12776. bs285 = testMarshalErr(v285v3, h, t, "enc-map-v285-custom")
  12777. testUnmarshalErr(v285v4, bs285, h, t, "dec-map-v285-p-len")
  12778. testDeepEqualErr(v285v3, v285v4, t, "equal-map-v285-p-len")
  12779. }
  12780. for _, v := range []map[bool]float64{nil, {}, {true: 0}} {
  12781. // fmt.Printf(">>>> running mammoth map v286: %v\n", v)
  12782. var v286v1, v286v2 map[bool]float64
  12783. v286v1 = v
  12784. bs286 := testMarshalErr(v286v1, h, t, "enc-map-v286")
  12785. if v == nil {
  12786. v286v2 = nil
  12787. } else {
  12788. v286v2 = make(map[bool]float64, len(v))
  12789. } // reset map
  12790. testUnmarshalErr(v286v2, bs286, h, t, "dec-map-v286")
  12791. testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286")
  12792. if v == nil {
  12793. v286v2 = nil
  12794. } else {
  12795. v286v2 = make(map[bool]float64, len(v))
  12796. } // reset map
  12797. testUnmarshalErr(reflect.ValueOf(v286v2), bs286, h, t, "dec-map-v286-noaddr") // decode into non-addressable map value
  12798. testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-noaddr")
  12799. if v == nil {
  12800. v286v2 = nil
  12801. } else {
  12802. v286v2 = make(map[bool]float64, len(v))
  12803. } // reset map
  12804. testUnmarshalErr(&v286v2, bs286, h, t, "dec-map-v286-p-len")
  12805. testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-p-len")
  12806. bs286 = testMarshalErr(&v286v1, h, t, "enc-map-v286-p")
  12807. v286v2 = nil
  12808. testUnmarshalErr(&v286v2, bs286, h, t, "dec-map-v286-p-nil")
  12809. testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-p-nil")
  12810. // ...
  12811. if v == nil {
  12812. v286v2 = nil
  12813. } else {
  12814. v286v2 = make(map[bool]float64, len(v))
  12815. } // reset map
  12816. var v286v3, v286v4 typMapMapBoolFloat64
  12817. v286v3 = typMapMapBoolFloat64(v286v1)
  12818. v286v4 = typMapMapBoolFloat64(v286v2)
  12819. bs286 = testMarshalErr(v286v3, h, t, "enc-map-v286-custom")
  12820. testUnmarshalErr(v286v4, bs286, h, t, "dec-map-v286-p-len")
  12821. testDeepEqualErr(v286v3, v286v4, t, "equal-map-v286-p-len")
  12822. }
  12823. for _, v := range []map[bool]bool{nil, {}, {true: false}} {
  12824. // fmt.Printf(">>>> running mammoth map v287: %v\n", v)
  12825. var v287v1, v287v2 map[bool]bool
  12826. v287v1 = v
  12827. bs287 := testMarshalErr(v287v1, h, t, "enc-map-v287")
  12828. if v == nil {
  12829. v287v2 = nil
  12830. } else {
  12831. v287v2 = make(map[bool]bool, len(v))
  12832. } // reset map
  12833. testUnmarshalErr(v287v2, bs287, h, t, "dec-map-v287")
  12834. testDeepEqualErr(v287v1, v287v2, t, "equal-map-v287")
  12835. if v == nil {
  12836. v287v2 = nil
  12837. } else {
  12838. v287v2 = make(map[bool]bool, len(v))
  12839. } // reset map
  12840. testUnmarshalErr(reflect.ValueOf(v287v2), bs287, h, t, "dec-map-v287-noaddr") // decode into non-addressable map value
  12841. testDeepEqualErr(v287v1, v287v2, t, "equal-map-v287-noaddr")
  12842. if v == nil {
  12843. v287v2 = nil
  12844. } else {
  12845. v287v2 = make(map[bool]bool, len(v))
  12846. } // reset map
  12847. testUnmarshalErr(&v287v2, bs287, h, t, "dec-map-v287-p-len")
  12848. testDeepEqualErr(v287v1, v287v2, t, "equal-map-v287-p-len")
  12849. bs287 = testMarshalErr(&v287v1, h, t, "enc-map-v287-p")
  12850. v287v2 = nil
  12851. testUnmarshalErr(&v287v2, bs287, h, t, "dec-map-v287-p-nil")
  12852. testDeepEqualErr(v287v1, v287v2, t, "equal-map-v287-p-nil")
  12853. // ...
  12854. if v == nil {
  12855. v287v2 = nil
  12856. } else {
  12857. v287v2 = make(map[bool]bool, len(v))
  12858. } // reset map
  12859. var v287v3, v287v4 typMapMapBoolBool
  12860. v287v3 = typMapMapBoolBool(v287v1)
  12861. v287v4 = typMapMapBoolBool(v287v2)
  12862. bs287 = testMarshalErr(v287v3, h, t, "enc-map-v287-custom")
  12863. testUnmarshalErr(v287v4, bs287, h, t, "dec-map-v287-p-len")
  12864. testDeepEqualErr(v287v3, v287v4, t, "equal-map-v287-p-len")
  12865. }
  12866. }
  12867. func doTestMammothMapsAndSlices(t *testing.T, h Handle) {
  12868. doTestMammothSlices(t, h)
  12869. doTestMammothMaps(t, h)
  12870. }