From 7c1e566113d59699af1624186c64eca67f063fc6 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Apr 2020 19:09:33 -0400 Subject: Upgraded Unity --- .../Documentation~/reference-comparer-equals.md | 27 ---------------------- 1 file changed, 27 deletions(-) delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-comparer-equals.md (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-comparer-equals.md') diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-comparer-equals.md b/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-comparer-equals.md deleted file mode 100644 index 8ef8d85..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-comparer-equals.md +++ /dev/null @@ -1,27 +0,0 @@ -# Custom equality comparers with equals operator - -If you need to compare Vectors using the overloaded operator == (see [Vector2.operator ==](https://docs.unity3d.com/ScriptReference/Vector2-operator_eq.html), [Vector3.operator ==](https://docs.unity3d.com/ScriptReference/Vector3-operator_eq.html), and [Vector4.operator ==](https://docs.unity3d.com/ScriptReference/Vector4-operator_eq.html)) you should use the respective comparer implementations: - -- Vector2ComparerWithEqualsOperator -- Vector3ComparerWithEqualsOperator -- Vector4ComparerWithEqualsOperator - -The interface is the same as for other [equality comparers](./reference-custom-equality-comparers.md) except the public [constructor](./reference-custom-equality-comparers.md#constructors) `error` parameter is inapplicable in this case. - -## Example - -```c# -[TestFixture] -public class Vector3Test -{ - [Test] - public void VerifyThat_TwoVector3ObjectsAreEqual() - { - var actual = new Vector3(10e-7f, 10e-7f, 10e-7f); - var expected = new Vector3(0f, 0f, 0f); - - Assert.That(actual, Is.EqualTo(expected).Using(Vector3ComparerWithEqualsOperator.Instance)); - } -} -``` - -- cgit v1.2.3