00001
00026 #include <QtCrypto>
00027 #include <QtTest/QtTest>
00028
00029 class BigIntUnitTest : public QObject
00030 {
00031 Q_OBJECT
00032
00033 private slots:
00034 void initTestCase();
00035 void cleanupTestCase();
00036 void allTests();
00037 private:
00038 QCA::Initializer* m_init;
00039 };
00040
00041 void BigIntUnitTest::initTestCase()
00042 {
00043 m_init = new QCA::Initializer;
00044 #include "../fixpaths.include"
00045 }
00046
00047 void BigIntUnitTest::cleanupTestCase()
00048 {
00049 delete m_init;
00050 }
00051
00052 void BigIntUnitTest::allTests()
00053 {
00054 QCA::BigInteger result;
00055
00056
00057 QCOMPARE( QCA::BigInteger("255").toString(), QCA::BigInteger(255).toString() );
00058 QCOMPARE( QCA::BigInteger("-255").toString(), QCA::BigInteger(-255).toString() );
00059 QCOMPARE( QCA::BigInteger("255").toString(), QString("255") );
00060 QCOMPARE( QCA::BigInteger("-255").toString(), QString("-255") );
00061
00062
00063 QCOMPARE( QCA::BigInteger("255") == QCA::BigInteger(255), true );
00064 QCOMPARE( QCA::BigInteger("-255") == QCA::BigInteger(-255), true );
00065 QCOMPARE( QCA::BigInteger("256") != QCA::BigInteger(255), true );
00066 QCOMPARE( QCA::BigInteger("-256") != QCA::BigInteger(-255), true );
00067
00068
00069 QCA::BigInteger a( "4000000000000" );
00070 QCA::BigInteger b( "-4000000000000" );
00071 QCA::BigInteger c( "2000000000000" );
00072 QCOMPARE( a < b, false );
00073 QCOMPARE( a <= b, false );
00074 QCOMPARE( a.compare(b), 1 );
00075 QCOMPARE( a > b, true );
00076 QCOMPARE( a >= b, true );
00077 QCOMPARE( a > c, true );
00078 QCOMPARE( c.compare(b), 1 );
00079 QCOMPARE( c.compare(a), -1 );
00080
00081
00082 QString testString;
00083 QTextStream ts( &testString, QIODevice::WriteOnly);
00084 ts << a << b << c << endl;
00085 QCOMPARE( testString, QString( "4000000000000-40000000000002000000000000\n") );
00086
00087
00088 QCOMPARE( QCA::BigInteger( 255 ) += QCA::BigInteger ( 1 ), QCA::BigInteger( 256 ) );
00089 result = QCA::BigInteger( 255 ) += QCA::BigInteger( 1 );
00090 QCOMPARE( result.toString(), QCA::BigInteger( 256 ).toString() );
00091
00092 result = QCA::BigInteger( "65535" ) += QCA::BigInteger( "1" );
00093 QCOMPARE( result.toString(), QString( "65536" ) );
00094 QCOMPARE( result, QCA::BigInteger( "65536") );
00095
00096 result = QCA::BigInteger( "4294967295" ) += QCA::BigInteger( 1 );
00097 QCOMPARE( result.toString(), QString( "4294967296" ) );
00098 QCOMPARE( result, QCA::BigInteger( "4294967296" ) );
00099
00100 result = QCA::BigInteger( "18446744073709551615" ) += QCA::BigInteger( 1 );
00101 QCOMPARE( result.toString(), QString( "18446744073709551616" ) );
00102 QCOMPARE( result, QCA::BigInteger( "18446744073709551616" ) );
00103
00104 result = QCA::BigInteger( "124536363637272472" ) += QCA::BigInteger( "124536363637272472" );
00105 QCOMPARE( result.toString(), QString ( "249072727274544944" ) );
00106 QCOMPARE( result, QCA::BigInteger ( "249072727274544944" ) );
00107
00108 result = QCA::BigInteger( "9223372036854775807" ) += QCA::BigInteger( "281474976710655" );
00109 QCOMPARE( result.toString(), QString ( "9223653511831486462" ) );
00110 QCOMPARE( result, QCA::BigInteger ( "9223653511831486462" ) );
00111
00112 result = QCA::BigInteger( "9223372036854775807" ) += QCA::BigInteger( "137438953471" );
00113 QCOMPARE( result.toString(), QString( "9223372174293729278" ) );
00114 QCOMPARE( result, QCA::BigInteger( "9223372174293729278" ) );
00115
00116
00117
00118 result = QCA::BigInteger( "340282366920938463463374607431768211455" )
00119 += QCA::BigInteger( "340282366920938463463374607431768211455" );
00120 QCOMPARE( result.toString(), QString( "680564733841876926926749214863536422910" ) );
00121 QCOMPARE( result, QCA::BigInteger( "680564733841876926926749214863536422910" ) );
00122
00123 result = QCA::BigInteger( "340282366920938463463374607431768211455" )
00124 += QCA::BigInteger( "340282366920938463463374607431768211450" );
00125 QCOMPARE( result.toString(), QString( "680564733841876926926749214863536422905" ) );
00126 QCOMPARE( result, QCA::BigInteger( "680564733841876926926749214863536422905" ) );
00127
00128 result = QCA::BigInteger( "115792089237316195423570985008687907853269984665640564039457584007913129639935" )
00129 += QCA::BigInteger( "115792089237316195423570985008687907853269984665640564039457584007913129639935" );
00130 QCOMPARE( result.toString(), QString( "231584178474632390847141970017375815706539969331281128078915168015826259279870" ) );
00131 QCOMPARE( result, QCA::BigInteger( "231584178474632390847141970017375815706539969331281128078915168015826259279870" ) );
00132
00133 result = QCA::BigInteger( "115792089237316195423570985008687907853269984665640564039457584007913129639935" )
00134 += QCA::BigInteger( "115792089237316195423570985008687907853269984665640564039457584007913129639919" );
00135 QCOMPARE( result.toString(), QString( "231584178474632390847141970017375815706539969331281128078915168015826259279854") );
00136 QCOMPARE( result, QCA::BigInteger( "231584178474632390847141970017375815706539969331281128078915168015826259279854") );
00137
00138 result = QCA::BigInteger( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095" )
00139 += QCA::BigInteger( "18446744073709551616" );
00140 QCOMPARE( result.toString(), QString( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946588393177722715635711" ) );
00141 QCOMPARE( result, QCA::BigInteger( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946588393177722715635711" ) );
00142
00143
00144 result = QCA::BigInteger( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095" )
00145 += QCA::BigInteger( "1" );
00146 QCOMPARE( result.toString(), QString( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096" ) );
00147 QCOMPARE( result, QCA::BigInteger( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096" ) );
00148
00149 result = QCA::BigInteger( "-39794270013919406610834826960427146769766189764838473416502965291920535601112688579198627475284777498059330306128763345008528325994574657552726381901" )
00150 += QCA::BigInteger( "-342238655038" );
00151 QCOMPARE( result.toString(), QString( "-39794270013919406610834826960427146769766189764838473416502965291920535601112688579198627475284777498059330306128763345008528325994574657894965036939" ) );
00152 QCOMPARE( result, QCA::BigInteger( "-39794270013919406610834826960427146769766189764838473416502965291920535601112688579198627475284777498059330306128763345008528325994574657894965036939" ) );
00153
00154 result = QCA::BigInteger( "25110291853498940831251897922987678157346336093292373576945426289097725034326735312448621015537884914" )
00155 += QCA::BigInteger( "-36551081154398645734533965739979697527373251608055056627686956281114038842935173436543461" );
00156 QCOMPARE( result.toString(), QString( "25110291853462389750097499277253144191606356395765000325337371232470038078045621273605685842101341453") );
00157 QCOMPARE( result, QCA::BigInteger( "25110291853462389750097499277253144191606356395765000325337371232470038078045621273605685842101341453") );
00158
00159 result = QCA::BigInteger( "27802650352" )
00160 += QCA::BigInteger( "660736146705288303126411072388564329913778942" );
00161 QCOMPARE( result.toString(), QString( "660736146705288303126411072388564357716429294" ) );
00162 QCOMPARE( result, QCA::BigInteger( "660736146705288303126411072388564357716429294" ) );
00163
00164 result = QCA::BigInteger( "-1348245899955041864800954463709881466231496038216683608715424566397833766910915722793041224478985289" )
00165 += QCA::BigInteger( "11517149522866182358565152643595266257020228597058539113114732218008332987904361457299261161227276764386173666571334749062651694592291882972" );
00166 QCOMPARE( result.toString(), QString( "11517149522866182358565152643595266257018880351158584071249931263544623106438129961261044477618561339819775832804423833339858653367812897683" ) );
00167 QCOMPARE( result, QCA::BigInteger( "11517149522866182358565152643595266257018880351158584071249931263544623106438129961261044477618561339819775832804423833339858653367812897683" ) );
00168
00169 result = QCA::BigInteger( "-17540530441681616962868251635133601915039026254996886583618243914226325157426408929602625346567256761818" )
00170 += QCA::BigInteger( "865200427983527245206901810160356641402419461642082623179544681519016990" );
00171 QCOMPARE( result.toString(), QString( "-17540530441681616962868251635132736714611042727751679681808083557584922737964766846979445801885737744828" ) );
00172 QCOMPARE( result, QCA::BigInteger( "-17540530441681616962868251635132736714611042727751679681808083557584922737964766846979445801885737744828" ) );
00173
00174 result = QCA::BigInteger( "128844776074298261556398714096948603458177018275051329218555498374" )
00175 += QCA::BigInteger( "443816313829150876362052235134610603220548928107697961229953611873695276391917150913346479060246759720475193648" );
00176 QCOMPARE( result.toString(), QString( "443816313829150876362052235134610603220548928236542737304251873430093990488865754371523497335298088939030692022" ) );
00177 QCOMPARE( result, QCA::BigInteger( "443816313829150876362052235134610603220548928236542737304251873430093990488865754371523497335298088939030692022" ) );
00178
00179 result = QCA::BigInteger( "1709484189262457846620911889502097055085989595277300243221975568275935717696463" )
00180 += QCA::BigInteger( "-1646592344139809206374540620411514484579951199941360" );
00181 QCOMPARE( result.toString(), QString( "1709484189262457846620911887855504710946180388902759622810461083695984517755103" ) );
00182 QCOMPARE( result, QCA::BigInteger( "1709484189262457846620911887855504710946180388902759622810461083695984517755103" ) );
00183
00184 result = QCA::BigInteger( "320175865429637176165709341576187102540180627806418015204928771170233538951323952509055929139673223273528062883083030595199153877335714942842" )
00185 += QCA::BigInteger( "-2828241696960736089879965882386687935938570856545481227619497640844399275054327390050478930503975773972" );
00186 QCOMPARE( result.toString(), QString( "320175865429637176165709341576187102537352386109457279115048805287846851015385381652510447912053725632683663608028703205148674946831739168870" ) );
00187 QCOMPARE( result, QCA::BigInteger( "320175865429637176165709341576187102537352386109457279115048805287846851015385381652510447912053725632683663608028703205148674946831739168870" ) );
00188
00189 result = QCA::BigInteger( "-4035398360542181725908295312107496142105415014744259439963377204111754181625695349185753326709217" )
00190 += QCA::BigInteger( "85450213703789913646546187382091037800" );
00191 QCOMPARE( result.toString(), QString( "-4035398360542181725908295312107496142105415014744259439963291753898050391712048802998371235671417" ) );
00192 QCOMPARE( result, QCA::BigInteger( "-4035398360542181725908295312107496142105415014744259439963291753898050391712048802998371235671417" ) );
00193
00194 result = QCA::BigInteger( "-1292166446073479876801522363382357887431657639184151284775525387363973852756087726243671676713861533673009088319851" )
00195 += QCA::BigInteger( "804538895874518175537499425282375058236245531798590350403343841766955572070643267141945695624895109330242749935754739434394691714971" );
00196 QCOMPARE( result.toString(), QString( "804538895874518174245332979208895181434723168416232462971686202582804287295117879777971842868807383086571073221893205761385603395120" ) );
00197 QCOMPARE( result, QCA::BigInteger( "804538895874518174245332979208895181434723168416232462971686202582804287295117879777971842868807383086571073221893205761385603395120" ) );
00198
00199 result = QCA::BigInteger( "-451986588700926309459451756852005697379481014956007968529234251884946522682901215022086432597024324062240835564200177389" )
00200 += QCA::BigInteger( "15762983479" );
00201 QCOMPARE( result.toString(), QString( "-451986588700926309459451756852005697379481014956007968529234251884946522682901215022086432597024324062240835548437193910" ) );
00202 QCOMPARE( result, QCA::BigInteger( "-451986588700926309459451756852005697379481014956007968529234251884946522682901215022086432597024324062240835548437193910" ) );
00203
00204 result = QCA::BigInteger( "-3907475412115728816974567022055278374116794025624287474334038831885743634200801846649105209920908153587891040882946582394429615396962188674594744360388466" )
00205 += QCA::BigInteger( "193893611236537854694879677478106237157079207398283117392998175454362643521031390" );
00206 QCOMPARE( result.toString(), QString( "-3907475412115728816974567022055278374116794025624287474334038831885743634006908235412567355226028476109784803725867374996146498003964013220232100839357076" ) );
00207 QCOMPARE( result, QCA::BigInteger( "-3907475412115728816974567022055278374116794025624287474334038831885743634006908235412567355226028476109784803725867374996146498003964013220232100839357076" ) );
00208
00209
00210 result = QCA::BigInteger( "-72603710637966201224690926289" )
00211 += QCA::BigInteger( "-13618442642298533261581255034923612640512507150728017106768861506299813289801666559564532" );
00212 QCOMPARE( result.toString(), QString( "-13618442642298533261581255034923612640512507150728017106768934110010451256002891250490821" ) );
00213 QCOMPARE( result, QCA::BigInteger( "-13618442642298533261581255034923612640512507150728017106768934110010451256002891250490821" ) );
00214
00215 result = QCA::BigInteger( "56077960835713056831402948406790747107889446769357509759472207603483968107693997028111823994257399379783658853302692762256851623103019589392739" )
00216 += QCA::BigInteger( "-427057313888431079237360487703561848638868677065083968842" );
00217 QCOMPARE( result.toString(), QString( "56077960835713056831402948406790747107889446769357509759472207603483968107693997028111396936943510948704421492814989200408212754425954505423897" ) );
00218 QCOMPARE( result, QCA::BigInteger( "56077960835713056831402948406790747107889446769357509759472207603483968107693997028111396936943510948704421492814989200408212754425954505423897" ) );
00219
00220 result = QCA::BigInteger( "-2209800838508504443494783762534800337712101405156784708782197580824527899758308" )
00221 += QCA::BigInteger( "42844076503039495864500213925837598507817708418354152774112078596443089606598570396235816327987463393971710495985285591895096794994387176281079" );
00222 QCOMPARE( result.toString(), QString( "42844076503039495864500213925837598507817708418354152774112078594233288768090065952741032565452663056259609090828500883112899214169859276522771" ) );
00223 QCOMPARE( result, QCA::BigInteger( "42844076503039495864500213925837598507817708418354152774112078594233288768090065952741032565452663056259609090828500883112899214169859276522771" ) );
00224
00225 result = QCA::BigInteger( "33887767308809826842417841176152232321272231788338404526859019370507113927387984766381329515371768224976188337692" )
00226 += QCA::BigInteger( "349484339542971517481628970179002500341" );
00227 QCOMPARE( result.toString(), QString( "33887767308809826842417841176152232321272231788338404526859019370507113927737469105924301032853397195155190838033" ) );
00228 QCOMPARE( result, QCA::BigInteger( "33887767308809826842417841176152232321272231788338404526859019370507113927737469105924301032853397195155190838033" ) );
00229
00230 result = QCA::BigInteger( "85748089639858660722587321621536298082690707526412426951630101551228144063151688592419555048867068162" )
00231 += QCA::BigInteger( "-383634567691961960211191292397062452265352651123492760493087381707279" );
00232 QCOMPARE( result.toString(), QString( "85748089639858660722587321621535914448123015564452215760337704488775878710500565099659061961485360883" ) );
00233 QCOMPARE( result, QCA::BigInteger( "85748089639858660722587321621535914448123015564452215760337704488775878710500565099659061961485360883" ) );
00234
00235 result = QCA::BigInteger( "23889807888563742283608049816129153552608399262924421832404872043475" )
00236 += QCA::BigInteger( "995" );
00237 QCOMPARE( result.toString(), QString( "23889807888563742283608049816129153552608399262924421832404872044470" ) );
00238 QCOMPARE( result, QCA::BigInteger( "23889807888563742283608049816129153552608399262924421832404872044470" ) );
00239
00240 result = QCA::BigInteger( "-654786925833474864669230962582694222611472680701859262466465606239654996048306783957549697781271829257774329538985" )
00241 += QCA::BigInteger( "-276137507159648540503039013089014674747" );
00242 QCOMPARE( result.toString(), QString( "-654786925833474864669230962582694222611472680701859262466465606239654996048582921464709346321774868270863344213732" ) );
00243 QCOMPARE( result, QCA::BigInteger( "-654786925833474864669230962582694222611472680701859262466465606239654996048582921464709346321774868270863344213732" ) );
00244
00245 result = QCA::BigInteger( "50463316268089933" )
00246 += QCA::BigInteger( "-140591583463431806921000349498135287589005423318927850947894242995310138569473157521312413652439234324419130527702899917161307657443381774866237429" );
00247 QCOMPARE( result.toString(), QString( "-140591583463431806921000349498135287589005423318927850947894242995310138569473157521312413652439234324419130527702899917161307657392918458598147496" ) );
00248 QCOMPARE( result, QCA::BigInteger( "-140591583463431806921000349498135287589005423318927850947894242995310138569473157521312413652439234324419130527702899917161307657392918458598147496" ) );
00249
00250 result = QCA::BigInteger( "1339015021665554488163337105187026760232395594198925052890859936\
00251 418304234254229440059229155546157793544192" )
00252 += QCA::BigInteger( "6294037420283433712414743361937677483761554699961644450461297486224793278823004487175687771163597590566132592591599249970281125781761944353272" );
00253 QCOMPARE( result.toString(), QString( "6294037420283433712414743361937677485100569721627198938624634591411820039055400081374612824054457526984436826845828690029510281327919737897464" ) );
00254 QCOMPARE( result, QCA::BigInteger( "6294037420283433712414743361937677485100569721627198938624634591411820039055400081374612824054457526984436826845828690029510281327919737897464" ) );
00255
00256 result = QCA::BigInteger( "-241446683" )
00257 += QCA::BigInteger( "-282671163032866994488211995758272717472259277760825940523445628\
00258 442206062910449311538519756165635175664610569214430918184214" );
00259 QCOMPARE( result.toString(), QString( "-282671163032866994488211995758272717472259277760825940523445628442206062910449311538519756165635175664610569214431159630897" ) );
00260 QCOMPARE( result, QCA::BigInteger( "-282671163032866994488211995758272717472259277760825940523445628442206062910449311538519756165635175664610569214431159630897" ) );
00261
00262 result = QCA::BigInteger( "2358605503303452637996081421902056515951744611718383128442445119505739707550326378912342448355046239066896995563581" )
00263 += QCA::BigInteger( "-3830437229145325165273364525551261440648845791949681661260946956860463720730123941973615" );
00264 QCOMPARE( result.toString(), QString( "2358605503303452637996081418071619286806419446445018602891183678856893915600644717651395491494582518336773053589966" ) );
00265 QCOMPARE( result, QCA::BigInteger( "2358605503303452637996081418071619286806419446445018602891183678856893915600644717651395491494582518336773053589966" ) );
00266
00267 result = QCA::BigInteger( "1860794367587960058388097846258490" )
00268 += QCA::BigInteger( "-237344494507203983863096991896035366478949095337787603280" );
00269 QCOMPARE( result.toString(), QString( "-237344494507203983863095131101667778518890707239941344790" ) );
00270 QCOMPARE( result, QCA::BigInteger( "-237344494507203983863095131101667778518890707239941344790" ) );
00271
00272 result = QCA::BigInteger( "-286399096802321907543674770412181810379003627366516307780436082546" )
00273 += QCA::BigInteger( "6433131620680089024037442172197761714707480582555136398379812339597187475099646442833150194" );
00274 QCOMPARE( result.toString(), QString( "6433131620680089024037441885798664912385573038880365986198001960593560108583338662397067648" ) );
00275 QCOMPARE( result, QCA::BigInteger( "6433131620680089024037441885798664912385573038880365986198001960593560108583338662397067648" ) );
00276
00277 result = QCA::BigInteger( "181180339077102369559537817583627894783322804181859729574752442572146800569023773490164987520541203125338295785763244283224569259250011493" )
00278 += QCA::BigInteger( "-1199127665773503170250307078028035875479459397657178356959526245067549497129923023348187933280753018204983010837846725666878521137637491" );
00279 QCOMPARE( result.toString(), QString( "179981211411328866389287510505599858907843344784202551217792916327079251071893850466816799587260450107133312774925397557557690738112374002" ) );
00280 QCOMPARE( result, QCA::BigInteger( "179981211411328866389287510505599858907843344784202551217792916327079251071893850466816799587260450107133312774925397557557690738112374002" ) );
00281
00282 result = QCA::BigInteger( "-64140201395555533811408642891620184652051275811075926176282032144915585503450776768366775652419022149512034611311149858695307750874152" )
00283 += QCA::BigInteger( "174441039" );
00284 QCOMPARE( result.toString(), QString( "-64140201395555533811408642891620184652051275811075926176282032144915585503450776768366775652419022149512034611311149858695307576433113" ) );
00285 QCOMPARE( result, QCA::BigInteger( "-64140201395555533811408642891620184652051275811075926176282032144915585503450776768366775652419022149512034611311149858695307576433113" ) );
00286
00287 result = QCA::BigInteger( "1272757944308835857208037878018507337530557445422230495561634616503724419877512717512360239259640193513601352202821462208896049331599624285621" )
00288 += QCA::BigInteger( "7326562354017884140300121264633612334070903165496641915889499701\
00289 38457507491850467631029977010" );
00290 QCOMPARE( result.toString(), QString( "1272757944308835857208037878018507337530557445422963151797036404917754432003976078745767329576189857705190302172959919716387899799230654262631" ) );
00291 QCOMPARE( result, QCA::BigInteger( "1272757944308835857208037878018507337530557445422963151797036404917754432003976078745767329576189857705190302172959919716387899799230654262631" ) );
00292
00293 result = QCA::BigInteger( "-296171972628230" )
00294 += QCA::BigInteger( "-8295766099121843219000823699362222865173820102569731517716391727126741710202086962877467940292139" );
00295 QCOMPARE( result.toString(), QString( "-8295766099121843219000823699362222865173820102569731517716391727126741710202086963173639912920369" ) );
00296 QCOMPARE( result, QCA::BigInteger( "-8295766099121843219000823699362222865173820102569731517716391727126741710202086963173639912920369" ) );
00297
00298 result = QCA::BigInteger( "746985914068199510024843682108839444828414222769191520615967632362127522466922882591" )
00299 += QCA::BigInteger( "-20487191102299831461877807785745372724903547246374023" );
00300 QCOMPARE( result.toString(), QString( "746985914068199510024843682108818957637311922937729642808181886989402618919676508568" ) );
00301 QCOMPARE( result, QCA::BigInteger( "746985914068199510024843682108818957637311922937729642808181886989402618919676508568" ) );
00302
00303 result = QCA::BigInteger( "-4" )
00304 += QCA::BigInteger( "-2344390090753264806043234960981151613122271366762590006930318876906455201397017135" );
00305 QCOMPARE( result.toString(), QString( "-2344390090753264806043234960981151613122271366762590006930318876906455201397017139" ) );
00306 QCOMPARE( result, QCA::BigInteger( "-2344390090753264806043234960981151613122271366762590006930318876906455201397017139" ) );
00307
00308 result = QCA::BigInteger( "-44876180273995737337769331875058141129678736711749946388832275767882143882764" )
00309 += QCA::BigInteger( "20982187786" );
00310 QCOMPARE( result.toString(), QString( "-44876180273995737337769331875058141129678736711749946388832275767861161694978" ) );
00311 QCOMPARE( result, QCA::BigInteger( "-44876180273995737337769331875058141129678736711749946388832275767861161694978" ) );
00312
00313 result = QCA::BigInteger( "-6019440082648243511340058232981487443695615379104154368957939907896782179207195666302228625496897271988494" )
00314 += QCA::BigInteger( "532566302499155416003316607801593784583652720754079760364736422291735917382015688217276924340984564880" );
00315 QCOMPARE( result.toString(), QString( "-6018907516345744355924054916373685849911031726383400289197575171474490443289813650614011348572556287423614" ) );
00316 QCOMPARE( result, QCA::BigInteger( "-6018907516345744355924054916373685849911031726383400289197575171474490443289813650614011348572556287423614" ) );
00317
00318 result = QCA::BigInteger( "-73755471563616026847726349357167530833850959662921059052928229237814728719448868719278211294785998253117976812683153264088230182865250970217610487" )
00319 += QCA::BigInteger( "-30100016097092378349958946184353117306134810372681" );
00320 QCOMPARE( result.toString(), QString( "-73755471563616026847726349357167530833850959662921059052928229237814728719448868719278211294786028353134073905061503223034414535982557105027983168" ) );
00321 QCOMPARE( result, QCA::BigInteger( "-73755471563616026847726349357167530833850959662921059052928229237814728719448868719278211294786028353134073905061503223034414535982557105027983168" ) );
00322
00323 result = QCA::BigInteger( "-2211177066689704345686852756638946306674958952044447080285364283965878599873864667094550865713828159912" )
00324 += QCA::BigInteger( "-5365560439372456892007565798761606781997269201538475736814780300517383963455858081652308237033460360040921820049494698892905680307378540208" );
00325 QCOMPARE( result.toString(), QString( "-5365560439372456892007565798761606784208446268228180082501633057156330270130817033696755317318824644006800419923359365987456546021206700120" ) );
00326 QCOMPARE( result, QCA::BigInteger( "-5365560439372456892007565798761606784208446268228180082501633057156330270130817033696755317318824644006800419923359365987456546021206700120" ) );
00327
00328 result = QCA::BigInteger( "6074122512337108841968521649035076841633691574254417104144285970819068715158037023149867252146570418484850234979838064249373816163440" )
00329 += QCA::BigInteger( "301843614094506325875637699" );
00330 QCOMPARE( result.toString(), QString( "6074122512337108841968521649035076841633691574254417104144285970819068715158037023149867252146570418484850536823452158755699691801139" ) );
00331 QCOMPARE( result, QCA::BigInteger( "6074122512337108841968521649035076841633691574254417104144285970819068715158037023149867252146570418484850536823452158755699691801139" ) );
00332
00333 result = QCA::BigInteger( "-518214776931158149908771340564348982010543985108065053479219152734659892042499774128809654713651547833087206893256740737426200715673766732196603988" )
00334 += QCA::BigInteger( "-29835172557747693726115525887386137004674545311422557345658884038760353928226157702249175218280718951979" );
00335 QCOMPARE( result.toString(), QString( "-518214776931158149908771340564348982010544014943237611226912878850185779428636778803354966136208893491971245653610668963583902964848985012915555967" ) );
00336 QCOMPARE( result, QCA::BigInteger( "-518214776931158149908771340564348982010544014943237611226912878850185779428636778803354966136208893491971245653610668963583902964848985012915555967" ) );
00337
00338 result = QCA::BigInteger( "15937412249227240968245047444122" )
00339 += QCA::BigInteger( "186214680376169426108822450700978827886569053440254258585576645530381613666540347032550716844628275956253" );
00340 QCOMPARE( result.toString(), QString( "186214680376169426108822450700978827886569053440254258585576645530381613682477759281777957812873323400375" ) );
00341 QCOMPARE( result, QCA::BigInteger( "186214680376169426108822450700978827886569053440254258585576645530381613682477759281777957812873323400375" ) );
00342
00343 result = QCA::BigInteger( "-12528010116258685855047504252928107623923105458701761707911969527003855713485846140551107967495813584097081777160" )
00344 += QCA::BigInteger( "-539986280927242338236008809854961759996986302156061552378097160849129372827386927545686899193598721998757419572890" );
00345 QCOMPARE( result.toString(), QString( "-552514291043501024091056314107889867620909407614763314086009130376133228540872773686238007161094535582854501350050" ) );
00346 QCOMPARE( result, QCA::BigInteger( "-552514291043501024091056314107889867620909407614763314086009130376133228540872773686238007161094535582854501350050" ) );
00347
00348 result = QCA::BigInteger( "-2454746908" )
00349 += QCA::BigInteger( "-3822957127889394780055242156360370187075592078655552376050604679934415014573879513870030211860839641756441626913419699098985245833920954444218" );
00350 QCOMPARE( result.toString(), QString( "-3822957127889394780055242156360370187075592078655552376050604679934415014573879513870030211860839641756441626913419699098985245833923409191126" ) );
00351 QCOMPARE( result, QCA::BigInteger( "-3822957127889394780055242156360370187075592078655552376050604679934415014573879513870030211860839641756441626913419699098985245833923409191126" ) );
00352
00353
00354 result = QCA::BigInteger( "-54288706131860071583318409080596095357980447323635" )
00355 += QCA::BigInteger( "-425339410556015631098973742993327323051438456819027069606294261157940297643297240559452124432779202181589763874" );
00356 QCOMPARE( result.toString(), QString( "-425339410556015631098973742993327323051438456819027069606294315446646429503368823877861205028874560162037087509" ) );
00357 QCOMPARE( result, QCA::BigInteger( "-425339410556015631098973742993327323051438456819027069606294315446646429503368823877861205028874560162037087509" ) );
00358
00359 result = QCA::BigInteger( "1418766894051319870818496026367686195459604395660119754151922014257535705077512233275240217434104" )
00360 += QCA::BigInteger( "-111987390206074845527" );
00361 QCOMPARE( result.toString(), QString( "1418766894051319870818496026367686195459604395660119754151922014257535705077400245885034142588577" ) );
00362 QCOMPARE( result, QCA::BigInteger( "1418766894051319870818496026367686195459604395660119754151922014257535705077400245885034142588577" ) );
00363
00364 result = QCA::BigInteger( "-690410131860410477456103857594543515409677479242833618634809302452962600476353286822550168231234854116465153078845744722987447719420052500874721214723" )
00365 += QCA::BigInteger( "-2584690377433946747311356992432788361455494791066739384837409609897387109736539600623155880918146331681272708396146283818299" );
00366 QCOMPARE( result.toString(), QString( "-690410131860410477456103860179233892843624226554190611067597663908457391543092671659959778128621963853004753702001625641133779400692760897021005033022" ) );
00367 QCOMPARE( result, QCA::BigInteger( "-690410131860410477456103860179233892843624226554190611067597663908457391543092671659959778128621963853004753702001625641133779400692760897021005033022" ) );
00368
00369 result = QCA::BigInteger( "-2326153002179462643778624079324592172489363679671158" )
00370 += QCA::BigInteger( "-109819757548464054181938329012610459679" );
00371 QCOMPARE( result.toString(), QString( "-2326153002179572463536172543378774110818376290130837" ) );
00372 QCOMPARE( result, QCA::BigInteger( "-2326153002179572463536172543378774110818376290130837" ) );
00373
00374 result = QCA::BigInteger( "-4428752250566525488353857709194941742993785578807911414016959206453045495320705299466107784149485981354180907411034982168391" )
00375 += QCA::BigInteger( "-39247778259374215325521768005388007526581235832446540589720560855741992694947322437679214611686905696" );
00376 QCOMPARE( result.toString(), QString( "-4428752250566525488353896956973201117209111100575916802024485787688877941861295020026963526142180928676618586625646669074087" ) );
00377 QCOMPARE( result, QCA::BigInteger( "-4428752250566525488353896956973201117209111100575916802024485787688877941861295020026963526142180928676618586625646669074087" ) );
00378
00379 result = QCA::BigInteger( "3047" )
00380 += QCA::BigInteger( "-73564587850313153523776932163719610733433776890390204618040173797196000100856070829277943048343156165795282307508135277641315214" );
00381 QCOMPARE( result.toString(), QString( "-73564587850313153523776932163719610733433776890390204618040173797196000100856070829277943048343156165795282307508135277641312167" ) );
00382 QCOMPARE( result, QCA::BigInteger( "-73564587850313153523776932163719610733433776890390204618040173797196000100856070829277943048343156165795282307508135277641312167" ) );
00383
00384 result = QCA::BigInteger( "71397189765381049110362731262243394989390499523719445987286843598407339615555456955143712741779487184644001767776382991377987516772847242986" )
00385 += QCA::BigInteger( "-5821969555717973232123574849275726788359152255219972775831" );
00386 QCOMPARE( result.toString(), QString( "71397189765381049110362731262243394989390499523719445987286843598407339615555456949321743186061513952520426918500656203018835261552874467155" ) );
00387 QCOMPARE( result, QCA::BigInteger( "71397189765381049110362731262243394989390499523719445987286843598407339615555456949321743186061513952520426918500656203018835261552874467155" ) );
00388
00389 result = QCA::BigInteger( "-181409752656613138777964092635909379021826360390960647186726991165227400176766831466541160049935205507919070233410228328274" )
00390 += QCA::BigInteger( "-523301382154855044703947051892202646490840761177533623732372519689918420769842424772676407501350528096714904915297347684247802773107355881667545916901" );
00391 QCOMPARE( result.toString(), QString( "-523301382154855044703947052073612399147453899955497716368281898711744781160803071959403398666577928273481736381838507734183008281026426115077774245175" ) );
00392 QCOMPARE( result, QCA::BigInteger( "-523301382154855044703947052073612399147453899955497716368281898711744781160803071959403398666577928273481736381838507734183008281026426115077774245175" ) );
00393
00394 result = QCA::BigInteger( "6858961373707073067" )
00395 += QCA::BigInteger( "-334051508933893061433844279764271107181974906283364991309903077649971606436918071327072869826471946094594594115614990907" );
00396 QCOMPARE( result.toString(), QString( "-334051508933893061433844279764271107181974906283364991309903077649971606436918071327072869826471946087735632741907917840" ) );
00397 QCOMPARE( result, QCA::BigInteger( "-334051508933893061433844279764271107181974906283364991309903077649971606436918071327072869826471946087735632741907917840" ) );
00398
00399 result = QCA::BigInteger( "-23635098930374569407171906960429616870908424281519944658490940109956689534874971218650241680916564611" )
00400 += QCA::BigInteger( "-18958917875779522833599589133142827952448539301142718746979271443846670235982743793439686626736428198541647202983677887505430060922528525205" );
00401 QCOMPARE( result.toString(), QString( "-18958917875779522833599589133142827952472174400073093316386443350807099852853652217721206571394919138651603892518552858724080302603445089816" ) );
00402 QCOMPARE( result, QCA::BigInteger( "-18958917875779522833599589133142827952472174400073093316386443350807099852853652217721206571394919138651603892518552858724080302603445089816" ) );
00403
00404
00405 result = QCA::BigInteger( "0" )
00406 -= QCA::BigInteger( "0" );
00407 QCOMPARE( result.toString(), QString( "0" ) );
00408 QCOMPARE( result, QCA::BigInteger( "0" ) );
00409
00410 result = QCA::BigInteger( "0" )
00411 -= QCA::BigInteger( "1" );
00412 QCOMPARE( result.toString(), QString( "-1" ) );
00413 QCOMPARE( result, QCA::BigInteger( "-1" ) );
00414
00415 result = QCA::BigInteger( "0" )
00416 -= QCA::BigInteger( "4294967296" );
00417 QCOMPARE( result.toString(), QString( "-4294967296" ) );
00418 QCOMPARE( result, QCA::BigInteger( "-4294967296" ) );
00419
00420
00421 result = QCA::BigInteger( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095" )
00422 -= QCA::BigInteger( "1" );
00423 QCOMPARE( result.toString(), QString( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084094" ) );
00424 QCOMPARE( result, QCA::BigInteger( "13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084094" ) );
00425
00426 result = QCA::BigInteger( "89094716573076464980713547115099137014719483620102078148320806773871083148864" )
00427 -= QCA::BigInteger( "49505213825110728957828173754776257356620450607893971553289366249708672306581" );
00428 QCOMPARE( result.toString(), QString( "39589502747965736022885373360322879658099033012208106595031440524162410842283" ) );
00429 QCOMPARE( result, QCA::BigInteger( "39589502747965736022885373360322879658099033012208106595031440524162410842283" ) );
00430
00431 result = QCA::BigInteger( "65894747009896006767807716946835412110318548717263922395390971078905789585431" )
00432 -= QCA::BigInteger( "3884269741925508225990715416862047284194603799902650748631039608684367281358" );
00433 QCOMPARE( result.toString(), QString( "62010477267970498541817001529973364826123944917361271646759931470221422304073" ) );
00434 QCOMPARE( result, QCA::BigInteger( "62010477267970498541817001529973364826123944917361271646759931470221422304073" ) );
00435
00436 result = QCA::BigInteger( "5950196396451977566902121301707054218364717196893101360011491777761952253736964709165962613347710607164178682987783755894811024288429224592316636383" )
00437 -= QCA::BigInteger( "8750653273562160761286422180115618621879821429145276197424652349306577311499807887070429373153777028581165316131683348567" );
00438 QCOMPARE( result.toString(), QString( "5950196396451977566902121292956400944802556435606679179895873155882130824591688511741310264041133295664370795917354382741033995707263908460633287816" ) );
00439 QCOMPARE( result, QCA::BigInteger( "5950196396451977566902121292956400944802556435606679179895873155882130824591688511741310264041133295664370795917354382741033995707263908460633287816" ) );
00440
00441 result = QCA::BigInteger( "9815262808265519920770782360080149146267723690" )
00442 -= QCA::BigInteger( "14067005768891609281364919358115291341352189918255780397560060748765650205261663193732434161580120817" );
00443 QCOMPARE( result.toString(), QString( "-14067005768891609281364919358115291341352189918255780387744797940500130284490880833652285015312397127" ) );
00444 QCOMPARE( result, QCA::BigInteger( "-14067005768891609281364919358115291341352189918255780387744797940500130284490880833652285015312397127" ) );
00445
00446 result = QCA::BigInteger( "-390149102941948621568479722346940666704376013734485343840154221605853412503154993878886490867020934777530894593416337175399865065870417717658815158195790" )
00447 -= QCA::BigInteger( "1456031684988128870809574635750149625240648487837308" );
00448 QCOMPARE( result.toString(), QString( "-390149102941948621568479722346940666704376013734485343840154221605853412503154993878886490867020934778986926278404466046209439701620567342899463646033098" ) );
00449 QCOMPARE( result, QCA::BigInteger( "-390149102941948621568479722346940666704376013734485343840154221605853412503154993878886490867020934778986926278404466046209439701620567342899463646033098" ) );
00450
00451 result = QCA::BigInteger( "7473774301764883450943" )
00452 -= QCA::BigInteger( "-26256369859367890755157372820052387483402723790185562908491933812453" );
00453 QCOMPARE( result.toString(), QString( "26256369859367890755157372820052387483402723797659337210256817263396" ) );
00454 QCOMPARE( result, QCA::BigInteger( "26256369859367890755157372820052387483402723797659337210256817263396" ) );
00455
00456 result = QCA::BigInteger( "36246343251214922024139186757009148849295485593397952003237349660142296147421019916619944353877490544706223768684758263065399016597969" )
00457 -= QCA::BigInteger( "2574427901445527995149185461475228850098549655325125750771680756403104624569522792792597223218143154924988199562355517064962665954307425375180" );
00458 QCOMPARE( result.toString(), QString( "-2574427865199184743934263437336042093089400806029640157373728753165754964427226645371577306598198801047497654856131748380204402888908408777211" ) );
00459 QCOMPARE( result, QCA::BigInteger( "-2574427865199184743934263437336042093089400806029640157373728753165754964427226645371577306598198801047497654856131748380204402888908408777211" ) );
00460
00461 result = QCA::BigInteger( "30129746266682790628283889040897642317014108334116727" )
00462 -= QCA::BigInteger( "-1580480523895398762563721715474380903630073871362143915864398724834897608423" );
00463 QCOMPARE( result.toString(), QString( "1580480523895398762563751845220647586420702155251184813506715738943231725150" ) );
00464 QCOMPARE( result, QCA::BigInteger( "1580480523895398762563751845220647586420702155251184813506715738943231725150" ) );
00465
00466 result = QCA::BigInteger( "-4614735863800137951667138933166372061" )
00467 -= QCA::BigInteger( "87175694379075561307234146162193190462135078700346746992273" );
00468 QCOMPARE( result.toString(), QString( "-87175694379075561307238760898056990600086745839279913364334" ) );
00469 QCOMPARE( result, QCA::BigInteger( "-87175694379075561307238760898056990600086745839279913364334" ) );
00470
00471 result = QCA::BigInteger( "-3753904" )
00472 -= QCA::BigInteger( "-11269137783745339515071988205310702154422777729974" );
00473 QCOMPARE( result.toString(), QString( "11269137783745339515071988205310702154422773976070" ) );
00474 QCOMPARE( result, QCA::BigInteger( "11269137783745339515071988205310702154422773976070" ) );
00475
00476 result = QCA::BigInteger( "592523948495379440082021279738170088402918858455470050140652787171830058864932939900794505955437856926902975870288" )
00477 -= QCA::BigInteger( "-205854658295495452479104108497931263758143158076949293929661651111" );
00478 QCOMPARE( result.toString(), QString( "592523948495379440082021279738170088402918858455675904798948282624309162973430871164552649113514806220832637521399" ) );
00479 QCOMPARE( result, QCA::BigInteger( "592523948495379440082021279738170088402918858455675904798948282624309162973430871164552649113514806220832637521399" ) );
00480
00481 result = QCA::BigInteger( "-33993701617495591491176844355" )
00482 -= QCA::BigInteger( "3438065097398894672826284379125235190693300918673662774192379185002391232383325160416036963599856704698280" );
00483 QCOMPARE( result.toString(), QString( "-3438065097398894672826284379125235190693300918673662774192379185002391232383359154117654459191347881542635" ) );
00484 QCOMPARE( result, QCA::BigInteger( "-3438065097398894672826284379125235190693300918673662774192379185002391232383359154117654459191347881542635" ) );
00485
00486 result = QCA::BigInteger( "26876428790838270949718735111909136008255051776703" )
00487 -= QCA::BigInteger( "-1781128112966810373286192008831149275546995635268767241859967609117529616872536681035700534316457543887601645022" );
00488 QCOMPARE( result.toString(), QString( "1781128112966810373286192008831149275546995635268767241859967635993958407710807630754435646225593552142653421725" ) );
00489 QCOMPARE( result, QCA::BigInteger( "1781128112966810373286192008831149275546995635268767241859967635993958407710807630754435646225593552142653421725" ) );
00490
00491 result = QCA::BigInteger( "2059771092932179758019770618974659367350250375647433386639519387\
00492 69317693429941871882153770641334267205446421916220398066553188" )
00493 -= QCA::BigInteger( "3342500267594994347156312297990633112620923791590960237694328174171473763026" );
00494 QCOMPARE( result.toString(), QString( "205977109293217975801977061897465936735025037564739996163684343774970537117643881249041149717542676245208727588046226592790162" ) );
00495 QCOMPARE( result, QCA::BigInteger( "205977109293217975801977061897465936735025037564739996163684343774970537117643881249041149717542676245208727588046226592790162" ) );
00496
00497 result = QCA::BigInteger( "5545520403000578843599072515870982842927227412121917598877293331575380404618111609" )
00498 -= QCA::BigInteger( "5991287327241003718821424770352575362437680738923552868139860461945460339860477495902" );
00499 QCOMPARE( result.toString(), QString( "-5985741806838003139977825697836704379594753511511430950540983168613884959455859384293" ) );
00500 QCOMPARE( result, QCA::BigInteger( "-5985741806838003139977825697836704379594753511511430950540983168613884959455859384293" ) );
00501
00502 result = QCA::BigInteger( "248039029608125071340" )
00503 -= QCA::BigInteger( "3664608673" );
00504 QCOMPARE( result.toString(), QString( "248039029604460462667" ) );
00505 QCOMPARE( result, QCA::BigInteger( "248039029604460462667" ) );
00506
00507 result = QCA::BigInteger( "15425705711415937103627" )
00508 -= QCA::BigInteger( "-1435504065517745703440045276868982910754081405474123003767554211132837427846963435621523810229738262235546179779885824" );
00509 QCOMPARE( result.toString(), QString( "1435504065517745703440045276868982910754081405474123003767554211132837427846963435621523810229753687941257595716989451" ) );
00510 QCOMPARE( result, QCA::BigInteger( "1435504065517745703440045276868982910754081405474123003767554211132837427846963435621523810229753687941257595716989451" ) );
00511
00512 result = QCA::BigInteger( "50882847205108645607281568922683652688671738236030732914347600821086" )
00513 -= QCA::BigInteger( "12176160963158" );
00514 QCOMPARE( result.toString(), QString( "50882847205108645607281568922683652688671738236030732902171439857928" ) );
00515 QCOMPARE( result, QCA::BigInteger( "50882847205108645607281568922683652688671738236030732902171439857928" ) );
00516
00517 result = QCA::BigInteger( "-35426518565985818947670047877033022885542172461973566228509771053416312543201815881190953762207629232160412058300173038824256783171761132" )
00518 -= QCA::BigInteger( "-4864862607366468843184694353123830534588538011093812418208808135799" );
00519 QCOMPARE( result.toString(), QString( "-35426518565985818947670047877033022885542172461973566228509771053416307678339208514722110577513276108329877469762161945011838574363625333" ) );
00520 QCOMPARE( result, QCA::BigInteger( "-35426518565985818947670047877033022885542172461973566228509771053416307678339208514722110577513276108329877469762161945011838574363625333" ) );
00521
00522 result = QCA::BigInteger( "-1428596214712268310382144828171384812520179141608121870013556402879770424002218157546599921571184" )
00523 -= QCA::BigInteger( "-4054101" );
00524 QCOMPARE( result.toString(), QString( "-1428596214712268310382144828171384812520179141608121870013556402879770424002218157546599917517083" ) );
00525 QCOMPARE( result, QCA::BigInteger( "-1428596214712268310382144828171384812520179141608121870013556402879770424002218157546599917517083" ) );
00526
00527 result = QCA::BigInteger( "-200931" )
00528 -= QCA::BigInteger( "-44558802460130495759482832913160717791151786725570519475449607659705171682283111490834930835045735142966847483009157514950177565952218520297258834187372" );
00529 QCOMPARE( result.toString(), QString( "44558802460130495759482832913160717791151786725570519475449607659705171682283111490834930835045735142966847483009157514950177565952218520297258833986441" ) );
00530 QCOMPARE( result, QCA::BigInteger( "44558802460130495759482832913160717791151786725570519475449607659705171682283111490834930835045735142966847483009157514950177565952218520297258833986441" ) );
00531
00532 result = QCA::BigInteger( "105704314890799915321259" )
00533 -= QCA::BigInteger( "827923545945076415574912438499169814414563066877494100831657761190490697473854369477784874118787495351405549803329615347120938123226038208" );
00534 QCOMPARE( result.toString(), QString( "-827923545945076415574912438499169814414563066877494100831657761190490697473854369477784874118787495351405549803329509642806047323310716949" ) );
00535 QCOMPARE( result, QCA::BigInteger( "-827923545945076415574912438499169814414563066877494100831657761190490697473854369477784874118787495351405549803329509642806047323310716949" ) );
00536
00537 result = QCA::BigInteger( "1448979433940064018828919290452280235308901982649341" )
00538 -= QCA::BigInteger( "303926827425887072291878308433008512899006711759770318009" );
00539 QCOMPARE( result.toString(), QString( "-303925378446453132227859479513718060618771402857787668668" ) );
00540 QCOMPARE( result, QCA::BigInteger( "-303925378446453132227859479513718060618771402857787668668" ) );
00541
00542 result = QCA::BigInteger( "-243237595290235750457450892290434789864" )
00543 -= QCA::BigInteger( "19817702076334276402981273067417321098467533300947463865383702005126562800253466403934608765512316565811954342319565128573969" );
00544 QCOMPARE( result.toString(), QString( "-19817702076334276402981273067417321098467533300947463865383702005126562800253466403934852003107606801562411793211855563363833" ) );
00545 QCOMPARE( result, QCA::BigInteger( "-19817702076334276402981273067417321098467533300947463865383702005126562800253466403934852003107606801562411793211855563363833" ) );
00546
00547 result = QCA::BigInteger( "294037338365659932242802023634" )
00548 -= QCA::BigInteger( "4401245995535867764294876849802142926077599828776505639975554254356763769548465" );
00549 QCOMPARE( result.toString(), QString( "-4401245995535867764294876849802142926077599828776211602637188594424520967524831" ) );
00550 QCOMPARE( result, QCA::BigInteger( "-4401245995535867764294876849802142926077599828776211602637188594424520967524831" ) );
00551
00552 result = QCA::BigInteger( "7303853946195223307036710881687367004566538357189824031021831088365362" )
00553 -= QCA::BigInteger( "119286025999378935715794641163321741" );
00554 QCOMPARE( result.toString(), QString( "7303853946195223307036710881687366885280512357810888315227189925043621" ) );
00555 QCOMPARE( result, QCA::BigInteger( "7303853946195223307036710881687366885280512357810888315227189925043621" ) );
00556
00557 result = QCA::BigInteger( "571167355343287235687602610714110416067426289363505412908804940696550592413192300554016875" )
00558 -= QCA::BigInteger( "15872188842802631759540597" );
00559 QCOMPARE( result.toString(), QString( "571167355343287235687602610714110416067426289363505412908804940680678403570389668794476278" ) );
00560 QCOMPARE( result, QCA::BigInteger( "571167355343287235687602610714110416067426289363505412908804940680678403570389668794476278" ) );
00561
00562 result = QCA::BigInteger( "1002240129784524388754179399598974973256811336031329881209395070412702275169416754240" )
00563 -= QCA::BigInteger( "59429482478860591343145393540420033516478305952872349006715789477946474753657206800070515207967709079933420746952" );
00564 QCOMPARE( result.toString(), QString( "-59429482478860591343145393539417793386693781564118169607116814504689663417625876918861120137555006804764003992712" ) );
00565 QCOMPARE( result, QCA::BigInteger( "-59429482478860591343145393539417793386693781564118169607116814504689663417625876918861120137555006804764003992712" ) );
00566
00567 result = QCA::BigInteger( "1370431648825444838359719050380239722263203134555431526491525074601463042144798545817957389" )
00568 -= QCA::BigInteger( "3473869878" );
00569 QCOMPARE( result.toString(), QString( "1370431648825444838359719050380239722263203134555431526491525074601463042144798542344087511" ) );
00570 QCOMPARE( result, QCA::BigInteger( "1370431648825444838359719050380239722263203134555431526491525074601463042144798542344087511" ) );
00571
00572 result = QCA::BigInteger( "8548280229254726209" )
00573 -= QCA::BigInteger( "33066125035269904981849320434016892734943145935582141989968280846973981913056248918" );
00574 QCOMPARE( result.toString(), QString( "-33066125035269904981849320434016892734943145935582141989968280838425701683801522709" ) );
00575 QCOMPARE( result, QCA::BigInteger( "-33066125035269904981849320434016892734943145935582141989968280838425701683801522709" ) );
00576
00577 result = QCA::BigInteger( "-19023558832687506489508150795966332175990129963029928958584170111759630293276939647334082100169102538364437859846398095065171936899503" )
00578 -= QCA::BigInteger( "24899271127523545342283468762809653407638631966220124695751976894193103779443050843040771191227522843088079031762445684377195650493065096847292797" );
00579 QCOMPARE( result.toString(), QString( "-24899271127542568901116156269299161558434598298396114825715006823151687949554810473334048130874856925188248134300810122237042048588130268784192300" ) );
00580 QCOMPARE( result, QCA::BigInteger( "-24899271127542568901116156269299161558434598298396114825715006823151687949554810473334048130874856925188248134300810122237042048588130268784192300" ) );
00581
00582 result = QCA::BigInteger( "-1800353575522706389288305623797196690530870204356722928042061228497437075035917720399302198953687023" )
00583 -= QCA::BigInteger( "-11875668261530466053708538730940776412171106483072624532757177471384128016458332544642788404765469924496127460164" );
00584 QCOMPARE( result.toString(), QString( "11875668261528665700133016024551488106547309286382093662552820748456085955229835107567752487045070622297173773141" ) );
00585 QCOMPARE( result, QCA::BigInteger( "11875668261528665700133016024551488106547309286382093662552820748456085955229835107567752487045070622297173773141" ) );
00586
00587 result = QCA::BigInteger( "-29861551039945217879" )
00588 -= QCA::BigInteger( "1113473025916855642353456146647542930581669082348409639697282960877889226500319996380838232582376232872868947624793789212829885934" );
00589 QCOMPARE( result.toString(), QString( "-1113473025916855642353456146647542930581669082348409639697282960877889226500319996380838232582376232872868947654655340252775103813" ) );
00590 QCOMPARE( result, QCA::BigInteger( "-1113473025916855642353456146647542930581669082348409639697282960877889226500319996380838232582376232872868947654655340252775103813" ) );
00591
00592 result = QCA::BigInteger( "565532963656761153838218277564957917658707297649757920676303301655328103665512287797108510139837643506491641987188791892506290" )
00593 -= QCA::BigInteger( "-2188105671531473889939411772533707" );
00594 QCOMPARE( result.toString(), QString( "565532963656761153838218277564957917658707297649757920676303301655328103665512287797108510142025749178023115877128203665039997" ) );
00595 QCOMPARE( result, QCA::BigInteger( "565532963656761153838218277564957917658707297649757920676303301655328103665512287797108510142025749178023115877128203665039997" ) );
00596
00597 result = QCA::BigInteger( "-349535960680522202843083381184496349093812380954435872337802226" )
00598 -= QCA::BigInteger( "-1829600726218222026679938" );