-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: weaver test for abstract methods (#2166)
* weaver test for abstract methods * doing nothing is method is abstract * not calling base if it is abstract * adding tests for message to make sure they work
- Loading branch information
1 parent
7294c42
commit 3a276b4
Showing
5 changed files
with
111 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Assets/Mirror/Tests/Editor/Weaver/WeaverMessageTests~/AbstractMessageMethods.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Mirror; | ||
|
||
namespace WeaverMessageTests.AbstractMessageMethods | ||
{ | ||
abstract class AbstractMessage : IMessageBase | ||
{ | ||
public abstract void Deserialize(NetworkReader reader); | ||
public abstract void Serialize(NetworkWriter writer); | ||
} | ||
|
||
class OverrideMessage : AbstractMessage | ||
{ | ||
public int someValue; | ||
|
||
// Mirror will fill out these empty methods | ||
|
||
public override void Serialize(NetworkWriter writer) { } | ||
public override void Deserialize(NetworkReader reader) { } | ||
} | ||
} |