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

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

27 Examples 7

1. Example

Project: GlmSharp
Source File: lvec2.Test.cs
View license
[Test]
        public void InvariantNorm()
        {
            {
                var v0 = new lvec2(-2L, -5L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(6L, 9L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(-1L, 4L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(-3L, -5L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(-7L, 8L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(2L, -9L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(-7L, 9L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(0, 3L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(-4L, 4L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec2(-1L, -4L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
        }

2. Example

Project: GlmSharp
Source File: dvec4.Test.cs
View license
[Test]
        public void InvariantNorm()
        {
            {
                var v0 = new dvec4(8d, 2d, -6d, 0.0);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(6d, -9.5d, 8.5d, -8d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(9d, 0.0, -9d, -4d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(-1d, 8.5d, -2d, 7.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(9d, -1d, 7.5d, -4.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(-9d, 0.5d, 5d, 5.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(6d, -4.5d, -9d, -9d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(7d, -4d, -6.5d, -7d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(-7d, -8d, -1.5d, 3.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec4(-5d, 2.5d, -4d, 9d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
        }

3. Example

Project: GlmSharp
Source File: lvec3.Test.cs
View license
[Test]
        public void InvariantNorm()
        {
            {
                var v0 = new lvec3(4L, 9L, -3L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(-5L, -5L, -8L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(7L, 4L, -9L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(1, 5L, 8L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(4L, 7L, -8L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(2L, 4L, 2L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(-8L, 4L, -6L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(8L, 2L, 1);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(-6L, -1L, -9L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec3(-2L, -1L, -6L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
        }

4. Example

Project: nuve
Source File: DistanceTest.cs
View license
public void TriangeInequalityTest(string s1, string s2, string s3)
        {
            double distance1 = d.Measure(s1, s2);
            double distance2 = d.Measure(s2, s3);
            double distance3 = d.Measure(s1, s3);
            Assert.LessOrEqual(distance3, distance1 + distance2);
        }

5. Example

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

6. Example

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

7. Example

Project: GlmSharp
Source File: dvec2.Test.cs
View license
[Test]
        public void InvariantNorm()
        {
            {
                var v0 = new dvec2(-4.5d, -1d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(9.5d, -2d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(-3d, 3.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(6.5d, 8d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(-7d, 9.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(-8d, 8d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(2.5d, -9.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(-5d, 3.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(-5.5d, 8.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec2(0.0, -9d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
        }

8. Example

Project: GlmSharp
Source File: dvec3.Test.cs
View license
[Test]
        public void InvariantNorm()
        {
            {
                var v0 = new dvec3(-1d, 9d, 7d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(-5d, 8.5d, -5.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(2d, -1d, 9d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(-4.5d, 9.5d, 6d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(-5d, -7d, -7d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(-9d, 3.5d, -8.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(-4.5d, 4d, 5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(-1.5d, -6.5d, -5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(9.5d, -5.5d, 1.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new dvec3(0.0, -2d, -7.5d);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
        }

9. Example

Project: GlmSharp
Source File: lvec4.Test.cs
View license
[Test]
        public void InvariantNorm()
        {
            {
                var v0 = new lvec4(-9L, -4L, -9L, -4L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(5L, -9L, 6L, -7L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(-8L, -2L, 0, 6L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(-9L, 0, 3L, 7L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(5L, -8L, -3L, 9L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(-8L, 7L, 9L, -3L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(5L, 5L, 1, -6L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(7L, 7L, 6L, -2L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(-8L, 4L, -2L, 2L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
            {
                var v0 = new lvec4(0, -3L, -1L, -3L);
                Assert.LessOrEqual(v0.NormMax, v0.Norm);
            }
        }

10. Example

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

11. Example

Project: Geo
Source File: CircleTests.cs
View license
[Test]
        public void AnEquatorialCircleWith_111000M_RadiusShouldBeAboutTwoDegreesTall()
        {
            var circle = new Circle(0, 20, 111000);
            var bounds = circle.GetBounds();

            var minLatError = Distance(-1, bounds.MinLat);
            Assert.LessOrEqual(minLatError, 0.002);

            var maxLatError = Distance(+1, bounds.MaxLat);
            Assert.LessOrEqual(maxLatError, 0.002);
        }

12. Example

Project: Geo
Source File: CircleTests.cs
View license
[Test]
        public void Bounds_A_111000_RadiusMeterEquatorialCircleShouldBeAboutTwoDegreesWide()
        {
            var circle = new Circle(0, 20, 111000);
            var bounds = circle.GetBounds();

            var minLonError = Distance(19, bounds.MinLon);
            Assert.LessOrEqual(minLonError, 0.002);

            var maxLonError = Distance(21, bounds.MaxLon);
            Assert.LessOrEqual(maxLonError, 0.002);
        }

13. Example

Project: Geo
Source File: CircleTests.cs
View license
[Test]
        public void An_60Degree_CircleWith_111000M_RadiusShouldBeAboutOneDegreeWide()
        {
            var circle = new Circle(60, 20, 111000);
            var bounds = circle.GetBounds();

            var minLonError = Distance(19.5, bounds.MinLon);
            Assert.LessOrEqual(minLonError, 0.002);

            var maxLonError = Distance(20.5, bounds.MaxLon);
            Assert.LessOrEqual(maxLonError, 0.002);
        }

14. Example

Project: Geo
Source File: CircleTests.cs
View license
[Test]
        public void An_60Degree_CircleWith_111000M_RadiusShouldBeAboutTwoDegreesTall()
        {
            var circle = new Circle(60, 20, 111000);
            var bounds = circle.GetBounds();

            var minLatError = Distance(59, bounds.MinLat);
            Assert.LessOrEqual(minLatError, 0.002);

            var maxLatError = Distance(61, bounds.MaxLat);
            Assert.LessOrEqual(maxLatError, 0.002);
        }

15. Example

View license
[Test]
        public void FindMinimum_Rosenbrock_MinimumLesserOrEqualToUpperBoundary()
        {
            var obj = ObjectiveFunction.Gradient(RosenbrockFunction.Value, RosenbrockFunction.Gradient);
            var solver = new BfgsBMinimizer(1e-5, 1e-5, 1e-5, maximumIterations: 1000);

            var lowerBound = new DenseVector(new[] { -2.0, -2.0 });
            var upperBound = new DenseVector(new[] { 0.5, 0.5 });

            var initialGuess = new DenseVector(new[] { -0.9, -0.5 });

            var result = solver.FindMinimum(obj, lowerBound, upperBound, initialGuess);

            Assert.LessOrEqual(result.MinimizingPoint[0],upperBound[0]);
            Assert.LessOrEqual(result.MinimizingPoint[1],upperBound[1]);
        }

16. Example

Project: DReAM
Source File: BlockingQueueTests.cs
View license
[Test]
        public void Dequeue_times_out_as_specified() {
            BlockingQueue<string> q = new BlockingQueue<string>();
            DateTime start = GlobalClock.UtcNow;
            string x;
            Assert.IsFalse(q.TryDequeue(TimeSpan.FromSeconds(1), out x));
            Assert.IsNull(x);
            TimeSpan elapsed = GlobalClock.UtcNow.Subtract(start);
            Assert.GreaterOrEqual(elapsed.TotalSeconds, 0.95);
            Assert.LessOrEqual(elapsed.TotalSeconds, 1.1d);
        }

17. Example

Project: SharpMap
Source File: CreatingData.cs
View license
[NUnit.Framework.Test]
        public void TestEllipse()
        {
            var ell = ShapeFactory.CreateEllipse(Factory, new GeoAPI.Geometries.Coordinate(1, 1), new System.Drawing.SizeF(1, 1), 1);
            NUnit.Framework.Assert.AreEqual(ell.StartPoint, ell.EndPoint);
            NUnit.Framework.Assert.LessOrEqual(System.Math.Abs(4 * System.Math.Sqrt(2) - ell.Length), 0.00001d);


            NUnit.Framework.Assert.AreEqual("LINEARRING (2 1, 1 2, 0 1, 1 0, 2 1)", ell.ToString());
            var ell2 = ShapeFactory.CreateEllipse(Factory, new GeoAPI.Geometries.Coordinate(1, 1), new System.Drawing.SizeF(1, 1));
            System.Console.WriteLine(ell2.ToString());
        }

18. Example

Project: SharpMap
Source File: CreatingData.cs
View license
[NUnit.Framework.Test]
        public void TestEllipse()
        {
            var ell = ShapeFactory.CreateEllipse(Factory, new GeoAPI.Geometries.Coordinate(1, 1), new System.Drawing.SizeF(1, 1), 1);
            NUnit.Framework.Assert.AreEqual(ell.StartPoint, ell.EndPoint);
            NUnit.Framework.Assert.LessOrEqual(System.Math.Abs(4 * System.Math.Sqrt(2) - ell.Length), 0.00001d);


            NUnit.Framework.Assert.AreEqual("LINEARRING (2 1, 1 2, 0 1, 1 0, 2 1)", ell.ToString());
            var ell2 = ShapeFactory.CreateEllipse(Factory, new GeoAPI.Geometries.Coordinate(1, 1), new System.Drawing.SizeF(1, 1));
            System.Console.WriteLine(ell2.ToString());
        }

19. Example

View license
[Test, Category("Timings")]
    public void OrderByDoesntMatchOriginalOrderTimings()
    {
        v/n ..... /n //View Source file for more details /n }

20. Example

Project: FieldWorks
Source File: LiftExportTests.cs
View license
private void VerifyExport(XmlDocument xdoc)
		{
			var repoEntry = m_cache.ServiceLocator.GetInstanc/n ..... /n //View Source file for more details /n }

21. Example

Project: AutoTest.Net
Source File: LessEqualFixture.cs
View license
[Test]
        public void LessOrEqual()
        {
            // Test equality check for all forms
/n ..... /n //View Source file for more details /n }

22. Example

Project: AutoTest.Net
Source File: LessEqualFixture.cs
View license
[Test]
        public void LessOrEqual()
        {
            // Test equality check for all forms
/n ..... /n //View Source file for more details /n }

23. Example

Project: ContinuousTests
Source File: LessEqualFixture.cs
View license
[Test]
        public void LessOrEqual()
        {
            // Test equality check for all forms
/n ..... /n //View Source file for more details /n }

24. Example

Project: AutoTest.Net
Source File: LessEqualFixture.cs
View license
[Test]
        public void LessOrEqual()
        {
            // Test equality check for all forms
/n ..... /n //View Source file for more details /n }

25. Example

Project: nunit
Source File: LessEqualFixture.cs
View license
[Test]
        public void LessOrEqual()
        {
            // Test equality check for all forms
/n ..... /n //View Source file for more details /n }

26. Example

Project: ContinuousTests
Source File: LessEqualFixture.cs
View license
[Test]
        public void LessOrEqual()
        {
            // Test equality check for all forms
/n ..... /n //View Source file for more details /n }

27. Example

Project: ContinuousTests
Source File: LessEqualFixture.cs
View license
[Test]
        public void LessOrEqual()
        {
            // Test equality check for all forms
/n ..... /n //View Source file for more details /n }