-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathTestSuite017.java
6821 lines (6818 loc) · 244 KB
/
TestSuite017.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*******************************************************************************
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package net.adoptopenjdk.test.bigdecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
import org.junit.Assert;
import junit.framework.TestCase;
public class TestSuite017 extends TestCase
{
MathContext rc_MathContext;
int rc_int;
boolean rc_boolean;
long rc_long;
BigDecimal rc_BigDecimal;
float rc_float;
byte rc_byte;
short rc_short;
double rc_double;
BigDecimal[] rc_BigDecimal_array;
String rc_String;
BigInteger rc_BigInteger;
public TestSuite017() {
}
public void testItem_0000()
{
rc_String = (new BigDecimal("1")).toPlainString();
Assert.assertEquals("1", rc_String);
}
public void testItem_0001()
{
rc_BigDecimal = new BigDecimal(1L);
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0002()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(new char[]{'8'}, 0, 2147483647);
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0003()
{
rc_int = (new BigDecimal("1")).scale();
Assert.assertEquals(0, rc_int);
}
// public void testItem_0004()
// {
// boolean caught;
// rc_int = (new BigDecimal("1")).hashCode();
// Assert.assertEquals(31, rc_int);
// }
@SuppressWarnings("unlikely-arg-type")
public void testItem_0005()
{
rc_boolean = (new BigDecimal("0")).equals("C68L1?R4PUP0BDK6AK4G7XAS7@BYR3HS?UCE=;2N0XRETX1H");
Assert.assertEquals(false, rc_boolean);
}
public void testItem_0006()
{
rc_BigDecimal = (new BigDecimal("1")).ulp();
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0007()
{
rc_String = (new BigDecimal("1")).toString();
Assert.assertEquals("1", rc_String);
}
public void testItem_0008()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369")).negate(new MathContext("precision=1 roundingMode=UNNECESSARY"));
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0009()
{
rc_BigDecimal = (new BigDecimal("1")).pow(1);
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0010()
{
rc_BigDecimal = (new BigDecimal("1")).plus(new MathContext("precision=1 roundingMode=HALF_EVEN"));
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0011()
{
rc_BigDecimal = (new BigDecimal("-1")).divide(new BigDecimal("1"));
Assert.assertEquals("-1", rc_BigDecimal.toString());
}
public void testItem_0012()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(new char[]{'\1', '8', '\234', '\1', '\uFFFF', '\1', '\1', '\234', '\uFFFF', '\uFFFF', '\1', '\uFFFF', '\234', '\234', '\0', '\234', '\0', '\234', '\234', '8', '\uFFFF', '\0', '\1', '\234', '\234', '\uFFFF', '\1', '\0', '8', '\234', '\uFFFF', '\1', '\0', '\1', '\uFFFF', '\1', '\uFFFF', '\1', '\uFFFF', '8', '8', '\1', '\234', '\uFFFF', '\1', '\0', '\1', '\234', '8', '\uFFFF', '\234', '8', '\234', '\1', '\1', '\uFFFF', '\0', '\uFFFF', '8', '\uFFFF', '\1', '\uFFFF', '\uFFFF', '\uFFFF', '\0', '8', '\0', '\0', '\uFFFF', '\1', '\234', '8', '\0', '8', '\234', '\0', '\uFFFF', '\1', '8', '\1', '\234', '\234', '\uFFFF', '\0', '\1', '8', '\234', '8', '\234', '8', '8', '\234', '\0', '\1', '\uFFFF', '\234', '8', '\1', '\1', '\0'});
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
// public void testItem_0013()
// {
// boolean caught;
// caught = false;
// try {
// rc_BigDecimal = (new BigDecimal("-1")).setScale(2147483647);
// }
// catch (java.lang.NegativeArraySizeException e) {
// caught = true;
// }
// Assert.assertEquals("91.94630872483222%", true, caught);
// }
public void testItem_0014()
{
rc_BigDecimal = (new BigDecimal("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369")).min(new BigDecimal("-1"));
Assert.assertEquals("-1", rc_BigDecimal.toString());
}
public void testItem_0015()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(new char[]{'\234', '\0', '\0', '8', '\uFFFF', '\0', '\1', '\234', '8', '\1', '\234', '\234', '\uFFFF', '\uFFFF', '\uFFFF', '\0', '\uFFFF', '\uFFFF', '\0', '8', '\0', '\uFFFF', '\0', '\1', '\1', '8', '\0', '\234', '\uFFFF', '\1', '\1', '\0', '\234', '\0', '\234', '\1', '\uFFFF', '\1', '8', '8', '\234', '8', '\uFFFF', '\0', '8', '\uFFFF', '\234', '\1'});
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0016()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(new char[]{'\234'});
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0017()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("1")).pow(2147483647);
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0018()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(new char[]{'8', '8', '\0', '8', '8', '8', '\234', '\1', '\1', '8', '8', '\0', '\1', '8', '\0', '\uFFFF', '8', '8', '8', '\1', '\0', '\234', '\1', '\234', '\234', '\0', '\234', '\234', '\uFFFF', '\234', '\uFFFF', '\uFFFF', '\uFFFF', '\234', '\1', '\234', '8', '\1', '\uFFFF', '\0', '\1', '\0', '\uFFFF', '\1', '\234', '\234', '\1', '\uFFFF', '\uFFFF', '\1', '\234', '\uFFFF', '\234', '\234', '\0', '\uFFFF', '\234', '8', '\0', '\1', '8', '\uFFFF', '8', '\uFFFF', '\uFFFF', '\uFFFF', '\1', '\234', '\uFFFF', '8', '\1', '\234', '\234', '8', '8', '\0', '\0', '8', '\234', '8', '\uFFFF', '\1', '\0', '\1', '\uFFFF', '\234', '\uFFFF', '\0', '\1', '\0', '\234', '8', '\uFFFF', '\uFFFF', '\uFFFF', '\234', '\0', '\1', '\234', '\uFFFF'}, new MathContext("precision=1 roundingMode=CEILING"));
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0019()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369")).negate(new MathContext("precision=1 roundingMode=UNNECESSARY"));
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0020()
{
rc_BigDecimal_array = (new BigDecimal("-1")).divideAndRemainder(new BigDecimal("1"));
}
public void testItem_0021()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(new char[]{'\uFFFF', '\uFFFF', '\1', '\0', '8'}, 0, -1, new MathContext("precision=0 roundingMode=HALF_UP"));
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0022()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("1")).pow(1, new MathContext("precision=2147483647 roundingMode=HALF_UP"));
}
catch (java.lang.IllegalArgumentException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0023()
{
rc_BigDecimal = (new BigDecimal("1")).setScale(-1, 0);
Assert.assertEquals("1E+1", rc_BigDecimal.toString());
}
public void testItem_0024()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(-2147483648, new MathContext("precision=1 roundingMode=UNNECESSARY"));
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
// public void testItem_0025()
// {
// boolean caught;
// caught = false;
// try {
// rc_BigDecimal = (new BigDecimal("1")).setScale(2147483647, java.math.RoundingMode.CEILING);
// }
// catch (java.lang.NegativeArraySizeException e) {
// caught = true;
// }
// Assert.assertEquals("91.94630872483222%", true, caught);
// }
public void testItem_0026()
{
rc_int = (new BigDecimal("1E+1")).intValueExact();
Assert.assertEquals(10, rc_int);
}
public void testItem_0027()
{
rc_BigDecimal = (new BigDecimal("-1")).abs(new MathContext("precision=0 roundingMode=HALF_UP"));
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0028()
{
boolean caught;
caught = false;
try {
rc_MathContext = new MathContext("71WY?CTA5OS;<4E@D9W7R<LUBUHP0L@FMW:<2YHRNOY4T136F8?XX9TQ2X;73AQ>RG9?KKAPOBUIJWL8YVISOO;E>HC<AKQY0UBO");
}
catch (java.lang.IllegalArgumentException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0029()
{
rc_BigDecimal = (new BigDecimal("-1")).multiply(new BigDecimal("-1"), new MathContext("precision=2147483647 roundingMode=HALF_UP"));
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0030()
{
rc_BigDecimal = (new BigDecimal("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369")).divide(new BigDecimal("1"), new MathContext("precision=0 roundingMode=HALF_UP"));
Assert.assertEquals("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369", rc_BigDecimal.toString());
}
public void testItem_0031()
{
rc_BigDecimal = (new BigDecimal("-1")).remainder(new BigDecimal("1"));
Assert.assertEquals("0", rc_BigDecimal.toString());
}
public void testItem_0032()
{
rc_BigDecimal = (new BigDecimal("1")).divide(new BigDecimal("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369"), 0);
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0033()
{
rc_BigDecimal = (new BigDecimal("1")).plus();
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0034()
{
rc_long = (new BigDecimal("1")).longValue();
Assert.assertEquals(1L, rc_long);
}
public void testItem_0035()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal("TN3D4MH@M9SO46YRHYT>DA=ATY0H;DP5MEKIGPW2:PQJUFL>RJMUDQROSXI;FU7D?4?82?F0A62?L>014X:U5JK5=X<F4TA5Q;IP");
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0036()
{
rc_BigDecimal = (new BigDecimal("-1")).subtract(new BigDecimal("1"));
Assert.assertEquals("-2", rc_BigDecimal.toString());
}
public void testItem_0037()
{
rc_long = (new BigDecimal("1")).longValueExact();
Assert.assertEquals(1L, rc_long);
}
public void testItem_0038()
{
rc_BigDecimal = (new BigDecimal("1")).movePointRight(-1);
Assert.assertEquals("0.1", rc_BigDecimal.toString());
}
public void testItem_0039()
{
rc_BigDecimal = (new BigDecimal("-2")).movePointLeft(0);
Assert.assertEquals("-2", rc_BigDecimal.toString());
}
public void testItem_0040()
{
rc_BigDecimal = (new BigDecimal("1")).subtract(new BigDecimal("0.1"));
Assert.assertEquals("0.9", rc_BigDecimal.toString());
}
public void testItem_0041()
{
rc_long = (new BigDecimal("0.1")).longValue();
Assert.assertEquals(0L, rc_long);
}
public void testItem_0042()
{
rc_BigDecimal = (new BigDecimal("-1")).setScale(0);
Assert.assertEquals("-1", rc_BigDecimal.toString());
}
public void testItem_0043()
{
rc_BigDecimal = new BigDecimal(-9223372036854775808L, new MathContext("precision=0 roundingMode=HALF_UP"));
Assert.assertEquals("-9223372036854775808", rc_BigDecimal.toString());
}
public void testItem_0044()
{
rc_BigDecimal = (new BigDecimal("1")).add(new BigDecimal("-9223372036854775808"));
Assert.assertEquals("-9223372036854775807", rc_BigDecimal.toString());
}
public void testItem_0045()
{
rc_BigDecimal = new BigDecimal(1L);
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0046()
{
rc_BigDecimal = (new BigDecimal("-9223372036854775807")).scaleByPowerOfTen(2147483647);
Assert.assertEquals("-9.223372036854775807E+2147483665", rc_BigDecimal.toString());
}
public void testItem_0047()
{
rc_BigDecimal = (new BigDecimal("-9223372036854775807")).subtract(new BigDecimal("1"), new MathContext("precision=1 roundingMode=CEILING"));
Assert.assertEquals("-9E+18", rc_BigDecimal.toString());
}
public void testItem_0048()
{
rc_int = (new BigDecimal("-9E+18")).intValue();
Assert.assertEquals(494665728, rc_int);
}
public void testItem_0049()
{
rc_BigDecimal = (new BigDecimal("-9223372036854775808")).divide(new BigDecimal("-9223372036854775808"), 1);
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0050()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("-9223372036854775808")).plus(new MathContext("precision=1 roundingMode=UNNECESSARY"));
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0051()
{
rc_int = (new BigDecimal("-9E+18")).signum();
Assert.assertEquals(-1, rc_int);
}
public void testItem_0052()
{
boolean caught;
caught = false;
try {
rc_MathContext = new MathContext(-1, java.math.RoundingMode.DOWN);
}
catch (java.lang.IllegalArgumentException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0053()
{
rc_BigInteger = (new BigDecimal("-9223372036854775808")).toBigInteger();
Assert.assertEquals("-9223372036854775808", rc_BigInteger.toString());
}
public void testItem_0054()
{
boolean caught;
caught = false;
try {
rc_MathContext = new MathContext(-1, java.math.RoundingMode.DOWN);
}
catch (java.lang.IllegalArgumentException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0055()
{
rc_BigDecimal = new BigDecimal(new java.math.BigInteger("32"), 2147483647);
Assert.assertEquals("3.2E-2147483646", rc_BigDecimal.toString());
}
// public void testItem_0056()
// {
// boolean caught;
// caught = false;
// try {
// rc_BigDecimal = (new BigDecimal("-9223372036854775808")).setScale(2147483647);
// }
// catch (java.lang.NegativeArraySizeException e) {
// caught = true;
// }
// Assert.assertEquals("91.94630872483222%", true, caught);
// }
public void testItem_0057()
{
rc_String = (new BigDecimal("0.1")).toString();
Assert.assertEquals("0.1", rc_String);
}
public void testItem_0058()
{
rc_BigDecimal = new BigDecimal(new java.math.BigInteger("32"), 2147483647, new MathContext("precision=0 roundingMode=HALF_UP"));
Assert.assertEquals("3.2E-2147483646", rc_BigDecimal.toString());
}
public void testItem_0059()
{
rc_int = (new BigDecimal("0.1")).compareTo(new BigDecimal("3.2E-2147483646"));
Assert.assertEquals(1, rc_int);
}
public void testItem_0060()
{
boolean caught;
caught = false;
try {
rc_int = (new BigDecimal("-9223372036854775808")).intValueExact();
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0061()
{
rc_String = (new BigDecimal("-9223372036854775808")).toString();
Assert.assertEquals("-9223372036854775808", rc_String);
}
public void testItem_0062()
{
rc_BigDecimal = (new BigDecimal("3.2E-2147483646")).plus();
Assert.assertEquals("3.2E-2147483646", rc_BigDecimal.toString());
}
public void testItem_0063()
{
boolean caught;
caught = false;
try {
rc_MathContext = new MathContext(-2147483648, java.math.RoundingMode.HALF_DOWN);
}
catch (java.lang.IllegalArgumentException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0064()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(new char[]{'\0', '\0', '\0', '\1', '\1', '8', '\234', '8', '\234', '\uFFFF', '\uFFFF', '\uFFFF', '\1', '8', '\1', '\0', '\1', '\0', '\234', '8', '\uFFFF', '\1', '\0', '\0', '\1', '\uFFFF', '8', '\uFFFF', '\234', '\234', '\234', '\0', '\0', '\0', '8', '8', '\234', '8', '\234', '8', '\0', '\1', '\234', '\1', '\234', '8', '\uFFFF', '\1', '\0', '\0', '\1', '8', '8', '8', '\1', '\1', '\234', '\0', '\0', '8', '\234', '8', '\234', '\234', '8', '\1', '\234', '8', '\0', '8', '\234', '\uFFFF', '\uFFFF', '\234', '\0', '8', '\0', '\234', '8', '8', '8', '\1', '\1', '\uFFFF', '\234', '\1', '\uFFFF', '8', '\uFFFF', '8', '\1', '\0', '8', '\0', '\uFFFF', '\uFFFF', '\uFFFF', '8', '\uFFFF', '\0'}, new MathContext("precision=2147483647 roundingMode=HALF_UP"));
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0065()
{
rc_BigDecimal = (new BigDecimal("1")).scaleByPowerOfTen(2147483647);
Assert.assertEquals("1E+2147483647", rc_BigDecimal.toString());
}
public void testItem_0066()
{
rc_BigDecimal = (new BigDecimal("1E+2147483647")).movePointLeft(2147483647);
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0067()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("1")).divideToIntegralValue(new BigDecimal("3.2E-2147483646"), new MathContext("precision=1 roundingMode=HALF_EVEN"));
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0068()
{
rc_BigDecimal = new BigDecimal(new java.math.BigInteger("32"), new MathContext("precision=2147483647 roundingMode=HALF_UP"));
Assert.assertEquals("32", rc_BigDecimal.toString());
}
// public void testItem_0069()
// {
// boolean caught;
// if (!Boolean.getBoolean("notanerror"))
// {
// rc_int = (new BigDecimal("1E+2147483647")).compareTo(new BigDecimal("1"));
// Assert.assertEquals(-1, rc_int);
// }
// }
public void testItem_0070()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("1")).setScale(-1, -1);
}
catch (java.lang.IllegalArgumentException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0071()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal("AL2AGWLM");
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0072()
{
rc_String = (new BigDecimal("1")).toEngineeringString();
Assert.assertEquals("1", rc_String);
}
public void testItem_0073()
{
rc_String = (new BigDecimal("1")).toEngineeringString();
Assert.assertEquals("1", rc_String);
}
public void testItem_0074()
{
rc_BigInteger = (new BigDecimal("0.1")).toBigInteger();
Assert.assertEquals("0", rc_BigInteger.toString());
}
@SuppressWarnings("unlikely-arg-type")
public void testItem_0075()
{
rc_boolean = (new BigDecimal("0.1")).equals("UEHLUDM0AGIB>XLE>L90JUN=E0FWE92Q");
Assert.assertEquals(false, rc_boolean);
}
public void testItem_0076()
{
boolean caught;
caught = false;
try {
rc_short = (new BigDecimal("1E+2147483647")).shortValueExact();
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
// public void testItem_0077()
// {
// boolean caught;
// if (!Boolean.getBoolean("notanerror"))
// {
// rc_BigDecimal = (new BigDecimal("1")).max(new BigDecimal("1E+2147483647"));
// Assert.assertEquals("1", rc_BigDecimal.toString());
// }
// }
public void testItem_0078()
{
rc_BigDecimal = new BigDecimal(1135879015891L, new MathContext("precision=2147483647 roundingMode=HALF_UP"));
Assert.assertEquals("1135879015891", rc_BigDecimal.toString());
}
public void testItem_0079()
{
rc_BigDecimal = (new BigDecimal("1135879015891")).divide(new BigDecimal("1"));
Assert.assertEquals("1135879015891", rc_BigDecimal.toString());
}
public void testItem_0080()
{
rc_BigDecimal = new BigDecimal(1L);
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0081()
{
rc_BigDecimal = new BigDecimal(4.9E-324);
Assert.assertEquals("4.940656458412465441765687928682213723650598026143247644255856825006755072702087518652998363616359923797965646954457177309266567103559397963987747960107818781263007131903114045278458171678489821036887186360569987307230500063874091535649843873124733972731696151400317153853980741262385655911710266585566867681870395603106249319452715914924553293054565444011274801297099995419319894090804165633245247571478690147267801593552386115501348035264934720193790268107107491703332226844753335720832431936092382893458368060106011506169809753078342277318329247904982524730776375927247874656084778203734469699533647017972677717585125660551199131504891101451037862738167250955837389733598993664809941164205702637090279242767544565229087538682506419718265533447265625E-324", rc_BigDecimal.toString());
}
public void testItem_0082()
{
rc_MathContext = new MathContext(2147483647);
Assert.assertEquals("precision=2147483647 roundingMode=HALF_UP", rc_MathContext.toString());
}
public void testItem_0083()
{
rc_BigDecimal = (new BigDecimal("1")).plus(new MathContext("precision=1 roundingMode=UNNECESSARY"));
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0084()
{
rc_BigDecimal = (new BigDecimal("1")).multiply(new BigDecimal("1135879015891"), new MathContext("precision=2147483647 roundingMode=HALF_UP"));
Assert.assertEquals("1135879015891", rc_BigDecimal.toString());
}
// public void testItem_0085()
// {
// boolean caught;
// caught = false;
// try {
// rc_BigDecimal = (new BigDecimal("1135879015891")).remainder(new BigDecimal("1"), new MathContext("precision=2147483647 roundingMode=HALF_UP"));
// }
// catch (java.lang.OutOfMemoryError e) {
// caught = true;
// }
// Assert.assertEquals("91.94630872483222%", true, caught);
// }
public void testItem_0086()
{
rc_BigDecimal = (new BigDecimal("1")).ulp();
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0087()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("1135879015891")).divide(new BigDecimal("1135879015891"), -2147483648, 0);
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
// public void testItem_0088()
// {
// boolean caught;
// rc_int = (new BigDecimal("1")).hashCode();
// Assert.assertEquals(31, rc_int);
// }
public void testItem_0089()
{
rc_BigDecimal = (new BigDecimal("4.940656458412465441765687928682213723650598026143247644255856825006755072702087518652998363616359923797965646954457177309266567103559397963987747960107818781263007131903114045278458171678489821036887186360569987307230500063874091535649843873124733972731696151400317153853980741262385655911710266585566867681870395603106249319452715914924553293054565444011274801297099995419319894090804165633245247571478690147267801593552386115501348035264934720193790268107107491703332226844753335720832431936092382893458368060106011506169809753078342277318329247904982524730776375927247874656084778203734469699533647017972677717585125660551199131504891101451037862738167250955837389733598993664809941164205702637090279242767544565229087538682506419718265533447265625E-324")).divideToIntegralValue(new BigDecimal("1"), new MathContext("precision=0 roundingMode=HALF_UP"));
Assert.assertEquals("0E-1074", rc_BigDecimal.toString());
}
public void testItem_0090()
{
rc_String = (new BigDecimal("1135879015891")).toPlainString();
Assert.assertEquals("1135879015891", rc_String);
}
public void testItem_0091()
{
rc_BigDecimal = new BigDecimal(9223372036854775807L);
Assert.assertEquals("9223372036854775807", rc_BigDecimal.toString());
}
public void testItem_0092()
{
rc_BigDecimal_array = (new BigDecimal("1")).divideAndRemainder(new BigDecimal("9223372036854775807"), new MathContext("precision=2147483647 roundingMode=HALF_UP"));
}
public void testItem_0093()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("0E-1074")).divide(new BigDecimal("0E-1074"), -1, java.math.RoundingMode.HALF_DOWN);
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0094()
{
rc_BigDecimal = new BigDecimal(0.0, new MathContext("precision=1 roundingMode=UNNECESSARY"));
Assert.assertEquals("0", rc_BigDecimal.toString());
}
public void testItem_0095()
{
rc_BigDecimal_array = (new BigDecimal("1")).divideAndRemainder(new BigDecimal("9223372036854775807"), new MathContext("precision=2147483647 roundingMode=HALF_UP"));
}
public void testItem_0096()
{
rc_String = (new BigDecimal("1135879015891")).toString();
Assert.assertEquals("1135879015891", rc_String);
}
public void testItem_0097()
{
rc_BigDecimal = new BigDecimal(1.0, new MathContext("precision=2147483647 roundingMode=HALF_UP"));
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0098()
{
rc_BigDecimal = (new BigDecimal("9223372036854775807")).multiply(new BigDecimal("1135879015891"), new MathContext("precision=1 roundingMode=CEILING"));
Assert.assertEquals("2E+31", rc_BigDecimal.toString());
}
public void testItem_0099()
{
rc_String = (new BigDecimal("1135879015891")).toPlainString();
Assert.assertEquals("1135879015891", rc_String);
}
public void testItem_0100()
{
rc_long = (new BigDecimal("0E-1074")).longValueExact();
Assert.assertEquals(0L, rc_long);
}
public void testItem_0101()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal("AG23S3D<:Y;:1Q:A850GY0;PW82J8X74S;@Y@PM204N1Q4EUPHUFL?8C3T5<W8N3CBS472LAT@CFPE6RL6A:F:E6XB2U<T071LE?", new MathContext("precision=1 roundingMode=CEILING"));
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0102()
{
rc_BigDecimal = new BigDecimal(new java.math.BigInteger("32"), -2147483648);
Assert.assertEquals("3.2E+2147483649", rc_BigDecimal.toString());
}
public void testItem_0103()
{
rc_long = (new BigDecimal("0E-1074")).longValueExact();
Assert.assertEquals(0L, rc_long);
}
public void testItem_0104()
{
rc_BigDecimal = new BigDecimal(-1);
Assert.assertEquals("-1", rc_BigDecimal.toString());
}
public void testItem_0105()
{
rc_float = (new BigDecimal("9223372036854775807")).floatValue();
Assert.assertEquals(9.223372036854776E18F, rc_float, 0);
}
public void testItem_0106()
{
boolean caught;
caught = false;
try {
rc_short = (new BigDecimal("9223372036854775807")).shortValueExact();
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0107()
{
rc_long = (new BigDecimal("1135879015891")).longValueExact();
Assert.assertEquals(1135879015891L, rc_long);
}
public void testItem_0108()
{
rc_BigDecimal = (new BigDecimal("1")).divide(new BigDecimal("-1"), java.math.RoundingMode.CEILING);
Assert.assertEquals("-1", rc_BigDecimal.toString());
}
public void testItem_0109()
{
rc_BigDecimal_array = (new BigDecimal("9223372036854775807")).divideAndRemainder(new BigDecimal("-1"));
}
public void testItem_0110()
{
rc_BigDecimal = new BigDecimal(new java.math.BigInteger("32"), new MathContext("precision=2147483647 roundingMode=HALF_UP"));
Assert.assertEquals("32", rc_BigDecimal.toString());
}
public void testItem_0111()
{
rc_BigDecimal = (new BigDecimal("32")).add(new BigDecimal("-1"));
Assert.assertEquals("31", rc_BigDecimal.toString());
}
public void testItem_0112()
{
rc_BigDecimal = (new BigDecimal("-1")).scaleByPowerOfTen(0);
Assert.assertEquals("-1", rc_BigDecimal.toString());
}
// public void testItem_0113()
// {
// boolean caught;
// caught = false;
// try {
// rc_BigDecimal = (new BigDecimal("32")).setScale(2147483647, java.math.RoundingMode.HALF_EVEN);
// }
// catch (java.lang.NegativeArraySizeException e) {
// caught = true;
// }
// Assert.assertEquals("91.94630872483222%", true, caught);
// }
public void testItem_0114()
{
rc_BigDecimal = (new BigDecimal("31")).stripTrailingZeros();
Assert.assertEquals("31", rc_BigDecimal.toString());
}
public void testItem_0115()
{
rc_BigDecimal = (new BigDecimal("31")).movePointLeft(2147483647);
Assert.assertEquals("3.1E-2147483646", rc_BigDecimal.toString());
}
public void testItem_0116()
{
rc_BigDecimal = (new BigDecimal("-1")).divide(new BigDecimal("31"), 0, java.math.RoundingMode.HALF_EVEN);
Assert.assertEquals("0", rc_BigDecimal.toString());
}
public void testItem_0117()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal(new char[]{'\1'});
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0118()
{
rc_BigDecimal = new BigDecimal(new java.math.BigInteger("32"), new MathContext("precision=2147483647 roundingMode=HALF_UP"));
Assert.assertEquals("32", rc_BigDecimal.toString());
}
public void testItem_0119()
{
rc_String = (new BigDecimal("0")).toPlainString();
Assert.assertEquals("0", rc_String);
}
public void testItem_0120()
{
rc_String = (new BigDecimal("32")).toPlainString();
Assert.assertEquals("32", rc_String);
}
public void testItem_0121()
{
rc_BigDecimal = (new BigDecimal("0")).divide(new BigDecimal("31"));
Assert.assertEquals("0", rc_BigDecimal.toString());
}
public void testItem_0122()
{
rc_long = (new BigDecimal("1135879015891")).longValueExact();
Assert.assertEquals(1135879015891L, rc_long);
}
public void testItem_0123()
{
rc_BigDecimal = (new BigDecimal("31")).add(new BigDecimal("31"));
Assert.assertEquals("62", rc_BigDecimal.toString());
}
public void testItem_0124()
{
rc_int = (new BigDecimal("62")).intValue();
Assert.assertEquals(62, rc_int);
}
public void testItem_0125()
{
rc_BigDecimal = (new BigDecimal("1135879015891")).divide(new BigDecimal("1135879015891"), java.math.RoundingMode.HALF_EVEN);
Assert.assertEquals("1", rc_BigDecimal.toString());
}
public void testItem_0126()
{
rc_BigDecimal = (new BigDecimal("0")).add(new BigDecimal("0"));
Assert.assertEquals("0", rc_BigDecimal.toString());
}
public void testItem_0127()
{
rc_BigDecimal = new BigDecimal(-1.0, new MathContext("precision=2147483647 roundingMode=HALF_UP"));
Assert.assertEquals("-1", rc_BigDecimal.toString());
}
public void testItem_0128()
{
rc_int = (new BigDecimal("1135879015891")).precision();
Assert.assertEquals(13, rc_int);
}
public void testItem_0129()
{
rc_float = (new BigDecimal("-1")).floatValue();
Assert.assertEquals(-1.0F, rc_float, 0);
}
public void testItem_0130()
{
rc_BigDecimal_array = (new BigDecimal("0")).divideAndRemainder(new BigDecimal("31"));
}
public void testItem_0131()
{
rc_int = (new BigDecimal("31")).compareTo(new BigDecimal("0"));
Assert.assertEquals(1, rc_int);
}
public void testItem_0132()
{
rc_long = (new BigDecimal("1135879015891")).longValue();
Assert.assertEquals(1135879015891L, rc_long);
}
public void testItem_0133()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = (new BigDecimal("1135879015891")).divideToIntegralValue(new BigDecimal("0"));
}
catch (java.lang.ArithmeticException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0134()
{
boolean caught;
caught = false;
try {
rc_MathContext = new MathContext("");
}
catch (java.lang.IllegalArgumentException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0135()
{
rc_BigInteger = (new BigDecimal("1")).toBigIntegerExact();
Assert.assertEquals("1", rc_BigInteger.toString());
}
public void testItem_0136()
{
rc_int = (new BigDecimal("1135879015891")).compareTo(new BigDecimal("31"));
Assert.assertEquals(1, rc_int);
}
public void testItem_0137()
{
boolean caught;
caught = false;
try {
rc_BigDecimal = new BigDecimal("");
}
catch (java.lang.NumberFormatException e) {
caught = true;
}
Assert.assertEquals("91.94630872483222%", true, caught);
}
public void testItem_0138()
{
rc_MathContext = new MathContext(1);
Assert.assertEquals("precision=1 roundingMode=HALF_UP", rc_MathContext.toString());
}
public void testItem_0139()
{
rc_BigDecimal = (new BigDecimal("31")).setScale(1, java.math.RoundingMode.UP);
Assert.assertEquals("31.0", rc_BigDecimal.toString());
}
public void testItem_0140()
{
rc_byte = (new BigDecimal("-1")).byteValueExact();