Exemple #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;
 }
Exemple #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);
        }
 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;
 }
Exemple #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);
        }