Exemplo n.º 1
0
 //Test shall throw IndexOutOfRangeException if rangecheck is inserted properly
 private static bool DoTest(RngTest Test)
 {
     bool bResult = false;
     try
     {
         Test();
     }
     catch (System.IndexOutOfRangeException)
     {
         bResult = true;
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
     return bResult;
 }
Exemplo n.º 2
0
        //Test shall throw IndexOutOfRangeException if rangecheck is inserted properly
        private static bool DoTest(RngTest Test)
        {
            bool bResult = false;

            try
            {
                Test();
            }
            catch (System.IndexOutOfRangeException)
            {
                bResult = true;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            return(bResult);
        }
Exemplo n.º 3
0
 private static bool DoTest(RngTest Test)
 {
     bool bResult = false;
     myResetEvent.Reset();
     try
     {
         Thread t = new Thread(new ThreadStart(Class1.ThreadFunc));
         t.Start();
         Test(ref val);
         t.Join();
     }
     catch (System.IndexOutOfRangeException)
     {
         bResult = true;
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
     return bResult;
 }
Exemplo n.º 4
0
        private static bool DoTest(RngTest Test)
        {
            bool bResult = false;

            myResetEvent.Reset();
            try
            {
                Thread t = new Thread(new ThreadStart(Class1.ThreadFunc));
                t.Start();
                Test(ref val);
                t.Join();
            }
            catch (System.IndexOutOfRangeException)
            {
                bResult = true;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            return(bResult);
        }