Exemplo n.º 1
0
        public static int Main(string[] Args)
        {
            int     rValue;
            IntTest testInt = new IntTest(100, 10);

            Console.WriteLine("Check Inc Returnt: {0}", rValue = testInt.CheckDecReturn());
            Console.WriteLine("Test {0}", 100 == rValue ? "Passed" : "Failed");
            return(rValue);
        }
Exemplo n.º 2
0
		public static int Main(string[] Args)
		{
			int rValue;
			IntTest testInt = new IntTest(100, 10);

			Console.WriteLine("Check Inc Returnt: {0}", rValue = testInt.CheckIncReturn());
			Console.WriteLine("Test {0}", 100 == rValue ? "Passed" : "Failed");
			return rValue;
		}
Exemplo n.º 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);
			
			IntTest testInt = new IntTest(loops, threads);

			Console.WriteLine("Check Increment: {0}", rValue = testInt.Inc());
			Console.WriteLine("Test {0}", 100 == rValue ? "Passed" : "Failed");
			return rValue;
		}
Exemplo n.º 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);

            IntTest testInt = new IntTest(loops, threads);

            Console.WriteLine("Check Increment: {0}", rValue = testInt.Inc());
            Console.WriteLine("Test {0}", 100 == rValue ? "Passed" : "Failed");
            return(rValue);
        }