revert: "Weaver: added missing HashSet<T> reader/writer generation after recent PR" - tests are still failing

This commit is contained in:
vis2k 2022-12-10 22:37:28 +01:00
parent 51eeb8a22d
commit 8c5152dc65
3 changed files with 8 additions and 2 deletions

View File

@ -257,6 +257,8 @@ public static List<T> ReadList<T>(this NetworkReader reader)
// structs may have .Set<T> members which weaver needs to be able to // structs may have .Set<T> members which weaver needs to be able to
// fully serialize for NetworkMessages etc. // fully serialize for NetworkMessages etc.
// note that Weaver/Readers/GenerateReader() handles this manually. // note that Weaver/Readers/GenerateReader() handles this manually.
// TODO writer not found. need to adjust weaver first. see tests.
/*
public static HashSet<T> ReadHashSet<T>(this NetworkReader reader) public static HashSet<T> ReadHashSet<T>(this NetworkReader reader)
{ {
int length = reader.ReadInt(); int length = reader.ReadInt();
@ -269,6 +271,7 @@ public static HashSet<T> ReadHashSet<T>(this NetworkReader reader)
} }
return result; return result;
} }
*/
public static T[] ReadArray<T>(this NetworkReader reader) public static T[] ReadArray<T>(this NetworkReader reader)
{ {

View File

@ -289,6 +289,8 @@ public static void WriteList<T>(this NetworkWriter writer, List<T> list)
// structs may have .Set<T> members which weaver needs to be able to // structs may have .Set<T> members which weaver needs to be able to
// fully serialize for NetworkMessages etc. // fully serialize for NetworkMessages etc.
// note that Weaver/Writers/GenerateWriter() handles this manually. // note that Weaver/Writers/GenerateWriter() handles this manually.
// TODO writer not found. need to adjust weaver first. see tests.
/*
public static void WriteHashSet<T>(this NetworkWriter writer, HashSet<T> hashSet) public static void WriteHashSet<T>(this NetworkWriter writer, HashSet<T> hashSet)
{ {
if (hashSet is null) if (hashSet is null)
@ -300,6 +302,7 @@ public static void WriteHashSet<T>(this NetworkWriter writer, HashSet<T> hashSet
foreach (T item in hashSet) foreach (T item in hashSet)
writer.Write(item); writer.Write(item);
} }
*/
public static void WriteArray<T>(this NetworkWriter writer, T[] array) public static void WriteArray<T>(this NetworkWriter writer, T[] array)
{ {

View File

@ -1317,7 +1317,7 @@ public void TestNullList()
Assert.That(readList, Is.Null); Assert.That(readList, Is.Null);
} }
[Test] [Test, Ignore("TODO")]
public void TestHashSet() public void TestHashSet()
{ {
HashSet<int> original = new HashSet<int>() { 1, 2, 3, 4, 5 }; HashSet<int> original = new HashSet<int>() { 1, 2, 3, 4, 5 };
@ -1329,7 +1329,7 @@ public void TestHashSet()
Assert.That(readHashSet, Is.EqualTo(original)); Assert.That(readHashSet, Is.EqualTo(original));
} }
[Test] [Test, Ignore("TODO")]
public void TestNullHashSet() public void TestNullHashSet()
{ {
NetworkWriter writer = new NetworkWriter(); NetworkWriter writer = new NetworkWriter();