Example #1
0
		public static int Main(string[] Args)
		{
			int rValue;
			LongTest testLong = new LongTest();

			Console.WriteLine("Check Decrement: {0}", rValue = testLong.CheckDecReturn());
			Console.WriteLine("Test {0}", 100 == rValue ? "Passed" : "Failed");
			return rValue;
		}
Example #2
0
        public static int Main(string[] Args)
        {
            int      rValue;
            LongTest testLong = new LongTest();

            Console.WriteLine("Check Decrement: {0}", rValue = testLong.CheckIncReturn());
            Console.WriteLine("Test {0}", 100 == rValue ? "Passed" : "Failed");
            return(rValue);
        }
Example #3
0
		public static int Main(string[] Args)
		{
			int rValue;
			int loops = 5000;
			int threads = 50;
			if (Args.Length == 2)
			{
				loops = Int32.Parse(Args[0]);
				threads = Int32.Parse(Args[1]);
			}
			Console.WriteLine("Starting Interlocked test on {0} threads for {1} iterations.",threads,loops);
			
			LongTest testLong = new LongTest(loops, threads);

			Console.WriteLine("Check Decrement: {0}", rValue = testLong.Dec());
			Console.WriteLine("Test {0}", 100 == rValue ? "Passed" : "Failed");
			return rValue;
		}
Example #4
0
        public static int Main(string[] Args)
        {
            int rValue;
            int loops   = 5000;
            int threads = 50;

            if (Args.Length == 2)
            {
                loops   = Int32.Parse(Args[0]);
                threads = Int32.Parse(Args[1]);
            }
            Console.WriteLine("Starting Interlocked test on {0} threads for {1} iterations.", threads, loops);

            LongTest testLong = new LongTest(loops, threads);

            Console.WriteLine("Check Decrement: {0}", rValue = testLong.Dec());
            Console.WriteLine("Test {0}", 100 == rValue ? "Passed" : "Failed");
            return(rValue);
        }