From 28ef29fe5044fb7e401229900cb1a1fd823a0330 Mon Sep 17 00:00:00 2001 From: Antoniu Pop Date: Wed, 19 Feb 2025 09:08:28 +0000 Subject: [PATCH] chore(tests): fix expected return values in random tests --- fhevm-engine/coprocessor/src/tests/random.rs | 48 ++++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/fhevm-engine/coprocessor/src/tests/random.rs b/fhevm-engine/coprocessor/src/tests/random.rs index 494ad377..cb1f6a12 100644 --- a/fhevm-engine/coprocessor/src/tests/random.rs +++ b/fhevm-engine/coprocessor/src/tests/random.rs @@ -116,18 +116,18 @@ async fn test_fhe_random_basic() -> Result<(), Box> { let decrypt_request = output_handles.clone(); let resp = decrypt_ciphertexts(&pool, 1, decrypt_request).await?; let expected: Vec = vec![ - DecryptionResult { value: "false".to_string(), output_type: 0 }, - DecryptionResult { value: "0".to_string(), output_type: 1 }, - DecryptionResult { value: "32".to_string(), output_type: 2 }, - DecryptionResult { value: "11808".to_string(), output_type: 3 }, - DecryptionResult { value: "629550624".to_string(), output_type: 4 }, - DecryptionResult { value: "3599940269858237984".to_string(), output_type: 5 }, - DecryptionResult { value: "150656153923308677215624867801423293984".to_string(), output_type: 6 }, - DecryptionResult { value: "1261613769508706031045665600428040676770937450016".to_string(), output_type: 7 }, - DecryptionResult { value: "18986873298894233193145929080150256577322576591471711287367330129765741243936".to_string(), output_type: 8 }, - DecryptionResult { value: "10232350915780295990148615700987438737697741448785160860135259387386215782819850109804323105785900141458372909187170741294522096847981892229609774582738464".to_string(), output_type: 9 }, - DecryptionResult { value: "114367637199514847280448439417333260889725768550794741460093029758684557000312443906223981262973346694472790204966807897959645636684378913727005482338418513179184032059107143496248018885275767404657195894019321555130941197468256351150140818663045904088790403066627628439931419938370391918367209538518541282848".to_string(), output_type: 10 }, - DecryptionResult { value: "23940285086149406195104910222696349773472952003969972901666479954284412735482075737869257567496112381323535591795817090039940361948031502028694254712019646399685913783316013749903402108425160731492109549265457576392817155024878310259964474796614021191592424323638774487508424508416957672843897425589775197725978251329316157873335206056648769835100133311157452200251642784760686809522544321619752333854545498304174217444123021187312416085732051585256387418702550559610091526362070737477336848035323232793394860744635340095871616414245206326412912897684765261334599455438505400455977427966529860876570606701934348217888".to_string(), output_type: 11 } + DecryptionResult { value: "true".to_string(), output_type: 0 }, + DecryptionResult { value: "10".to_string(), output_type: 1 }, + DecryptionResult { value: "74".to_string(), output_type: 2 }, + DecryptionResult { value: "20042".to_string(), output_type: 3 }, + DecryptionResult { value: "2317110858".to_string(), output_type: 4 }, + DecryptionResult { value: "3781517732040429130".to_string(), output_type: 5 }, + DecryptionResult { value: "173067494276272686594848549919321247306".to_string(), output_type: 6 }, + DecryptionResult { value: "1094515384870572566830339459490292190735847149130".to_string(), output_type: 7 }, + DecryptionResult { value: "708862794572017520787824189501889310665101791528313059693660933975816556106".to_string(), output_type: 8 }, + DecryptionResult { value: "12730235082833568380334594754488662004233832431992980449804758406069160864275028020962155601245523679819346268699252919365791199191241634613862853049601610".to_string(), output_type: 9 }, + DecryptionResult { value: "108080741562249556931009330483536710085758122079454929899567131003800646884284657303009577197577435564912115080988607041335379236995946564760399287610685200564494202954787898550157622716115053586508022488999714877512770859433667427323545700100098005683083248085496846062049536709006011184102093099103655054922".to_string(), output_type: 10 }, + DecryptionResult { value: "20861508589877342907727084703622550598935352998746120842950395081753632435267183114988504993162213367166862517403829273790814314107740319854089900370739997411799274100417555415192972122100470155923419604034291807093541986108659977790911517837161376588397655175961399498725202642377614760931166783035115963547101181507813456254749873668327253075828261674997156280447164928833111149986197323155994656673039741155124831297907623530345138812274608251091216970172997278005915715893955210806849703477333174085073707097135005438554387123608323887293974874745441977610516712982266319433597579122608490187852748993192739491402".to_string(), output_type: 11 } ]; println!("results: {:#?}", resp); @@ -189,18 +189,18 @@ async fn test_fhe_random_bounded() -> Result<(), Box> { "8079251517827751825178719172167487990111025667428871008032586356881163784716972723299300352880728365922179490230474504873529889787622730273772038096612070780157719341825249022937549437597413026699014409596016892069198054660654939040459523584619042617645411463009076260721893972885266452151888099780982596380478583347417085605171243696641142373714044008831580514519451414832756548177115078537564648216044279181485900929615464339399587788075411476100924403308321807806781421177705052431289275431732830867419635645164174483761499317088249659553881291597359333885900533858307401161329619651238037048388963402764899057664", ]; let results = [ - "false", - "0", - "32", - "11808", - "629550624", - "3599940269858237984", - "65585562193074061349781215943481241120", - "165487541510528842392901975890828412028988042784", - "18986873298894233193145929080150256577322576591471711287367330129765741243936", - "176494968323348165468096952333054142088217083340865826842588304594892760264689877202917382160722570690849015547306203154206684739021964769784537828175392", - "24482980456399051893983179877882024208826919603679412823377989179818219097561962339869742601769578683912733265031111219130250752277170602480581767018681450990300085346674400858096909084652720344930654417976818670711865856297024910413184263392632285507115147724334479319957796969130533765949531373706429214240", - "7781782050493902544747471878361373793250900669112230885601307240522085166048130291270656861734655649479176611334868080292880582372786041481150178518795504839370475099665515704028303233230334678094080730073423792254421045703568432179045427627375935956301601397620621966064636562646424768540121226027810004965021084634481986662992718663366485087672045293494291171212739955095173713168314164544623037422456939941202415584892092508513240509581228633054538612085906943996528684006660632614758297171857571058555589454306991128348617780068707007305150314490046593562798387721890598133318188664053786779792679896404550102560", + "true", + "2", + "10", + "3658", + "169627210", + "3781517732040429130", + "2926310815803454863161246203437141578", + "363764566205121107728497043132150680907880877642", + "708862794572017520787824189501889310665101791528313059693660933975816556106", + "2674379135376620555654076005834277408624308066548685416512087323277837841719867788360749877620346109051822375059388381225475787082281707154037616295038538", + "18196084819133761544544070944085473404859273132339601262852090424934308981534175736655338536373667554352058141052910362505984352588738253513975572290948138375610256242355155912006512915492006526781481012957211993093695518262435986586589144829684387101407992743203696942075913739766153031684414934291542986314", + "4703005554221839257369646359287574618713301663888378826885222367991304865833237668389904287400756635322503536942880264043754534532494859306545824177515855851483835416767057369317873246905644102525390784842258022955145876787350099709992470667923291353106832249943246977281414696607081856627390583473150770786144014812979285044407386275044968328400173657333995251408262099167598053631967166080865360240951182792153029438676694851545963236123785298889368163556353662392352873538545105944271152613867512350234435806806656471031388489431824568186212291550723309838715645265651517110938339820132416091074822187662941376074", ]; for (idx, the_type) in supported_types().iter().enumerate() {