NUnit.Framework.Assert.Less(float, float)

Here are the examples of the csharp api class NUnit.Framework.Assert.Less(float, float) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

8 Examples 7

1. Example

Project: amaranth
Source File: Statistics.cs
public static void TestFrequencies(float[] expected, Func<int> func)
        {
            int runs = 100000 * expected.Length;

            int[] counts = new int[expected.Length];

            // accumulate the results
            for (int i = 0; i < runs; i++)
            {
                int result = func();

                if ((result >= 0) && (result < counts.Length))
                {
                    counts[result]++;
                }
            }

            // show the results
            for (int i = 0; i < counts.Length; i++)
            {
                float normal = (float)counts[i] / (float)runs;
                float distance = Math.Abs(expected[i] - normal);
                Console.WriteLine("  " + i.ToString() + " : " + counts[i] + " / " + runs + " = " + normal + " (expected " + expected[i] + ")");
            }

            float epsilon = 0.01f;

            // test the results
            for (int i = 0; i < counts.Length; i++)
            {
                float normal = (float)counts[i] / (float)runs;
                float distance = Math.Abs(expected[i] - normal);
                Assert.Less(distance, epsilon);
            }
        }

2. Example

Project: ContinuousTests
Source File: LessFixture.cs
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

3. Example

Project: ContinuousTests
Source File: LessFixture.cs
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

4. Example

Project: ContinuousTests
Source File: LessFixture.cs
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

5. Example

Project: nunit
Source File: LessFixture.cs
[Test]
        public void Less()
        {
            // Testing all forms after seeing some bugs. CFP
            Assert.Less(i1,i2);
            Assert.Less(i1,i2,"int");
            Assert.Less(i1,i2,"{0}","int");
            Assert.Less(u1,u2,"uint");
            Assert.Less(u1,u2,"{0}","uint");
            Assert.Less(l1,l2,"long");
            Assert.Less(l1,l2,"{0}","long");
            Assert.Less(ul1,ul2,"ulong");
            Assert.Less(ul1,ul2,"{0}","ulong");
            Assert.Less(d1,d2);
            Assert.Less(d1,d2, "double");
            Assert.Less(d1,d2, "{0}", "double");
            Assert.Less(de1,de2);
            Assert.Less(de1,de2, "decimal");
            Assert.Less(de1,de2, "{0}", "decimal");
            Assert.Less(f1,f2);
            Assert.Less(f1,f2, "float");
            Assert.Less(f1,f2, "{0}", "float");
        }

6. Example

Project: AutoTest.Net
Source File: LessFixture.cs
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

7. Example

Project: AutoTest.Net
Source File: LessFixture.cs
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

8. Example

Project: AutoTest.Net
Source File: LessFixture.cs
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}