From d0df3e8b9060ed743ae41fae138ae23395d44bb8 Mon Sep 17 00:00:00 2001 From: Paul Pacheco Date: Wed, 22 Apr 2020 20:51:49 -0500 Subject: [PATCH] test class name matches file name --- .../Tests/Editor/Weaver/WeaverSyncVarTests.cs | 24 +++++++++---------- .../SyncVarsCantBeArray.cs | 2 +- .../SyncVarsDerivedNetworkBehaviour.cs | 2 +- .../SyncVarsDifferentModule.cs | 2 +- .../SyncVarsGenericParam.cs | 2 +- .../WeaverSyncVarTests~/SyncVarsInterface.cs | 2 +- .../WeaverSyncVarTests~/SyncVarsMoreThan63.cs | 2 +- .../WeaverSyncVarTests~/SyncVarsNoHook.cs | 2 +- .../SyncVarsNoHookParams.cs | 2 +- .../WeaverSyncVarTests~/SyncVarsStatic.cs | 2 +- .../WeaverSyncVarTests~/SyncVarsSyncList.cs | 2 +- .../SyncVarsTooManyHookParams.cs | 2 +- .../WeaverSyncVarTests~/SyncVarsValid.cs | 2 +- .../SyncVarsWrongHookType.cs | 2 +- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests.cs index 28667af45..010512f26 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests.cs @@ -15,56 +15,56 @@ public void SyncVarsValid() public void SyncVarsNoHook() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: No hook implementation found for System.Int32 MirrorTest.MirrorTestPlayer::health. Add this method to your class:\npublic void OnChangeHealth(System.Int32 oldValue, System.Int32 newValue) { }")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: No hook implementation found for System.Int32 MirrorTest.SyncVarsNoHook::health. Add this method to your class:\npublic void OnChangeHealth(System.Int32 oldValue, System.Int32 newValue) { }")); } [Test] public void SyncVarsNoHookParams() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Void MirrorTest.MirrorTestPlayer::OnChangeHealth() should have signature:\npublic void OnChangeHealth(System.Int32 oldValue, System.Int32 newValue) { }")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Void MirrorTest.SyncVarsNoHookParams::OnChangeHealth() should have signature:\npublic void OnChangeHealth(System.Int32 oldValue, System.Int32 newValue) { }")); } [Test] public void SyncVarsTooManyHookParams() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Void MirrorTest.MirrorTestPlayer::OnChangeHealth(System.Int32,System.Int32,System.Int32) should have signature:\npublic void OnChangeHealth(System.Int32 oldValue, System.Int32 newValue) { }")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Void MirrorTest.SyncVarsTooManyHookParams::OnChangeHealth(System.Int32,System.Int32,System.Int32) should have signature:\npublic void OnChangeHealth(System.Int32 oldValue, System.Int32 newValue) { }")); } [Test] public void SyncVarsWrongHookType() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Void MirrorTest.MirrorTestPlayer::OnChangeHealth(System.Boolean,System.Boolean) should have signature:\npublic void OnChangeHealth(System.Int32 oldValue, System.Int32 newValue) { }")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Void MirrorTest.SyncVarsWrongHookType::OnChangeHealth(System.Boolean,System.Boolean) should have signature:\npublic void OnChangeHealth(System.Int32 oldValue, System.Int32 newValue) { }")); } [Test] public void SyncVarsDerivedNetworkBehaviour() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: Cannot generate writer for component type MirrorTest.MirrorTestPlayer/MySyncVar. Use a supported type or provide a custom writer")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: Cannot generate writer for component type MirrorTest.SyncVarsDerivedNetworkBehaviour/MySyncVar. Use a supported type or provide a custom writer")); } [Test] public void SyncVarsStatic() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Int32 MirrorTest.MirrorTestPlayer::invalidVar cannot be static")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Int32 MirrorTest.SyncVarsStatic::invalidVar cannot be static")); } [Test] public void SyncVarsGenericParam() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: Cannot generate writer for generic type MirrorTest.MirrorTestPlayer/MySyncVar`1. Use a supported type or provide a custom writer")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: Cannot generate writer for generic type MirrorTest.SyncVarsGenericParam/MySyncVar`1. Use a supported type or provide a custom writer")); } [Test] public void SyncVarsInterface() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: Cannot generate writer for interface MirrorTest.MirrorTestPlayer/MySyncVar. Use a supported type or provide a custom writer")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: Cannot generate writer for interface MirrorTest.SyncVarsInterface/MySyncVar. Use a supported type or provide a custom writer")); } [Test] @@ -78,7 +78,7 @@ public void SyncVarsDifferentModule() public void SyncVarsCantBeArray() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Int32[] MirrorTest.MirrorTestPlayer::thisShouldntWork has invalid type. Use SyncLists instead of arrays")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: System.Int32[] MirrorTest.SyncVarsCantBeArray::thisShouldntWork has invalid type. Use SyncLists instead of arrays")); } [Test] @@ -86,15 +86,15 @@ public void SyncVarsSyncList() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.False); Assert.That(weaverErrors, Is.Empty); - Assert.That(weaverWarnings, Contains.Item("Mirror.Weaver warning: MirrorTest.SyncObjImplementer MirrorTest.MirrorTestPlayer::syncobj has [SyncVar] attribute. SyncLists should not be marked with SyncVar")); - Assert.That(weaverWarnings, Contains.Item("Mirror.Weaver warning: Mirror.SyncListInt MirrorTest.MirrorTestPlayer::syncints has [SyncVar] attribute. SyncLists should not be marked with SyncVar")); + Assert.That(weaverWarnings, Contains.Item("Mirror.Weaver warning: MirrorTest.SyncObjImplementer MirrorTest.SyncVarsSyncList::syncobj has [SyncVar] attribute. SyncLists should not be marked with SyncVar")); + Assert.That(weaverWarnings, Contains.Item("Mirror.Weaver warning: Mirror.SyncListInt MirrorTest.SyncVarsSyncList::syncints has [SyncVar] attribute. SyncLists should not be marked with SyncVar")); } [Test] public void SyncVarsMoreThan63() { Assert.That(CompilationFinishedHook.WeaveFailed, Is.True); - Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: MirrorTest.MirrorTestPlayer has too many SyncVars. Consider refactoring your class into multiple components")); + Assert.That(weaverErrors, Contains.Item("Mirror.Weaver error: MirrorTest.SyncVarsMoreThan63 has too many SyncVars. Consider refactoring your class into multiple components")); } } } diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsCantBeArray.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsCantBeArray.cs index 675401d50..a8799cd2d 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsCantBeArray.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsCantBeArray.cs @@ -4,7 +4,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsCantBeArray : NetworkBehaviour { [SyncVar] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsDerivedNetworkBehaviour.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsDerivedNetworkBehaviour.cs index a96dc501f..fe3f82839 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsDerivedNetworkBehaviour.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsDerivedNetworkBehaviour.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsDerivedNetworkBehaviour : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsDifferentModule.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsDifferentModule.cs index b36e89c2b..052b208d0 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsDifferentModule.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsDifferentModule.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsDifferentModule : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsGenericParam.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsGenericParam.cs index 8ebc51691..a455fc1a2 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsGenericParam.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsGenericParam.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsGenericParam : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsInterface.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsInterface.cs index 24b0721ad..18f2ae85a 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsInterface.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsInterface.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsInterface : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsMoreThan63.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsMoreThan63.cs index fa7fdd0b9..105d3bd78 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsMoreThan63.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsMoreThan63.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsMoreThan63 : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsNoHook.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsNoHook.cs index 702838673..d5afad886 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsNoHook.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsNoHook.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsNoHook : NetworkBehaviour { [SyncVar(hook = "OnChangeHealth")] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsNoHookParams.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsNoHookParams.cs index 026fd77a9..c8bb67ef8 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsNoHookParams.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsNoHookParams.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsNoHookParams : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsStatic.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsStatic.cs index 0e376f355..1753ed278 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsStatic.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsStatic.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsStatic : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsSyncList.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsSyncList.cs index 86569cfea..e4f80865c 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsSyncList.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsSyncList.cs @@ -14,7 +14,7 @@ public void OnDeserializeDelta(NetworkReader reader) {} public void Reset() {} } - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsSyncList : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsTooManyHookParams.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsTooManyHookParams.cs index 430f1a275..a33aa7e2b 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsTooManyHookParams.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsTooManyHookParams.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsTooManyHookParams : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsValid.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsValid.cs index c8dc46fee..512732d41 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsValid.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsValid.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsValid : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health; diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsWrongHookType.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsWrongHookType.cs index 603b20687..62394fdbe 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsWrongHookType.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverSyncVarTests~/SyncVarsWrongHookType.cs @@ -3,7 +3,7 @@ namespace MirrorTest { - class MirrorTestPlayer : NetworkBehaviour + class SyncVarsWrongHookType : NetworkBehaviour { [SyncVar(hook = nameof(OnChangeHealth))] int health;