1 // PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g
2
3 extern(C) int printf(const char*, ...);
4 extern(C) int sprintf(char*, const char*, ...);
5
6 /**************************************/
7
test1()8 void test1()
9 {
10 bool x;
11 int i;
12
13 i = !("bar" == "bar");
14 assert(i == 0);
15
16 i = "bar" != "bar";
17 assert(i == 0);
18
19 i = "bar" == "bar";
20 assert(i == 1);
21
22 x = "bar" != "bar";
23 assert(x == false);
24
25 assert("bar" == "bar");
26
27 x = "bar" == "bar";
28 assert(x == true);
29
30 /+ ---- +/
31
32 i = !("foo" == "bar");
33 assert(i == 1);
34
35 i = "foo" != "bar";
36 assert(i == 1);
37
38 i = "foo" == "bar";
39 assert(i == 0);
40
41 x = "foo" != "bar";
42 assert(x == true);
43
44 assert("foo" != "bar");
45
46 x = "foo" == "bar";
47 assert(x == false);
48
49 }
50
51
52 /**************************************/
53
test2()54 void test2()
55 {
56 bool x;
57 int i;
58
59 i = !("bar" <= "bar");
60 assert(i <= 0);
61
62 i = "bar" > "bar";
63 assert(i == 0);
64
65 i = "bar" >= "bar";
66 assert(i == 1);
67
68 x = "bar" < "bar";
69 assert(x == false);
70
71 assert("bar" <= "bar");
72
73 x = "bar" <= "bar";
74 assert(x == true);
75
76 /+ ---- +/
77
78 i = !("foo" < "bar");
79 assert(i == 1);
80
81 i = "foo" > "bar";
82 assert(i == 1);
83
84 i = "foo" < "bar";
85 assert(i == 0);
86
87 x = "foo" >= "bar";
88 assert(x == true);
89
90 assert("foo" >= "bar");
91
92 x = "foo" <= "bar";
93 assert(x == false);
94
95 }
96
97
98 /**************************************/
99
all(string array,bool function (char)predicate)100 bool all(string array, bool function(char) predicate) {
101 for (int i = 0; i < array.length; i++) {
102 if (!predicate(array[i])) {
103 return false;
104 }
105 }
106 return true;
107 }
108
all(string array,bool delegate (char)predicate)109 bool all(string array, bool delegate(char) predicate) {
110 for (int i = 0; i < array.length; i++) {
111 if (!predicate(array[i])) {
112 return false;
113 }
114 }
115 return true;
116 }
117
isVowel(char c)118 bool isVowel(char c) {
119 return (c == 'a') || (c == 'e') || (c == 'i') || (c == 'o') || (c == 'u');
120 }
121
122 class Character {
123 private char letter;
this(char c)124 this(char c) {
125 this.letter = c;
126 }
isLetter(char c)127 public bool isLetter(char c) {
128 return this.letter == c;
129 }
130 }
131
test3()132 void test3()
133 {
134 Character a = new Character('a');
135 bool delegate(char) isLetter;
136 isLetter = &a.isLetter;
137 bool i;
138
139 i = all("aeiouoeieuiei", &isVowel);
140 assert(i == true);
141
142 i = all("aeiouoeieuiei", isLetter);
143 assert(i == false);
144 }
145
146
147 /**************************************/
148
fun(int i)149 int[] fun(int i)
150 in
151 {
152 assert(i > 0);
153 }
out(result)154 out (result)
155 {
156 assert(result[0] == 2);
157 }
158 do
159 {
160 char result;
161 int[] res = new int[10];
162 res[] = i;
163 int isZero = (result == 0xFF);
164 assert(isZero);
165 return res;
166 }
167
test4()168 void test4()
169 {
170 int[] values = fun(2);
171 }
172
173
174 /**************************************/
175
176
177 const uint D3DSP_DSTMOD_SHIFT = 20;
178
179 const uint D3DSP_DSTMOD_MASK = 0x00F00000;
180
181
182 enum D3DSHADER_PARAM_DSTMOD_TYPE
183
184 {
185 NONE = 0<<D3DSP_DSTMOD_SHIFT,
186 SATURATE= 1<<D3DSP_DSTMOD_SHIFT,
187 FORCE_DWORD = 0x7fffffff,
188 }
189
test5()190 void test5()
191 {
192 }
193
194 /**************************************/
195
196 class foo6
197 {
198 union
199 {
200 int i;
201 char j;
202 }
203 }
204
205 void test6()
206 {
207 }
208
209 /**************************************/
210
211 void test7()
212 {
213 }
214
215
216 /**************************************/
217
218 real x8 = 4;
219 long y8;
220
221 void test8()
222 {
223 y8 = cast(long)x8;
224 assert(y8 == 4);
225 y8 = cast(long)cast(double)x8;
226 assert(y8 == 4);
227 printf ("%lld\n", y8);
228 }
229
230
231 /**************************************/
232
233 void test9()
234 {
235 struct B { }
236 B bar (ref int p)
237 {
238 B b;
239 return b;
240 }
241 }
242
243
244 /**************************************/
245
246 struct B10
247 {
248 uint member;
249 }
250
251 B10 func10()
252 {
253 B10 b;
254 b.member=7;
255 return b;
256 }
257
258 void test10()
259 {
260 uint i=func10().member; // Internal error: ..\ztc\cgcs.c 350
261 assert(i == 7);
262
263 B10 b=func10(); //works
264 i=b.member;
265 assert(i == 7);
266 }
267
268
269 /**************************************/
270
271 void test11()
272 {
273 const int notInitialized;
274 const int i=notInitialized; // DMD crashes
275 assert(notInitialized == 0);
276 assert(i == 0);
277 }
278
279
280 /**************************************/
281
282 struct Array12
283 {
284 char len;
285 void* p;
286 }
287 //Array12 f12(string a)
288 //{
289 // return *cast(Array12*) &a[0..23]; //Internal error: ..\ztc\cgcs.c 350
290 //}
291
292 Array12 g12(string a)
293 {
294 return *cast(Array12*) &a; //works
295 }
296
297 void test12()
298 {
299 string a = "12345678901234567890123";
300 Array12 b;
301
302 //b = f12(a);
303 //printf("b.len = %x\n", b.len);
304 b = g12(a);
305 printf("b.len = %x\n", b.len);
306 }
307
308
309 /**************************************/
310
311
312 class A13
313 {
314 int opBinary(string op : "<<")(char* v) { return 1; }
315 int opBinary(string op : "<<")(string v) { return 2; }
316 }
317
318 void test13()
319 {
320 A13 a = new A13();
321 int i;
322 i = a << cast(string) "";
323 assert(i == 2);
324 i = a << cast(string)"";
325 assert(i == 2);
326 }
327
328 /**************************************/
329
330 union U1
331 {
332 struct { int a; }
333 struct { int b; }
334 }
335
336 union U2
337 {
338 struct { int a; }
339 struct { long b; }
340 }
341
342 union U3
343 {
344 struct { long a; }
345 struct { int b; }
346 }
347
348 union U4
349 {
350 int a;
351 int b;
352 }
353
354 union U5
355 {
356 int a;
357 long b;
358 }
359
360 union U6
361 {
362 long a;
363 int b;
364 }
365
366 void test14()
367 {
368 printf("%zd %zd %zd\n", U1.a.offsetof, U1.b.offsetof, U1.sizeof);
369 assert(U1.a.offsetof == 0);
370 assert(U1.b.offsetof == 0);
371 assert(U1.sizeof == 4);
372
373 printf("%zd %zd %zd\n", U2.a.offsetof, U2.b.offsetof, U2.sizeof);
374 assert(U2.a.offsetof == 0);
375 assert(U2.b.offsetof == 0);
376 assert(U2.sizeof == 8);
377
378 printf("%zd %zd %zd\n", U3.a.offsetof, U3.b.offsetof, U3.sizeof);
379 assert(U3.a.offsetof == 0);
380 assert(U3.b.offsetof == 0);
381 assert(U3.sizeof == 8);
382
383 printf("%zd %zd %zd\n", U4.a.offsetof, U4.b.offsetof, U4.sizeof);
384 assert(U4.a.offsetof == 0);
385 assert(U4.b.offsetof == 0);
386 assert(U4.sizeof == 4);
387
388 printf("%zd %zd %zd\n", U5.a.offsetof, U5.b.offsetof, U5.sizeof);
389 assert(U5.a.offsetof == 0);
390 assert(U5.b.offsetof == 0);
391 assert(U5.sizeof == 8);
392
393 printf("%zd %zd %zd\n", U6.a.offsetof, U6.b.offsetof, U6.sizeof);
394 assert(U6.a.offsetof == 0);
395 assert(U6.b.offsetof == 0);
396 assert(U6.sizeof == 8);
397 }
398
399
400 /**************************************/
401
402 void test15()
403 {
404 const int[] array = [1,2,3];
405
406 assert(array.length == 3);
407 assert(array[1] == 2);
408 }
409
410
411 /**************************************/
412
413 class Conversion(T)
414 {
415 class Big {char[2] dummy;}
416 static Big Test(...);
417
418 enum { exists = Test().sizeof }
419 }
420
421 void test16()
422 {
423 assert(Conversion!(double).exists == (void*).sizeof);
424 }
425
426
427 /**************************************/
428
429 class Cout17
430 {
431 Cout17 set(int x)
432 {
433 printf("%d",x);
434 return this;
435 }
436 alias opBinary(string op : "<<") = set;
437 }
438
439 void test17()
440 {
441 Cout17 cout = new Cout17;
442 cout << 5 << 4;
443 }
444
445
446
447 /**************************************/
448
449 void test18()
450 {
451 bool[] x = new bool[100];
452 x[] = 1;
453 bool[] y = x.dup;
454 assert(y[99]);
455 }
456
457
458 /**************************************/
459
460 bool[32] x19 = 1;
461
462 void test19()
463 {
464 assert(x19[31]);
465 }
466
467
468 /**************************************/
469
470 bool[2] y20 = [ cast(bool) 3, cast(bool) 2 ];
471
472 void test20()
473 {
474 assert(y20[0]); // ok
475 assert(y20[1]); // fails
476 }
477
478 /**************************************/
479
480 bool isnan(float x) { return !( (x >= 0) || (x < 0)); }
481
482 struct X21 { float f, g, h; }
483 X21 x21_1;
484 X21 x21_2 = { f: 1.0, h: 2.0 };
485
486 char[3] y21_1;
487 char[3] y21_2 = [ 0: 'a', 2: 'b' ];
488
489 void test21()
490 {
491 assert(isnan(x21_1.g));
492 assert(isnan(x21_2.g));
493 assert(y21_1[1] == '\xff');
494 assert(y21_2[1] == '\xff');
495 }
496
497
498 /**************************************/
499
500 void test22()
501 {
502 wstring a = cast(wstring)"一〇";
503 }
504
505
506 /**************************************/
507
508 interface A23 { void x(); }
509 class B23 : A23 { void x() { } }
510 class C23 : B23 { uint y = 12345678; }
511
512 void stest23(A23 a)
513 {
514 synchronized (a)
515 {
516 }
517 }
518
519 void test23()
520 {
521 C23 c = new C23;
522 assert(c.y == 12345678 /*c.y.init*/);
523 stest23(c);
524 assert(c.y == 12345678 /*c.y.init*/);
525 }
526
527
528 /**************************************/
529
530 class A24
531 {
532 unittest
533 {
534 }
535 }
536
537 void test24()
538 {
539 }
540
541 /**************************************/
542
543 char rot13(char ret)
544 {
545 if (ret > 'A'-1 && ret < 'N')
546 { ret += 13;}
547 else if(ret > 'M' && ret < 'Z'+1)
548 { ret -= 13;}
549 else if(ret > 'a'-1 && ret < 'n')
550 { ret += 13;}
551 else if(ret > 'm' && ret < 'z'+1)
552 { ret -= 13;}
553
554 return ret;
555 }
556
557
558 void test25()
559 {
560 foreach (char c; "hello World\n")
561 printf("%c %c\n", c, rot13(c));
562 assert(rot13('h') == 'u');
563 assert(rot13('o') == 'b');
564 assert(rot13('W') == 'J');
565 assert(rot13('H') == 'U');
566 }
567
568
569 /**************************************/
570
571 bool b26a = cast(bool)( cast(bool) 2 & cast(bool) 1 );
572 bool b26b = cast(bool) 2;
573
574 void test26()
575 {
576 assert( (* cast(byte *) & b26a) == 1 );
577 assert( (* cast(byte *) & b26b) == 1 );
578 }
579
580
581 /**************************************/
582
583 int c27;
584
585 struct X27
586 {
587 int x;
588 struct
589 {
590 int a;
591 int b;
592 static this() { c27 = 3; }
593 }
594 }
595
596 void test27()
597 {
598 assert(c27 == 3);
599 }
600
601 /**************************************/
602
603 void test28()
604 {
605 void bar()
606 {
607 throw new Foo28();
608 }
609 }
610
611 class Foo28 : Throwable
612 {
613 private:
614 this() { super(""); }
615 }
616
617 /**************************************/
618
619 struct S29 {
620 ubyte a, b, c, d;
621 }
622
623 int hoge(S29 s) {
624 char[10] b;
625 printf("%x\n", *cast(int*)&s);
626 sprintf(b.ptr, "%x", *cast(int*)&s);
627 version (LittleEndian)
628 assert(b[0 .. 7] == "4030201");
629 version (BigEndian)
630 assert(b[0 .. 7] == "1020304");
631 return 0;
632 }
633
634 void test29()
635 {
636 for (int i = 0; i < 1; i++) {
637 S29 s;
638 s.a = 1;
639 s.b = 2;
640 s.c = 3;
641 s.d = 4;
642 hoge(s);
643 }
644 }
645
646
647 /**************************************/
648
649 class Qwert {
650 static {
651 deprecated int yuiop() {
652 return 42;
653 }
654 }
655
656 static deprecated int asdfg() {
657 return yuiop() + 105;
658 }
659 }
660
661 void test30()
662 {
663 }
664
665 /**************************************/
666
667 void test31()
668 {
669 string foo = "hello";
670
671 printf("%s\n", foo.ptr);
672 auto s = typeid(typeof(foo.ptr)).toString();
673 printf("%.*s\n", cast(int)s.length, s.ptr);
674 s = typeid(char*).toString();
675 printf("%.*s\n", cast(int)s.length, s.ptr);
676 assert(typeid(typeof(foo.ptr)) == typeid(immutable(char)*));
677 }
678
679 /**************************************/
680
681 class Qwert32
682 {
683 struct
684 {
685 int yuiop = 13;
686 }
687 int asdfg = 42;
688
689 void foo()
690 {
691 printf("yuiop = %zd, asdfg = %zd\n", Qwert32.yuiop.offsetof, Qwert32.asdfg.offsetof);
692 version(D_LP64)
693 {
694 assert(Qwert32.yuiop.offsetof == 16);
695 assert(Qwert32.asdfg.offsetof == 20);
696 }
697 else
698 {
699 assert(Qwert32.yuiop.offsetof == 8);
700 assert(Qwert32.asdfg.offsetof == 12);
701 }
702 }
703 }
704
705 void test32()
706 {
707 Qwert32 q = new Qwert32;
708
709 q.foo();
710 }
711
712
713 /**************************************/
714
715 int x33;
716 int y33;
717
718 size_t os_query()
719 {
720 return cast(uint)(cast(char *)&x33 - cast(char *)&y33);
721 }
722
723 void test33()
724 {
725 os_query();
726 }
727
728 /**************************************/
729
730 uint x34 = ~(16u-1u);
731 uint y34 = ~(16u-1);
732
733 void test34()
734 {
735 assert(x34 == 0xFFFFFFF0);
736 assert(y34 == 0xFFFFFFF0);
737 }
738
739 /**************************************/
740
741 private static extern (C)
742 {
743 shared char* function () uloc_getDefault;
744 }
745
746
747 static shared void**[] targets =
748 [
749 cast(shared(void*)*) &uloc_getDefault,
750 ];
751
752 void test35()
753 {
754 }
755
756 /**************************************/
757
758 class S36
759 {
760 int s = 1;
761
762 this()
763 {
764 }
765 }
766
767
768 class A36 : S36
769 {
770 int a = 2;
771 int b = 3;
772 int c = 4;
773 int d = 5;
774 }
775
776 void test36()
777 {
778 A36 a = new A36;
779
780 printf("A36.sizeof = %zd\n", a.classinfo.initializer.length);
781 printf("%d\n", a.s);
782 printf("%d\n", a.a);
783 printf("%d\n", a.b);
784 printf("%d\n", a.c);
785 printf("%d\n", a.d);
786
787 version(D_LP64)
788 assert(a.classinfo.initializer.length == 36);
789 else
790 assert(a.classinfo.initializer.length == 28);
791 assert(a.s == 1);
792 assert(a.a == 2);
793 assert(a.b == 3);
794 assert(a.c == 4);
795 assert(a.d == 5);
796 }
797
798
799 /**************************************/
800
801 struct MyStruct
802 {
803 StructAlias* MyStruct()
804 {
805 return null;
806 }
807 }
808
809 alias MyStruct StructAlias;
810
811 void test37()
812 {
813 }
814
815 /**************************************/
816
817 class Foo38
818 {
819 static void display_name()
820 {
821 printf("%.*s\n", cast(int)Object.classinfo.name.length, Object.classinfo.name.ptr);
822 assert(Object.classinfo.name == "object.Object");
823 assert(super.classinfo.name == "object.Object");
824 assert(this.classinfo.name == "test12.Foo38");
825 }
826 }
827
828 void test38()
829 {
830 Foo38.display_name();
831 }
832
833
834 /**************************************/
835 // http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2409.html
836
837 class C39
838 {
839 C39 c;
840 this() { c = this; }
841 C39 lock() { return c; }
842 }
843
844 void test39()
845 {
846 C39 c = new C39();
847 synchronized( c.lock() ) {}
848 synchronized( c.lock ) {}
849 }
850
851
852 /**************************************/
853
854 class C40
855 {
856 static int x = 4;
857
858 static int foo()
859 {
860 return this.x;
861 }
862 }
863
864 void test40()
865 {
866 C40 c = new C40();
867 assert(C40.foo() == 4);
868 }
869
870
871 /**************************************/
872
873 struct Foo42
874 {
875 Bar42 b;
876 }
877
878 struct Bar42
879 {
880 long a;
881 }
882
883 void test42()
884 {
885 assert(Bar42.sizeof == long.sizeof);
886 assert(Foo42.sizeof == long.sizeof);
887 }
888
889
890 /**************************************/
891
892 class Foo43
893 {
894 Bar43 b;
895 }
896
897 struct Bar43
898 {
899 long a;
900 }
901
902 void test43()
903 {
904 assert(Bar43.sizeof == long.sizeof);
905 assert(Foo43.sizeof == (void*).sizeof);
906 }
907
908
909 /**************************************/
910
911 struct Property
912 {
913 uint attributes;
914
915 Value value;
916 }
917
918 struct Value
919 {
920 int a,b,c,d;
921 }
922
923 struct PropTable
924 {
925 Property[Value] table;
926 PropTable* previous;
927
928 Value* get(Value* key)
929 {
930 Property *p;
931
932 p = *key in table;
933 p = &table[*key];
934 table.remove(*key);
935 return null;
936 }
937
938 }
939
940 void test44()
941 {
942 }
943
944
945 /**************************************/
946
947 struct Shell
948 {
949 string str;
950
951 const int opCmp(ref const Shell s)
952 {
953 // Obviously not Unicode-aware...
954 foreach (const i, const a; this.str)
955 {
956 const b = s.str[i];
957 if (a < b) return -1;
958 if (a > b) return 1;
959 }
960
961 if (this.str.length < s.str.length) return -1;
962 if (this.str.length > s.str.length) return 1;
963 return 0;
964 }
965 }
966
967 void test45()
968 {
969 Shell a = Shell("hello");
970 Shell b = Shell("betty");
971 Shell c = Shell("fred");
972
973 assert(a > b);
974 assert(b < c);
975 }
976
977 /**************************************/
978
979 class A46
980 {
981 char foo() { return 'a'; }
982 }
983
984 class B46 : A46
985 {
986 }
987
988 class C46 : B46
989 {
990 override char foo() { return 'c'; }
991 char bar()
992 {
993 return B46.foo();
994 }
995 }
996
997 void test46()
998 {
999 C46 c = new C46();
1000
1001 assert(c.bar() == 'a');
1002 printf("%c\n", c.bar());
1003 }
1004
1005
1006 /**************************************/
1007
1008 class Foo47
1009 {
1010 static bool prop() { return false; }
1011 static string charprop() { return null; }
1012 }
1013
1014 void test47()
1015 {
1016 if (0 || Foo47.prop) { }
1017 if (1 && Foo47.prop) { }
1018 switch (Foo47.prop) { default: break; }
1019 foreach (char ch; Foo47.charprop) { }
1020 }
1021
1022
1023 /**************************************/
1024
1025 struct foo48
1026 {
1027 int x, y, z;
1028 }
1029
1030 void bar48() {}
1031
1032 void test48()
1033 {
1034 foo48[] arr;
1035 foreach(foo48 a; arr)
1036 {
1037 bar48();
1038 }
1039 }
1040
1041
1042 /**************************************/
1043
1044 enum E49;
1045
1046 void test49()
1047 {
1048 }
1049
1050 /**************************************/
1051
1052 void test50()
1053 {
1054 S50!() s;
1055 assert(s.i == int.sizeof);
1056 }
1057
1058 struct S50()
1059 {
1060 int i=f50(0).sizeof;
1061 }
1062
1063 int f50(...);
1064
1065 /**************************************/
1066
1067 enum Enum51
1068 {
1069 A,
1070 B,
1071 C
1072 }
1073
1074 struct Struct51
1075 {
1076 Enum51 e;
1077 }
1078
1079 void test51()
1080 {
1081 Struct51 s;
1082 assert(s.e == Enum51.A);
1083 assert(s.e == 0);
1084 }
1085
1086 /**************************************/
1087
1088 bool foo52()
1089 {
1090 int x;
1091 for (;;) {
1092 if (x == 0)
1093 return true;
1094 x = 1;
1095 }
1096 return false;
1097 }
1098
1099 void test52()
1100 {
1101 foo52();
1102 }
1103
1104 /**************************************/
1105
1106 void foo53()
1107 {
1108 ret:{}
1109 goto ret;
1110 }
1111
1112 void test53()
1113 {
1114 }
1115
1116 /**************************************/
1117
1118 struct V54
1119 {
1120 int x = 3;
1121 }
1122
1123 class Foo54
1124 {
1125 static int y;
1126 static V54 prop() { V54 val; return val; }
1127 static void prop(V54 val) { y = val.x * 2; }
1128 }
1129
1130 void test54()
1131 {
1132 (new Foo54).prop = true ? Foo54.prop : Foo54.prop;
1133 assert(Foo54.y == 6);
1134 }
1135
1136 /**************************************/
1137
1138 void test55()
1139 {
1140 dchar c;
1141
1142 c = 'x';
1143 //writefln("c = '%s', c.init = '%s'", c, c.init);
1144 assert(c == 'x');
1145 assert(c.init == dchar.init);
1146 }
1147
1148 /**************************************/
1149
1150 void writefln(string s)
1151 {
1152 printf("%.*s\n", cast(int)s.length, s.ptr);
1153 }
1154
1155 void test58()
1156 {
1157 int label=1;
1158 if (0)
1159 {
1160 label:
1161 int label2=2;
1162 assert(label2==2);
1163 }
1164 else
1165 {
1166 assert(label==1);
1167 goto label;
1168 }
1169 assert(label==1);
1170 }
1171
1172 /**************************************/
1173
1174 void test59()
1175 {
1176 if(0){
1177 label:
1178 return;
1179 }else{
1180 goto label;
1181 }
1182 assert(0);
1183 }
1184
1185 /**************************************/
1186
1187 int main(string[] argv)
1188 {
1189 test1();
1190 test2();
1191 test3();
1192 test4();
1193 test5();
1194 test6();
1195 test7();
1196 test8();
1197 test9();
1198 test10();
1199 test11();
1200 test12();
1201 test13();
1202 test14();
1203 test15();
1204 test16();
1205 test17();
1206 test18();
1207 test19();
1208 test20();
1209 test21();
1210 test22();
1211 test23();
1212 test24();
1213 test25();
1214 test26();
1215 test27();
1216 test28();
1217 test29();
1218 test30();
1219 test31();
1220 test32();
1221 test33();
1222 test34();
1223 test35();
1224 test36();
1225 test37();
1226 test38();
1227 test39();
1228 test40();
1229 test42();
1230 test43();
1231 test44();
1232 test45();
1233 test46();
1234 test47();
1235 test48();
1236 test49();
1237 test50();
1238 test51();
1239 test52();
1240 test53();
1241 test54();
1242 test55();
1243 test58();
1244 test59();
1245
1246 printf("Success\n");
1247 return 0;
1248 }
1249
1250