Update list of serialization primitives

This commit is contained in:
Frederik Carlier
2018-06-26 15:55:41 +02:00
parent 48da27c068
commit a035dd5056
4 changed files with 24 additions and 1 deletions

View File

@@ -37,5 +37,21 @@ namespace plistcil.test
writer.Write(root);
}
}
[Fact]
public void Roundtrip3Test()
{
byte[] data = File.ReadAllBytes("test-files/plist3.bin");
NSObject root = PropertyListParser.Parse(data);
using (MemoryStream actualOutput = new MemoryStream())
using (Stream expectedOutput = File.OpenRead("test-files/plist3.bin"))
using (ValidatingStream validatingStream = new ValidatingStream(actualOutput, expectedOutput))
{
BinaryPropertyListWriter writer = new BinaryPropertyListWriter(validatingStream);
writer.ReuseObjectIds = false;
writer.Write(root);
}
}
}
}

View File

@@ -119,6 +119,9 @@
<None Update="test-files\plist2.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="test-files\plist3.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="test-files\RoundtripBinaryIndentation.plist">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

Binary file not shown.

View File

@@ -422,13 +422,17 @@ namespace Claunia.PropertyList
|| content == "$classname"
|| content == "NS.objects"
|| content == "NS.keys"
|| content == "NS.base"
|| content == "NS.relative"
|| content == "NSURL"
|| content == "NSDictionary"
|| content == "NSObject"
|| content == "NSMutableDictionary"
|| content == "NSMutableArray"
|| content == "NSArray"
|| content == "NSUUID";
|| content == "NSUUID"
|| content == "NSKeyedArchiver"
|| content == "NSMutableString";
}
internal static bool IsSerializationPrimitive(NSNumber n)