Skip to content

Commit

Permalink
Got everything working with the new type interface, finally. Not real…
Browse files Browse the repository at this point in the history
…ly sure if it was worth it yet.
  • Loading branch information
MeltyPlayer committed Aug 6, 2023
1 parent aa29928 commit 9c55ea5
Show file tree
Hide file tree
Showing 20 changed files with 500 additions and 446 deletions.
20 changes: 0 additions & 20 deletions Schema Tests/SchemaStructureParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class ByteWrapper {
Assert.AreEqual("field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(SpecialType.System_Byte, memberType.TypeSymbol.SpecialType);

var primitiveType = (memberType as IPrimitiveMemberType)!;
Assert.AreEqual(SchemaPrimitiveType.BYTE, primitiveType.PrimitiveType);
Assert.AreEqual(false, primitiveType.IsReadOnly);
Expand Down Expand Up @@ -59,8 +57,6 @@ public class SByteWrapper {
Assert.AreEqual("field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(SpecialType.System_SByte, memberType.TypeSymbol.SpecialType);

var primitiveType = (memberType as IPrimitiveMemberType)!;
Assert.AreEqual(SchemaPrimitiveType.SBYTE, primitiveType.PrimitiveType);
Assert.AreEqual(false, primitiveType.IsReadOnly);
Expand Down Expand Up @@ -91,8 +87,6 @@ public class Int16Wrapper {
Assert.AreEqual("field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(SpecialType.System_Int16, memberType.TypeSymbol.SpecialType);

var primitiveType = (memberType as IPrimitiveMemberType)!;
Assert.AreEqual(SchemaPrimitiveType.INT16, primitiveType.PrimitiveType);
Assert.AreEqual(false, primitiveType.IsReadOnly);
Expand Down Expand Up @@ -131,8 +125,6 @@ public class EnumWrapper {
Assert.AreEqual("field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(TypeKind.Enum, memberType.TypeSymbol.TypeKind);

var primitiveType = (memberType as IPrimitiveMemberType)!;
Assert.AreEqual(SchemaPrimitiveType.ENUM, primitiveType.PrimitiveType);
Assert.AreEqual(false, primitiveType.IsReadOnly);
Expand All @@ -156,8 +148,6 @@ public class ArrayWrapper {
Assert.AreEqual("field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(TypeKind.Array, memberType.TypeSymbol.TypeKind);

var arrayType = (memberType as ISequenceMemberType)!;
Assert.AreEqual(SequenceType.MUTABLE_ARRAY, arrayType.SequenceTypeInfo.SequenceType);
Assert.AreEqual(SequenceLengthSourceType.READ_ONLY, arrayType.LengthSourceType);
Expand Down Expand Up @@ -185,8 +175,6 @@ public class CharWrapper {
Assert.AreEqual("field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(TypeKind.Array, memberType.TypeSymbol.TypeKind);

var arrayType = (memberType as ISequenceMemberType)!;
Assert.AreEqual(SequenceType.MUTABLE_ARRAY, arrayType.SequenceTypeInfo.SequenceType);
Assert.AreEqual(SequenceLengthSourceType.READ_ONLY, arrayType.LengthSourceType);
Expand Down Expand Up @@ -221,8 +209,6 @@ public class ByteWrapper {
Assert.AreEqual("field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(SpecialType.System_Byte, memberType.TypeSymbol.SpecialType);

var primitiveType = (memberType as IPrimitiveMemberType)!;
Assert.AreEqual(SchemaPrimitiveType.BYTE, primitiveType.PrimitiveType);
Assert.AreEqual(false, primitiveType.IsReadOnly);
Expand Down Expand Up @@ -253,8 +239,6 @@ public class ByteWrapper {
Assert.AreEqual("Field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(SpecialType.System_Byte, memberType.TypeSymbol.SpecialType);

var primitiveType = (memberType as IPrimitiveMemberType)!;
Assert.AreEqual(SchemaPrimitiveType.BYTE, primitiveType.PrimitiveType);
Assert.AreEqual(false, primitiveType.IsReadOnly);
Expand Down Expand Up @@ -285,8 +269,6 @@ public class ByteWrapper {
Assert.AreEqual("field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(SpecialType.System_Byte, memberType.TypeSymbol.SpecialType);

var primitiveType = (memberType as IPrimitiveMemberType)!;
Assert.AreEqual(SchemaPrimitiveType.BYTE, primitiveType.PrimitiveType);
Assert.AreEqual(true, primitiveType.IsReadOnly);
Expand Down Expand Up @@ -317,8 +299,6 @@ public class ByteWrapper {
Assert.AreEqual("Field", field.Name);

var memberType = field.MemberType;
Assert.AreEqual(SpecialType.System_Byte, memberType.TypeSymbol.SpecialType);

var primitiveType = (memberType as IPrimitiveMemberType)!;
Assert.AreEqual(SchemaPrimitiveType.BYTE, primitiveType.PrimitiveType);
Assert.AreEqual(true, primitiveType.IsReadOnly);
Expand Down
Loading

0 comments on commit 9c55ea5

Please sign in to comment.