mirror of
https://github.com/claunia/plist-cil.git
synced 2025-12-16 19:14:26 +00:00
NSNumber: Keep track of the original number type when parsing from XML
This commit is contained in:
@@ -126,6 +126,18 @@ namespace plistcil.test
|
||||
NSDictionary dict = (NSDictionary)PropertyListParser.Parse(new FileInfo("test-files/issue49.plist"));
|
||||
Assert.AreEqual(0, dict.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void TestRealInResourceRule()
|
||||
{
|
||||
NSDictionary dict = (NSDictionary)XmlPropertyListParser.Parse(new FileInfo("test-files/ResourceRules.plist"));
|
||||
Assert.AreEqual(1, dict.Count);
|
||||
Assert.IsTrue(dict.ContainsKey("weight"));
|
||||
|
||||
var weight = dict["weight"].ToObject();
|
||||
Assert.IsInstanceOf<double>(weight);
|
||||
Assert.AreEqual(10d, (double)weight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user