コード例 #1
0
		public void Equals ()
		{
			TestRuntime.AssertXcodeVersion (7, 0);
			Assert.True (UIFloatRange.Zero.Equals (UIFloatRange.Zero), "Zero-Zero");
			var one = new UIFloatRange (1f, 1f);
			Assert.False (one.Equals (UIFloatRange.Zero), "one-Zero");
			Assert.False (UIFloatRange.Zero.Equals ((object) one), "Zero-one");
			Assert.True (one.Equals (one), "one-one");

			Assert.False (UIFloatRange.Infinite.Equals (UIFloatRange.Infinite), "Infinite-Infinite");
			Assert.False (UIFloatRange.Infinite.Equals (UIFloatRange.Zero), "Infinite-Zero");
			Assert.False (UIFloatRange.Zero.Equals (UIFloatRange.Infinite), "Zero-Infinite");
		}
コード例 #2
0
        public void Equals()
        {
            if (!UIDevice.CurrentDevice.CheckSystemVersion(9, 0))
            {
                Assert.Ignore("Requires iOS 9+");
            }
            Assert.True(UIFloatRange.Zero.Equals(UIFloatRange.Zero), "Zero-Zero");
            var one = new UIFloatRange(1f, 1f);

            Assert.False(one.Equals(UIFloatRange.Zero), "one-Zero");
            Assert.False(UIFloatRange.Zero.Equals((object)one), "Zero-one");
            Assert.True(one.Equals(one), "one-one");

            Assert.False(UIFloatRange.Infinite.Equals(UIFloatRange.Infinite), "Infinite-Infinite");
            Assert.False(UIFloatRange.Infinite.Equals(UIFloatRange.Zero), "Infinite-Zero");
            Assert.False(UIFloatRange.Zero.Equals(UIFloatRange.Infinite), "Zero-Infinite");
        }