diff options
author | Matt Mitchell <mmitche@microsoft.com> | 2015-05-21 09:53:11 -0700 |
---|---|---|
committer | Matt Mitchell <mmitche@microsoft.com> | 2015-05-21 09:53:11 -0700 |
commit | c122ee624844e04e8c7248326fb4ae90e3db7018 (patch) | |
tree | 988800d259ac86280d9ba17da275023d343c4fd3 | |
parent | 85eac4ce945618ff522930992cb8d9422c28112a (diff) | |
download | coreclr-c122ee624844e04e8c7248326fb4ae90e3db7018.tar.gz coreclr-c122ee624844e04e8c7248326fb4ae90e3db7018.tar.bz2 coreclr-c122ee624844e04e8c7248326fb4ae90e3db7018.zip |
Disable tests failing at runtime and remove tests failing to compile.
See #1036, #1037 and #1038
-rw-r--r-- | tests/issues.targets | 11 | ||||
-rw-r--r-- | tests/runtest.cmd | 5 | ||||
-rw-r--r-- | tests/src/JIT/Directed/coverage/oldtests/lclfldadd.cs | 559 | ||||
-rw-r--r-- | tests/src/JIT/Directed/coverage/oldtests/lclflddiv.cs | 559 | ||||
-rw-r--r-- | tests/src/JIT/Directed/coverage/oldtests/lclfldmul.cs | 559 | ||||
-rw-r--r-- | tests/src/JIT/Directed/coverage/oldtests/lclfldrem.cs | 559 | ||||
-rw-r--r-- | tests/src/JIT/Directed/coverage/oldtests/lclfldsub.cs | 559 |
7 files changed, 15 insertions, 2796 deletions
diff --git a/tests/issues.targets b/tests/issues.targets new file mode 100644 index 0000000000..3f228860a6 --- /dev/null +++ b/tests/issues.targets @@ -0,0 +1,11 @@ +<Project DefaultTargets = "GetListOfTestCmds" + xmlns="http://schemas.microsoft.com/developer/msbuild/2003" > + <ItemGroup Condition="'$(XunitTestBinBase)' != ''"> + <ExcludeList Include="$(XunitTestBinBase)\JIT\Directed\newarr\newarr.cmd" > + <Issue>1036</Issue> + </ExcludeList> + <ExcludeList Include="$(XunitTestBinBase)\JIT\Directed\lifetime\lifetime2.cmd" > + <Issue>1037</Issue> + </ExcludeList> + </ItemGroup> +</Project> diff --git a/tests/runtest.cmd b/tests/runtest.cmd index fd2c611acb..0963bc0486 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -6,6 +6,9 @@ set __ProjectFilesDir=%~dp0 set __VSVersion=VS2013 set __VSProductVersion=120 +:: Default __Exclude to issues.targets +set __Exclude=%~dp0\issues.targets + :Arg_Loop if "%1" == "" goto ArgsDone if /i "%1" == "x64" (set __BuildArch=x64&set __MSBuildBuildArch=x64&shift&goto Arg_Loop) @@ -126,7 +129,7 @@ if ERRORLEVEL 1 ( ) :runtests -%_buildprefix% %_msbuildexe% "%__ProjectFilesDir%runtest.proj" /p:NoBuild=true /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__TestRunBuildLog%";Append %1 %_buildpostfix% +%_buildprefix% %_msbuildexe% "%__ProjectFilesDir%runtest.proj" /p:NoBuild=true /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__TestRunBuildLog%";Append %1 %_buildpostfix% /clp:showcommandline exit /b %ERRORLEVEL% :PerformXunitWrapperBuild diff --git a/tests/src/JIT/Directed/coverage/oldtests/lclfldadd.cs b/tests/src/JIT/Directed/coverage/oldtests/lclfldadd.cs deleted file mode 100644 index fc4fe19725..0000000000 --- a/tests/src/JIT/Directed/coverage/oldtests/lclfldadd.cs +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -//Testing simple math on local vars and fields - add - -#pragma warning disable 0414 -using System; -internal class lclfldadd -{ - //user-defined class that overloads operator + - public class numHolder - { - private int _num; - private uint _ui_num; - private long _num; - private ulong _ul_num; - private float _num; - private double _num; - private decimal _num; - public numHolder(int i_num) - { - _num = Convert.ToInt32(i_num); - _ui_num = Convert.ToUInt32(i_num); - _num = Convert.ToInt64(i_num); - _ul_num = Convert.ToUInt64(i_num); - _num = Convert.ToSingle(i_num); - _num = Convert.ToDouble(i_num); - _num = Convert.ToDecimal(i_num); - } - - public static int operator +(numHolder a, int b) - { - return a._num + b; - } - - public numHolder(uint ui_num) - { - _num = Convert.ToInt32(ui_num); - _ui_num = Convert.ToUInt32(ui_num); - _num = Convert.ToInt64(ui_num); - _ul_num = Convert.ToUInt64(ui_num); - _num = Convert.ToSingle(ui_num); - _num = Convert.ToDouble(ui_num); - _num = Convert.ToDecimal(ui_num); - } - - public static uint operator +(numHolder a, uint b) - { - return a._ui_num + b; - } - - public numHolder(long l_num) - { - _num = Convert.ToInt32(l_num); - _ui_num = Convert.ToUInt32(l_num); - this._num = Convert.ToInt64(l_num); - _ul_num = Convert.ToUInt64(l_num); - _num = Convert.ToSingle(l_num); - _num = Convert.ToDouble(l_num); - _num = Convert.ToDecimal(l_num); - } - - public static long operator +(numHolder a, long b) - { - return a._num + b; - } - - public numHolder(ulong ul_num) - { - _num = Convert.ToInt32(ul_num); - _ui_num = Convert.ToUInt32(ul_num); - _num = Convert.ToInt64(ul_num); - _ul_num = Convert.ToUInt64(ul_num); - _num = Convert.ToSingle(ul_num); - _num = Convert.ToDouble(ul_num); - _num = Convert.ToDecimal(ul_num); - } - - public static long operator +(numHolder a, ulong b) - { - return (long)(a._ul_num + b); - } - - public numHolder(float f_num) - { - _num = Convert.ToInt32(f_num); - _ui_num = Convert.ToUInt32(f_num); - _num = Convert.ToInt64(f_num); - _ul_num = Convert.ToUInt64(f_num); - this._num = Convert.ToSingle(f_num); - _num = Convert.ToDouble(f_num); - _num = Convert.ToDecimal(f_num); - } - - public static float operator +(numHolder a, float b) - { - return a._num + b; - } - - public numHolder(double d_num) - { - _num = Convert.ToInt32(d_num); - _ui_num = Convert.ToUInt32(d_num); - _num = Convert.ToInt64(d_num); - _ul_num = Convert.ToUInt64(d_num); - _num = Convert.ToSingle(d_num); - this._num = Convert.ToDouble(d_num); - _num = Convert.ToDecimal(d_num); - } - - public static double operator +(numHolder a, double b) - { - return a._num + b; - } - - public numHolder(decimal m_num) - { - _num = Convert.ToInt32(m_num); - _ui_num = Convert.ToUInt32(m_num); - _num = Convert.ToInt64(m_num); - _ul_num = Convert.ToUInt64(m_num); - _num = Convert.ToSingle(m_num); - _num = Convert.ToDouble(m_num); - this._num = Convert.ToDecimal(m_num); - } - - public static int operator +(numHolder a, decimal b) - { - return (int)(a._num + b); - } - - public static int operator +(numHolder a, numHolder b) - { - return a._num + b._num; - } - } - - private static int s_s_op1 = 1; - private static uint s_ui_s_op1 = 1; - private static long s_s_op1 = 1; - private static ulong s_ul_s_op1 = 1; - private static float s_s_op1 = 1; - private static double s_s_op1 = 1; - private static decimal s_s_op1 = 1; - - private static int s_s_op2 = 8; - private static uint s_ui_s_op2 = 8; - private static long s_s_op2 = 8; - private static ulong s_ul_s_op2 = 8; - private static float s_s_op2 = 8; - private static double s_s_op2 = 8; - private static decimal s_s_op2 = 8; - private static numHolder s_nHldr_s_op2 = new numHolder(8); - - public static int i_f(String s) - { - if (s == "op1") - return 1; - else - return 8; - } - public static uint ui_f(String s) - { - if (s == "op1") - return 1; - else - return 8; - } - public static long l_f(String s) - { - if (s == "op1") - return 1; - else - return 8; - } - public static ulong ul_f(String s) - { - if (s == "op1") - return 1; - else - return 8; - } - public static float f_f(String s) - { - if (s == "op1") - return 1; - else - return 8; - } - public static double d_f(String s) - { - if (s == "op1") - return 1; - else - return 8; - } - public static decimal m_f(String s) - { - if (s == "op1") - return 1; - else - return 8; - } - public static numHolder nHldr_f(String s) - { - if (s == "op1") - return new numHolder(1); - else - return new numHolder(8); - } - private class CL - { - public int i_cl_op1 = 1; - public uint ui_cl_op1 = 1; - public long l_cl_op1 = 1; - public ulong ul_cl_op1 = 1; - public float f_cl_op1 = 1; - public double d_cl_op1 = 1; - public decimal m_cl_op1 = 1; - - public int i_cl_op2 = 8; - public uint ui_cl_op2 = 8; - public long l_cl_op2 = 8; - public ulong ul_cl_op2 = 8; - public float f_cl_op2 = 8; - public double d_cl_op2 = 8; - public decimal m_cl_op2 = 8; - public numHolder nHldr_cl_op2 = new numHolder(8); - } - - private struct VT - { - public int i_vt_op1; - public uint ui_vt_op1; - public long l_vt_op1; - public ulong ul_vt_op1; - public float f_vt_op1; - public double d_vt_op1; - public decimal m_vt_op1; - - public int i_vt_op2; - public uint ui_vt_op2; - public long l_vt_op2; - public ulong ul_vt_op2; - public float f_vt_op2; - public double d_vt_op2; - public decimal m_vt_op2; - public numHolder nHldr_vt_op2; - } - - public static int Main() - { - bool passed = true; - //initialize class - CL cl1 = new CL(); - //initialize struct - VT vt1; - vt1.i_vt_op1 = 1; - vt1.ui_vt_op1 = 1; - vt1.l_vt_op1 = 1; - vt1.ul_vt_op1 = 1; - vt1.f_vt_op1 = 1; - vt1.d_vt_op1 = 1; - vt1.m_vt_op1 = 1; - vt1.i_vt_op2 = 8; - vt1.ui_vt_op2 = 8; - vt1.l_vt_op2 = 8; - vt1.ul_vt_op2 = 8; - vt1.f_vt_op2 = 8; - vt1.d_vt_op2 = 8; - vt1.m_vt_op2 = 8; - vt1.nHldr_vt_op2 = new numHolder(8); - - int[] i_arr1d_op1 = { 0, 1 }; - int[,] i_arr2d_op1 = { { 0, 1 }, { 1, 1 } }; - int[,,] i_arr3d_op1 = { { { 0, 1 }, { 1, 1 } } }; - uint[] ui_arr1d_op1 = { 0, 1 }; - uint[,] ui_arr2d_op1 = { { 0, 1 }, { 1, 1 } }; - uint[,,] ui_arr3d_op1 = { { { 0, 1 }, { 1, 1 } } }; - long[] l_arr1d_op1 = { 0, 1 }; - long[,] l_arr2d_op1 = { { 0, 1 }, { 1, 1 } }; - long[,,] l_arr3d_op1 = { { { 0, 1 }, { 1, 1 } } }; - ulong[] ul_arr1d_op1 = { 0, 1 }; - ulong[,] ul_arr2d_op1 = { { 0, 1 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op1 = { { { 0, 1 }, { 1, 1 } } }; - float[] f_arr1d_op1 = { 0, 1 }; - float[,] f_arr2d_op1 = { { 0, 1 }, { 1, 1 } }; - float[,,] f_arr3d_op1 = { { { 0, 1 }, { 1, 1 } } }; - double[] d_arr1d_op1 = { 0, 1 }; - double[,] d_arr2d_op1 = { { 0, 1 }, { 1, 1 } }; - double[,,] d_arr3d_op1 = { { { 0, 1 }, { 1, 1 } } }; - decimal[] m_arr1d_op1 = { 0, 1 }; - decimal[,] m_arr2d_op1 = { { 0, 1 }, { 1, 1 } }; - decimal[,,] m_arr3d_op1 = { { { 0, 1 }, { 1, 1 } } }; - - int[] i_arr1d_op2 = { 8, 0, 1 }; - int[,] i_arr2d_op2 = { { 0, 8 }, { 1, 1 } }; - int[,,] i_arr3d_op2 = { { { 0, 8 }, { 1, 1 } } }; - uint[] ui_arr1d_op2 = { 8, 0, 1 }; - uint[,] ui_arr2d_op2 = { { 0, 8 }, { 1, 1 } }; - uint[,,] ui_arr3d_op2 = { { { 0, 8 }, { 1, 1 } } }; - long[] l_arr1d_op2 = { 8, 0, 1 }; - long[,] l_arr2d_op2 = { { 0, 8 }, { 1, 1 } }; - long[,,] l_arr3d_op2 = { { { 0, 8 }, { 1, 1 } } }; - ulong[] ul_arr1d_op2 = { 8, 0, 1 }; - ulong[,] ul_arr2d_op2 = { { 0, 8 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op2 = { { { 0, 8 }, { 1, 1 } } }; - float[] f_arr1d_op2 = { 8, 0, 1 }; - float[,] f_arr2d_op2 = { { 0, 8 }, { 1, 1 } }; - float[,,] f_arr3d_op2 = { { { 0, 8 }, { 1, 1 } } }; - double[] d_arr1d_op2 = { 8, 0, 1 }; - double[,] d_arr2d_op2 = { { 0, 8 }, { 1, 1 } }; - double[,,] d_arr3d_op2 = { { { 0, 8 }, { 1, 1 } } }; - decimal[] m_arr1d_op2 = { 8, 0, 1 }; - decimal[,] m_arr2d_op2 = { { 0, 8 }, { 1, 1 } }; - decimal[,,] m_arr3d_op2 = { { { 0, 8 }, { 1, 1 } } }; - numHolder[] nHldr_arr1d_op2 = { new numHolder(8), new numHolder(0), new numHolder(1) }; - numHolder[,] nHldr_arr2d_op2 = { { new numHolder(0), new numHolder(8) }, { new numHolder(1), new numHolder(1) } }; - numHolder[,,] nHldr_arr3d_op2 = { { { new numHolder(0), new numHolder(8) }, { new numHolder(1), new numHolder(1) } } }; - - int[,] index = { { 0, 0 }, { 1, 1 } }; - - { - int i_l_op1 = 1; - int i_l_op2 = 8; - uint ui_l_op2 = 8; - long l_l_op2 = 8; - ulong ul_l_op2 = 8; - float f_l_op2 = 8; - double d_l_op2 = 8; - decimal m_l_op2 = 8; - numHolder nHldr_l_op2 = new numHolder(8); - if ((i_l_op1 + i_l_op2 != i_l_op1 + ui_l_op2) || (i_l_op1 + ui_l_op2 != i_l_op1 + l_l_op2) || (i_l_op1 + l_l_op2 != i_l_op1 + (int)ul_l_op2) || (i_l_op1 + (int)ul_l_op2 != i_l_op1 + f_l_op2) || (i_l_op1 + f_l_op2 != i_l_op1 + d_l_op2) || ((decimal)(i_l_op1 + d_l_op2) != i_l_op1 + m_l_op2) || (i_l_op1 + m_l_op2 != i_l_op1 + i_l_op2) || (i_l_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 1 failed"); - passed = false; - } - if ((i_l_op1 + s_s_op2 != i_l_op1 + s_ui_s_op2) || (i_l_op1 + s_ui_s_op2 != i_l_op1 + s_s_op2) || (i_l_op1 + s_s_op2 != i_l_op1 + (int)s_ul_s_op2) || (i_l_op1 + (int)s_ul_s_op2 != i_l_op1 + s_s_op2) || (i_l_op1 + s_s_op2 != i_l_op1 + s_s_op2) || ((decimal)(i_l_op1 + s_s_op2) != i_l_op1 + s_s_op2) || (i_l_op1 + s_s_op2 != i_l_op1 + s_s_op2) || (i_l_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 2 failed"); - passed = false; - } - if ((s_s_op1 + i_l_op2 != s_s_op1 + ui_l_op2) || (s_s_op1 + ui_l_op2 != s_s_op1 + l_l_op2) || (s_s_op1 + l_l_op2 != s_s_op1 + (int)ul_l_op2) || (s_s_op1 + (int)ul_l_op2 != s_s_op1 + f_l_op2) || (s_s_op1 + f_l_op2 != s_s_op1 + d_l_op2) || ((decimal)(s_s_op1 + d_l_op2) != s_s_op1 + m_l_op2) || (s_s_op1 + m_l_op2 != s_s_op1 + i_l_op2) || (s_s_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 3 failed"); - passed = false; - } - if ((s_s_op1 + s_s_op2 != s_s_op1 + s_ui_s_op2) || (s_s_op1 + s_ui_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + (int)s_ul_s_op2) || (s_s_op1 + (int)s_ul_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_s_op2) || ((decimal)(s_s_op1 + s_s_op2) != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 4 failed"); - passed = false; - } - } - - { - uint ui_l_op1 = 1; - int i_l_op2 = 8; - uint ui_l_op2 = 8; - long l_l_op2 = 8; - ulong ul_l_op2 = 8; - float f_l_op2 = 8; - double d_l_op2 = 8; - decimal m_l_op2 = 8; - numHolder nHldr_l_op2 = new numHolder(8); - if ((ui_l_op1 + i_l_op2 != ui_l_op1 + ui_l_op2) || (ui_l_op1 + ui_l_op2 != ui_l_op1 + l_l_op2) || ((ulong)(ui_l_op1 + l_l_op2) != ui_l_op1 + ul_l_op2) || (ui_l_op1 + ul_l_op2 != ui_l_op1 + f_l_op2) || (ui_l_op1 + f_l_op2 != ui_l_op1 + d_l_op2) || ((decimal)(ui_l_op1 + d_l_op2) != ui_l_op1 + m_l_op2) || (ui_l_op1 + m_l_op2 != ui_l_op1 + i_l_op2) || (ui_l_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 5 failed"); - passed = false; - } - if ((ui_l_op1 + s_s_op2 != ui_l_op1 + s_ui_s_op2) || (ui_l_op1 + s_ui_s_op2 != ui_l_op1 + s_s_op2) || ((ulong)(ui_l_op1 + s_s_op2) != ui_l_op1 + s_ul_s_op2) || (ui_l_op1 + s_ul_s_op2 != ui_l_op1 + s_s_op2) || (ui_l_op1 + s_s_op2 != ui_l_op1 + s_s_op2) || ((decimal)(ui_l_op1 + s_s_op2) != ui_l_op1 + s_s_op2) || (ui_l_op1 + s_s_op2 != ui_l_op1 + s_s_op2) || (ui_l_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 6 failed"); - passed = false; - } - if ((s_ui_s_op1 + i_l_op2 != s_ui_s_op1 + ui_l_op2) || (s_ui_s_op1 + ui_l_op2 != s_ui_s_op1 + l_l_op2) || ((ulong)(s_ui_s_op1 + l_l_op2) != s_ui_s_op1 + ul_l_op2) || (s_ui_s_op1 + ul_l_op2 != s_ui_s_op1 + f_l_op2) || (s_ui_s_op1 + f_l_op2 != s_ui_s_op1 + d_l_op2) || ((decimal)(s_ui_s_op1 + d_l_op2) != s_ui_s_op1 + m_l_op2) || (s_ui_s_op1 + m_l_op2 != s_ui_s_op1 + i_l_op2) || (s_ui_s_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 7 failed"); - passed = false; - } - if ((s_ui_s_op1 + s_s_op2 != s_ui_s_op1 + s_ui_s_op2) || (s_ui_s_op1 + s_ui_s_op2 != s_ui_s_op1 + s_s_op2) || ((ulong)(s_ui_s_op1 + s_s_op2) != s_ui_s_op1 + s_ul_s_op2) || (s_ui_s_op1 + s_ul_s_op2 != s_ui_s_op1 + s_s_op2) || (s_ui_s_op1 + s_s_op2 != s_ui_s_op1 + s_s_op2) || ((decimal)(s_ui_s_op1 + s_s_op2) != s_ui_s_op1 + s_s_op2) || (s_ui_s_op1 + s_s_op2 != s_ui_s_op1 + s_s_op2) || (s_ui_s_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 8 failed"); - passed = false; - } - } - - { - long l_l_op1 = 1; - int i_l_op2 = 8; - uint ui_l_op2 = 8; - long l_l_op2 = 8; - ulong ul_l_op2 = 8; - float f_l_op2 = 8; - double d_l_op2 = 8; - decimal m_l_op2 = 8; - numHolder nHldr_l_op2 = new numHolder(8); - if ((l_l_op1 + i_l_op2 != l_l_op1 + ui_l_op2) || (l_l_op1 + ui_l_op2 != l_l_op1 + l_l_op2) || (l_l_op1 + l_l_op2 != l_l_op1 + (long)ul_l_op2) || (l_l_op1 + (long)ul_l_op2 != l_l_op1 + f_l_op2) || (l_l_op1 + f_l_op2 != l_l_op1 + d_l_op2) || ((decimal)(l_l_op1 + d_l_op2) != l_l_op1 + m_l_op2) || (l_l_op1 + m_l_op2 != l_l_op1 + i_l_op2) || (l_l_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 9 failed"); - passed = false; - } - if ((l_l_op1 + s_s_op2 != l_l_op1 + s_ui_s_op2) || (l_l_op1 + s_ui_s_op2 != l_l_op1 + s_s_op2) || (l_l_op1 + s_s_op2 != l_l_op1 + (long)s_ul_s_op2) || (l_l_op1 + (long)s_ul_s_op2 != l_l_op1 + s_s_op2) || (l_l_op1 + s_s_op2 != l_l_op1 + s_s_op2) || ((decimal)(l_l_op1 + s_s_op2) != l_l_op1 + s_s_op2) || (l_l_op1 + s_s_op2 != l_l_op1 + s_s_op2) || (l_l_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 10 failed"); - passed = false; - } - if ((s_s_op1 + i_l_op2 != s_s_op1 + ui_l_op2) || (s_s_op1 + ui_l_op2 != s_s_op1 + l_l_op2) || (s_s_op1 + l_l_op2 != s_s_op1 + (long)ul_l_op2) || (s_s_op1 + (long)ul_l_op2 != s_s_op1 + f_l_op2) || (s_s_op1 + f_l_op2 != s_s_op1 + d_l_op2) || ((decimal)(s_s_op1 + d_l_op2) != s_s_op1 + m_l_op2) || (s_s_op1 + m_l_op2 != s_s_op1 + i_l_op2) || (s_s_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 11 failed"); - passed = false; - } - if ((s_s_op1 + s_s_op2 != s_s_op1 + s_ui_s_op2) || (s_s_op1 + s_ui_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + (long)s_ul_s_op2) || (s_s_op1 + (long)s_ul_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_s_op2) || ((decimal)(s_s_op1 + s_s_op2) != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 12 failed"); - passed = false; - } - } - - { - ulong ul_l_op1 = 1; - int i_l_op2 = 8; - uint ui_l_op2 = 8; - long l_l_op2 = 8; - ulong ul_l_op2 = 8; - float f_l_op2 = 8; - double d_l_op2 = 8; - decimal m_l_op2 = 8; - numHolder nHldr_l_op2 = new numHolder(8); - if ((ul_l_op1 + (ulong)i_l_op2 != ul_l_op1 + ui_l_op2) || (ul_l_op1 + ui_l_op2 != ul_l_op1 + (ulong)l_l_op2) || (ul_l_op1 + (ulong)l_l_op2 != ul_l_op1 + ul_l_op2) || (ul_l_op1 + ul_l_op2 != ul_l_op1 + f_l_op2) || (ul_l_op1 + f_l_op2 != ul_l_op1 + d_l_op2) || ((decimal)(ul_l_op1 + d_l_op2) != ul_l_op1 + m_l_op2) || (ul_l_op1 + m_l_op2 != ul_l_op1 + (ulong)i_l_op2) || (ul_l_op1 + (ulong)i_l_op2 != 9)) - { - Console.WriteLine("testcase 13 failed"); - passed = false; - } - if ((ul_l_op1 + (ulong)s_s_op2 != ul_l_op1 + s_ui_s_op2) || (ul_l_op1 + s_ui_s_op2 != ul_l_op1 + (ulong)s_s_op2) || (ul_l_op1 + (ulong)s_s_op2 != ul_l_op1 + s_ul_s_op2) || (ul_l_op1 + s_ul_s_op2 != ul_l_op1 + s_s_op2) || (ul_l_op1 + s_s_op2 != ul_l_op1 + s_s_op2) || ((decimal)(ul_l_op1 + s_s_op2) != ul_l_op1 + s_s_op2) || (ul_l_op1 + s_s_op2 != ul_l_op1 + (ulong)s_s_op2) || (ul_l_op1 + (ulong)s_s_op2 != 9)) - { - Console.WriteLine("testcase 14 failed"); - passed = false; - } - if ((s_ul_s_op1 + (ulong)i_l_op2 != s_ul_s_op1 + ui_l_op2) || (s_ul_s_op1 + ui_l_op2 != s_ul_s_op1 + (ulong)l_l_op2) || (s_ul_s_op1 + (ulong)l_l_op2 != s_ul_s_op1 + ul_l_op2) || (s_ul_s_op1 + ul_l_op2 != s_ul_s_op1 + f_l_op2) || (s_ul_s_op1 + f_l_op2 != s_ul_s_op1 + d_l_op2) || ((decimal)(s_ul_s_op1 + d_l_op2) != s_ul_s_op1 + m_l_op2) || (s_ul_s_op1 + m_l_op2 != s_ul_s_op1 + (ulong)i_l_op2) || (s_ul_s_op1 + (ulong)i_l_op2 != 9)) - { - Console.WriteLine("testcase 15 failed"); - passed = false; - } - if ((s_ul_s_op1 + (ulong)s_s_op2 != s_ul_s_op1 + s_ui_s_op2) || (s_ul_s_op1 + s_ui_s_op2 != s_ul_s_op1 + (ulong)s_s_op2) || (s_ul_s_op1 + (ulong)s_s_op2 != s_ul_s_op1 + s_ul_s_op2) || (s_ul_s_op1 + s_ul_s_op2 != s_ul_s_op1 + s_s_op2) || (s_ul_s_op1 + s_s_op2 != s_ul_s_op1 + s_s_op2) || ((decimal)(s_ul_s_op1 + s_s_op2) != s_ul_s_op1 + s_s_op2) || (s_ul_s_op1 + s_s_op2 != s_ul_s_op1 + (ulong)s_s_op2) || (s_ul_s_op1 + (ulong)s_s_op2 != 9)) - { - Console.WriteLine("testcase 16 failed"); - passed = false; - } - } - - { - float f_l_op1 = 1; - int i_l_op2 = 8; - uint ui_l_op2 = 8; - long l_l_op2 = 8; - ulong ul_l_op2 = 8; - float f_l_op2 = 8; - double d_l_op2 = 8; - decimal m_l_op2 = 8; - numHolder nHldr_l_op2 = new numHolder(8); - if ((f_l_op1 + i_l_op2 != f_l_op1 + ui_l_op2) || (f_l_op1 + ui_l_op2 != f_l_op1 + l_l_op2) || (f_l_op1 + l_l_op2 != f_l_op1 + ul_l_op2) || (f_l_op1 + ul_l_op2 != f_l_op1 + f_l_op2) || (f_l_op1 + f_l_op2 != f_l_op1 + d_l_op2) || (f_l_op1 + d_l_op2 != f_l_op1 + (float)m_l_op2) || (f_l_op1 + (float)m_l_op2 != f_l_op1 + i_l_op2) || (f_l_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 17 failed"); - passed = false; - } - if ((f_l_op1 + s_s_op2 != f_l_op1 + s_ui_s_op2) || (f_l_op1 + s_ui_s_op2 != f_l_op1 + s_s_op2) || (f_l_op1 + s_s_op2 != f_l_op1 + s_ul_s_op2) || (f_l_op1 + s_ul_s_op2 != f_l_op1 + s_s_op2) || (f_l_op1 + s_s_op2 != f_l_op1 + s_s_op2) || (f_l_op1 + s_s_op2 != f_l_op1 + (float)s_s_op2) || (f_l_op1 + (float)s_s_op2 != f_l_op1 + s_s_op2) || (f_l_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 18 failed"); - passed = false; - } - if ((s_s_op1 + i_l_op2 != s_s_op1 + ui_l_op2) || (s_s_op1 + ui_l_op2 != s_s_op1 + l_l_op2) || (s_s_op1 + l_l_op2 != s_s_op1 + ul_l_op2) || (s_s_op1 + ul_l_op2 != s_s_op1 + f_l_op2) || (s_s_op1 + f_l_op2 != s_s_op1 + d_l_op2) || (s_s_op1 + d_l_op2 != s_s_op1 + (float)m_l_op2) || (s_s_op1 + (float)m_l_op2 != s_s_op1 + i_l_op2) || (s_s_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 19 failed"); - passed = false; - } - if ((s_s_op1 + s_s_op2 != s_s_op1 + s_ui_s_op2) || (s_s_op1 + s_ui_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_ul_s_op2) || (s_s_op1 + s_ul_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + (float)s_s_op2) || (s_s_op1 + (float)s_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 20 failed"); - passed = false; - } - } - - { - double d_l_op1 = 1; - int i_l_op2 = 8; - uint ui_l_op2 = 8; - long l_l_op2 = 8; - ulong ul_l_op2 = 8; - float f_l_op2 = 8; - double d_l_op2 = 8; - decimal m_l_op2 = 8; - numHolder nHldr_l_op2 = new numHolder(8); - if ((d_l_op1 + i_l_op2 != d_l_op1 + ui_l_op2) || (d_l_op1 + ui_l_op2 != d_l_op1 + l_l_op2) || (d_l_op1 + l_l_op2 != d_l_op1 + ul_l_op2) || (d_l_op1 + ul_l_op2 != d_l_op1 + f_l_op2) || (d_l_op1 + f_l_op2 != d_l_op1 + d_l_op2) || (d_l_op1 + d_l_op2 != d_l_op1 + (double)m_l_op2) || (d_l_op1 + (double)m_l_op2 != d_l_op1 + i_l_op2) || (d_l_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 21 failed"); - passed = false; - } - if ((d_l_op1 + s_s_op2 != d_l_op1 + s_ui_s_op2) || (d_l_op1 + s_ui_s_op2 != d_l_op1 + s_s_op2) || (d_l_op1 + s_s_op2 != d_l_op1 + s_ul_s_op2) || (d_l_op1 + s_ul_s_op2 != d_l_op1 + s_s_op2) || (d_l_op1 + s_s_op2 != d_l_op1 + s_s_op2) || (d_l_op1 + s_s_op2 != d_l_op1 + (double)s_s_op2) || (d_l_op1 + (double)s_s_op2 != d_l_op1 + s_s_op2) || (d_l_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 22 failed"); - passed = false; - } - if ((s_s_op1 + i_l_op2 != s_s_op1 + ui_l_op2) || (s_s_op1 + ui_l_op2 != s_s_op1 + l_l_op2) || (s_s_op1 + l_l_op2 != s_s_op1 + ul_l_op2) || (s_s_op1 + ul_l_op2 != s_s_op1 + f_l_op2) || (s_s_op1 + f_l_op2 != s_s_op1 + d_l_op2) || (s_s_op1 + d_l_op2 != s_s_op1 + (double)m_l_op2) || (s_s_op1 + (double)m_l_op2 != s_s_op1 + i_l_op2) || (s_s_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 23 failed"); - passed = false; - } - if ((s_s_op1 + s_s_op2 != s_s_op1 + s_ui_s_op2) || (s_s_op1 + s_ui_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_ul_s_op2) || (s_s_op1 + s_ul_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + (double)s_s_op2) || (s_s_op1 + (double)s_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 24 failed"); - passed = false; - } - } - - { - decimal m_l_op1 = 1; - int i_l_op2 = 8; - uint ui_l_op2 = 8; - long l_l_op2 = 8; - ulong ul_l_op2 = 8; - float f_l_op2 = 8; - double d_l_op2 = 8; - decimal m_l_op2 = 8; - numHolder nHldr_l_op2 = new numHolder(8); - if ((m_l_op1 + i_l_op2 != m_l_op1 + ui_l_op2) || (m_l_op1 + ui_l_op2 != m_l_op1 + l_l_op2) || (m_l_op1 + l_l_op2 != m_l_op1 + ul_l_op2) || (m_l_op1 + ul_l_op2 != m_l_op1 + (decimal)f_l_op2) || (m_l_op1 + (decimal)f_l_op2 != m_l_op1 + (decimal)d_l_op2) || (m_l_op1 + (decimal)d_l_op2 != m_l_op1 + m_l_op2) || (m_l_op1 + m_l_op2 != m_l_op1 + i_l_op2) || (m_l_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 25 failed"); - passed = false; - } - if ((m_l_op1 + s_s_op2 != m_l_op1 + s_ui_s_op2) || (m_l_op1 + s_ui_s_op2 != m_l_op1 + s_s_op2) || (m_l_op1 + s_s_op2 != m_l_op1 + s_ul_s_op2) || (m_l_op1 + s_ul_s_op2 != m_l_op1 + (decimal)s_s_op2) || (m_l_op1 + (decimal)s_s_op2 != m_l_op1 + (decimal)s_s_op2) || (m_l_op1 + (decimal)s_s_op2 != m_l_op1 + s_s_op2) || (m_l_op1 + s_s_op2 != m_l_op1 + s_s_op2) || (m_l_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 26 failed"); - passed = false; - } - if ((s_s_op1 + i_l_op2 != s_s_op1 + ui_l_op2) || (s_s_op1 + ui_l_op2 != s_s_op1 + l_l_op2) || (s_s_op1 + l_l_op2 != s_s_op1 + ul_l_op2) || (s_s_op1 + ul_l_op2 != s_s_op1 + (decimal)f_l_op2) || (s_s_op1 + (decimal)f_l_op2 != s_s_op1 + (decimal)d_l_op2) || (s_s_op1 + (decimal)d_l_op2 != s_s_op1 + m_l_op2) || (s_s_op1 + m_l_op2 != s_s_op1 + i_l_op2) || (s_s_op1 + i_l_op2 != 9)) - { - Console.WriteLine("testcase 27 failed"); - passed = false; - } - if ((s_s_op1 + s_s_op2 != s_s_op1 + s_ui_s_op2) || (s_s_op1 + s_ui_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_ul_s_op2) || (s_s_op1 + s_ul_s_op2 != s_s_op1 + (decimal)s_s_op2) || (s_s_op1 + (decimal)s_s_op2 != s_s_op1 + (decimal)s_s_op2) || (s_s_op1 + (decimal)s_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != s_s_op1 + s_s_op2) || (s_s_op1 + s_s_op2 != 9)) - { - Console.WriteLine("testcase 28 failed"); - passed = false; - } - } - - if (!passed) - { - Console.WriteLine("FAILED"); - return 1; - } - else - { - Console.WriteLine("PASSED"); - return 100; - } - } -} diff --git a/tests/src/JIT/Directed/coverage/oldtests/lclflddiv.cs b/tests/src/JIT/Directed/coverage/oldtests/lclflddiv.cs deleted file mode 100644 index fe81185674..0000000000 --- a/tests/src/JIT/Directed/coverage/oldtests/lclflddiv.cs +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -//Testing simple math on local vars and fields - div - -#pragma warning disable 0414 -using System; -internal class lclflddiv -{ - //user-defined class that overloads operator / - public class numHolder - { - private int _num; - private uint _ui_num; - private long _num; - private ulong _ul_num; - private float _num; - private double _num; - private decimal _num; - public numHolder(int i_num) - { - _num = Convert.ToInt32(i_num); - _ui_num = Convert.ToUInt32(i_num); - _num = Convert.ToInt64(i_num); - _ul_num = Convert.ToUInt64(i_num); - _num = Convert.ToSingle(i_num); - _num = Convert.ToDouble(i_num); - _num = Convert.ToDecimal(i_num); - } - - public static int operator /(numHolder a, int b) - { - return a._num / b; - } - - public numHolder(uint ui_num) - { - _num = Convert.ToInt32(ui_num); - _ui_num = Convert.ToUInt32(ui_num); - _num = Convert.ToInt64(ui_num); - _ul_num = Convert.ToUInt64(ui_num); - _num = Convert.ToSingle(ui_num); - _num = Convert.ToDouble(ui_num); - _num = Convert.ToDecimal(ui_num); - } - - public static uint operator /(numHolder a, uint b) - { - return a._ui_num / b; - } - - public numHolder(long l_num) - { - _num = Convert.ToInt32(l_num); - _ui_num = Convert.ToUInt32(l_num); - this._num = Convert.ToInt64(l_num); - _ul_num = Convert.ToUInt64(l_num); - _num = Convert.ToSingle(l_num); - _num = Convert.ToDouble(l_num); - _num = Convert.ToDecimal(l_num); - } - - public static long operator /(numHolder a, long b) - { - return a._num / b; - } - - public numHolder(ulong ul_num) - { - _num = Convert.ToInt32(ul_num); - _ui_num = Convert.ToUInt32(ul_num); - _num = Convert.ToInt64(ul_num); - _ul_num = Convert.ToUInt64(ul_num); - _num = Convert.ToSingle(ul_num); - _num = Convert.ToDouble(ul_num); - _num = Convert.ToDecimal(ul_num); - } - - public static long operator /(numHolder a, ulong b) - { - return (long)(a._ul_num / b); - } - - public numHolder(float f_num) - { - _num = Convert.ToInt32(f_num); - _ui_num = Convert.ToUInt32(f_num); - _num = Convert.ToInt64(f_num); - _ul_num = Convert.ToUInt64(f_num); - this._num = Convert.ToSingle(f_num); - _num = Convert.ToDouble(f_num); - _num = Convert.ToDecimal(f_num); - } - - public static float operator /(numHolder a, float b) - { - return a._num / b; - } - - public numHolder(double d_num) - { - _num = Convert.ToInt32(d_num); - _ui_num = Convert.ToUInt32(d_num); - _num = Convert.ToInt64(d_num); - _ul_num = Convert.ToUInt64(d_num); - _num = Convert.ToSingle(d_num); - this._num = Convert.ToDouble(d_num); - _num = Convert.ToDecimal(d_num); - } - - public static double operator /(numHolder a, double b) - { - return a._num / b; - } - - public numHolder(decimal m_num) - { - _num = Convert.ToInt32(m_num); - _ui_num = Convert.ToUInt32(m_num); - _num = Convert.ToInt64(m_num); - _ul_num = Convert.ToUInt64(m_num); - _num = Convert.ToSingle(m_num); - _num = Convert.ToDouble(m_num); - this._num = Convert.ToDecimal(m_num); - } - - public static int operator /(numHolder a, decimal b) - { - return (int)(a._num / b); - } - - public static int operator /(numHolder a, numHolder b) - { - return a._num / b._num; - } - } - - private static int s_s_op1 = 128; - private static uint s_ui_s_op1 = 128; - private static long s_s_op1 = 128; - private static ulong s_ul_s_op1 = 128; - private static float s_s_op1 = 128; - private static double s_s_op1 = 128; - private static decimal s_s_op1 = 128; - - private static int s_s_op2 = 4; - private static uint s_ui_s_op2 = 4; - private static long s_s_op2 = 4; - private static ulong s_ul_s_op2 = 4; - private static float s_s_op2 = 4; - private static double s_s_op2 = 4; - private static decimal s_s_op2 = 4; - private static numHolder s_nHldr_s_op2 = new numHolder(4); - - public static int i_f(String s) - { - if (s == "op1") - return 128; - else - return 4; - } - public static uint ui_f(String s) - { - if (s == "op1") - return 128; - else - return 4; - } - public static long l_f(String s) - { - if (s == "op1") - return 128; - else - return 4; - } - public static ulong ul_f(String s) - { - if (s == "op1") - return 128; - else - return 4; - } - public static float f_f(String s) - { - if (s == "op1") - return 128; - else - return 4; - } - public static double d_f(String s) - { - if (s == "op1") - return 128; - else - return 4; - } - public static decimal m_f(String s) - { - if (s == "op1") - return 128; - else - return 4; - } - public static numHolder nHldr_f(String s) - { - if (s == "op1") - return new numHolder(128); - else - return new numHolder(4); - } - private class CL - { - public int i_cl_op1 = 128; - public uint ui_cl_op1 = 128; - public long l_cl_op1 = 128; - public ulong ul_cl_op1 = 128; - public float f_cl_op1 = 128; - public double d_cl_op1 = 128; - public decimal m_cl_op1 = 128; - - public int i_cl_op2 = 4; - public uint ui_cl_op2 = 4; - public long l_cl_op2 = 4; - public ulong ul_cl_op2 = 4; - public float f_cl_op2 = 4; - public double d_cl_op2 = 4; - public decimal m_cl_op2 = 4; - public numHolder nHldr_cl_op2 = new numHolder(4); - } - - private struct VT - { - public int i_vt_op1; - public uint ui_vt_op1; - public long l_vt_op1; - public ulong ul_vt_op1; - public float f_vt_op1; - public double d_vt_op1; - public decimal m_vt_op1; - - public int i_vt_op2; - public uint ui_vt_op2; - public long l_vt_op2; - public ulong ul_vt_op2; - public float f_vt_op2; - public double d_vt_op2; - public decimal m_vt_op2; - public numHolder nHldr_vt_op2; - } - - public static int Main() - { - bool passed = true; - //initialize class - CL cl1 = new CL(); - //initialize struct - VT vt1; - vt1.i_vt_op1 = 128; - vt1.ui_vt_op1 = 128; - vt1.l_vt_op1 = 128; - vt1.ul_vt_op1 = 128; - vt1.f_vt_op1 = 128; - vt1.d_vt_op1 = 128; - vt1.m_vt_op1 = 128; - vt1.i_vt_op2 = 4; - vt1.ui_vt_op2 = 4; - vt1.l_vt_op2 = 4; - vt1.ul_vt_op2 = 4; - vt1.f_vt_op2 = 4; - vt1.d_vt_op2 = 4; - vt1.m_vt_op2 = 4; - vt1.nHldr_vt_op2 = new numHolder(4); - - int[] i_arr1d_op1 = { 0, 128 }; - int[,] i_arr2d_op1 = { { 0, 128 }, { 1, 1 } }; - int[,,] i_arr3d_op1 = { { { 0, 128 }, { 1, 1 } } }; - uint[] ui_arr1d_op1 = { 0, 128 }; - uint[,] ui_arr2d_op1 = { { 0, 128 }, { 1, 1 } }; - uint[,,] ui_arr3d_op1 = { { { 0, 128 }, { 1, 1 } } }; - long[] l_arr1d_op1 = { 0, 128 }; - long[,] l_arr2d_op1 = { { 0, 128 }, { 1, 1 } }; - long[,,] l_arr3d_op1 = { { { 0, 128 }, { 1, 1 } } }; - ulong[] ul_arr1d_op1 = { 0, 128 }; - ulong[,] ul_arr2d_op1 = { { 0, 128 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op1 = { { { 0, 128 }, { 1, 1 } } }; - float[] f_arr1d_op1 = { 0, 128 }; - float[,] f_arr2d_op1 = { { 0, 128 }, { 1, 1 } }; - float[,,] f_arr3d_op1 = { { { 0, 128 }, { 1, 1 } } }; - double[] d_arr1d_op1 = { 0, 128 }; - double[,] d_arr2d_op1 = { { 0, 128 }, { 1, 1 } }; - double[,,] d_arr3d_op1 = { { { 0, 128 }, { 1, 1 } } }; - decimal[] m_arr1d_op1 = { 0, 128 }; - decimal[,] m_arr2d_op1 = { { 0, 128 }, { 1, 1 } }; - decimal[,,] m_arr3d_op1 = { { { 0, 128 }, { 1, 1 } } }; - - int[] i_arr1d_op2 = { 4, 0, 1 }; - int[,] i_arr2d_op2 = { { 0, 4 }, { 1, 1 } }; - int[,,] i_arr3d_op2 = { { { 0, 4 }, { 1, 1 } } }; - uint[] ui_arr1d_op2 = { 4, 0, 1 }; - uint[,] ui_arr2d_op2 = { { 0, 4 }, { 1, 1 } }; - uint[,,] ui_arr3d_op2 = { { { 0, 4 }, { 1, 1 } } }; - long[] l_arr1d_op2 = { 4, 0, 1 }; - long[,] l_arr2d_op2 = { { 0, 4 }, { 1, 1 } }; - long[,,] l_arr3d_op2 = { { { 0, 4 }, { 1, 1 } } }; - ulong[] ul_arr1d_op2 = { 4, 0, 1 }; - ulong[,] ul_arr2d_op2 = { { 0, 4 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op2 = { { { 0, 4 }, { 1, 1 } } }; - float[] f_arr1d_op2 = { 4, 0, 1 }; - float[,] f_arr2d_op2 = { { 0, 4 }, { 1, 1 } }; - float[,,] f_arr3d_op2 = { { { 0, 4 }, { 1, 1 } } }; - double[] d_arr1d_op2 = { 4, 0, 1 }; - double[,] d_arr2d_op2 = { { 0, 4 }, { 1, 1 } }; - double[,,] d_arr3d_op2 = { { { 0, 4 }, { 1, 1 } } }; - decimal[] m_arr1d_op2 = { 4, 0, 1 }; - decimal[,] m_arr2d_op2 = { { 0, 4 }, { 1, 1 } }; - decimal[,,] m_arr3d_op2 = { { { 0, 4 }, { 1, 1 } } }; - numHolder[] nHldr_arr1d_op2 = { new numHolder(4), new numHolder(0), new numHolder(1) }; - numHolder[,] nHldr_arr2d_op2 = { { new numHolder(0), new numHolder(4) }, { new numHolder(1), new numHolder(1) } }; - numHolder[,,] nHldr_arr3d_op2 = { { { new numHolder(0), new numHolder(4) }, { new numHolder(1), new numHolder(1) } } }; - - int[,] index = { { 0, 0 }, { 1, 1 } }; - - { - int i_l_op1 = 128; - int i_l_op2 = 4; - uint ui_l_op2 = 4; - long l_l_op2 = 4; - ulong ul_l_op2 = 4; - float f_l_op2 = 4; - double d_l_op2 = 4; - decimal m_l_op2 = 4; - numHolder nHldr_l_op2 = new numHolder(4); - if ((i_l_op1 / i_l_op2 != i_l_op1 / ui_l_op2) || (i_l_op1 / ui_l_op2 != i_l_op1 / l_l_op2) || (i_l_op1 / l_l_op2 != i_l_op1 / (int)ul_l_op2) || (i_l_op1 / (int)ul_l_op2 != i_l_op1 / f_l_op2) || (i_l_op1 / f_l_op2 != i_l_op1 / d_l_op2) || ((decimal)(i_l_op1 / d_l_op2) != i_l_op1 / m_l_op2) || (i_l_op1 / m_l_op2 != i_l_op1 / i_l_op2) || (i_l_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 1 failed"); - passed = false; - } - if ((i_l_op1 / s_s_op2 != i_l_op1 / s_ui_s_op2) || (i_l_op1 / s_ui_s_op2 != i_l_op1 / s_s_op2) || (i_l_op1 / s_s_op2 != i_l_op1 / (int)s_ul_s_op2) || (i_l_op1 / (int)s_ul_s_op2 != i_l_op1 / s_s_op2) || (i_l_op1 / s_s_op2 != i_l_op1 / s_s_op2) || ((decimal)(i_l_op1 / s_s_op2) != i_l_op1 / s_s_op2) || (i_l_op1 / s_s_op2 != i_l_op1 / s_s_op2) || (i_l_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 2 failed"); - passed = false; - } - if ((s_s_op1 / i_l_op2 != s_s_op1 / ui_l_op2) || (s_s_op1 / ui_l_op2 != s_s_op1 / l_l_op2) || (s_s_op1 / l_l_op2 != s_s_op1 / (int)ul_l_op2) || (s_s_op1 / (int)ul_l_op2 != s_s_op1 / f_l_op2) || (s_s_op1 / f_l_op2 != s_s_op1 / d_l_op2) || ((decimal)(s_s_op1 / d_l_op2) != s_s_op1 / m_l_op2) || (s_s_op1 / m_l_op2 != s_s_op1 / i_l_op2) || (s_s_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 3 failed"); - passed = false; - } - if ((s_s_op1 / s_s_op2 != s_s_op1 / s_ui_s_op2) || (s_s_op1 / s_ui_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / (int)s_ul_s_op2) || (s_s_op1 / (int)s_ul_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_s_op2) || ((decimal)(s_s_op1 / s_s_op2) != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 4 failed"); - passed = false; - } - } - - { - uint ui_l_op1 = 128; - int i_l_op2 = 4; - uint ui_l_op2 = 4; - long l_l_op2 = 4; - ulong ul_l_op2 = 4; - float f_l_op2 = 4; - double d_l_op2 = 4; - decimal m_l_op2 = 4; - numHolder nHldr_l_op2 = new numHolder(4); - if ((ui_l_op1 / i_l_op2 != ui_l_op1 / ui_l_op2) || (ui_l_op1 / ui_l_op2 != ui_l_op1 / l_l_op2) || ((ulong)(ui_l_op1 / l_l_op2) != ui_l_op1 / ul_l_op2) || (ui_l_op1 / ul_l_op2 != ui_l_op1 / f_l_op2) || (ui_l_op1 / f_l_op2 != ui_l_op1 / d_l_op2) || ((decimal)(ui_l_op1 / d_l_op2) != ui_l_op1 / m_l_op2) || (ui_l_op1 / m_l_op2 != ui_l_op1 / i_l_op2) || (ui_l_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 5 failed"); - passed = false; - } - if ((ui_l_op1 / s_s_op2 != ui_l_op1 / s_ui_s_op2) || (ui_l_op1 / s_ui_s_op2 != ui_l_op1 / s_s_op2) || ((ulong)(ui_l_op1 / s_s_op2) != ui_l_op1 / s_ul_s_op2) || (ui_l_op1 / s_ul_s_op2 != ui_l_op1 / s_s_op2) || (ui_l_op1 / s_s_op2 != ui_l_op1 / s_s_op2) || ((decimal)(ui_l_op1 / s_s_op2) != ui_l_op1 / s_s_op2) || (ui_l_op1 / s_s_op2 != ui_l_op1 / s_s_op2) || (ui_l_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 6 failed"); - passed = false; - } - if ((s_ui_s_op1 / i_l_op2 != s_ui_s_op1 / ui_l_op2) || (s_ui_s_op1 / ui_l_op2 != s_ui_s_op1 / l_l_op2) || ((ulong)(s_ui_s_op1 / l_l_op2) != s_ui_s_op1 / ul_l_op2) || (s_ui_s_op1 / ul_l_op2 != s_ui_s_op1 / f_l_op2) || (s_ui_s_op1 / f_l_op2 != s_ui_s_op1 / d_l_op2) || ((decimal)(s_ui_s_op1 / d_l_op2) != s_ui_s_op1 / m_l_op2) || (s_ui_s_op1 / m_l_op2 != s_ui_s_op1 / i_l_op2) || (s_ui_s_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 7 failed"); - passed = false; - } - if ((s_ui_s_op1 / s_s_op2 != s_ui_s_op1 / s_ui_s_op2) || (s_ui_s_op1 / s_ui_s_op2 != s_ui_s_op1 / s_s_op2) || ((ulong)(s_ui_s_op1 / s_s_op2) != s_ui_s_op1 / s_ul_s_op2) || (s_ui_s_op1 / s_ul_s_op2 != s_ui_s_op1 / s_s_op2) || (s_ui_s_op1 / s_s_op2 != s_ui_s_op1 / s_s_op2) || ((decimal)(s_ui_s_op1 / s_s_op2) != s_ui_s_op1 / s_s_op2) || (s_ui_s_op1 / s_s_op2 != s_ui_s_op1 / s_s_op2) || (s_ui_s_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 8 failed"); - passed = false; - } - } - - { - long l_l_op1 = 128; - int i_l_op2 = 4; - uint ui_l_op2 = 4; - long l_l_op2 = 4; - ulong ul_l_op2 = 4; - float f_l_op2 = 4; - double d_l_op2 = 4; - decimal m_l_op2 = 4; - numHolder nHldr_l_op2 = new numHolder(4); - if ((l_l_op1 / i_l_op2 != l_l_op1 / ui_l_op2) || (l_l_op1 / ui_l_op2 != l_l_op1 / l_l_op2) || (l_l_op1 / l_l_op2 != l_l_op1 / (long)ul_l_op2) || (l_l_op1 / (long)ul_l_op2 != l_l_op1 / f_l_op2) || (l_l_op1 / f_l_op2 != l_l_op1 / d_l_op2) || ((decimal)(l_l_op1 / d_l_op2) != l_l_op1 / m_l_op2) || (l_l_op1 / m_l_op2 != l_l_op1 / i_l_op2) || (l_l_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 9 failed"); - passed = false; - } - if ((l_l_op1 / s_s_op2 != l_l_op1 / s_ui_s_op2) || (l_l_op1 / s_ui_s_op2 != l_l_op1 / s_s_op2) || (l_l_op1 / s_s_op2 != l_l_op1 / (long)s_ul_s_op2) || (l_l_op1 / (long)s_ul_s_op2 != l_l_op1 / s_s_op2) || (l_l_op1 / s_s_op2 != l_l_op1 / s_s_op2) || ((decimal)(l_l_op1 / s_s_op2) != l_l_op1 / s_s_op2) || (l_l_op1 / s_s_op2 != l_l_op1 / s_s_op2) || (l_l_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 10 failed"); - passed = false; - } - if ((s_s_op1 / i_l_op2 != s_s_op1 / ui_l_op2) || (s_s_op1 / ui_l_op2 != s_s_op1 / l_l_op2) || (s_s_op1 / l_l_op2 != s_s_op1 / (long)ul_l_op2) || (s_s_op1 / (long)ul_l_op2 != s_s_op1 / f_l_op2) || (s_s_op1 / f_l_op2 != s_s_op1 / d_l_op2) || ((decimal)(s_s_op1 / d_l_op2) != s_s_op1 / m_l_op2) || (s_s_op1 / m_l_op2 != s_s_op1 / i_l_op2) || (s_s_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 11 failed"); - passed = false; - } - if ((s_s_op1 / s_s_op2 != s_s_op1 / s_ui_s_op2) || (s_s_op1 / s_ui_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / (long)s_ul_s_op2) || (s_s_op1 / (long)s_ul_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_s_op2) || ((decimal)(s_s_op1 / s_s_op2) != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 12 failed"); - passed = false; - } - } - - { - ulong ul_l_op1 = 128; - int i_l_op2 = 4; - uint ui_l_op2 = 4; - long l_l_op2 = 4; - ulong ul_l_op2 = 4; - float f_l_op2 = 4; - double d_l_op2 = 4; - decimal m_l_op2 = 4; - numHolder nHldr_l_op2 = new numHolder(4); - if ((ul_l_op1 / (ulong)i_l_op2 != ul_l_op1 / ui_l_op2) || (ul_l_op1 / ui_l_op2 != ul_l_op1 / (ulong)l_l_op2) || (ul_l_op1 / (ulong)l_l_op2 != ul_l_op1 / ul_l_op2) || (ul_l_op1 / ul_l_op2 != ul_l_op1 / f_l_op2) || (ul_l_op1 / f_l_op2 != ul_l_op1 / d_l_op2) || ((decimal)(ul_l_op1 / d_l_op2) != ul_l_op1 / m_l_op2) || (ul_l_op1 / m_l_op2 != ul_l_op1 / (ulong)i_l_op2) || (ul_l_op1 / (ulong)i_l_op2 != 32)) - { - Console.WriteLine("testcase 13 failed"); - passed = false; - } - if ((ul_l_op1 / (ulong)s_s_op2 != ul_l_op1 / s_ui_s_op2) || (ul_l_op1 / s_ui_s_op2 != ul_l_op1 / (ulong)s_s_op2) || (ul_l_op1 / (ulong)s_s_op2 != ul_l_op1 / s_ul_s_op2) || (ul_l_op1 / s_ul_s_op2 != ul_l_op1 / s_s_op2) || (ul_l_op1 / s_s_op2 != ul_l_op1 / s_s_op2) || ((decimal)(ul_l_op1 / s_s_op2) != ul_l_op1 / s_s_op2) || (ul_l_op1 / s_s_op2 != ul_l_op1 / (ulong)s_s_op2) || (ul_l_op1 / (ulong)s_s_op2 != 32)) - { - Console.WriteLine("testcase 14 failed"); - passed = false; - } - if ((s_ul_s_op1 / (ulong)i_l_op2 != s_ul_s_op1 / ui_l_op2) || (s_ul_s_op1 / ui_l_op2 != s_ul_s_op1 / (ulong)l_l_op2) || (s_ul_s_op1 / (ulong)l_l_op2 != s_ul_s_op1 / ul_l_op2) || (s_ul_s_op1 / ul_l_op2 != s_ul_s_op1 / f_l_op2) || (s_ul_s_op1 / f_l_op2 != s_ul_s_op1 / d_l_op2) || ((decimal)(s_ul_s_op1 / d_l_op2) != s_ul_s_op1 / m_l_op2) || (s_ul_s_op1 / m_l_op2 != s_ul_s_op1 / (ulong)i_l_op2) || (s_ul_s_op1 / (ulong)i_l_op2 != 32)) - { - Console.WriteLine("testcase 15 failed"); - passed = false; - } - if ((s_ul_s_op1 / (ulong)s_s_op2 != s_ul_s_op1 / s_ui_s_op2) || (s_ul_s_op1 / s_ui_s_op2 != s_ul_s_op1 / (ulong)s_s_op2) || (s_ul_s_op1 / (ulong)s_s_op2 != s_ul_s_op1 / s_ul_s_op2) || (s_ul_s_op1 / s_ul_s_op2 != s_ul_s_op1 / s_s_op2) || (s_ul_s_op1 / s_s_op2 != s_ul_s_op1 / s_s_op2) || ((decimal)(s_ul_s_op1 / s_s_op2) != s_ul_s_op1 / s_s_op2) || (s_ul_s_op1 / s_s_op2 != s_ul_s_op1 / (ulong)s_s_op2) || (s_ul_s_op1 / (ulong)s_s_op2 != 32)) - { - Console.WriteLine("testcase 16 failed"); - passed = false; - } - } - - { - float f_l_op1 = 128; - int i_l_op2 = 4; - uint ui_l_op2 = 4; - long l_l_op2 = 4; - ulong ul_l_op2 = 4; - float f_l_op2 = 4; - double d_l_op2 = 4; - decimal m_l_op2 = 4; - numHolder nHldr_l_op2 = new numHolder(4); - if ((f_l_op1 / i_l_op2 != f_l_op1 / ui_l_op2) || (f_l_op1 / ui_l_op2 != f_l_op1 / l_l_op2) || (f_l_op1 / l_l_op2 != f_l_op1 / ul_l_op2) || (f_l_op1 / ul_l_op2 != f_l_op1 / f_l_op2) || (f_l_op1 / f_l_op2 != f_l_op1 / d_l_op2) || (f_l_op1 / d_l_op2 != f_l_op1 / (float)m_l_op2) || (f_l_op1 / (float)m_l_op2 != f_l_op1 / i_l_op2) || (f_l_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 17 failed"); - passed = false; - } - if ((f_l_op1 / s_s_op2 != f_l_op1 / s_ui_s_op2) || (f_l_op1 / s_ui_s_op2 != f_l_op1 / s_s_op2) || (f_l_op1 / s_s_op2 != f_l_op1 / s_ul_s_op2) || (f_l_op1 / s_ul_s_op2 != f_l_op1 / s_s_op2) || (f_l_op1 / s_s_op2 != f_l_op1 / s_s_op2) || (f_l_op1 / s_s_op2 != f_l_op1 / (float)s_s_op2) || (f_l_op1 / (float)s_s_op2 != f_l_op1 / s_s_op2) || (f_l_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 18 failed"); - passed = false; - } - if ((s_s_op1 / i_l_op2 != s_s_op1 / ui_l_op2) || (s_s_op1 / ui_l_op2 != s_s_op1 / l_l_op2) || (s_s_op1 / l_l_op2 != s_s_op1 / ul_l_op2) || (s_s_op1 / ul_l_op2 != s_s_op1 / f_l_op2) || (s_s_op1 / f_l_op2 != s_s_op1 / d_l_op2) || (s_s_op1 / d_l_op2 != s_s_op1 / (float)m_l_op2) || (s_s_op1 / (float)m_l_op2 != s_s_op1 / i_l_op2) || (s_s_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 19 failed"); - passed = false; - } - if ((s_s_op1 / s_s_op2 != s_s_op1 / s_ui_s_op2) || (s_s_op1 / s_ui_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_ul_s_op2) || (s_s_op1 / s_ul_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / (float)s_s_op2) || (s_s_op1 / (float)s_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 20 failed"); - passed = false; - } - } - - { - double d_l_op1 = 128; - int i_l_op2 = 4; - uint ui_l_op2 = 4; - long l_l_op2 = 4; - ulong ul_l_op2 = 4; - float f_l_op2 = 4; - double d_l_op2 = 4; - decimal m_l_op2 = 4; - numHolder nHldr_l_op2 = new numHolder(4); - if ((d_l_op1 / i_l_op2 != d_l_op1 / ui_l_op2) || (d_l_op1 / ui_l_op2 != d_l_op1 / l_l_op2) || (d_l_op1 / l_l_op2 != d_l_op1 / ul_l_op2) || (d_l_op1 / ul_l_op2 != d_l_op1 / f_l_op2) || (d_l_op1 / f_l_op2 != d_l_op1 / d_l_op2) || (d_l_op1 / d_l_op2 != d_l_op1 / (double)m_l_op2) || (d_l_op1 / (double)m_l_op2 != d_l_op1 / i_l_op2) || (d_l_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 21 failed"); - passed = false; - } - if ((d_l_op1 / s_s_op2 != d_l_op1 / s_ui_s_op2) || (d_l_op1 / s_ui_s_op2 != d_l_op1 / s_s_op2) || (d_l_op1 / s_s_op2 != d_l_op1 / s_ul_s_op2) || (d_l_op1 / s_ul_s_op2 != d_l_op1 / s_s_op2) || (d_l_op1 / s_s_op2 != d_l_op1 / s_s_op2) || (d_l_op1 / s_s_op2 != d_l_op1 / (double)s_s_op2) || (d_l_op1 / (double)s_s_op2 != d_l_op1 / s_s_op2) || (d_l_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 22 failed"); - passed = false; - } - if ((s_s_op1 / i_l_op2 != s_s_op1 / ui_l_op2) || (s_s_op1 / ui_l_op2 != s_s_op1 / l_l_op2) || (s_s_op1 / l_l_op2 != s_s_op1 / ul_l_op2) || (s_s_op1 / ul_l_op2 != s_s_op1 / f_l_op2) || (s_s_op1 / f_l_op2 != s_s_op1 / d_l_op2) || (s_s_op1 / d_l_op2 != s_s_op1 / (double)m_l_op2) || (s_s_op1 / (double)m_l_op2 != s_s_op1 / i_l_op2) || (s_s_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 23 failed"); - passed = false; - } - if ((s_s_op1 / s_s_op2 != s_s_op1 / s_ui_s_op2) || (s_s_op1 / s_ui_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_ul_s_op2) || (s_s_op1 / s_ul_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / (double)s_s_op2) || (s_s_op1 / (double)s_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 24 failed"); - passed = false; - } - } - - { - decimal m_l_op1 = 128; - int i_l_op2 = 4; - uint ui_l_op2 = 4; - long l_l_op2 = 4; - ulong ul_l_op2 = 4; - float f_l_op2 = 4; - double d_l_op2 = 4; - decimal m_l_op2 = 4; - numHolder nHldr_l_op2 = new numHolder(4); - if ((m_l_op1 / i_l_op2 != m_l_op1 / ui_l_op2) || (m_l_op1 / ui_l_op2 != m_l_op1 / l_l_op2) || (m_l_op1 / l_l_op2 != m_l_op1 / ul_l_op2) || (m_l_op1 / ul_l_op2 != m_l_op1 / (decimal)f_l_op2) || (m_l_op1 / (decimal)f_l_op2 != m_l_op1 / (decimal)d_l_op2) || (m_l_op1 / (decimal)d_l_op2 != m_l_op1 / m_l_op2) || (m_l_op1 / m_l_op2 != m_l_op1 / i_l_op2) || (m_l_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 25 failed"); - passed = false; - } - if ((m_l_op1 / s_s_op2 != m_l_op1 / s_ui_s_op2) || (m_l_op1 / s_ui_s_op2 != m_l_op1 / s_s_op2) || (m_l_op1 / s_s_op2 != m_l_op1 / s_ul_s_op2) || (m_l_op1 / s_ul_s_op2 != m_l_op1 / (decimal)s_s_op2) || (m_l_op1 / (decimal)s_s_op2 != m_l_op1 / (decimal)s_s_op2) || (m_l_op1 / (decimal)s_s_op2 != m_l_op1 / s_s_op2) || (m_l_op1 / s_s_op2 != m_l_op1 / s_s_op2) || (m_l_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 26 failed"); - passed = false; - } - if ((s_s_op1 / i_l_op2 != s_s_op1 / ui_l_op2) || (s_s_op1 / ui_l_op2 != s_s_op1 / l_l_op2) || (s_s_op1 / l_l_op2 != s_s_op1 / ul_l_op2) || (s_s_op1 / ul_l_op2 != s_s_op1 / (decimal)f_l_op2) || (s_s_op1 / (decimal)f_l_op2 != s_s_op1 / (decimal)d_l_op2) || (s_s_op1 / (decimal)d_l_op2 != s_s_op1 / m_l_op2) || (s_s_op1 / m_l_op2 != s_s_op1 / i_l_op2) || (s_s_op1 / i_l_op2 != 32)) - { - Console.WriteLine("testcase 27 failed"); - passed = false; - } - if ((s_s_op1 / s_s_op2 != s_s_op1 / s_ui_s_op2) || (s_s_op1 / s_ui_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_ul_s_op2) || (s_s_op1 / s_ul_s_op2 != s_s_op1 / (decimal)s_s_op2) || (s_s_op1 / (decimal)s_s_op2 != s_s_op1 / (decimal)s_s_op2) || (s_s_op1 / (decimal)s_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != s_s_op1 / s_s_op2) || (s_s_op1 / s_s_op2 != 32)) - { - Console.WriteLine("testcase 28 failed"); - passed = false; - } - } - - if (!passed) - { - Console.WriteLine("FAILED"); - return 1; - } - else - { - Console.WriteLine("PASSED"); - return 100; - } - } -} diff --git a/tests/src/JIT/Directed/coverage/oldtests/lclfldmul.cs b/tests/src/JIT/Directed/coverage/oldtests/lclfldmul.cs deleted file mode 100644 index f781b13469..0000000000 --- a/tests/src/JIT/Directed/coverage/oldtests/lclfldmul.cs +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -//Testing simple math on local vars and fields - mul - -#pragma warning disable 0414 -using System; -internal class lclfldmul -{ - //user-defined class that overloads operator * - public class numHolder - { - private int _num; - private uint _ui_num; - private long _num; - private ulong _ul_num; - private float _num; - private double _num; - private decimal _num; - public numHolder(int i_num) - { - _num = Convert.ToInt32(i_num); - _ui_num = Convert.ToUInt32(i_num); - _num = Convert.ToInt64(i_num); - _ul_num = Convert.ToUInt64(i_num); - _num = Convert.ToSingle(i_num); - _num = Convert.ToDouble(i_num); - _num = Convert.ToDecimal(i_num); - } - - public static int operator *(numHolder a, int b) - { - return a._num * b; - } - - public numHolder(uint ui_num) - { - _num = Convert.ToInt32(ui_num); - _ui_num = Convert.ToUInt32(ui_num); - _num = Convert.ToInt64(ui_num); - _ul_num = Convert.ToUInt64(ui_num); - _num = Convert.ToSingle(ui_num); - _num = Convert.ToDouble(ui_num); - _num = Convert.ToDecimal(ui_num); - } - - public static uint operator *(numHolder a, uint b) - { - return a._ui_num * b; - } - - public numHolder(long l_num) - { - _num = Convert.ToInt32(l_num); - _ui_num = Convert.ToUInt32(l_num); - this._num = Convert.ToInt64(l_num); - _ul_num = Convert.ToUInt64(l_num); - _num = Convert.ToSingle(l_num); - _num = Convert.ToDouble(l_num); - _num = Convert.ToDecimal(l_num); - } - - public static long operator *(numHolder a, long b) - { - return a._num * b; - } - - public numHolder(ulong ul_num) - { - _num = Convert.ToInt32(ul_num); - _ui_num = Convert.ToUInt32(ul_num); - _num = Convert.ToInt64(ul_num); - _ul_num = Convert.ToUInt64(ul_num); - _num = Convert.ToSingle(ul_num); - _num = Convert.ToDouble(ul_num); - _num = Convert.ToDecimal(ul_num); - } - - public static long operator *(numHolder a, ulong b) - { - return (long)(a._ul_num * b); - } - - public numHolder(float f_num) - { - _num = Convert.ToInt32(f_num); - _ui_num = Convert.ToUInt32(f_num); - _num = Convert.ToInt64(f_num); - _ul_num = Convert.ToUInt64(f_num); - this._num = Convert.ToSingle(f_num); - _num = Convert.ToDouble(f_num); - _num = Convert.ToDecimal(f_num); - } - - public static float operator *(numHolder a, float b) - { - return a._num * b; - } - - public numHolder(double d_num) - { - _num = Convert.ToInt32(d_num); - _ui_num = Convert.ToUInt32(d_num); - _num = Convert.ToInt64(d_num); - _ul_num = Convert.ToUInt64(d_num); - _num = Convert.ToSingle(d_num); - this._num = Convert.ToDouble(d_num); - _num = Convert.ToDecimal(d_num); - } - - public static double operator *(numHolder a, double b) - { - return a._num * b; - } - - public numHolder(decimal m_num) - { - _num = Convert.ToInt32(m_num); - _ui_num = Convert.ToUInt32(m_num); - _num = Convert.ToInt64(m_num); - _ul_num = Convert.ToUInt64(m_num); - _num = Convert.ToSingle(m_num); - _num = Convert.ToDouble(m_num); - this._num = Convert.ToDecimal(m_num); - } - - public static int operator *(numHolder a, decimal b) - { - return (int)(a._num * b); - } - - public static int operator *(numHolder a, numHolder b) - { - return a._num * b._num; - } - } - - private static int s_s_op1 = 3; - private static uint s_ui_s_op1 = 3; - private static long s_s_op1 = 3; - private static ulong s_ul_s_op1 = 3; - private static float s_s_op1 = 3; - private static double s_s_op1 = 3; - private static decimal s_s_op1 = 3; - - private static int s_s_op2 = 7; - private static uint s_ui_s_op2 = 7; - private static long s_s_op2 = 7; - private static ulong s_ul_s_op2 = 7; - private static float s_s_op2 = 7; - private static double s_s_op2 = 7; - private static decimal s_s_op2 = 7; - private static numHolder s_nHldr_s_op2 = new numHolder(7); - - public static int i_f(String s) - { - if (s == "op1") - return 3; - else - return 7; - } - public static uint ui_f(String s) - { - if (s == "op1") - return 3; - else - return 7; - } - public static long l_f(String s) - { - if (s == "op1") - return 3; - else - return 7; - } - public static ulong ul_f(String s) - { - if (s == "op1") - return 3; - else - return 7; - } - public static float f_f(String s) - { - if (s == "op1") - return 3; - else - return 7; - } - public static double d_f(String s) - { - if (s == "op1") - return 3; - else - return 7; - } - public static decimal m_f(String s) - { - if (s == "op1") - return 3; - else - return 7; - } - public static numHolder nHldr_f(String s) - { - if (s == "op1") - return new numHolder(3); - else - return new numHolder(7); - } - private class CL - { - public int i_cl_op1 = 3; - public uint ui_cl_op1 = 3; - public long l_cl_op1 = 3; - public ulong ul_cl_op1 = 3; - public float f_cl_op1 = 3; - public double d_cl_op1 = 3; - public decimal m_cl_op1 = 3; - - public int i_cl_op2 = 7; - public uint ui_cl_op2 = 7; - public long l_cl_op2 = 7; - public ulong ul_cl_op2 = 7; - public float f_cl_op2 = 7; - public double d_cl_op2 = 7; - public decimal m_cl_op2 = 7; - public numHolder nHldr_cl_op2 = new numHolder(7); - } - - private struct VT - { - public int i_vt_op1; - public uint ui_vt_op1; - public long l_vt_op1; - public ulong ul_vt_op1; - public float f_vt_op1; - public double d_vt_op1; - public decimal m_vt_op1; - - public int i_vt_op2; - public uint ui_vt_op2; - public long l_vt_op2; - public ulong ul_vt_op2; - public float f_vt_op2; - public double d_vt_op2; - public decimal m_vt_op2; - public numHolder nHldr_vt_op2; - } - - public static int Main() - { - bool passed = true; - //initialize class - CL cl1 = new CL(); - //initialize struct - VT vt1; - vt1.i_vt_op1 = 3; - vt1.ui_vt_op1 = 3; - vt1.l_vt_op1 = 3; - vt1.ul_vt_op1 = 3; - vt1.f_vt_op1 = 3; - vt1.d_vt_op1 = 3; - vt1.m_vt_op1 = 3; - vt1.i_vt_op2 = 7; - vt1.ui_vt_op2 = 7; - vt1.l_vt_op2 = 7; - vt1.ul_vt_op2 = 7; - vt1.f_vt_op2 = 7; - vt1.d_vt_op2 = 7; - vt1.m_vt_op2 = 7; - vt1.nHldr_vt_op2 = new numHolder(7); - - int[] i_arr1d_op1 = { 0, 3 }; - int[,] i_arr2d_op1 = { { 0, 3 }, { 1, 1 } }; - int[,,] i_arr3d_op1 = { { { 0, 3 }, { 1, 1 } } }; - uint[] ui_arr1d_op1 = { 0, 3 }; - uint[,] ui_arr2d_op1 = { { 0, 3 }, { 1, 1 } }; - uint[,,] ui_arr3d_op1 = { { { 0, 3 }, { 1, 1 } } }; - long[] l_arr1d_op1 = { 0, 3 }; - long[,] l_arr2d_op1 = { { 0, 3 }, { 1, 1 } }; - long[,,] l_arr3d_op1 = { { { 0, 3 }, { 1, 1 } } }; - ulong[] ul_arr1d_op1 = { 0, 3 }; - ulong[,] ul_arr2d_op1 = { { 0, 3 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op1 = { { { 0, 3 }, { 1, 1 } } }; - float[] f_arr1d_op1 = { 0, 3 }; - float[,] f_arr2d_op1 = { { 0, 3 }, { 1, 1 } }; - float[,,] f_arr3d_op1 = { { { 0, 3 }, { 1, 1 } } }; - double[] d_arr1d_op1 = { 0, 3 }; - double[,] d_arr2d_op1 = { { 0, 3 }, { 1, 1 } }; - double[,,] d_arr3d_op1 = { { { 0, 3 }, { 1, 1 } } }; - decimal[] m_arr1d_op1 = { 0, 3 }; - decimal[,] m_arr2d_op1 = { { 0, 3 }, { 1, 1 } }; - decimal[,,] m_arr3d_op1 = { { { 0, 3 }, { 1, 1 } } }; - - int[] i_arr1d_op2 = { 7, 0, 1 }; - int[,] i_arr2d_op2 = { { 0, 7 }, { 1, 1 } }; - int[,,] i_arr3d_op2 = { { { 0, 7 }, { 1, 1 } } }; - uint[] ui_arr1d_op2 = { 7, 0, 1 }; - uint[,] ui_arr2d_op2 = { { 0, 7 }, { 1, 1 } }; - uint[,,] ui_arr3d_op2 = { { { 0, 7 }, { 1, 1 } } }; - long[] l_arr1d_op2 = { 7, 0, 1 }; - long[,] l_arr2d_op2 = { { 0, 7 }, { 1, 1 } }; - long[,,] l_arr3d_op2 = { { { 0, 7 }, { 1, 1 } } }; - ulong[] ul_arr1d_op2 = { 7, 0, 1 }; - ulong[,] ul_arr2d_op2 = { { 0, 7 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op2 = { { { 0, 7 }, { 1, 1 } } }; - float[] f_arr1d_op2 = { 7, 0, 1 }; - float[,] f_arr2d_op2 = { { 0, 7 }, { 1, 1 } }; - float[,,] f_arr3d_op2 = { { { 0, 7 }, { 1, 1 } } }; - double[] d_arr1d_op2 = { 7, 0, 1 }; - double[,] d_arr2d_op2 = { { 0, 7 }, { 1, 1 } }; - double[,,] d_arr3d_op2 = { { { 0, 7 }, { 1, 1 } } }; - decimal[] m_arr1d_op2 = { 7, 0, 1 }; - decimal[,] m_arr2d_op2 = { { 0, 7 }, { 1, 1 } }; - decimal[,,] m_arr3d_op2 = { { { 0, 7 }, { 1, 1 } } }; - numHolder[] nHldr_arr1d_op2 = { new numHolder(7), new numHolder(0), new numHolder(1) }; - numHolder[,] nHldr_arr2d_op2 = { { new numHolder(0), new numHolder(7) }, { new numHolder(1), new numHolder(1) } }; - numHolder[,,] nHldr_arr3d_op2 = { { { new numHolder(0), new numHolder(7) }, { new numHolder(1), new numHolder(1) } } }; - - int[,] index = { { 0, 0 }, { 1, 1 } }; - - { - int i_l_op1 = 3; - int i_l_op2 = 7; - uint ui_l_op2 = 7; - long l_l_op2 = 7; - ulong ul_l_op2 = 7; - float f_l_op2 = 7; - double d_l_op2 = 7; - decimal m_l_op2 = 7; - numHolder nHldr_l_op2 = new numHolder(7); - if ((i_l_op1 * i_l_op2 != i_l_op1 * ui_l_op2) || (i_l_op1 * ui_l_op2 != i_l_op1 * l_l_op2) || (i_l_op1 * l_l_op2 != i_l_op1 * (int)ul_l_op2) || (i_l_op1 * (int)ul_l_op2 != i_l_op1 * f_l_op2) || (i_l_op1 * f_l_op2 != i_l_op1 * d_l_op2) || ((decimal)(i_l_op1 * d_l_op2) != i_l_op1 * m_l_op2) || (i_l_op1 * m_l_op2 != i_l_op1 * i_l_op2) || (i_l_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 1 failed"); - passed = false; - } - if ((i_l_op1 * s_s_op2 != i_l_op1 * s_ui_s_op2) || (i_l_op1 * s_ui_s_op2 != i_l_op1 * s_s_op2) || (i_l_op1 * s_s_op2 != i_l_op1 * (int)s_ul_s_op2) || (i_l_op1 * (int)s_ul_s_op2 != i_l_op1 * s_s_op2) || (i_l_op1 * s_s_op2 != i_l_op1 * s_s_op2) || ((decimal)(i_l_op1 * s_s_op2) != i_l_op1 * s_s_op2) || (i_l_op1 * s_s_op2 != i_l_op1 * s_s_op2) || (i_l_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 2 failed"); - passed = false; - } - if ((s_s_op1 * i_l_op2 != s_s_op1 * ui_l_op2) || (s_s_op1 * ui_l_op2 != s_s_op1 * l_l_op2) || (s_s_op1 * l_l_op2 != s_s_op1 * (int)ul_l_op2) || (s_s_op1 * (int)ul_l_op2 != s_s_op1 * f_l_op2) || (s_s_op1 * f_l_op2 != s_s_op1 * d_l_op2) || ((decimal)(s_s_op1 * d_l_op2) != s_s_op1 * m_l_op2) || (s_s_op1 * m_l_op2 != s_s_op1 * i_l_op2) || (s_s_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 3 failed"); - passed = false; - } - if ((s_s_op1 * s_s_op2 != s_s_op1 * s_ui_s_op2) || (s_s_op1 * s_ui_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * (int)s_ul_s_op2) || (s_s_op1 * (int)s_ul_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_s_op2) || ((decimal)(s_s_op1 * s_s_op2) != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 4 failed"); - passed = false; - } - } - - { - uint ui_l_op1 = 3; - int i_l_op2 = 7; - uint ui_l_op2 = 7; - long l_l_op2 = 7; - ulong ul_l_op2 = 7; - float f_l_op2 = 7; - double d_l_op2 = 7; - decimal m_l_op2 = 7; - numHolder nHldr_l_op2 = new numHolder(7); - if ((ui_l_op1 * i_l_op2 != ui_l_op1 * ui_l_op2) || (ui_l_op1 * ui_l_op2 != ui_l_op1 * l_l_op2) || ((ulong)(ui_l_op1 * l_l_op2) != ui_l_op1 * ul_l_op2) || (ui_l_op1 * ul_l_op2 != ui_l_op1 * f_l_op2) || (ui_l_op1 * f_l_op2 != ui_l_op1 * d_l_op2) || ((decimal)(ui_l_op1 * d_l_op2) != ui_l_op1 * m_l_op2) || (ui_l_op1 * m_l_op2 != ui_l_op1 * i_l_op2) || (ui_l_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 5 failed"); - passed = false; - } - if ((ui_l_op1 * s_s_op2 != ui_l_op1 * s_ui_s_op2) || (ui_l_op1 * s_ui_s_op2 != ui_l_op1 * s_s_op2) || ((ulong)(ui_l_op1 * s_s_op2) != ui_l_op1 * s_ul_s_op2) || (ui_l_op1 * s_ul_s_op2 != ui_l_op1 * s_s_op2) || (ui_l_op1 * s_s_op2 != ui_l_op1 * s_s_op2) || ((decimal)(ui_l_op1 * s_s_op2) != ui_l_op1 * s_s_op2) || (ui_l_op1 * s_s_op2 != ui_l_op1 * s_s_op2) || (ui_l_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 6 failed"); - passed = false; - } - if ((s_ui_s_op1 * i_l_op2 != s_ui_s_op1 * ui_l_op2) || (s_ui_s_op1 * ui_l_op2 != s_ui_s_op1 * l_l_op2) || ((ulong)(s_ui_s_op1 * l_l_op2) != s_ui_s_op1 * ul_l_op2) || (s_ui_s_op1 * ul_l_op2 != s_ui_s_op1 * f_l_op2) || (s_ui_s_op1 * f_l_op2 != s_ui_s_op1 * d_l_op2) || ((decimal)(s_ui_s_op1 * d_l_op2) != s_ui_s_op1 * m_l_op2) || (s_ui_s_op1 * m_l_op2 != s_ui_s_op1 * i_l_op2) || (s_ui_s_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 7 failed"); - passed = false; - } - if ((s_ui_s_op1 * s_s_op2 != s_ui_s_op1 * s_ui_s_op2) || (s_ui_s_op1 * s_ui_s_op2 != s_ui_s_op1 * s_s_op2) || ((ulong)(s_ui_s_op1 * s_s_op2) != s_ui_s_op1 * s_ul_s_op2) || (s_ui_s_op1 * s_ul_s_op2 != s_ui_s_op1 * s_s_op2) || (s_ui_s_op1 * s_s_op2 != s_ui_s_op1 * s_s_op2) || ((decimal)(s_ui_s_op1 * s_s_op2) != s_ui_s_op1 * s_s_op2) || (s_ui_s_op1 * s_s_op2 != s_ui_s_op1 * s_s_op2) || (s_ui_s_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 8 failed"); - passed = false; - } - } - - { - long l_l_op1 = 3; - int i_l_op2 = 7; - uint ui_l_op2 = 7; - long l_l_op2 = 7; - ulong ul_l_op2 = 7; - float f_l_op2 = 7; - double d_l_op2 = 7; - decimal m_l_op2 = 7; - numHolder nHldr_l_op2 = new numHolder(7); - if ((l_l_op1 * i_l_op2 != l_l_op1 * ui_l_op2) || (l_l_op1 * ui_l_op2 != l_l_op1 * l_l_op2) || (l_l_op1 * l_l_op2 != l_l_op1 * (long)ul_l_op2) || (l_l_op1 * (long)ul_l_op2 != l_l_op1 * f_l_op2) || (l_l_op1 * f_l_op2 != l_l_op1 * d_l_op2) || ((decimal)(l_l_op1 * d_l_op2) != l_l_op1 * m_l_op2) || (l_l_op1 * m_l_op2 != l_l_op1 * i_l_op2) || (l_l_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 9 failed"); - passed = false; - } - if ((l_l_op1 * s_s_op2 != l_l_op1 * s_ui_s_op2) || (l_l_op1 * s_ui_s_op2 != l_l_op1 * s_s_op2) || (l_l_op1 * s_s_op2 != l_l_op1 * (long)s_ul_s_op2) || (l_l_op1 * (long)s_ul_s_op2 != l_l_op1 * s_s_op2) || (l_l_op1 * s_s_op2 != l_l_op1 * s_s_op2) || ((decimal)(l_l_op1 * s_s_op2) != l_l_op1 * s_s_op2) || (l_l_op1 * s_s_op2 != l_l_op1 * s_s_op2) || (l_l_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 10 failed"); - passed = false; - } - if ((s_s_op1 * i_l_op2 != s_s_op1 * ui_l_op2) || (s_s_op1 * ui_l_op2 != s_s_op1 * l_l_op2) || (s_s_op1 * l_l_op2 != s_s_op1 * (long)ul_l_op2) || (s_s_op1 * (long)ul_l_op2 != s_s_op1 * f_l_op2) || (s_s_op1 * f_l_op2 != s_s_op1 * d_l_op2) || ((decimal)(s_s_op1 * d_l_op2) != s_s_op1 * m_l_op2) || (s_s_op1 * m_l_op2 != s_s_op1 * i_l_op2) || (s_s_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 11 failed"); - passed = false; - } - if ((s_s_op1 * s_s_op2 != s_s_op1 * s_ui_s_op2) || (s_s_op1 * s_ui_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * (long)s_ul_s_op2) || (s_s_op1 * (long)s_ul_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_s_op2) || ((decimal)(s_s_op1 * s_s_op2) != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 12 failed"); - passed = false; - } - } - - { - ulong ul_l_op1 = 3; - int i_l_op2 = 7; - uint ui_l_op2 = 7; - long l_l_op2 = 7; - ulong ul_l_op2 = 7; - float f_l_op2 = 7; - double d_l_op2 = 7; - decimal m_l_op2 = 7; - numHolder nHldr_l_op2 = new numHolder(7); - if ((ul_l_op1 * (ulong)i_l_op2 != ul_l_op1 * ui_l_op2) || (ul_l_op1 * ui_l_op2 != ul_l_op1 * (ulong)l_l_op2) || (ul_l_op1 * (ulong)l_l_op2 != ul_l_op1 * ul_l_op2) || (ul_l_op1 * ul_l_op2 != ul_l_op1 * f_l_op2) || (ul_l_op1 * f_l_op2 != ul_l_op1 * d_l_op2) || ((decimal)(ul_l_op1 * d_l_op2) != ul_l_op1 * m_l_op2) || (ul_l_op1 * m_l_op2 != ul_l_op1 * (ulong)i_l_op2) || (ul_l_op1 * (ulong)i_l_op2 != 21)) - { - Console.WriteLine("testcase 13 failed"); - passed = false; - } - if ((ul_l_op1 * (ulong)s_s_op2 != ul_l_op1 * s_ui_s_op2) || (ul_l_op1 * s_ui_s_op2 != ul_l_op1 * (ulong)s_s_op2) || (ul_l_op1 * (ulong)s_s_op2 != ul_l_op1 * s_ul_s_op2) || (ul_l_op1 * s_ul_s_op2 != ul_l_op1 * s_s_op2) || (ul_l_op1 * s_s_op2 != ul_l_op1 * s_s_op2) || ((decimal)(ul_l_op1 * s_s_op2) != ul_l_op1 * s_s_op2) || (ul_l_op1 * s_s_op2 != ul_l_op1 * (ulong)s_s_op2) || (ul_l_op1 * (ulong)s_s_op2 != 21)) - { - Console.WriteLine("testcase 14 failed"); - passed = false; - } - if ((s_ul_s_op1 * (ulong)i_l_op2 != s_ul_s_op1 * ui_l_op2) || (s_ul_s_op1 * ui_l_op2 != s_ul_s_op1 * (ulong)l_l_op2) || (s_ul_s_op1 * (ulong)l_l_op2 != s_ul_s_op1 * ul_l_op2) || (s_ul_s_op1 * ul_l_op2 != s_ul_s_op1 * f_l_op2) || (s_ul_s_op1 * f_l_op2 != s_ul_s_op1 * d_l_op2) || ((decimal)(s_ul_s_op1 * d_l_op2) != s_ul_s_op1 * m_l_op2) || (s_ul_s_op1 * m_l_op2 != s_ul_s_op1 * (ulong)i_l_op2) || (s_ul_s_op1 * (ulong)i_l_op2 != 21)) - { - Console.WriteLine("testcase 15 failed"); - passed = false; - } - if ((s_ul_s_op1 * (ulong)s_s_op2 != s_ul_s_op1 * s_ui_s_op2) || (s_ul_s_op1 * s_ui_s_op2 != s_ul_s_op1 * (ulong)s_s_op2) || (s_ul_s_op1 * (ulong)s_s_op2 != s_ul_s_op1 * s_ul_s_op2) || (s_ul_s_op1 * s_ul_s_op2 != s_ul_s_op1 * s_s_op2) || (s_ul_s_op1 * s_s_op2 != s_ul_s_op1 * s_s_op2) || ((decimal)(s_ul_s_op1 * s_s_op2) != s_ul_s_op1 * s_s_op2) || (s_ul_s_op1 * s_s_op2 != s_ul_s_op1 * (ulong)s_s_op2) || (s_ul_s_op1 * (ulong)s_s_op2 != 21)) - { - Console.WriteLine("testcase 16 failed"); - passed = false; - } - } - - { - float f_l_op1 = 3; - int i_l_op2 = 7; - uint ui_l_op2 = 7; - long l_l_op2 = 7; - ulong ul_l_op2 = 7; - float f_l_op2 = 7; - double d_l_op2 = 7; - decimal m_l_op2 = 7; - numHolder nHldr_l_op2 = new numHolder(7); - if ((f_l_op1 * i_l_op2 != f_l_op1 * ui_l_op2) || (f_l_op1 * ui_l_op2 != f_l_op1 * l_l_op2) || (f_l_op1 * l_l_op2 != f_l_op1 * ul_l_op2) || (f_l_op1 * ul_l_op2 != f_l_op1 * f_l_op2) || (f_l_op1 * f_l_op2 != f_l_op1 * d_l_op2) || (f_l_op1 * d_l_op2 != f_l_op1 * (float)m_l_op2) || (f_l_op1 * (float)m_l_op2 != f_l_op1 * i_l_op2) || (f_l_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 17 failed"); - passed = false; - } - if ((f_l_op1 * s_s_op2 != f_l_op1 * s_ui_s_op2) || (f_l_op1 * s_ui_s_op2 != f_l_op1 * s_s_op2) || (f_l_op1 * s_s_op2 != f_l_op1 * s_ul_s_op2) || (f_l_op1 * s_ul_s_op2 != f_l_op1 * s_s_op2) || (f_l_op1 * s_s_op2 != f_l_op1 * s_s_op2) || (f_l_op1 * s_s_op2 != f_l_op1 * (float)s_s_op2) || (f_l_op1 * (float)s_s_op2 != f_l_op1 * s_s_op2) || (f_l_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 18 failed"); - passed = false; - } - if ((s_s_op1 * i_l_op2 != s_s_op1 * ui_l_op2) || (s_s_op1 * ui_l_op2 != s_s_op1 * l_l_op2) || (s_s_op1 * l_l_op2 != s_s_op1 * ul_l_op2) || (s_s_op1 * ul_l_op2 != s_s_op1 * f_l_op2) || (s_s_op1 * f_l_op2 != s_s_op1 * d_l_op2) || (s_s_op1 * d_l_op2 != s_s_op1 * (float)m_l_op2) || (s_s_op1 * (float)m_l_op2 != s_s_op1 * i_l_op2) || (s_s_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 19 failed"); - passed = false; - } - if ((s_s_op1 * s_s_op2 != s_s_op1 * s_ui_s_op2) || (s_s_op1 * s_ui_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_ul_s_op2) || (s_s_op1 * s_ul_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * (float)s_s_op2) || (s_s_op1 * (float)s_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 20 failed"); - passed = false; - } - } - - { - double d_l_op1 = 3; - int i_l_op2 = 7; - uint ui_l_op2 = 7; - long l_l_op2 = 7; - ulong ul_l_op2 = 7; - float f_l_op2 = 7; - double d_l_op2 = 7; - decimal m_l_op2 = 7; - numHolder nHldr_l_op2 = new numHolder(7); - if ((d_l_op1 * i_l_op2 != d_l_op1 * ui_l_op2) || (d_l_op1 * ui_l_op2 != d_l_op1 * l_l_op2) || (d_l_op1 * l_l_op2 != d_l_op1 * ul_l_op2) || (d_l_op1 * ul_l_op2 != d_l_op1 * f_l_op2) || (d_l_op1 * f_l_op2 != d_l_op1 * d_l_op2) || (d_l_op1 * d_l_op2 != d_l_op1 * (double)m_l_op2) || (d_l_op1 * (double)m_l_op2 != d_l_op1 * i_l_op2) || (d_l_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 21 failed"); - passed = false; - } - if ((d_l_op1 * s_s_op2 != d_l_op1 * s_ui_s_op2) || (d_l_op1 * s_ui_s_op2 != d_l_op1 * s_s_op2) || (d_l_op1 * s_s_op2 != d_l_op1 * s_ul_s_op2) || (d_l_op1 * s_ul_s_op2 != d_l_op1 * s_s_op2) || (d_l_op1 * s_s_op2 != d_l_op1 * s_s_op2) || (d_l_op1 * s_s_op2 != d_l_op1 * (double)s_s_op2) || (d_l_op1 * (double)s_s_op2 != d_l_op1 * s_s_op2) || (d_l_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 22 failed"); - passed = false; - } - if ((s_s_op1 * i_l_op2 != s_s_op1 * ui_l_op2) || (s_s_op1 * ui_l_op2 != s_s_op1 * l_l_op2) || (s_s_op1 * l_l_op2 != s_s_op1 * ul_l_op2) || (s_s_op1 * ul_l_op2 != s_s_op1 * f_l_op2) || (s_s_op1 * f_l_op2 != s_s_op1 * d_l_op2) || (s_s_op1 * d_l_op2 != s_s_op1 * (double)m_l_op2) || (s_s_op1 * (double)m_l_op2 != s_s_op1 * i_l_op2) || (s_s_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 23 failed"); - passed = false; - } - if ((s_s_op1 * s_s_op2 != s_s_op1 * s_ui_s_op2) || (s_s_op1 * s_ui_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_ul_s_op2) || (s_s_op1 * s_ul_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * (double)s_s_op2) || (s_s_op1 * (double)s_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 24 failed"); - passed = false; - } - } - - { - decimal m_l_op1 = 3; - int i_l_op2 = 7; - uint ui_l_op2 = 7; - long l_l_op2 = 7; - ulong ul_l_op2 = 7; - float f_l_op2 = 7; - double d_l_op2 = 7; - decimal m_l_op2 = 7; - numHolder nHldr_l_op2 = new numHolder(7); - if ((m_l_op1 * i_l_op2 != m_l_op1 * ui_l_op2) || (m_l_op1 * ui_l_op2 != m_l_op1 * l_l_op2) || (m_l_op1 * l_l_op2 != m_l_op1 * ul_l_op2) || (m_l_op1 * ul_l_op2 != m_l_op1 * (decimal)f_l_op2) || (m_l_op1 * (decimal)f_l_op2 != m_l_op1 * (decimal)d_l_op2) || (m_l_op1 * (decimal)d_l_op2 != m_l_op1 * m_l_op2) || (m_l_op1 * m_l_op2 != m_l_op1 * i_l_op2) || (m_l_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 25 failed"); - passed = false; - } - if ((m_l_op1 * s_s_op2 != m_l_op1 * s_ui_s_op2) || (m_l_op1 * s_ui_s_op2 != m_l_op1 * s_s_op2) || (m_l_op1 * s_s_op2 != m_l_op1 * s_ul_s_op2) || (m_l_op1 * s_ul_s_op2 != m_l_op1 * (decimal)s_s_op2) || (m_l_op1 * (decimal)s_s_op2 != m_l_op1 * (decimal)s_s_op2) || (m_l_op1 * (decimal)s_s_op2 != m_l_op1 * s_s_op2) || (m_l_op1 * s_s_op2 != m_l_op1 * s_s_op2) || (m_l_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 26 failed"); - passed = false; - } - if ((s_s_op1 * i_l_op2 != s_s_op1 * ui_l_op2) || (s_s_op1 * ui_l_op2 != s_s_op1 * l_l_op2) || (s_s_op1 * l_l_op2 != s_s_op1 * ul_l_op2) || (s_s_op1 * ul_l_op2 != s_s_op1 * (decimal)f_l_op2) || (s_s_op1 * (decimal)f_l_op2 != s_s_op1 * (decimal)d_l_op2) || (s_s_op1 * (decimal)d_l_op2 != s_s_op1 * m_l_op2) || (s_s_op1 * m_l_op2 != s_s_op1 * i_l_op2) || (s_s_op1 * i_l_op2 != 21)) - { - Console.WriteLine("testcase 27 failed"); - passed = false; - } - if ((s_s_op1 * s_s_op2 != s_s_op1 * s_ui_s_op2) || (s_s_op1 * s_ui_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_ul_s_op2) || (s_s_op1 * s_ul_s_op2 != s_s_op1 * (decimal)s_s_op2) || (s_s_op1 * (decimal)s_s_op2 != s_s_op1 * (decimal)s_s_op2) || (s_s_op1 * (decimal)s_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != s_s_op1 * s_s_op2) || (s_s_op1 * s_s_op2 != 21)) - { - Console.WriteLine("testcase 28 failed"); - passed = false; - } - } - - if (!passed) - { - Console.WriteLine("FAILED"); - return 1; - } - else - { - Console.WriteLine("PASSED"); - return 100; - } - } -} diff --git a/tests/src/JIT/Directed/coverage/oldtests/lclfldrem.cs b/tests/src/JIT/Directed/coverage/oldtests/lclfldrem.cs deleted file mode 100644 index 587ad791e1..0000000000 --- a/tests/src/JIT/Directed/coverage/oldtests/lclfldrem.cs +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -//Testing simple math on local vars and fields - rem - -#pragma warning disable 0414 -using System; -internal class lclfldrem -{ - //user-defined class that overloads operator % - public class numHolder - { - private int _num; - private uint _ui_num; - private long _num; - private ulong _ul_num; - private float _num; - private double _num; - private decimal _num; - public numHolder(int i_num) - { - _num = Convert.ToInt32(i_num); - _ui_num = Convert.ToUInt32(i_num); - _num = Convert.ToInt64(i_num); - _ul_num = Convert.ToUInt64(i_num); - _num = Convert.ToSingle(i_num); - _num = Convert.ToDouble(i_num); - _num = Convert.ToDecimal(i_num); - } - - public static int operator %(numHolder a, int b) - { - return a._num % b; - } - - public numHolder(uint ui_num) - { - _num = Convert.ToInt32(ui_num); - _ui_num = Convert.ToUInt32(ui_num); - _num = Convert.ToInt64(ui_num); - _ul_num = Convert.ToUInt64(ui_num); - _num = Convert.ToSingle(ui_num); - _num = Convert.ToDouble(ui_num); - _num = Convert.ToDecimal(ui_num); - } - - public static uint operator %(numHolder a, uint b) - { - return a._ui_num % b; - } - - public numHolder(long l_num) - { - _num = Convert.ToInt32(l_num); - _ui_num = Convert.ToUInt32(l_num); - this._num = Convert.ToInt64(l_num); - _ul_num = Convert.ToUInt64(l_num); - _num = Convert.ToSingle(l_num); - _num = Convert.ToDouble(l_num); - _num = Convert.ToDecimal(l_num); - } - - public static long operator %(numHolder a, long b) - { - return a._num % b; - } - - public numHolder(ulong ul_num) - { - _num = Convert.ToInt32(ul_num); - _ui_num = Convert.ToUInt32(ul_num); - _num = Convert.ToInt64(ul_num); - _ul_num = Convert.ToUInt64(ul_num); - _num = Convert.ToSingle(ul_num); - _num = Convert.ToDouble(ul_num); - _num = Convert.ToDecimal(ul_num); - } - - public static long operator %(numHolder a, ulong b) - { - return (long)(a._ul_num % b); - } - - public numHolder(float f_num) - { - _num = Convert.ToInt32(f_num); - _ui_num = Convert.ToUInt32(f_num); - _num = Convert.ToInt64(f_num); - _ul_num = Convert.ToUInt64(f_num); - this._num = Convert.ToSingle(f_num); - _num = Convert.ToDouble(f_num); - _num = Convert.ToDecimal(f_num); - } - - public static float operator %(numHolder a, float b) - { - return a._num % b; - } - - public numHolder(double d_num) - { - _num = Convert.ToInt32(d_num); - _ui_num = Convert.ToUInt32(d_num); - _num = Convert.ToInt64(d_num); - _ul_num = Convert.ToUInt64(d_num); - _num = Convert.ToSingle(d_num); - this._num = Convert.ToDouble(d_num); - _num = Convert.ToDecimal(d_num); - } - - public static double operator %(numHolder a, double b) - { - return a._num % b; - } - - public numHolder(decimal m_num) - { - _num = Convert.ToInt32(m_num); - _ui_num = Convert.ToUInt32(m_num); - _num = Convert.ToInt64(m_num); - _ul_num = Convert.ToUInt64(m_num); - _num = Convert.ToSingle(m_num); - _num = Convert.ToDouble(m_num); - this._num = Convert.ToDecimal(m_num); - } - - public static int operator %(numHolder a, decimal b) - { - return (int)(a._num % b); - } - - public static int operator %(numHolder a, numHolder b) - { - return a._num % b._num; - } - } - - private static int s_s_op1 = 9; - private static uint s_ui_s_op1 = 9; - private static long s_s_op1 = 9; - private static ulong s_ul_s_op1 = 9; - private static float s_s_op1 = 9; - private static double s_s_op1 = 9; - private static decimal s_s_op1 = 9; - - private static int s_s_op2 = 5; - private static uint s_ui_s_op2 = 5; - private static long s_s_op2 = 5; - private static ulong s_ul_s_op2 = 5; - private static float s_s_op2 = 5; - private static double s_s_op2 = 5; - private static decimal s_s_op2 = 5; - private static numHolder s_nHldr_s_op2 = new numHolder(5); - - public static int i_f(String s) - { - if (s == "op1") - return 9; - else - return 5; - } - public static uint ui_f(String s) - { - if (s == "op1") - return 9; - else - return 5; - } - public static long l_f(String s) - { - if (s == "op1") - return 9; - else - return 5; - } - public static ulong ul_f(String s) - { - if (s == "op1") - return 9; - else - return 5; - } - public static float f_f(String s) - { - if (s == "op1") - return 9; - else - return 5; - } - public static double d_f(String s) - { - if (s == "op1") - return 9; - else - return 5; - } - public static decimal m_f(String s) - { - if (s == "op1") - return 9; - else - return 5; - } - public static numHolder nHldr_f(String s) - { - if (s == "op1") - return new numHolder(9); - else - return new numHolder(5); - } - private class CL - { - public int i_cl_op1 = 9; - public uint ui_cl_op1 = 9; - public long l_cl_op1 = 9; - public ulong ul_cl_op1 = 9; - public float f_cl_op1 = 9; - public double d_cl_op1 = 9; - public decimal m_cl_op1 = 9; - - public int i_cl_op2 = 5; - public uint ui_cl_op2 = 5; - public long l_cl_op2 = 5; - public ulong ul_cl_op2 = 5; - public float f_cl_op2 = 5; - public double d_cl_op2 = 5; - public decimal m_cl_op2 = 5; - public numHolder nHldr_cl_op2 = new numHolder(5); - } - - private struct VT - { - public int i_vt_op1; - public uint ui_vt_op1; - public long l_vt_op1; - public ulong ul_vt_op1; - public float f_vt_op1; - public double d_vt_op1; - public decimal m_vt_op1; - - public int i_vt_op2; - public uint ui_vt_op2; - public long l_vt_op2; - public ulong ul_vt_op2; - public float f_vt_op2; - public double d_vt_op2; - public decimal m_vt_op2; - public numHolder nHldr_vt_op2; - } - - public static int Main() - { - bool passed = true; - //initialize class - CL cl1 = new CL(); - //initialize struct - VT vt1; - vt1.i_vt_op1 = 9; - vt1.ui_vt_op1 = 9; - vt1.l_vt_op1 = 9; - vt1.ul_vt_op1 = 9; - vt1.f_vt_op1 = 9; - vt1.d_vt_op1 = 9; - vt1.m_vt_op1 = 9; - vt1.i_vt_op2 = 5; - vt1.ui_vt_op2 = 5; - vt1.l_vt_op2 = 5; - vt1.ul_vt_op2 = 5; - vt1.f_vt_op2 = 5; - vt1.d_vt_op2 = 5; - vt1.m_vt_op2 = 5; - vt1.nHldr_vt_op2 = new numHolder(5); - - int[] i_arr1d_op1 = { 0, 9 }; - int[,] i_arr2d_op1 = { { 0, 9 }, { 1, 1 } }; - int[,,] i_arr3d_op1 = { { { 0, 9 }, { 1, 1 } } }; - uint[] ui_arr1d_op1 = { 0, 9 }; - uint[,] ui_arr2d_op1 = { { 0, 9 }, { 1, 1 } }; - uint[,,] ui_arr3d_op1 = { { { 0, 9 }, { 1, 1 } } }; - long[] l_arr1d_op1 = { 0, 9 }; - long[,] l_arr2d_op1 = { { 0, 9 }, { 1, 1 } }; - long[,,] l_arr3d_op1 = { { { 0, 9 }, { 1, 1 } } }; - ulong[] ul_arr1d_op1 = { 0, 9 }; - ulong[,] ul_arr2d_op1 = { { 0, 9 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op1 = { { { 0, 9 }, { 1, 1 } } }; - float[] f_arr1d_op1 = { 0, 9 }; - float[,] f_arr2d_op1 = { { 0, 9 }, { 1, 1 } }; - float[,,] f_arr3d_op1 = { { { 0, 9 }, { 1, 1 } } }; - double[] d_arr1d_op1 = { 0, 9 }; - double[,] d_arr2d_op1 = { { 0, 9 }, { 1, 1 } }; - double[,,] d_arr3d_op1 = { { { 0, 9 }, { 1, 1 } } }; - decimal[] m_arr1d_op1 = { 0, 9 }; - decimal[,] m_arr2d_op1 = { { 0, 9 }, { 1, 1 } }; - decimal[,,] m_arr3d_op1 = { { { 0, 9 }, { 1, 1 } } }; - - int[] i_arr1d_op2 = { 5, 0, 1 }; - int[,] i_arr2d_op2 = { { 0, 5 }, { 1, 1 } }; - int[,,] i_arr3d_op2 = { { { 0, 5 }, { 1, 1 } } }; - uint[] ui_arr1d_op2 = { 5, 0, 1 }; - uint[,] ui_arr2d_op2 = { { 0, 5 }, { 1, 1 } }; - uint[,,] ui_arr3d_op2 = { { { 0, 5 }, { 1, 1 } } }; - long[] l_arr1d_op2 = { 5, 0, 1 }; - long[,] l_arr2d_op2 = { { 0, 5 }, { 1, 1 } }; - long[,,] l_arr3d_op2 = { { { 0, 5 }, { 1, 1 } } }; - ulong[] ul_arr1d_op2 = { 5, 0, 1 }; - ulong[,] ul_arr2d_op2 = { { 0, 5 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op2 = { { { 0, 5 }, { 1, 1 } } }; - float[] f_arr1d_op2 = { 5, 0, 1 }; - float[,] f_arr2d_op2 = { { 0, 5 }, { 1, 1 } }; - float[,,] f_arr3d_op2 = { { { 0, 5 }, { 1, 1 } } }; - double[] d_arr1d_op2 = { 5, 0, 1 }; - double[,] d_arr2d_op2 = { { 0, 5 }, { 1, 1 } }; - double[,,] d_arr3d_op2 = { { { 0, 5 }, { 1, 1 } } }; - decimal[] m_arr1d_op2 = { 5, 0, 1 }; - decimal[,] m_arr2d_op2 = { { 0, 5 }, { 1, 1 } }; - decimal[,,] m_arr3d_op2 = { { { 0, 5 }, { 1, 1 } } }; - numHolder[] nHldr_arr1d_op2 = { new numHolder(5), new numHolder(0), new numHolder(1) }; - numHolder[,] nHldr_arr2d_op2 = { { new numHolder(0), new numHolder(5) }, { new numHolder(1), new numHolder(1) } }; - numHolder[,,] nHldr_arr3d_op2 = { { { new numHolder(0), new numHolder(5) }, { new numHolder(1), new numHolder(1) } } }; - - int[,] index = { { 0, 0 }, { 1, 1 } }; - - { - int i_l_op1 = 9; - int i_l_op2 = 5; - uint ui_l_op2 = 5; - long l_l_op2 = 5; - ulong ul_l_op2 = 5; - float f_l_op2 = 5; - double d_l_op2 = 5; - decimal m_l_op2 = 5; - numHolder nHldr_l_op2 = new numHolder(5); - if ((i_l_op1 % i_l_op2 != i_l_op1 % ui_l_op2) || (i_l_op1 % ui_l_op2 != i_l_op1 % l_l_op2) || (i_l_op1 % l_l_op2 != i_l_op1 % (int)ul_l_op2) || (i_l_op1 % (int)ul_l_op2 != i_l_op1 % f_l_op2) || (i_l_op1 % f_l_op2 != i_l_op1 % d_l_op2) || ((decimal)(i_l_op1 % d_l_op2) != i_l_op1 % m_l_op2) || (i_l_op1 % m_l_op2 != i_l_op1 % i_l_op2) || (i_l_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 1 failed"); - passed = false; - } - if ((i_l_op1 % s_s_op2 != i_l_op1 % s_ui_s_op2) || (i_l_op1 % s_ui_s_op2 != i_l_op1 % s_s_op2) || (i_l_op1 % s_s_op2 != i_l_op1 % (int)s_ul_s_op2) || (i_l_op1 % (int)s_ul_s_op2 != i_l_op1 % s_s_op2) || (i_l_op1 % s_s_op2 != i_l_op1 % s_s_op2) || ((decimal)(i_l_op1 % s_s_op2) != i_l_op1 % s_s_op2) || (i_l_op1 % s_s_op2 != i_l_op1 % s_s_op2) || (i_l_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 2 failed"); - passed = false; - } - if ((s_s_op1 % i_l_op2 != s_s_op1 % ui_l_op2) || (s_s_op1 % ui_l_op2 != s_s_op1 % l_l_op2) || (s_s_op1 % l_l_op2 != s_s_op1 % (int)ul_l_op2) || (s_s_op1 % (int)ul_l_op2 != s_s_op1 % f_l_op2) || (s_s_op1 % f_l_op2 != s_s_op1 % d_l_op2) || ((decimal)(s_s_op1 % d_l_op2) != s_s_op1 % m_l_op2) || (s_s_op1 % m_l_op2 != s_s_op1 % i_l_op2) || (s_s_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 3 failed"); - passed = false; - } - if ((s_s_op1 % s_s_op2 != s_s_op1 % s_ui_s_op2) || (s_s_op1 % s_ui_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % (int)s_ul_s_op2) || (s_s_op1 % (int)s_ul_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_s_op2) || ((decimal)(s_s_op1 % s_s_op2) != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 4 failed"); - passed = false; - } - } - - { - uint ui_l_op1 = 9; - int i_l_op2 = 5; - uint ui_l_op2 = 5; - long l_l_op2 = 5; - ulong ul_l_op2 = 5; - float f_l_op2 = 5; - double d_l_op2 = 5; - decimal m_l_op2 = 5; - numHolder nHldr_l_op2 = new numHolder(5); - if ((ui_l_op1 % i_l_op2 != ui_l_op1 % ui_l_op2) || (ui_l_op1 % ui_l_op2 != ui_l_op1 % l_l_op2) || ((ulong)(ui_l_op1 % l_l_op2) != ui_l_op1 % ul_l_op2) || (ui_l_op1 % ul_l_op2 != ui_l_op1 % f_l_op2) || (ui_l_op1 % f_l_op2 != ui_l_op1 % d_l_op2) || ((decimal)(ui_l_op1 % d_l_op2) != ui_l_op1 % m_l_op2) || (ui_l_op1 % m_l_op2 != ui_l_op1 % i_l_op2) || (ui_l_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 5 failed"); - passed = false; - } - if ((ui_l_op1 % s_s_op2 != ui_l_op1 % s_ui_s_op2) || (ui_l_op1 % s_ui_s_op2 != ui_l_op1 % s_s_op2) || ((ulong)(ui_l_op1 % s_s_op2) != ui_l_op1 % s_ul_s_op2) || (ui_l_op1 % s_ul_s_op2 != ui_l_op1 % s_s_op2) || (ui_l_op1 % s_s_op2 != ui_l_op1 % s_s_op2) || ((decimal)(ui_l_op1 % s_s_op2) != ui_l_op1 % s_s_op2) || (ui_l_op1 % s_s_op2 != ui_l_op1 % s_s_op2) || (ui_l_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 6 failed"); - passed = false; - } - if ((s_ui_s_op1 % i_l_op2 != s_ui_s_op1 % ui_l_op2) || (s_ui_s_op1 % ui_l_op2 != s_ui_s_op1 % l_l_op2) || ((ulong)(s_ui_s_op1 % l_l_op2) != s_ui_s_op1 % ul_l_op2) || (s_ui_s_op1 % ul_l_op2 != s_ui_s_op1 % f_l_op2) || (s_ui_s_op1 % f_l_op2 != s_ui_s_op1 % d_l_op2) || ((decimal)(s_ui_s_op1 % d_l_op2) != s_ui_s_op1 % m_l_op2) || (s_ui_s_op1 % m_l_op2 != s_ui_s_op1 % i_l_op2) || (s_ui_s_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 7 failed"); - passed = false; - } - if ((s_ui_s_op1 % s_s_op2 != s_ui_s_op1 % s_ui_s_op2) || (s_ui_s_op1 % s_ui_s_op2 != s_ui_s_op1 % s_s_op2) || ((ulong)(s_ui_s_op1 % s_s_op2) != s_ui_s_op1 % s_ul_s_op2) || (s_ui_s_op1 % s_ul_s_op2 != s_ui_s_op1 % s_s_op2) || (s_ui_s_op1 % s_s_op2 != s_ui_s_op1 % s_s_op2) || ((decimal)(s_ui_s_op1 % s_s_op2) != s_ui_s_op1 % s_s_op2) || (s_ui_s_op1 % s_s_op2 != s_ui_s_op1 % s_s_op2) || (s_ui_s_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 8 failed"); - passed = false; - } - } - - { - long l_l_op1 = 9; - int i_l_op2 = 5; - uint ui_l_op2 = 5; - long l_l_op2 = 5; - ulong ul_l_op2 = 5; - float f_l_op2 = 5; - double d_l_op2 = 5; - decimal m_l_op2 = 5; - numHolder nHldr_l_op2 = new numHolder(5); - if ((l_l_op1 % i_l_op2 != l_l_op1 % ui_l_op2) || (l_l_op1 % ui_l_op2 != l_l_op1 % l_l_op2) || (l_l_op1 % l_l_op2 != l_l_op1 % (long)ul_l_op2) || (l_l_op1 % (long)ul_l_op2 != l_l_op1 % f_l_op2) || (l_l_op1 % f_l_op2 != l_l_op1 % d_l_op2) || ((decimal)(l_l_op1 % d_l_op2) != l_l_op1 % m_l_op2) || (l_l_op1 % m_l_op2 != l_l_op1 % i_l_op2) || (l_l_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 9 failed"); - passed = false; - } - if ((l_l_op1 % s_s_op2 != l_l_op1 % s_ui_s_op2) || (l_l_op1 % s_ui_s_op2 != l_l_op1 % s_s_op2) || (l_l_op1 % s_s_op2 != l_l_op1 % (long)s_ul_s_op2) || (l_l_op1 % (long)s_ul_s_op2 != l_l_op1 % s_s_op2) || (l_l_op1 % s_s_op2 != l_l_op1 % s_s_op2) || ((decimal)(l_l_op1 % s_s_op2) != l_l_op1 % s_s_op2) || (l_l_op1 % s_s_op2 != l_l_op1 % s_s_op2) || (l_l_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 10 failed"); - passed = false; - } - if ((s_s_op1 % i_l_op2 != s_s_op1 % ui_l_op2) || (s_s_op1 % ui_l_op2 != s_s_op1 % l_l_op2) || (s_s_op1 % l_l_op2 != s_s_op1 % (long)ul_l_op2) || (s_s_op1 % (long)ul_l_op2 != s_s_op1 % f_l_op2) || (s_s_op1 % f_l_op2 != s_s_op1 % d_l_op2) || ((decimal)(s_s_op1 % d_l_op2) != s_s_op1 % m_l_op2) || (s_s_op1 % m_l_op2 != s_s_op1 % i_l_op2) || (s_s_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 11 failed"); - passed = false; - } - if ((s_s_op1 % s_s_op2 != s_s_op1 % s_ui_s_op2) || (s_s_op1 % s_ui_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % (long)s_ul_s_op2) || (s_s_op1 % (long)s_ul_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_s_op2) || ((decimal)(s_s_op1 % s_s_op2) != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 12 failed"); - passed = false; - } - } - - { - ulong ul_l_op1 = 9; - int i_l_op2 = 5; - uint ui_l_op2 = 5; - long l_l_op2 = 5; - ulong ul_l_op2 = 5; - float f_l_op2 = 5; - double d_l_op2 = 5; - decimal m_l_op2 = 5; - numHolder nHldr_l_op2 = new numHolder(5); - if ((ul_l_op1 % (ulong)i_l_op2 != ul_l_op1 % ui_l_op2) || (ul_l_op1 % ui_l_op2 != ul_l_op1 % (ulong)l_l_op2) || (ul_l_op1 % (ulong)l_l_op2 != ul_l_op1 % ul_l_op2) || (ul_l_op1 % ul_l_op2 != ul_l_op1 % f_l_op2) || (ul_l_op1 % f_l_op2 != ul_l_op1 % d_l_op2) || ((decimal)(ul_l_op1 % d_l_op2) != ul_l_op1 % m_l_op2) || (ul_l_op1 % m_l_op2 != ul_l_op1 % (ulong)i_l_op2) || (ul_l_op1 % (ulong)i_l_op2 != 4)) - { - Console.WriteLine("testcase 13 failed"); - passed = false; - } - if ((ul_l_op1 % (ulong)s_s_op2 != ul_l_op1 % s_ui_s_op2) || (ul_l_op1 % s_ui_s_op2 != ul_l_op1 % (ulong)s_s_op2) || (ul_l_op1 % (ulong)s_s_op2 != ul_l_op1 % s_ul_s_op2) || (ul_l_op1 % s_ul_s_op2 != ul_l_op1 % s_s_op2) || (ul_l_op1 % s_s_op2 != ul_l_op1 % s_s_op2) || ((decimal)(ul_l_op1 % s_s_op2) != ul_l_op1 % s_s_op2) || (ul_l_op1 % s_s_op2 != ul_l_op1 % (ulong)s_s_op2) || (ul_l_op1 % (ulong)s_s_op2 != 4)) - { - Console.WriteLine("testcase 14 failed"); - passed = false; - } - if ((s_ul_s_op1 % (ulong)i_l_op2 != s_ul_s_op1 % ui_l_op2) || (s_ul_s_op1 % ui_l_op2 != s_ul_s_op1 % (ulong)l_l_op2) || (s_ul_s_op1 % (ulong)l_l_op2 != s_ul_s_op1 % ul_l_op2) || (s_ul_s_op1 % ul_l_op2 != s_ul_s_op1 % f_l_op2) || (s_ul_s_op1 % f_l_op2 != s_ul_s_op1 % d_l_op2) || ((decimal)(s_ul_s_op1 % d_l_op2) != s_ul_s_op1 % m_l_op2) || (s_ul_s_op1 % m_l_op2 != s_ul_s_op1 % (ulong)i_l_op2) || (s_ul_s_op1 % (ulong)i_l_op2 != 4)) - { - Console.WriteLine("testcase 15 failed"); - passed = false; - } - if ((s_ul_s_op1 % (ulong)s_s_op2 != s_ul_s_op1 % s_ui_s_op2) || (s_ul_s_op1 % s_ui_s_op2 != s_ul_s_op1 % (ulong)s_s_op2) || (s_ul_s_op1 % (ulong)s_s_op2 != s_ul_s_op1 % s_ul_s_op2) || (s_ul_s_op1 % s_ul_s_op2 != s_ul_s_op1 % s_s_op2) || (s_ul_s_op1 % s_s_op2 != s_ul_s_op1 % s_s_op2) || ((decimal)(s_ul_s_op1 % s_s_op2) != s_ul_s_op1 % s_s_op2) || (s_ul_s_op1 % s_s_op2 != s_ul_s_op1 % (ulong)s_s_op2) || (s_ul_s_op1 % (ulong)s_s_op2 != 4)) - { - Console.WriteLine("testcase 16 failed"); - passed = false; - } - } - - { - float f_l_op1 = 9; - int i_l_op2 = 5; - uint ui_l_op2 = 5; - long l_l_op2 = 5; - ulong ul_l_op2 = 5; - float f_l_op2 = 5; - double d_l_op2 = 5; - decimal m_l_op2 = 5; - numHolder nHldr_l_op2 = new numHolder(5); - if ((f_l_op1 % i_l_op2 != f_l_op1 % ui_l_op2) || (f_l_op1 % ui_l_op2 != f_l_op1 % l_l_op2) || (f_l_op1 % l_l_op2 != f_l_op1 % ul_l_op2) || (f_l_op1 % ul_l_op2 != f_l_op1 % f_l_op2) || (f_l_op1 % f_l_op2 != f_l_op1 % d_l_op2) || (f_l_op1 % d_l_op2 != f_l_op1 % (float)m_l_op2) || (f_l_op1 % (float)m_l_op2 != f_l_op1 % i_l_op2) || (f_l_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 17 failed"); - passed = false; - } - if ((f_l_op1 % s_s_op2 != f_l_op1 % s_ui_s_op2) || (f_l_op1 % s_ui_s_op2 != f_l_op1 % s_s_op2) || (f_l_op1 % s_s_op2 != f_l_op1 % s_ul_s_op2) || (f_l_op1 % s_ul_s_op2 != f_l_op1 % s_s_op2) || (f_l_op1 % s_s_op2 != f_l_op1 % s_s_op2) || (f_l_op1 % s_s_op2 != f_l_op1 % (float)s_s_op2) || (f_l_op1 % (float)s_s_op2 != f_l_op1 % s_s_op2) || (f_l_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 18 failed"); - passed = false; - } - if ((s_s_op1 % i_l_op2 != s_s_op1 % ui_l_op2) || (s_s_op1 % ui_l_op2 != s_s_op1 % l_l_op2) || (s_s_op1 % l_l_op2 != s_s_op1 % ul_l_op2) || (s_s_op1 % ul_l_op2 != s_s_op1 % f_l_op2) || (s_s_op1 % f_l_op2 != s_s_op1 % d_l_op2) || (s_s_op1 % d_l_op2 != s_s_op1 % (float)m_l_op2) || (s_s_op1 % (float)m_l_op2 != s_s_op1 % i_l_op2) || (s_s_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 19 failed"); - passed = false; - } - if ((s_s_op1 % s_s_op2 != s_s_op1 % s_ui_s_op2) || (s_s_op1 % s_ui_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_ul_s_op2) || (s_s_op1 % s_ul_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % (float)s_s_op2) || (s_s_op1 % (float)s_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 20 failed"); - passed = false; - } - } - - { - double d_l_op1 = 9; - int i_l_op2 = 5; - uint ui_l_op2 = 5; - long l_l_op2 = 5; - ulong ul_l_op2 = 5; - float f_l_op2 = 5; - double d_l_op2 = 5; - decimal m_l_op2 = 5; - numHolder nHldr_l_op2 = new numHolder(5); - if ((d_l_op1 % i_l_op2 != d_l_op1 % ui_l_op2) || (d_l_op1 % ui_l_op2 != d_l_op1 % l_l_op2) || (d_l_op1 % l_l_op2 != d_l_op1 % ul_l_op2) || (d_l_op1 % ul_l_op2 != d_l_op1 % f_l_op2) || (d_l_op1 % f_l_op2 != d_l_op1 % d_l_op2) || (d_l_op1 % d_l_op2 != d_l_op1 % (double)m_l_op2) || (d_l_op1 % (double)m_l_op2 != d_l_op1 % i_l_op2) || (d_l_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 21 failed"); - passed = false; - } - if ((d_l_op1 % s_s_op2 != d_l_op1 % s_ui_s_op2) || (d_l_op1 % s_ui_s_op2 != d_l_op1 % s_s_op2) || (d_l_op1 % s_s_op2 != d_l_op1 % s_ul_s_op2) || (d_l_op1 % s_ul_s_op2 != d_l_op1 % s_s_op2) || (d_l_op1 % s_s_op2 != d_l_op1 % s_s_op2) || (d_l_op1 % s_s_op2 != d_l_op1 % (double)s_s_op2) || (d_l_op1 % (double)s_s_op2 != d_l_op1 % s_s_op2) || (d_l_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 22 failed"); - passed = false; - } - if ((s_s_op1 % i_l_op2 != s_s_op1 % ui_l_op2) || (s_s_op1 % ui_l_op2 != s_s_op1 % l_l_op2) || (s_s_op1 % l_l_op2 != s_s_op1 % ul_l_op2) || (s_s_op1 % ul_l_op2 != s_s_op1 % f_l_op2) || (s_s_op1 % f_l_op2 != s_s_op1 % d_l_op2) || (s_s_op1 % d_l_op2 != s_s_op1 % (double)m_l_op2) || (s_s_op1 % (double)m_l_op2 != s_s_op1 % i_l_op2) || (s_s_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 23 failed"); - passed = false; - } - if ((s_s_op1 % s_s_op2 != s_s_op1 % s_ui_s_op2) || (s_s_op1 % s_ui_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_ul_s_op2) || (s_s_op1 % s_ul_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % (double)s_s_op2) || (s_s_op1 % (double)s_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 24 failed"); - passed = false; - } - } - - { - decimal m_l_op1 = 9; - int i_l_op2 = 5; - uint ui_l_op2 = 5; - long l_l_op2 = 5; - ulong ul_l_op2 = 5; - float f_l_op2 = 5; - double d_l_op2 = 5; - decimal m_l_op2 = 5; - numHolder nHldr_l_op2 = new numHolder(5); - if ((m_l_op1 % i_l_op2 != m_l_op1 % ui_l_op2) || (m_l_op1 % ui_l_op2 != m_l_op1 % l_l_op2) || (m_l_op1 % l_l_op2 != m_l_op1 % ul_l_op2) || (m_l_op1 % ul_l_op2 != m_l_op1 % (decimal)f_l_op2) || (m_l_op1 % (decimal)f_l_op2 != m_l_op1 % (decimal)d_l_op2) || (m_l_op1 % (decimal)d_l_op2 != m_l_op1 % m_l_op2) || (m_l_op1 % m_l_op2 != m_l_op1 % i_l_op2) || (m_l_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 25 failed"); - passed = false; - } - if ((m_l_op1 % s_s_op2 != m_l_op1 % s_ui_s_op2) || (m_l_op1 % s_ui_s_op2 != m_l_op1 % s_s_op2) || (m_l_op1 % s_s_op2 != m_l_op1 % s_ul_s_op2) || (m_l_op1 % s_ul_s_op2 != m_l_op1 % (decimal)s_s_op2) || (m_l_op1 % (decimal)s_s_op2 != m_l_op1 % (decimal)s_s_op2) || (m_l_op1 % (decimal)s_s_op2 != m_l_op1 % s_s_op2) || (m_l_op1 % s_s_op2 != m_l_op1 % s_s_op2) || (m_l_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 26 failed"); - passed = false; - } - if ((s_s_op1 % i_l_op2 != s_s_op1 % ui_l_op2) || (s_s_op1 % ui_l_op2 != s_s_op1 % l_l_op2) || (s_s_op1 % l_l_op2 != s_s_op1 % ul_l_op2) || (s_s_op1 % ul_l_op2 != s_s_op1 % (decimal)f_l_op2) || (s_s_op1 % (decimal)f_l_op2 != s_s_op1 % (decimal)d_l_op2) || (s_s_op1 % (decimal)d_l_op2 != s_s_op1 % m_l_op2) || (s_s_op1 % m_l_op2 != s_s_op1 % i_l_op2) || (s_s_op1 % i_l_op2 != 4)) - { - Console.WriteLine("testcase 27 failed"); - passed = false; - } - if ((s_s_op1 % s_s_op2 != s_s_op1 % s_ui_s_op2) || (s_s_op1 % s_ui_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_ul_s_op2) || (s_s_op1 % s_ul_s_op2 != s_s_op1 % (decimal)s_s_op2) || (s_s_op1 % (decimal)s_s_op2 != s_s_op1 % (decimal)s_s_op2) || (s_s_op1 % (decimal)s_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != s_s_op1 % s_s_op2) || (s_s_op1 % s_s_op2 != 4)) - { - Console.WriteLine("testcase 28 failed"); - passed = false; - } - } - - if (!passed) - { - Console.WriteLine("FAILED"); - return 1; - } - else - { - Console.WriteLine("PASSED"); - return 100; - } - } -} diff --git a/tests/src/JIT/Directed/coverage/oldtests/lclfldsub.cs b/tests/src/JIT/Directed/coverage/oldtests/lclfldsub.cs deleted file mode 100644 index 21e524d6e3..0000000000 --- a/tests/src/JIT/Directed/coverage/oldtests/lclfldsub.cs +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -//Testing simple math on local vars and fields - sub - -#pragma warning disable 0414 -using System; -internal class lclfldsub -{ - //user-defined class that overloads operator - - public class numHolder - { - private int _num; - private uint _ui_num; - private long _num; - private ulong _ul_num; - private float _num; - private double _num; - private decimal _num; - public numHolder(int i_num) - { - _num = Convert.ToInt32(i_num); - _ui_num = Convert.ToUInt32(i_num); - _num = Convert.ToInt64(i_num); - _ul_num = Convert.ToUInt64(i_num); - _num = Convert.ToSingle(i_num); - _num = Convert.ToDouble(i_num); - _num = Convert.ToDecimal(i_num); - } - - public static int operator -(numHolder a, int b) - { - return a._num - b; - } - - public numHolder(uint ui_num) - { - _num = Convert.ToInt32(ui_num); - _ui_num = Convert.ToUInt32(ui_num); - _num = Convert.ToInt64(ui_num); - _ul_num = Convert.ToUInt64(ui_num); - _num = Convert.ToSingle(ui_num); - _num = Convert.ToDouble(ui_num); - _num = Convert.ToDecimal(ui_num); - } - - public static uint operator -(numHolder a, uint b) - { - return a._ui_num - b; - } - - public numHolder(long l_num) - { - _num = Convert.ToInt32(l_num); - _ui_num = Convert.ToUInt32(l_num); - this._num = Convert.ToInt64(l_num); - _ul_num = Convert.ToUInt64(l_num); - _num = Convert.ToSingle(l_num); - _num = Convert.ToDouble(l_num); - _num = Convert.ToDecimal(l_num); - } - - public static long operator -(numHolder a, long b) - { - return a._num - b; - } - - public numHolder(ulong ul_num) - { - _num = Convert.ToInt32(ul_num); - _ui_num = Convert.ToUInt32(ul_num); - _num = Convert.ToInt64(ul_num); - _ul_num = Convert.ToUInt64(ul_num); - _num = Convert.ToSingle(ul_num); - _num = Convert.ToDouble(ul_num); - _num = Convert.ToDecimal(ul_num); - } - - public static long operator -(numHolder a, ulong b) - { - return (long)(a._ul_num - b); - } - - public numHolder(float f_num) - { - _num = Convert.ToInt32(f_num); - _ui_num = Convert.ToUInt32(f_num); - _num = Convert.ToInt64(f_num); - _ul_num = Convert.ToUInt64(f_num); - this._num = Convert.ToSingle(f_num); - _num = Convert.ToDouble(f_num); - _num = Convert.ToDecimal(f_num); - } - - public static float operator -(numHolder a, float b) - { - return a._num - b; - } - - public numHolder(double d_num) - { - _num = Convert.ToInt32(d_num); - _ui_num = Convert.ToUInt32(d_num); - _num = Convert.ToInt64(d_num); - _ul_num = Convert.ToUInt64(d_num); - _num = Convert.ToSingle(d_num); - this._num = Convert.ToDouble(d_num); - _num = Convert.ToDecimal(d_num); - } - - public static double operator -(numHolder a, double b) - { - return a._num - b; - } - - public numHolder(decimal m_num) - { - _num = Convert.ToInt32(m_num); - _ui_num = Convert.ToUInt32(m_num); - _num = Convert.ToInt64(m_num); - _ul_num = Convert.ToUInt64(m_num); - _num = Convert.ToSingle(m_num); - _num = Convert.ToDouble(m_num); - this._num = Convert.ToDecimal(m_num); - } - - public static int operator -(numHolder a, decimal b) - { - return (int)(a._num - b); - } - - public static int operator -(numHolder a, numHolder b) - { - return a._num - b._num; - } - } - - private static int s_s_op1 = 16; - private static uint s_ui_s_op1 = 16; - private static long s_s_op1 = 16; - private static ulong s_ul_s_op1 = 16; - private static float s_s_op1 = 16; - private static double s_s_op1 = 16; - private static decimal s_s_op1 = 16; - - private static int s_s_op2 = 15; - private static uint s_ui_s_op2 = 15; - private static long s_s_op2 = 15; - private static ulong s_ul_s_op2 = 15; - private static float s_s_op2 = 15; - private static double s_s_op2 = 15; - private static decimal s_s_op2 = 15; - private static numHolder s_nHldr_s_op2 = new numHolder(15); - - public static int i_f(String s) - { - if (s == "op1") - return 16; - else - return 15; - } - public static uint ui_f(String s) - { - if (s == "op1") - return 16; - else - return 15; - } - public static long l_f(String s) - { - if (s == "op1") - return 16; - else - return 15; - } - public static ulong ul_f(String s) - { - if (s == "op1") - return 16; - else - return 15; - } - public static float f_f(String s) - { - if (s == "op1") - return 16; - else - return 15; - } - public static double d_f(String s) - { - if (s == "op1") - return 16; - else - return 15; - } - public static decimal m_f(String s) - { - if (s == "op1") - return 16; - else - return 15; - } - public static numHolder nHldr_f(String s) - { - if (s == "op1") - return new numHolder(16); - else - return new numHolder(15); - } - private class CL - { - public int i_cl_op1 = 16; - public uint ui_cl_op1 = 16; - public long l_cl_op1 = 16; - public ulong ul_cl_op1 = 16; - public float f_cl_op1 = 16; - public double d_cl_op1 = 16; - public decimal m_cl_op1 = 16; - - public int i_cl_op2 = 15; - public uint ui_cl_op2 = 15; - public long l_cl_op2 = 15; - public ulong ul_cl_op2 = 15; - public float f_cl_op2 = 15; - public double d_cl_op2 = 15; - public decimal m_cl_op2 = 15; - public numHolder nHldr_cl_op2 = new numHolder(15); - } - - private struct VT - { - public int i_vt_op1; - public uint ui_vt_op1; - public long l_vt_op1; - public ulong ul_vt_op1; - public float f_vt_op1; - public double d_vt_op1; - public decimal m_vt_op1; - - public int i_vt_op2; - public uint ui_vt_op2; - public long l_vt_op2; - public ulong ul_vt_op2; - public float f_vt_op2; - public double d_vt_op2; - public decimal m_vt_op2; - public numHolder nHldr_vt_op2; - } - - public static int Main() - { - bool passed = true; - //initialize class - CL cl1 = new CL(); - //initialize struct - VT vt1; - vt1.i_vt_op1 = 16; - vt1.ui_vt_op1 = 16; - vt1.l_vt_op1 = 16; - vt1.ul_vt_op1 = 16; - vt1.f_vt_op1 = 16; - vt1.d_vt_op1 = 16; - vt1.m_vt_op1 = 16; - vt1.i_vt_op2 = 15; - vt1.ui_vt_op2 = 15; - vt1.l_vt_op2 = 15; - vt1.ul_vt_op2 = 15; - vt1.f_vt_op2 = 15; - vt1.d_vt_op2 = 15; - vt1.m_vt_op2 = 15; - vt1.nHldr_vt_op2 = new numHolder(15); - - int[] i_arr1d_op1 = { 0, 16 }; - int[,] i_arr2d_op1 = { { 0, 16 }, { 1, 1 } }; - int[,,] i_arr3d_op1 = { { { 0, 16 }, { 1, 1 } } }; - uint[] ui_arr1d_op1 = { 0, 16 }; - uint[,] ui_arr2d_op1 = { { 0, 16 }, { 1, 1 } }; - uint[,,] ui_arr3d_op1 = { { { 0, 16 }, { 1, 1 } } }; - long[] l_arr1d_op1 = { 0, 16 }; - long[,] l_arr2d_op1 = { { 0, 16 }, { 1, 1 } }; - long[,,] l_arr3d_op1 = { { { 0, 16 }, { 1, 1 } } }; - ulong[] ul_arr1d_op1 = { 0, 16 }; - ulong[,] ul_arr2d_op1 = { { 0, 16 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op1 = { { { 0, 16 }, { 1, 1 } } }; - float[] f_arr1d_op1 = { 0, 16 }; - float[,] f_arr2d_op1 = { { 0, 16 }, { 1, 1 } }; - float[,,] f_arr3d_op1 = { { { 0, 16 }, { 1, 1 } } }; - double[] d_arr1d_op1 = { 0, 16 }; - double[,] d_arr2d_op1 = { { 0, 16 }, { 1, 1 } }; - double[,,] d_arr3d_op1 = { { { 0, 16 }, { 1, 1 } } }; - decimal[] m_arr1d_op1 = { 0, 16 }; - decimal[,] m_arr2d_op1 = { { 0, 16 }, { 1, 1 } }; - decimal[,,] m_arr3d_op1 = { { { 0, 16 }, { 1, 1 } } }; - - int[] i_arr1d_op2 = { 15, 0, 1 }; - int[,] i_arr2d_op2 = { { 0, 15 }, { 1, 1 } }; - int[,,] i_arr3d_op2 = { { { 0, 15 }, { 1, 1 } } }; - uint[] ui_arr1d_op2 = { 15, 0, 1 }; - uint[,] ui_arr2d_op2 = { { 0, 15 }, { 1, 1 } }; - uint[,,] ui_arr3d_op2 = { { { 0, 15 }, { 1, 1 } } }; - long[] l_arr1d_op2 = { 15, 0, 1 }; - long[,] l_arr2d_op2 = { { 0, 15 }, { 1, 1 } }; - long[,,] l_arr3d_op2 = { { { 0, 15 }, { 1, 1 } } }; - ulong[] ul_arr1d_op2 = { 15, 0, 1 }; - ulong[,] ul_arr2d_op2 = { { 0, 15 }, { 1, 1 } }; - ulong[,,] ul_arr3d_op2 = { { { 0, 15 }, { 1, 1 } } }; - float[] f_arr1d_op2 = { 15, 0, 1 }; - float[,] f_arr2d_op2 = { { 0, 15 }, { 1, 1 } }; - float[,,] f_arr3d_op2 = { { { 0, 15 }, { 1, 1 } } }; - double[] d_arr1d_op2 = { 15, 0, 1 }; - double[,] d_arr2d_op2 = { { 0, 15 }, { 1, 1 } }; - double[,,] d_arr3d_op2 = { { { 0, 15 }, { 1, 1 } } }; - decimal[] m_arr1d_op2 = { 15, 0, 1 }; - decimal[,] m_arr2d_op2 = { { 0, 15 }, { 1, 1 } }; - decimal[,,] m_arr3d_op2 = { { { 0, 15 }, { 1, 1 } } }; - numHolder[] nHldr_arr1d_op2 = { new numHolder(15), new numHolder(0), new numHolder(1) }; - numHolder[,] nHldr_arr2d_op2 = { { new numHolder(0), new numHolder(15) }, { new numHolder(1), new numHolder(1) } }; - numHolder[,,] nHldr_arr3d_op2 = { { { new numHolder(0), new numHolder(15) }, { new numHolder(1), new numHolder(1) } } }; - - int[,] index = { { 0, 0 }, { 1, 1 } }; - - { - int i_l_op1 = 16; - int i_l_op2 = 15; - uint ui_l_op2 = 15; - long l_l_op2 = 15; - ulong ul_l_op2 = 15; - float f_l_op2 = 15; - double d_l_op2 = 15; - decimal m_l_op2 = 15; - numHolder nHldr_l_op2 = new numHolder(15); - if ((i_l_op1 - i_l_op2 != i_l_op1 - ui_l_op2) || (i_l_op1 - ui_l_op2 != i_l_op1 - l_l_op2) || (i_l_op1 - l_l_op2 != i_l_op1 - (int)ul_l_op2) || (i_l_op1 - (int)ul_l_op2 != i_l_op1 - f_l_op2) || (i_l_op1 - f_l_op2 != i_l_op1 - d_l_op2) || ((decimal)(i_l_op1 - d_l_op2) != i_l_op1 - m_l_op2) || (i_l_op1 - m_l_op2 != i_l_op1 - i_l_op2) || (i_l_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 1 failed"); - passed = false; - } - if ((i_l_op1 - s_s_op2 != i_l_op1 - s_ui_s_op2) || (i_l_op1 - s_ui_s_op2 != i_l_op1 - s_s_op2) || (i_l_op1 - s_s_op2 != i_l_op1 - (int)s_ul_s_op2) || (i_l_op1 - (int)s_ul_s_op2 != i_l_op1 - s_s_op2) || (i_l_op1 - s_s_op2 != i_l_op1 - s_s_op2) || ((decimal)(i_l_op1 - s_s_op2) != i_l_op1 - s_s_op2) || (i_l_op1 - s_s_op2 != i_l_op1 - s_s_op2) || (i_l_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 2 failed"); - passed = false; - } - if ((s_s_op1 - i_l_op2 != s_s_op1 - ui_l_op2) || (s_s_op1 - ui_l_op2 != s_s_op1 - l_l_op2) || (s_s_op1 - l_l_op2 != s_s_op1 - (int)ul_l_op2) || (s_s_op1 - (int)ul_l_op2 != s_s_op1 - f_l_op2) || (s_s_op1 - f_l_op2 != s_s_op1 - d_l_op2) || ((decimal)(s_s_op1 - d_l_op2) != s_s_op1 - m_l_op2) || (s_s_op1 - m_l_op2 != s_s_op1 - i_l_op2) || (s_s_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 3 failed"); - passed = false; - } - if ((s_s_op1 - s_s_op2 != s_s_op1 - s_ui_s_op2) || (s_s_op1 - s_ui_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - (int)s_ul_s_op2) || (s_s_op1 - (int)s_ul_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_s_op2) || ((decimal)(s_s_op1 - s_s_op2) != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 4 failed"); - passed = false; - } - } - - { - uint ui_l_op1 = 16; - int i_l_op2 = 15; - uint ui_l_op2 = 15; - long l_l_op2 = 15; - ulong ul_l_op2 = 15; - float f_l_op2 = 15; - double d_l_op2 = 15; - decimal m_l_op2 = 15; - numHolder nHldr_l_op2 = new numHolder(15); - if ((ui_l_op1 - i_l_op2 != ui_l_op1 - ui_l_op2) || (ui_l_op1 - ui_l_op2 != ui_l_op1 - l_l_op2) || ((ulong)(ui_l_op1 - l_l_op2) != ui_l_op1 - ul_l_op2) || (ui_l_op1 - ul_l_op2 != ui_l_op1 - f_l_op2) || (ui_l_op1 - f_l_op2 != ui_l_op1 - d_l_op2) || ((decimal)(ui_l_op1 - d_l_op2) != ui_l_op1 - m_l_op2) || (ui_l_op1 - m_l_op2 != ui_l_op1 - i_l_op2) || (ui_l_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 5 failed"); - passed = false; - } - if ((ui_l_op1 - s_s_op2 != ui_l_op1 - s_ui_s_op2) || (ui_l_op1 - s_ui_s_op2 != ui_l_op1 - s_s_op2) || ((ulong)(ui_l_op1 - s_s_op2) != ui_l_op1 - s_ul_s_op2) || (ui_l_op1 - s_ul_s_op2 != ui_l_op1 - s_s_op2) || (ui_l_op1 - s_s_op2 != ui_l_op1 - s_s_op2) || ((decimal)(ui_l_op1 - s_s_op2) != ui_l_op1 - s_s_op2) || (ui_l_op1 - s_s_op2 != ui_l_op1 - s_s_op2) || (ui_l_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 6 failed"); - passed = false; - } - if ((s_ui_s_op1 - i_l_op2 != s_ui_s_op1 - ui_l_op2) || (s_ui_s_op1 - ui_l_op2 != s_ui_s_op1 - l_l_op2) || ((ulong)(s_ui_s_op1 - l_l_op2) != s_ui_s_op1 - ul_l_op2) || (s_ui_s_op1 - ul_l_op2 != s_ui_s_op1 - f_l_op2) || (s_ui_s_op1 - f_l_op2 != s_ui_s_op1 - d_l_op2) || ((decimal)(s_ui_s_op1 - d_l_op2) != s_ui_s_op1 - m_l_op2) || (s_ui_s_op1 - m_l_op2 != s_ui_s_op1 - i_l_op2) || (s_ui_s_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 7 failed"); - passed = false; - } - if ((s_ui_s_op1 - s_s_op2 != s_ui_s_op1 - s_ui_s_op2) || (s_ui_s_op1 - s_ui_s_op2 != s_ui_s_op1 - s_s_op2) || ((ulong)(s_ui_s_op1 - s_s_op2) != s_ui_s_op1 - s_ul_s_op2) || (s_ui_s_op1 - s_ul_s_op2 != s_ui_s_op1 - s_s_op2) || (s_ui_s_op1 - s_s_op2 != s_ui_s_op1 - s_s_op2) || ((decimal)(s_ui_s_op1 - s_s_op2) != s_ui_s_op1 - s_s_op2) || (s_ui_s_op1 - s_s_op2 != s_ui_s_op1 - s_s_op2) || (s_ui_s_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 8 failed"); - passed = false; - } - } - - { - long l_l_op1 = 16; - int i_l_op2 = 15; - uint ui_l_op2 = 15; - long l_l_op2 = 15; - ulong ul_l_op2 = 15; - float f_l_op2 = 15; - double d_l_op2 = 15; - decimal m_l_op2 = 15; - numHolder nHldr_l_op2 = new numHolder(15); - if ((l_l_op1 - i_l_op2 != l_l_op1 - ui_l_op2) || (l_l_op1 - ui_l_op2 != l_l_op1 - l_l_op2) || (l_l_op1 - l_l_op2 != l_l_op1 - (long)ul_l_op2) || (l_l_op1 - (long)ul_l_op2 != l_l_op1 - f_l_op2) || (l_l_op1 - f_l_op2 != l_l_op1 - d_l_op2) || ((decimal)(l_l_op1 - d_l_op2) != l_l_op1 - m_l_op2) || (l_l_op1 - m_l_op2 != l_l_op1 - i_l_op2) || (l_l_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 9 failed"); - passed = false; - } - if ((l_l_op1 - s_s_op2 != l_l_op1 - s_ui_s_op2) || (l_l_op1 - s_ui_s_op2 != l_l_op1 - s_s_op2) || (l_l_op1 - s_s_op2 != l_l_op1 - (long)s_ul_s_op2) || (l_l_op1 - (long)s_ul_s_op2 != l_l_op1 - s_s_op2) || (l_l_op1 - s_s_op2 != l_l_op1 - s_s_op2) || ((decimal)(l_l_op1 - s_s_op2) != l_l_op1 - s_s_op2) || (l_l_op1 - s_s_op2 != l_l_op1 - s_s_op2) || (l_l_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 10 failed"); - passed = false; - } - if ((s_s_op1 - i_l_op2 != s_s_op1 - ui_l_op2) || (s_s_op1 - ui_l_op2 != s_s_op1 - l_l_op2) || (s_s_op1 - l_l_op2 != s_s_op1 - (long)ul_l_op2) || (s_s_op1 - (long)ul_l_op2 != s_s_op1 - f_l_op2) || (s_s_op1 - f_l_op2 != s_s_op1 - d_l_op2) || ((decimal)(s_s_op1 - d_l_op2) != s_s_op1 - m_l_op2) || (s_s_op1 - m_l_op2 != s_s_op1 - i_l_op2) || (s_s_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 11 failed"); - passed = false; - } - if ((s_s_op1 - s_s_op2 != s_s_op1 - s_ui_s_op2) || (s_s_op1 - s_ui_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - (long)s_ul_s_op2) || (s_s_op1 - (long)s_ul_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_s_op2) || ((decimal)(s_s_op1 - s_s_op2) != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 12 failed"); - passed = false; - } - } - - { - ulong ul_l_op1 = 16; - int i_l_op2 = 15; - uint ui_l_op2 = 15; - long l_l_op2 = 15; - ulong ul_l_op2 = 15; - float f_l_op2 = 15; - double d_l_op2 = 15; - decimal m_l_op2 = 15; - numHolder nHldr_l_op2 = new numHolder(15); - if ((ul_l_op1 - (ulong)i_l_op2 != ul_l_op1 - ui_l_op2) || (ul_l_op1 - ui_l_op2 != ul_l_op1 - (ulong)l_l_op2) || (ul_l_op1 - (ulong)l_l_op2 != ul_l_op1 - ul_l_op2) || (ul_l_op1 - ul_l_op2 != ul_l_op1 - f_l_op2) || (ul_l_op1 - f_l_op2 != ul_l_op1 - d_l_op2) || ((decimal)(ul_l_op1 - d_l_op2) != ul_l_op1 - m_l_op2) || (ul_l_op1 - m_l_op2 != ul_l_op1 - (ulong)i_l_op2) || (ul_l_op1 - (ulong)i_l_op2 != 1)) - { - Console.WriteLine("testcase 13 failed"); - passed = false; - } - if ((ul_l_op1 - (ulong)s_s_op2 != ul_l_op1 - s_ui_s_op2) || (ul_l_op1 - s_ui_s_op2 != ul_l_op1 - (ulong)s_s_op2) || (ul_l_op1 - (ulong)s_s_op2 != ul_l_op1 - s_ul_s_op2) || (ul_l_op1 - s_ul_s_op2 != ul_l_op1 - s_s_op2) || (ul_l_op1 - s_s_op2 != ul_l_op1 - s_s_op2) || ((decimal)(ul_l_op1 - s_s_op2) != ul_l_op1 - s_s_op2) || (ul_l_op1 - s_s_op2 != ul_l_op1 - (ulong)s_s_op2) || (ul_l_op1 - (ulong)s_s_op2 != 1)) - { - Console.WriteLine("testcase 14 failed"); - passed = false; - } - if ((s_ul_s_op1 - (ulong)i_l_op2 != s_ul_s_op1 - ui_l_op2) || (s_ul_s_op1 - ui_l_op2 != s_ul_s_op1 - (ulong)l_l_op2) || (s_ul_s_op1 - (ulong)l_l_op2 != s_ul_s_op1 - ul_l_op2) || (s_ul_s_op1 - ul_l_op2 != s_ul_s_op1 - f_l_op2) || (s_ul_s_op1 - f_l_op2 != s_ul_s_op1 - d_l_op2) || ((decimal)(s_ul_s_op1 - d_l_op2) != s_ul_s_op1 - m_l_op2) || (s_ul_s_op1 - m_l_op2 != s_ul_s_op1 - (ulong)i_l_op2) || (s_ul_s_op1 - (ulong)i_l_op2 != 1)) - { - Console.WriteLine("testcase 15 failed"); - passed = false; - } - if ((s_ul_s_op1 - (ulong)s_s_op2 != s_ul_s_op1 - s_ui_s_op2) || (s_ul_s_op1 - s_ui_s_op2 != s_ul_s_op1 - (ulong)s_s_op2) || (s_ul_s_op1 - (ulong)s_s_op2 != s_ul_s_op1 - s_ul_s_op2) || (s_ul_s_op1 - s_ul_s_op2 != s_ul_s_op1 - s_s_op2) || (s_ul_s_op1 - s_s_op2 != s_ul_s_op1 - s_s_op2) || ((decimal)(s_ul_s_op1 - s_s_op2) != s_ul_s_op1 - s_s_op2) || (s_ul_s_op1 - s_s_op2 != s_ul_s_op1 - (ulong)s_s_op2) || (s_ul_s_op1 - (ulong)s_s_op2 != 1)) - { - Console.WriteLine("testcase 16 failed"); - passed = false; - } - } - - { - float f_l_op1 = 16; - int i_l_op2 = 15; - uint ui_l_op2 = 15; - long l_l_op2 = 15; - ulong ul_l_op2 = 15; - float f_l_op2 = 15; - double d_l_op2 = 15; - decimal m_l_op2 = 15; - numHolder nHldr_l_op2 = new numHolder(15); - if ((f_l_op1 - i_l_op2 != f_l_op1 - ui_l_op2) || (f_l_op1 - ui_l_op2 != f_l_op1 - l_l_op2) || (f_l_op1 - l_l_op2 != f_l_op1 - ul_l_op2) || (f_l_op1 - ul_l_op2 != f_l_op1 - f_l_op2) || (f_l_op1 - f_l_op2 != f_l_op1 - d_l_op2) || (f_l_op1 - d_l_op2 != f_l_op1 - (float)m_l_op2) || (f_l_op1 - (float)m_l_op2 != f_l_op1 - i_l_op2) || (f_l_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 17 failed"); - passed = false; - } - if ((f_l_op1 - s_s_op2 != f_l_op1 - s_ui_s_op2) || (f_l_op1 - s_ui_s_op2 != f_l_op1 - s_s_op2) || (f_l_op1 - s_s_op2 != f_l_op1 - s_ul_s_op2) || (f_l_op1 - s_ul_s_op2 != f_l_op1 - s_s_op2) || (f_l_op1 - s_s_op2 != f_l_op1 - s_s_op2) || (f_l_op1 - s_s_op2 != f_l_op1 - (float)s_s_op2) || (f_l_op1 - (float)s_s_op2 != f_l_op1 - s_s_op2) || (f_l_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 18 failed"); - passed = false; - } - if ((s_s_op1 - i_l_op2 != s_s_op1 - ui_l_op2) || (s_s_op1 - ui_l_op2 != s_s_op1 - l_l_op2) || (s_s_op1 - l_l_op2 != s_s_op1 - ul_l_op2) || (s_s_op1 - ul_l_op2 != s_s_op1 - f_l_op2) || (s_s_op1 - f_l_op2 != s_s_op1 - d_l_op2) || (s_s_op1 - d_l_op2 != s_s_op1 - (float)m_l_op2) || (s_s_op1 - (float)m_l_op2 != s_s_op1 - i_l_op2) || (s_s_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 19 failed"); - passed = false; - } - if ((s_s_op1 - s_s_op2 != s_s_op1 - s_ui_s_op2) || (s_s_op1 - s_ui_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_ul_s_op2) || (s_s_op1 - s_ul_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - (float)s_s_op2) || (s_s_op1 - (float)s_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 20 failed"); - passed = false; - } - } - - { - double d_l_op1 = 16; - int i_l_op2 = 15; - uint ui_l_op2 = 15; - long l_l_op2 = 15; - ulong ul_l_op2 = 15; - float f_l_op2 = 15; - double d_l_op2 = 15; - decimal m_l_op2 = 15; - numHolder nHldr_l_op2 = new numHolder(15); - if ((d_l_op1 - i_l_op2 != d_l_op1 - ui_l_op2) || (d_l_op1 - ui_l_op2 != d_l_op1 - l_l_op2) || (d_l_op1 - l_l_op2 != d_l_op1 - ul_l_op2) || (d_l_op1 - ul_l_op2 != d_l_op1 - f_l_op2) || (d_l_op1 - f_l_op2 != d_l_op1 - d_l_op2) || (d_l_op1 - d_l_op2 != d_l_op1 - (double)m_l_op2) || (d_l_op1 - (double)m_l_op2 != d_l_op1 - i_l_op2) || (d_l_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 21 failed"); - passed = false; - } - if ((d_l_op1 - s_s_op2 != d_l_op1 - s_ui_s_op2) || (d_l_op1 - s_ui_s_op2 != d_l_op1 - s_s_op2) || (d_l_op1 - s_s_op2 != d_l_op1 - s_ul_s_op2) || (d_l_op1 - s_ul_s_op2 != d_l_op1 - s_s_op2) || (d_l_op1 - s_s_op2 != d_l_op1 - s_s_op2) || (d_l_op1 - s_s_op2 != d_l_op1 - (double)s_s_op2) || (d_l_op1 - (double)s_s_op2 != d_l_op1 - s_s_op2) || (d_l_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 22 failed"); - passed = false; - } - if ((s_s_op1 - i_l_op2 != s_s_op1 - ui_l_op2) || (s_s_op1 - ui_l_op2 != s_s_op1 - l_l_op2) || (s_s_op1 - l_l_op2 != s_s_op1 - ul_l_op2) || (s_s_op1 - ul_l_op2 != s_s_op1 - f_l_op2) || (s_s_op1 - f_l_op2 != s_s_op1 - d_l_op2) || (s_s_op1 - d_l_op2 != s_s_op1 - (double)m_l_op2) || (s_s_op1 - (double)m_l_op2 != s_s_op1 - i_l_op2) || (s_s_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 23 failed"); - passed = false; - } - if ((s_s_op1 - s_s_op2 != s_s_op1 - s_ui_s_op2) || (s_s_op1 - s_ui_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_ul_s_op2) || (s_s_op1 - s_ul_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - (double)s_s_op2) || (s_s_op1 - (double)s_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 24 failed"); - passed = false; - } - } - - { - decimal m_l_op1 = 16; - int i_l_op2 = 15; - uint ui_l_op2 = 15; - long l_l_op2 = 15; - ulong ul_l_op2 = 15; - float f_l_op2 = 15; - double d_l_op2 = 15; - decimal m_l_op2 = 15; - numHolder nHldr_l_op2 = new numHolder(15); - if ((m_l_op1 - i_l_op2 != m_l_op1 - ui_l_op2) || (m_l_op1 - ui_l_op2 != m_l_op1 - l_l_op2) || (m_l_op1 - l_l_op2 != m_l_op1 - ul_l_op2) || (m_l_op1 - ul_l_op2 != m_l_op1 - (decimal)f_l_op2) || (m_l_op1 - (decimal)f_l_op2 != m_l_op1 - (decimal)d_l_op2) || (m_l_op1 - (decimal)d_l_op2 != m_l_op1 - m_l_op2) || (m_l_op1 - m_l_op2 != m_l_op1 - i_l_op2) || (m_l_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 25 failed"); - passed = false; - } - if ((m_l_op1 - s_s_op2 != m_l_op1 - s_ui_s_op2) || (m_l_op1 - s_ui_s_op2 != m_l_op1 - s_s_op2) || (m_l_op1 - s_s_op2 != m_l_op1 - s_ul_s_op2) || (m_l_op1 - s_ul_s_op2 != m_l_op1 - (decimal)s_s_op2) || (m_l_op1 - (decimal)s_s_op2 != m_l_op1 - (decimal)s_s_op2) || (m_l_op1 - (decimal)s_s_op2 != m_l_op1 - s_s_op2) || (m_l_op1 - s_s_op2 != m_l_op1 - s_s_op2) || (m_l_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 26 failed"); - passed = false; - } - if ((s_s_op1 - i_l_op2 != s_s_op1 - ui_l_op2) || (s_s_op1 - ui_l_op2 != s_s_op1 - l_l_op2) || (s_s_op1 - l_l_op2 != s_s_op1 - ul_l_op2) || (s_s_op1 - ul_l_op2 != s_s_op1 - (decimal)f_l_op2) || (s_s_op1 - (decimal)f_l_op2 != s_s_op1 - (decimal)d_l_op2) || (s_s_op1 - (decimal)d_l_op2 != s_s_op1 - m_l_op2) || (s_s_op1 - m_l_op2 != s_s_op1 - i_l_op2) || (s_s_op1 - i_l_op2 != 1)) - { - Console.WriteLine("testcase 27 failed"); - passed = false; - } - if ((s_s_op1 - s_s_op2 != s_s_op1 - s_ui_s_op2) || (s_s_op1 - s_ui_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_ul_s_op2) || (s_s_op1 - s_ul_s_op2 != s_s_op1 - (decimal)s_s_op2) || (s_s_op1 - (decimal)s_s_op2 != s_s_op1 - (decimal)s_s_op2) || (s_s_op1 - (decimal)s_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != s_s_op1 - s_s_op2) || (s_s_op1 - s_s_op2 != 1)) - { - Console.WriteLine("testcase 28 failed"); - passed = false; - } - } - - if (!passed) - { - Console.WriteLine("FAILED"); - return 1; - } - else - { - Console.WriteLine("PASSED"); - return 100; - } - } -} |