From fe11fac039279c05b815620ade54aa998e11929f Mon Sep 17 00:00:00 2001 From: Augusto Melo Date: Sun, 15 Nov 2015 15:41:59 -0200 Subject: [PATCH] Added the test of the float, char and string. --- test/test_char/program.cs | 11 ++++ test/test_char/program.exe | Bin 0 -> 2048 bytes test/test_char/program.il | 29 +++++++++++ .../teste_1 => test/test_float}/program.cs | 6 +-- test/test_float/program.exe | Bin 0 -> 3072 bytes test/test_float/program.il | 29 +++++++++++ .../program.il => test/test_float/program2.cs | 34 ++++--------- test/test_float/program2.exe | Bin 0 -> 3072 bytes test/test_float/program2.il | 29 +++++++++++ {testes/teste_2 => test/test_int}/filename.is | 0 {testes/teste_2 => test/test_int}/program.cs | 0 {testes/teste_2 => test/test_int}/program.exe | Bin {testes/teste_2 => test/test_int}/program.il | 0 {testes/teste_2 => test/test_int}/program_.cs | 0 .../teste_2 => test/test_int}/program_.exe | Bin .../test_int}/program_changed.il | 0 test/test_string/program.cs | 11 ++++ test/test_string/program.exe | Bin 0 -> 3072 bytes test/test_string/program.il | 29 +++++++++++ testes/teste_1/program2.cs | 11 ---- testes/teste_1/program2.exe | Bin 3072 -> 0 bytes testes/teste_1/program_changed.il | 47 ------------------ 22 files changed, 152 insertions(+), 84 deletions(-) create mode 100644 test/test_char/program.cs create mode 100755 test/test_char/program.exe create mode 100644 test/test_char/program.il rename {testes/teste_1 => test/test_float}/program.cs (50%) create mode 100755 test/test_float/program.exe create mode 100644 test/test_float/program.il rename testes/teste_1/program.il => test/test_float/program2.cs (52%) create mode 100755 test/test_float/program2.exe create mode 100644 test/test_float/program2.il rename {testes/teste_2 => test/test_int}/filename.is (100%) rename {testes/teste_2 => test/test_int}/program.cs (100%) rename {testes/teste_2 => test/test_int}/program.exe (100%) rename {testes/teste_2 => test/test_int}/program.il (100%) rename {testes/teste_2 => test/test_int}/program_.cs (100%) rename {testes/teste_2 => test/test_int}/program_.exe (100%) rename {testes/teste_2 => test/test_int}/program_changed.il (100%) create mode 100644 test/test_string/program.cs create mode 100755 test/test_string/program.exe create mode 100644 test/test_string/program.il delete mode 100644 testes/teste_1/program2.cs delete mode 100755 testes/teste_1/program2.exe delete mode 100644 testes/teste_1/program_changed.il diff --git a/test/test_char/program.cs b/test/test_char/program.cs new file mode 100644 index 0000000..e216c61 --- /dev/null +++ b/test/test_char/program.cs @@ -0,0 +1,11 @@ +using System; + +public static class Test { + public static char letra(){ + return 'a'; + } + + static void Main() { + Console.WriteLine(letra()); + } +} diff --git a/test/test_char/program.exe b/test/test_char/program.exe new file mode 100755 index 0000000000000000000000000000000000000000..92698dfb699e90996ef95d8d9fb0cb47397669f9 GIT binary patch literal 2048 zcmeHHOKTHR6#i~swAF^XacOUph^31mT3skohP0)PCN?msiW@UYE_GxwS7xRXK}0vM zT8}64MFoF`P|vwDLq{nV!A+ruIgjt0`}oeixoO;cjbQ*Ir2G58 z4tW;a*uR_SR4&YXE?|3NcXmhAcV}AY_~lW#3?bBkQz#|w~FK?sZGj8lA{{)X30F-1SrqKeF4+v zJMbwqH8MruW)>gjZQ%4_`J-|Y7|)FvC%l%!R;&gw;TChHnrR^AO~{A@+E%E1-Ay^z zl;$yXG%1mwBg_>#dMn}t!~to$-l~Q z)z=-uEW}x?(u9cw8cV}WZ`>a%<4lR8iMiDau*hB`%W}?G=KexV;|ifsiUpdI3vcPj z8MO?0LwC#7Gidy_Gmm6Bo4B0i{f+dat`2>#gY?;0YM`hR|d*#XviyN^?bfZ`Ug1=X`AT89Fr4}$-8V`IwpKi JX#Up|_yyxtZZQA= literal 0 HcmV?d00001 diff --git a/test/test_char/program.il b/test/test_char/program.il new file mode 100644 index 0000000..e4e2021 --- /dev/null +++ b/test/test_char/program.il @@ -0,0 +1,29 @@ +.assembly extern mscorlib { } +.assembly 'program' { } +//.module program.exe // GUID = {F569DEE4-B852-4CDE-97A8-AE70C6E57B4F} + + + .class public auto ansi abstract sealed beforefieldinit Test extends [mscorlib]System.Object { + + // method line 1 + .method public static hidebysig default char letra () cil managed { + // Method begins at RVA 0x2050 + // Code size 3 (0x3) + .maxstack 8 + IL_0000: ldc.i4.s 0x61 + IL_0002: ret + } // end of method Test::letra + + // method line 2 + .method private static hidebysig default void Main () cil managed { + // Method begins at RVA 0x2054 + .entrypoint + // Code size 11 (0xb) + .maxstack 8 + IL_0000: call char class Test::letra() + IL_0005: call void class [mscorlib]System.Console::WriteLine(char) + IL_000a: ret + } // end of method Test::Main + + } // end of class Test + diff --git a/testes/teste_1/program.cs b/test/test_float/program.cs similarity index 50% rename from testes/teste_1/program.cs rename to test/test_float/program.cs index 8e51569..890993e 100644 --- a/testes/teste_1/program.cs +++ b/test/test_float/program.cs @@ -1,8 +1,8 @@ using System; -class Test { - static int numero(){ - return 90; +public static class Test { + public static float numero(){ + return 1234.0F; } static void Main() { diff --git a/test/test_float/program.exe b/test/test_float/program.exe new file mode 100755 index 0000000000000000000000000000000000000000..75dcf78a3877d59d8442d198ded055aacacb478b GIT binary patch literal 3072 zcmeHIJ!~9B6#nM?Bikg#0+bMh!scuwE1>0qEfEAFi_a#Q*s+zn*a#uT_cJ*!-0hxr z_kx`QoB|OFB-2nJDhg@}B&-Oe6qJOD1__W03JN3&L_8gOWj<30@sUgq9f|*}IXhhXfj~YjjJl5zf@` zfSHtO)SFrB5pEd_py~jV+^dX@eJ5G$-Q;6gc%ROmbSIf$P{hbd%oJXmQ6{71cV*hm zxl_5RQ_oAL0n{nK=Nx|*IL$4eiC#z|Kd8l2@gsfG%khf^{7jvnD8|oToS)_T2kjTd zo~egrt};k}?Cc}Juo(ZSDIBr&$oHJF?&Ma(N>*UI&2SJ8;wTHBHZqTriCT~FfTMVnM zx_${o9Vf_#K^)dK3Y&4F8(59}L@)S(M$l^LD8ypP53p2zOIH%K?;tL;g2Zp=eAsA~ z62I)%{bcjygsm;Nl1?VK4RQtL*L76T(G|ai zsWac)xIDk}%il+TI``K{EJmqA?6gcpkUB1HDrSzXMy2NYFqqq@=w{-FL2*3_--*@G z*H_1);ix?;8H$}<~Fpc-cZ%rt=8o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b!Uj$BjoH;xq7{KTopQ8o5zPT32? zD0NEOi5sEghfaR6;MAgucK7ce9&e>yng!-nAFf|Lz1&`H8yWSG8nmPaZ1naRdxtH@ zCdy%#u@G8@zx3E-V_c*Uxle#m^Y8X8*Ftb*40uEA9I)M**BY|jD)8_>zY#++F{?oO~95H)-p(}mZkmC0!NtxvgG zcQQM9;w8zn4*~U$Y)3D0ZBDr&b|H=Zu$s`s&x}1Lv2z9dN}Ep$P| z2T_T=2GlU-eEIdA3*4MiBdokM)#pGRma-Ky2UlXRekKZMn`K>3{U|K1 z#nF3-8oc`c+slWhwm&uL@WYtxMc)+L5$oU5KF7fMnJAuZYEuluTx+)y$Qk1s?iie$ zvG&w%6;S4GJz?LXJpg-qv%ACvB=3$lbHG+cJS$t7DH_Wt;5_v#&eEF0BF@mCqdrMn zQOArf;!Q{p0G zL_Wk<{kM3b6*;9u`HWY0$@IO!WOHr z=wVRj{D`}i`&wiE3BzTc*s4LwuIl70RjFc)S$a8lakjb@&Z}`=j0>g$7MtT&Nb&jF z98z83(B7|jQZ;@ii0E>08Ecxjt>Kaxt)Ri$q&+*ZYgpd*Vs=)?;Tn7LfC@PFoBaE8 M55VmW|1T@>4_n&@+5i9m literal 0 HcmV?d00001 diff --git a/test/test_string/program.il b/test/test_string/program.il new file mode 100644 index 0000000..ce3a2aa --- /dev/null +++ b/test/test_string/program.il @@ -0,0 +1,29 @@ +.assembly extern mscorlib { } +.assembly 'program' { } +//.module program.exe // GUID = {7E2BF1A3-C2DD-4425-90EE-7DA7AFB3F46B} + + + .class public auto ansi abstract sealed beforefieldinit Test extends [mscorlib]System.Object { + + // method line 1 + .method public static hidebysig default string palavra () cil managed { + // Method begins at RVA 0x2050 + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "palavra" + IL_0005: ret + } // end of method Test::palavra + + // method line 2 + .method private static hidebysig default void Main () cil managed { + // Method begins at RVA 0x2057 + .entrypoint + // Code size 11 (0xb) + .maxstack 8 + IL_0000: call string class Test::palavra() + IL_0005: call void class [mscorlib]System.Console::WriteLine(string) + IL_000a: ret + } // end of method Test::Main + + } // end of class Test + diff --git a/testes/teste_1/program2.cs b/testes/teste_1/program2.cs deleted file mode 100644 index 8e51569..0000000 --- a/testes/teste_1/program2.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -class Test { - static int numero(){ - return 90; - } - - static void Main() { - Console.WriteLine(numero()); - } -} diff --git a/testes/teste_1/program2.exe b/testes/teste_1/program2.exe deleted file mode 100755 index 713bed4586747149fd24b26098ae77f832459e76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3072 zcmeHJOK%%h6#m9>BRh}~5Gt)e=`;x_iqPORK?tb=H*qK_NgdU0T2+-AKQ7L|Jgk{< za9BV#RInob2P_d1QiYJHsQ3qT$AT5|5(xw>Sg~mN&YkfiR$H+~ImtcuJidEgnS0xf zYX=wskmh>u0Jy_lD6jeB**@J9r@o)Sx7mBA?-=X%PM3G=&};^NBdEA$t>SrpWLA|K zv^>-H%tEnbx_(_*4N+usv4hT!%z@Q%oN;Me3_;)=Iz;K@UV|EQP%JLpk{`rADX zup-rtsHbK4^yvnM^3%L+1z}L5Ti2FPaLG)lY09&DD^QM4pssbBW{EY%H9&b_c|g@- zXF9e>Z7CeXj>%v=YfxutLz!aio+j;F`wCr(|Pw?rJBW2mwD<Q9)K@IE=7UuHA0H`oi>^0%;ggPrp&)8X3k$;D{xOU%~{cx z9ly$5h^EQ&&jMLd{xKGDyw{WX^fxb~XQeAoy7#TET+hxh9FOBZsB=6gY-Uz=p1#qlU-WCr(KcF zZus?SMVxxI6?Fqz3CI$Z?Wmxnf?d0&Lbzeg4;;JNi)X2}k}5|` zUF%PsyPFHUUl#8czWME?&wu%f4H-s;PTqH9xQrFKD^u5(~O*JFi_sTng z|3PSEzWea{*2$&LXF8l_KTr4NKSVbB`k>VPu7MjXez4kBx^Z2xQdZrO?~O0si!k$A zI$|;bL*J_t@hdtolK7j?J;W{`c{{G=frFH2F&(6qC~TpG8|16FL}?90T%^86{uX7S zAJTu`m%PLDW@3;#Fc4N-<<1+7T0y`#Hs21#m>%ARul=+7=9KBJ&>GTTK}4KSP3U9X zPXEP}25X9lvT1KTB+`!>lS2-#F?J41sFDLOup$F1jOX%4@pQy2(4XS$fUl|Z@3Gs8 z#z}6I>t&7UR$gF)5H(##^H80F&GFSUdbMp48xY;^B?pU`?gDF+H%X=uX{^WG&OilC zp7+_U%*MqTW&mF~>1UnzhDJ+gP3-B48hrcY-zk$TuDg$mCtT+_m*)b!ucr`W3m9k2 zViH3pEOm5y7ELAx<~dxCMQdAofOwXh8c|1!Gl~W}iSxv@AI1z%Noqf$M@+y>{?D-Z M2>+4!e?5VJ0pn`}asU7T diff --git a/testes/teste_1/program_changed.il b/testes/teste_1/program_changed.il deleted file mode 100644 index c868cea..0000000 --- a/testes/teste_1/program_changed.il +++ /dev/null @@ -1,47 +0,0 @@ -.assembly extern mscorlib {} -.assembly 'program2' {} -.module program2.exe - - - .class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object - { - - // method line 1 - .method public hidebysig specialname rtspecialname - instance default void '.ctor' () cil managed - { - // Method begins at RVA 0x2050 - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void object::'.ctor'() - IL_0006: ret - } // end of method Test::.ctor - - // method line 2 - .method private static hidebysig - default int32 numero () cil managed - { - // Method begins at RVA 0x2058 - // Code size 3 (0x3) - .maxstack 8 - IL_0000: ldc.i4.s 0x5a - IL_0002: ret - } // end of method Test::numero - - // method line 3 - .method private static hidebysig - default void Main () cil managed - { - // Method begins at RVA 0x205c - .entrypoint - // Code size 11 (0xb) - .maxstack 8 - IL_0000: call int32 class Test::numero() - IL_0005: call void class [mscorlib]System.Console::WriteLine(int32) - IL_000a: ret - } // end of method Test::Main - - } // end of class Test -