NetworkBehaviourTests: SyncVarGameObjectEqualNull

This commit is contained in:
vis2k 2020-03-07 14:29:10 +01:00
parent fa707832a9
commit 949ce8288c

View File

@ -671,6 +671,18 @@ public void GetDelegate()
// clean up
NetworkBehaviour.ClearDelegates();
}
// NOTE: SyncVarGameObjectEqual should be static later
[Test]
public void SyncVarGameObjectEqualNull()
{
// our identity should have a netid for comparing
identity.netId = 42;
// null should return false
bool result = emptyBehaviour.SyncVarGameObjectEqual(null, identity.netId);
Assert.That(result, Is.False);
}
}
// we need to inherit from networkbehaviour to test protected functions