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

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

24 Examples 7

1. Example

View license
public static void ShouldEqualSqlDate(this DateTime actual, DateTime expected)
        {
            TimeSpan timeSpan = actual - expected;
            Assert.Less(Math.Abs(timeSpan.TotalMilliseconds), 3);
        }

2. Example

View license
[Test]
        public void Float64()
        {
            for (int i = 0; i < 10000; i++)
            {
                double value = _rng.Float64();
                Assert.GreaterOrEqual(value, 0);
                Assert.Less(value, 1);
            }
        }

3. Example

View license
private static void AssertEqualDouble (double d1, double d2, double acc)
		{
			Assert.Less (d1 - acc, d2);
			Assert.Greater (d1 + acc, d2);
		}

4. Example

Project: Dominion
Source File: SpecificationExtensions.cs
View license
public static void ShouldEqualSqlDate(this DateTime actual, DateTime expected)
        {
            TimeSpan timeSpan = actual - expected;
            Assert.Less(Math.Abs(timeSpan.TotalMilliseconds), 3);
        }

5. Example

Project: Dominion
Source File: SpecificationExtensions.cs
View license
public static void ShouldEqualSqlDate(this DateTime actual, DateTime expected)
        {
            TimeSpan timeSpan = actual - expected;
            Assert.Less(Math.Abs(timeSpan.TotalMilliseconds), 3);
        }

6. Example

Project: mathnet-numerics
Source File: IntegrationTest.cs
View license
[TestCase(19)]
        [TestCase(20)]
        [TestCase(21)]
        [TestCase(22)]
        public void TestGaussLegendreRuleIntegrate2D(int order)
        {
            double appoximateArea = GaussLegendreRule.Integrate(TargetFunctionB, StartA, StopA, StartB, StopB, order);
            double relativeError = Math.Abs(TargetAreaB - appoximateArea) / TargetAreaB;
            Assert.Less(relativeError, 1e-15);
        }

7. Example

Project: mathnet-numerics
Source File: IntegrationTest.cs
View license
[TestCase(19)]
        [TestCase(20)]
        [TestCase(21)]
        [TestCase(22)]
        public void TestGaussLegendreRuleIntegration(int order)
        {
            double appoximateArea = GaussLegendreRule.Integrate(TargetFunctionA, StartA, StopA, order);
            double relativeError = Math.Abs(TargetAreaA - appoximateArea) / TargetAreaA;
            Assert.Less(relativeError, 5e-16);
        }

8. Example

Project: GlmSharp
Source File: lvec3.Test.cs
View license
[Test]
        public void InvariantCrossDot()
        {
            {
                var v0 = new /n ..... /n //View Source file for more details /n }

9. Example

Project: GlmSharp
Source File: dvec3.Test.cs
View license
[Test]
        public void InvariantCrossDot()
        {
            {
                var v0 = new /n ..... /n //View Source file for more details /n }

10. Example

Project: GlmSharp
Source File: vec3.Test.cs
View license
[Test]
        public void InvariantCrossDot()
        {
            {
                var v0 = new /n ..... /n //View Source file for more details /n }

11. Example

Project: GlmSharp
Source File: hvec3.Test.cs
View license
[Test]
        public void InvariantCrossDot()
        {
            {
                var v0 = new /n ..... /n //View Source file for more details /n }

12. Example

Project: GlmSharp
Source File: ivec3.Test.cs
View license
[Test]
        public void InvariantCrossDot()
        {
            {
                var v0 = new /n ..... /n //View Source file for more details /n }

13. Example

Project: GlmSharp
Source File: uvec3.Test.cs
View license
[Test]
        public void InvariantCrossDot()
        {
            {
                var v0 = new /n ..... /n //View Source file for more details /n }

14. Example

Project: discutils
Source File: LZNT1Test.cs
View license
[Test]
        public void Compress()
        {
            object instance = typeof(NtfsFileSystem).Assembly.CreateInstance("DiscUtils.Ntfs.LZNT1");
            BlockCompressor compressor = (BlockCompressor)instance;

            int compressedLength = 16 * 4096;
            byte[] compressedData = new byte[compressedLength];

            // Double-check, make sure native code round-trips
            byte[] nativeCompressed = NativeCompress(_uncompressedData, 0, _uncompressedData.Length, 4096);
            Assert.AreEqual(_uncompressedData, NativeDecompress(nativeCompressed, 0, nativeCompressed.Length));

            compressor.BlockSize = 4096;
            CompressionResult r = compressor.Compress(_uncompressedData, 0, _uncompressedData.Length, compressedData, 0, ref compressedLength);
            Assert.AreEqual(CompressionResult.Compressed, r);
            Assert.AreEqual(_uncompressedData, NativeDecompress(compressedData, 0, compressedLength));

            Assert.Less(compressedLength, _uncompressedData.Length * 0.66);
        }

15. Example

Project: mathnet-numerics
Source File: IntegrationTest.cs
View license
[TestCase(19)]
        [TestCase(20)]
        [TestCase(21)]
        [TestCase(22)]
        public void TestGaussLegendreRuleGetAbscissaGetWeightOrderViaIntegration(int order)
        {
            GaussLegendreRule gaussLegendre = new GaussLegendreRule(StartA, StopA, order);

            double appoximateArea = 0;
            for (int i = 0; i < gaussLegendre.Order; i++)
            {
                appoximateArea += gaussLegendre.GetWeight(i) * TargetFunctionA(gaussLegendre.GetAbscissa(i));
            }

            double relativeError = Math.Abs(TargetAreaA - appoximateArea) / TargetAreaA;
            Assert.Less(relativeError, 5e-16);
        }

16. Example

Project: distribox
Source File: PeerListTest.cs
View license
[Test]
        public void TestOperation()
        {
            string fileName = "peerList.test.tm/n ..... /n //View Source file for more details /n }

17. Example

Project: DReAM
Source File: BlockingQueueTests.cs
View license
[Test]
        public void Many_consumers_with_timeouts() {
            BlockingQueue<string> /n ..... /n //View Source file for more details /n }

18. Example

Project: nunit
Source File: LessFixture.cs
View license
[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");
        }

19. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[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");
		}

20. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[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");
		}

21. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[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");
		}

22. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[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");
		}

23. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[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");
		}

24. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[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");
		}