Clean up test scripts (#1942)

* fixing white space
* sorting using statements
This commit is contained in:
James Frowen 2020-05-29 23:55:12 +01:00 committed by GitHub
parent 3f9f3c8298
commit 7205d3a705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
117 changed files with 114 additions and 272 deletions

View File

@ -232,6 +232,9 @@
<Reference Include="UnityEditor">
<HintPath>G:\UnityEditors\2018.3.6f1\Editor\Data\Managed/UnityEditor.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>G:\UnityEditors\2018.3.6f1\Editor\Data\Managed\UnityEngine\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../../../../../Mirror.csproj">

View File

@ -1,5 +1,4 @@
using Mirror;
using Mirror.Weaver.Tests.Extra;
namespace GeneratedReaderWriter.CreatesForClass
{

View File

@ -1,5 +1,4 @@
using Mirror;
using Mirror.Weaver.Tests.Extra;
namespace GeneratedReaderWriter.CreatesForClassWithValidConstructor
{
@ -19,6 +18,6 @@ public class SomeOtherData
public SomeOtherData()
{
// empty
}
}
}
}

View File

@ -1,5 +1,4 @@
using Mirror;
using Mirror.Weaver.Tests.Extra;
using UnityEngine;
namespace GeneratedReaderWriter.CreatesForInheritedFromScriptableObject
@ -13,7 +12,7 @@ public void RpcDoSomething(DataScriptableObject data)
}
}
public class DataScriptableObject :ScriptableObject
public class DataScriptableObject : ScriptableObject
{
public int usefulNumber;
}

View File

@ -1,5 +1,4 @@
using Mirror;
using Mirror.Weaver.Tests.Extra;
namespace GeneratedReaderWriter.CreatesForStructs
{

View File

@ -1,5 +1,4 @@
using Mirror;
using Mirror.Weaver.Tests.Extra;
namespace GeneratedReaderWriter.ExcludesNonSerializedFields
{

View File

@ -1,5 +1,4 @@
using Mirror;
using Mirror.Weaver.Tests.Extra;
namespace GeneratedReaderWriter.GivesErrorForClassWithNoValidConstructor
{
@ -19,6 +18,6 @@ public class SomeOtherData
public SomeOtherData(int usefulNumber)
{
this.usefulNumber = usefulNumber;
}
}
}
}

View File

