1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-10 00:05:42 +00:00

test: suppress ReSharper.Unity.InefficientPropertyAccess

This is false positive being thrown by the analyzer. The values are - in fact - changing before being read each time.
This commit is contained in:
Oliver Booth 2023-04-07 01:34:08 +01:00
parent 420ec2433a
commit dc6d984fa8
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025

View File

@ -2,6 +2,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Diagnostics.CodeAnalysis;
using NUnit.Framework; using NUnit.Framework;
using UnityEngine; using UnityEngine;
using UnityEngine.TestTools; using UnityEngine.TestTools;
@ -122,6 +123,7 @@ namespace X10D.Unity.Tests
} }
[UnityTest] [UnityTest]
[SuppressMessage("ReSharper", "Unity.InefficientPropertyAccess", Justification = "False positive.")]
public IEnumerator LookAt_ShouldRotateSameAsTransform() public IEnumerator LookAt_ShouldRotateSameAsTransform()
{ {
var first = new GameObject {transform = {position = Vector3.zero, rotation = Quaternion.identity}}; var first = new GameObject {transform = {position = Vector3.zero, rotation = Quaternion.identity}};
@ -281,6 +283,7 @@ namespace X10D.Unity.Tests
} }
[UnityTest] [UnityTest]
[SuppressMessage("ReSharper", "Unity.InefficientPropertyAccess", Justification = "False positive.")]
public IEnumerator SetParent_ShouldSetParent() public IEnumerator SetParent_ShouldSetParent()
{ {
var first = new GameObject {transform = {position = Vector3.zero, rotation = Quaternion.identity}}; var first = new GameObject {transform = {position = Vector3.zero, rotation = Quaternion.identity}};