@ -1,5 +1,4 @@
using Mirror;
using UnityEngine;
namespace GeneratedReaderWriter.GivesErrorWhenUsingInterface
{

View File

@ -12,7 +12,7 @@ public void RpcDoSomething(MyBehaviour behaviour)
}
}
public class MyBehaviour : MonoBehaviour
public class MyBehaviour : MonoBehaviour
{
public int usefulNumber;
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverClientRpcTests.ClientRpcCantBeStatic
@ -8,6 +5,6 @@ namespace WeaverClientRpcTests.ClientRpcCantBeStatic
class ClientRpcCantBeStatic : NetworkBehaviour
{
[ClientRpc]
static void RpcCantBeStatic() {}
static void RpcCantBeStatic() { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverClientRpcTests.ClientRpcStartsWithRpc
@ -8,6 +5,6 @@ namespace WeaverClientRpcTests.ClientRpcStartsWithRpc
class ClientRpcStartsWithRpc : NetworkBehaviour
{
[ClientRpc]
void DoesntStartWithRpc() {}
void DoesntStartWithRpc() { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverClientRpcTests.ClientRpcValid
@ -8,6 +5,6 @@ namespace WeaverClientRpcTests.ClientRpcValid
class ClientRpcValid : NetworkBehaviour
{
[ClientRpc]
void RpcThatIsTotallyValid() {}
void RpcThatIsTotallyValid() { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverClientServerAttributeTests.NetworkBehaviourClient
@ -8,7 +5,7 @@ namespace WeaverClientServerAttributeTests.NetworkBehaviourClient
class NetworkBehaviourClient : NetworkBehaviour
{
[Client]
void ClientOnlyMethod()
void ClientOnlyMethod()
{
// test method
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverClientServerAttributeTests.NetworkBehaviourServer
@ -8,7 +5,7 @@ namespace WeaverClientServerAttributeTests.NetworkBehaviourServer
class NetworkBehaviourServer : NetworkBehaviour
{
[Server]
void ServerOnlyMethod()
void ServerOnlyMethod()
{
// test method
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverCommandTests.CommandCantBeStatic
@ -8,6 +5,6 @@ namespace WeaverCommandTests.CommandCantBeStatic
class CommandCantBeStatic : NetworkBehaviour
{
[Command]
static void CmdCantBeStatic() {}
static void CmdCantBeStatic() { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverCommandTests.CommandStartsWithCmd
@ -8,6 +5,6 @@ namespace WeaverCommandTests.CommandStartsWithCmd
class CommandStartsWithCmd : NetworkBehaviour
{
[Command]
void DoesntStartWithCmd() {}
void DoesntStartWithCmd() { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverGeneralTests.RecursionCount

View File

@ -28,8 +28,8 @@ public class TestingScriptableObjectArraySerialization : NetworkBehaviour
{
[Command]
public void
// This gonna give error saying-- Mirror.Weaver error:
// Cannot generate writer for scriptable object Data[]. Use a supported type or provide a custom writer
// This gonna give error saying-- Mirror.Weaver error:
// Cannot generate writer for scriptable object Data[]. Use a supported type or provide a custom writer
CmdwriteArraydata(
Data[] arg)
{

View File

@ -1,11 +1,10 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMessageTests.MessageMemberGeneric
{
class HasGeneric<T> {}
class HasGeneric<T> { }
class MessageMemberGeneric : MessageBase
{

View File

@ -1,11 +1,10 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMessageTests.MessageMemberInterface
{
interface SuperCoolInterface {}
interface SuperCoolInterface { }
class MessageMemberInterface : MessageBase
{

View File

@ -1,7 +1,6 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMessageTests.MessageSelfReferencing
{

View File

@ -1,7 +1,6 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMessageTests.MessageValid
{

View File

@ -1,13 +1,11 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourClient
{
class MonoBehaviourClient : MonoBehaviour
{
[Client]
void ThisCantBeOutsideNetworkBehaviour() {}
void ThisCantBeOutsideNetworkBehaviour() { }
}
}

View File

@ -1,13 +1,11 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourClientCallback
{
class MonoBehaviourClientCallback : MonoBehaviour
{
[ClientCallback]
void ThisCantBeOutsideNetworkBehaviour() {}
void ThisCantBeOutsideNetworkBehaviour() { }
}
}

View File

@ -1,13 +1,11 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourClientRpc
{
class MonoBehaviourClientRpc : MonoBehaviour
{
[ClientRpc]
void RpcThisCantBeOutsideNetworkBehaviour() {}
void RpcThisCantBeOutsideNetworkBehaviour() { }
}
}

View File

@ -1,13 +1,11 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourCommand
{
class MonoBehaviourCommand : MonoBehaviour
{
[Command]
void CmdThisCantBeOutsideNetworkBehaviour() {}
void CmdThisCantBeOutsideNetworkBehaviour() { }
}
}

View File

@ -1,13 +1,11 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourServer
{
class MonoBehaviourServer : MonoBehaviour
{
[Server]
void ThisCantBeOutsideNetworkBehaviour() {}
void ThisCantBeOutsideNetworkBehaviour() { }
}
}

View File

@ -1,13 +1,11 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourServerCallback
{
class MonoBehaviourServerCallback : MonoBehaviour
{
[ServerCallback]
void ThisCantBeOutsideNetworkBehaviour() {}
void ThisCantBeOutsideNetworkBehaviour() { }
}
}

View File

@ -1,7 +1,5 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourSyncList
{

View File

@ -1,7 +1,5 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourSyncVar
{

View File

@ -1,13 +1,11 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverMonoBehaviourTests.MonoBehaviourTargetRpc
{
class MonoBehaviourTargetRpc : MonoBehaviour
{
[TargetRpc]
void TargetThisCantBeOutsideNetworkBehaviour(NetworkConnection nc) {}
void TargetThisCantBeOutsideNetworkBehaviour(NetworkConnection nc) { }
}
}

View File

@ -1,7 +1,4 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverMonoBehaviourTests.MonoBehaviourValid
{

View File

@ -1,9 +1,8 @@
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourAbstractBaseValid
{
public abstract class EntityBase : NetworkBehaviour {}
public abstract class EntityBase : NetworkBehaviour { }
public class EntityConcrete : EntityBase
{

View File

@ -1,6 +1,4 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcCoroutine

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcDuplicateName
@ -8,9 +5,9 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcDuplicateName
class NetworkBehaviourClientRpcDuplicateName : NetworkBehaviour
{
[ClientRpc]
public void RpcCantHaveSameName(int abc) {}
public void RpcCantHaveSameName(int abc) { }
[ClientRpc]
public void RpcCantHaveSameName(int abc, int def) {}
public void RpcCantHaveSameName(int abc, int def) { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcGenericParam
@ -8,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcGenericParam
class NetworkBehaviourClientRpcGenericParam : NetworkBehaviour
{
[ClientRpc]
public void RpcCantHaveGeneric<T>() {}
public void RpcCantHaveGeneric<T>() { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcParamAbstract
@ -12,6 +10,6 @@ public abstract class AbstractClass
}
[ClientRpc]
public void RpcCantHaveParamAbstract(AbstractClass monkeys) {}
public void RpcCantHaveParamAbstract(AbstractClass monkeys) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcParamComponent
@ -12,6 +10,6 @@ public class ComponentClass : UnityEngine.Component
}
[ClientRpc]
public void RpcCantHaveParamComponent(ComponentClass monkeyComp) {}
public void RpcCantHaveParamComponent(ComponentClass monkeyComp) { }
}
}

View File

@ -5,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcParamNetworkConne
class NetworkBehaviourClientRpcParamNetworkConnection : NetworkBehaviour
{
[ClientRpc]
public void RpcCantHaveParamOptional(NetworkConnection monkeyCon) {}
public void RpcCantHaveParamOptional(NetworkConnection monkeyCon) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcParamOptional
@ -7,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcParamOptional
class NetworkBehaviourClientRpcParamOptional : NetworkBehaviour
{
[ClientRpc]
public void RpcCantHaveParamOptional(int monkeys = 12) {}
public void RpcCantHaveParamOptional(int monkeys = 12) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcParamOut

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcParamRef
@ -7,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcParamRef
class NetworkBehaviourClientRpcParamRef : NetworkBehaviour
{
[ClientRpc]
public void RpcCantHaveParamRef(ref int monkeys) {}
public void RpcCantHaveParamRef(ref int monkeys) { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourClientRpcVoidReturn

View File

@ -1,6 +1,4 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdCoroutine

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdDuplicateName
@ -8,9 +5,9 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdDuplicateName
class NetworkBehaviourCmdDuplicateName : NetworkBehaviour
{
[Command]
public void CmdCantHaveSameName(int abc) {}
public void CmdCantHaveSameName(int abc) { }
[Command]
public void CmdCantHaveSameName(int abc, int def) {}
public void CmdCantHaveSameName(int abc, int def) { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdGenericParam
@ -8,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdGenericParam
class NetworkBehaviourCmdGenericParam : NetworkBehaviour
{
[Command]
public void CmdCantHaveGeneric<T>() {}
public void CmdCantHaveGeneric<T>() { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdParamAbstract
@ -12,6 +10,6 @@ public abstract class AbstractClass
}
[Command]
public void CmdCantHaveParamAbstract(AbstractClass monkeys) {}
public void CmdCantHaveParamAbstract(AbstractClass monkeys) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdParamComponent
@ -12,6 +10,6 @@ public class ComponentClass : UnityEngine.Component
}
[Command]
public void CmdCantHaveParamComponent(ComponentClass monkeyComp) {}
public void CmdCantHaveParamComponent(ComponentClass monkeyComp) { }
}
}

View File

@ -5,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdParamNetworkConnection
class NetworkBehaviourCmdParamNetworkConnection : NetworkBehaviour
{
[Command]
public void CmdCantHaveParamOptional(NetworkConnection monkeyCon) {}
public void CmdCantHaveParamOptional(NetworkConnection monkeyCon) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdParamOptional
@ -7,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdParamOptional
class NetworkBehaviourCmdParamOptional : NetworkBehaviour
{
[Command]
public void CmdCantHaveParamOptional(int monkeys = 12) {}
public void CmdCantHaveParamOptional(int monkeys = 12) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdParamOut

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdParamRef
@ -7,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdParamRef
class NetworkBehaviourCmdParamRef : NetworkBehaviour
{
[Command]
public void CmdCantHaveParamRef(ref int monkeys) {}
public void CmdCantHaveParamRef(ref int monkeys) { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourCmdVoidReturn

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourGeneric

View File

@ -1,6 +1,4 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcCoroutine

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcDuplicateName
@ -8,9 +5,9 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcDuplicateName
class NetworkBehaviourTargetRpcDuplicateName : NetworkBehaviour
{
[TargetRpc]
public void TargetRpcCantHaveSameName(NetworkConnection monkeyCon, int abc) {}
public void TargetRpcCantHaveSameName(NetworkConnection monkeyCon, int abc) { }
[TargetRpc]
public void TargetRpcCantHaveSameName(NetworkConnection monkeyCon, int abc, int def) {}
public void TargetRpcCantHaveSameName(NetworkConnection monkeyCon, int abc, int def) { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcGenericParam
@ -8,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcGenericParam
class NetworkBehaviourTargetRpcGenericParam : NetworkBehaviour
{
[TargetRpc]
public void TargetRpcCantHaveGeneric<T>() {}
public void TargetRpcCantHaveGeneric<T>() { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamAbstract
@ -12,6 +10,6 @@ public abstract class AbstractClass
}
[TargetRpc]
public void TargetRpcCantHaveParamAbstract(NetworkConnection monkeyCon, AbstractClass monkeys) {}
public void TargetRpcCantHaveParamAbstract(NetworkConnection monkeyCon, AbstractClass monkeys) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamComponent
@ -12,6 +10,6 @@ public class ComponentClass : UnityEngine.Component
}
[TargetRpc]
public void TargetRpcCantHaveParamComponent(NetworkConnection monkeyCon, ComponentClass monkeyComp) {}
public void TargetRpcCantHaveParamComponent(NetworkConnection monkeyCon, ComponentClass monkeyComp) { }
}
}

View File

@ -5,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamNetworkConne
class NetworkBehaviourTargetRpcParamNetworkConnection : NetworkBehaviour
{
[TargetRpc]
public void TargetRpcCantHaveParamOptional(NetworkConnection monkeyCon) {}
public void TargetRpcCantHaveParamOptional(NetworkConnection monkeyCon) { }
}
}

View File

@ -5,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamNetworkConne
class NetworkBehaviourTargetRpcParamNetworkConnectionNotFirst : NetworkBehaviour
{
[TargetRpc]
public void TargetRpcCantHaveParamOptional(int abc, NetworkConnection monkeyCon) {}
public void TargetRpcCantHaveParamOptional(int abc, NetworkConnection monkeyCon) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamOptional
@ -7,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamOptional
class NetworkBehaviourTargetRpcParamOptional : NetworkBehaviour
{
[TargetRpc]
public void TargetRpcCantHaveParamOptional(NetworkConnection monkeyCon, int monkeys = 12) {}
public void TargetRpcCantHaveParamOptional(NetworkConnection monkeyCon, int monkeys = 12) { }
}
}

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamOut

View File

@ -1,5 +1,3 @@
using System;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamRef
@ -7,6 +5,6 @@ namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcParamRef
class NetworkBehaviourTargetRpcParamRef : NetworkBehaviour
{
[TargetRpc]
public void TargetRpcCantHaveParamRef(NetworkConnection monkeyCon, ref int monkeys) {}
public void TargetRpcCantHaveParamRef(NetworkConnection monkeyCon, ref int monkeys) { }
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections;
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourTargetRpcVoidReturn

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverNetworkBehaviourTests.NetworkBehaviourValid

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionary
@ -6,9 +5,9 @@ namespace WeaverSyncDictionaryTests.SyncDictionary
class SyncDictionaryValid : NetworkBehaviour
{
public class SyncDictionaryIntString : SyncDictionary<int, string> { }
public SyncDictionaryIntString Foo;
}
}

View File

@ -4,14 +4,14 @@ namespace WeaverSyncDictionaryTests.SyncDictionaryErrorForGenericStructItem
{
class SyncDictionaryErrorForGenericStructItem : NetworkBehaviour
{
struct MyGenericStruct<T>
struct MyGenericStruct<T>
{
T genericpotato;
}
class MyGenericStructDictionary : SyncDictionary<int, MyGenericStruct<float>> { };
MyGenericStructDictionary harpseals;
}
}

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryInheritance

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryStructItem

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryStructItemWithCustomDeserializeOnly

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryStructItemWithCustomMethods

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryStructItemWithCustomSerializeOnly

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryStructKey

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryStructKeyWithCustomDeserializeOnly

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryStructKeyWithCustomMethods

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncDictionaryTests.SyncDictionaryStructKeyWithCustomSerializeOnly

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncList

View File

@ -1,11 +1,10 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListByteValid
{
class SyncListByteValid : NetworkBehaviour
{
class MyByteClass : SyncList<byte> {};
class MyByteClass : SyncList<byte> { };
MyByteClass Foo;
}

View File

@ -5,7 +5,7 @@ namespace WeaverSyncListTests.SyncListErrorForGenericStruct
class SyncListErrorForGenericStruct : NetworkBehaviour
{
MyGenericStructList harpseals;
struct MyGenericStruct<T>
{

View File

@ -5,7 +5,7 @@ namespace WeaverSyncListTests.SyncListErrorForGenericStructWithCustomDeserialize
class SyncListErrorForGenericStructWithCustomDeserializeOnly : NetworkBehaviour
{
MyGenericStructList harpseals;
struct MyGenericStruct<T>
{

View File

@ -5,7 +5,7 @@ namespace WeaverSyncListTests.SyncListErrorForGenericStructWithCustomSerializeOn
class SyncListErrorForGenericStructWithCustomSerializeOnly : NetworkBehaviour
{
MyGenericStructList harpseals;
struct MyGenericStruct<T>
{

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListErrorForInterface

View File

@ -5,7 +5,7 @@ namespace WeaverSyncListTests.SyncListErrorWhenUsingGenericListInNetworkBehaviou
class SyncListErrorWhenUsingGenericListInNetworkBehaviour : NetworkBehaviour
{
readonly SomeList<int> someList;
public class SomeList<T> : SyncList<T> { }
}

View File

@ -5,7 +5,7 @@ namespace WeaverSyncListTests.SyncListGenericAbstractInheritance
class SyncListGenericAbstractInheritance : NetworkBehaviour
{
readonly SomeListInt superSyncListString = new SomeListInt();
public abstract class SomeList<T> : SyncList<T> { }

View File

@ -5,7 +5,7 @@ namespace WeaverSyncListTests.SyncListGenericInheritance
class SyncListGenericInheritance : NetworkBehaviour
{
readonly SomeListInt someList = new SomeListInt();
public class SomeList<T> : SyncList<T> { }

View File

@ -11,7 +11,7 @@ This test will fail
class SyncListGenericInheritanceWithMultipleGeneric : NetworkBehaviour
{
readonly SomeListInt someList = new SomeListInt();
public class SomeList<G, T> : SyncList<T> { }

View File

@ -5,7 +5,7 @@ namespace WeaverSyncListTests.SyncListGenericStructWithCustomMethods
class SyncListGenericStructWithCustomMethods : NetworkBehaviour
{
MyGenericStructList harpseals;
struct MyGenericStruct<T>
{

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListInheritance
@ -6,8 +5,8 @@ namespace WeaverSyncListTests.SyncListInheritance
class SyncListInheritance : NetworkBehaviour
{
readonly SuperSyncListString superSyncListString = new SuperSyncListString();
public class SuperSyncListString : SyncListString
{

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListInterfaceWithCustomMethods
@ -7,17 +6,17 @@ class SyncListInterfaceWithCustomMethods : NetworkBehaviour
{
MyInterfaceList Foo;
}
interface IMyInterface
{
int someNumber { get; set; }
}
class MyUser : IMyInterface
{
public int someNumber { get; set; }
}
class MyInterfaceList : SyncList<IMyInterface>
{
protected override void SerializeItem(NetworkWriter writer, IMyInterface item)

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListMissingParamlessCtor
@ -6,12 +5,12 @@ namespace WeaverSyncListTests.SyncListMissingParamlessCtor
class SyncListMissingParamlessCtor : NetworkBehaviour
{
public SyncListString2 Foo;
public class SyncListString2 : SyncList<string>
{
public SyncListString2(int phooey) {}
protected override void SerializeItem(NetworkWriter w, string item) {}
public SyncListString2(int phooey) { }
protected override void SerializeItem(NetworkWriter w, string item) { }
protected override string DeserializeItem(NetworkReader r) => "";
}
}

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListMissingParamlessCtorManuallyInitialized
@ -6,12 +5,12 @@ namespace WeaverSyncListTests.SyncListMissingParamlessCtorManuallyInitialized
class SyncListMissingParamlessCtorManuallyInitialized : NetworkBehaviour
{
public SyncListString2 Foo = new SyncListString2(20);
public class SyncListString2 : SyncList<string>
{
public SyncListString2(int phooey) {}
protected override void SerializeItem(NetworkWriter w, string item) {}
public SyncListString2(int phooey) { }
protected override void SerializeItem(NetworkWriter w, string item) { }
protected override string DeserializeItem(NetworkReader r) => "";
}
}

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListNestedInAbstractClass
@ -6,7 +5,7 @@ namespace WeaverSyncListTests.SyncListNestedInAbstractClass
class SyncListNestedStruct : NetworkBehaviour
{
SomeAbstractClass.MyNestedStructList Foo;
public abstract class SomeAbstractClass
{

View File

@ -1,12 +1,12 @@
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverSyncListTests.SyncListNestedInAbstractClassWithInvalid
{
class SyncListNestedStructWithInvalid : NetworkBehaviour
{
SomeAbstractClass.MyNestedStructList Foo;
public abstract class SomeAbstractClass
{

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListNestedInStruct
@ -6,9 +5,9 @@ namespace WeaverSyncListTests.SyncListNestedInStruct
class SyncListNestedStruct : NetworkBehaviour
{
SomeData.SyncList Foo;
public struct SomeData
public struct SomeData
{
public int usefulNumber;

View File

@ -1,14 +1,14 @@
using UnityEngine;
using Mirror;
using UnityEngine;
namespace WeaverSyncListTests.SyncListNestedInStructWithInvalid
{
class SyncListNestedInStructWithInvalid : NetworkBehaviour
{
SomeData.SyncList Foo;
public struct SomeData
public struct SomeData
{
public int usefulNumber;
public Object target;

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListNestedStruct
@ -6,7 +5,7 @@ namespace WeaverSyncListTests.SyncListNestedStruct
class SyncListNestedStruct : NetworkBehaviour
{
MyNestedStructList Foo;
struct MyNestedStruct
{
int potato;

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListStruct
@ -6,7 +5,7 @@ namespace WeaverSyncListTests.SyncListStruct
class SyncListStruct : NetworkBehaviour
{
MyStructList Foo;
struct MyStruct
{
int potato;

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListStructWithCustomDeserializeOnly
@ -6,14 +5,14 @@ namespace WeaverSyncListTests.SyncListStructWithCustomDeserializeOnly
class SyncListStructWithCustomDeserializeOnly : NetworkBehaviour
{
MyStructList Foo;
struct MyStruct
{
int potato;
float floatingpotato;
double givemetwopotatoes;
}
class MyStructList : SyncList<MyStruct>
class MyStructList : SyncList<MyStruct>
{
protected override MyStruct DeserializeItem(NetworkReader reader)
{

View File

@ -1,4 +1,3 @@
using UnityEngine;
using Mirror;
namespace WeaverSyncListTests.SyncListStructWithCustomMethods
@ -6,15 +5,15 @@ namespace WeaverSyncListTests.SyncListStructWithCustomMethods
class SyncListStructWithCustomMethods : NetworkBehaviour
{
MyStructList Foo;
struct MyStruct
{
int potato;
float floatingpotato;
double givemetwopotatoes;
}
class MyStructList : SyncList<MyStruct>
{
class MyStructList : SyncList<MyStruct>
{
protected override void SerializeItem(NetworkWriter writer, MyStruct item)
{
// write some stuff here

Some files were not shown because too many files have changed in this diff Show More