@@ -28,40 +28,10 @@ #import "OFXMLElement.h" #import "TestsAppDelegate.h" static OFString *module = @"OFSerialization"; -static const OFString *expected = @"\n" - @"" - @"" - @"Qu"xbar\ntest" - @"1234" - @"asd" - @"1234" - @"5678" - @"Hello" - @"Blub" - @"B"la" - @"Hello" - @"Wo ld!\nHow are you?" - @"https://webkeks.org/" - @"x" - @"" - @"http://www.w3.org/2000/xmlns/" - @"xmlns" - @"http://www.w3.org/XML/1998/namespace" - @"xml" - @"" - @"y" - @"" - @"http://www.w3.org/2000/xmlns/" - @"xmlns" - @"http://www.w3.org/XML/1998/namespace" - @"xml" - @"" - @"list" - @""; @implementation TestsAppDelegate (SerializationTests) - (void)serializationTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; @@ -88,13 +58,14 @@ [d setObject: @"list" forKey: l]; TEST(@"-[stringBySerializing]", - (s = [d stringBySerializing]) && [s isEqual: expected]) + (s = [d stringBySerializing]) && [s isEqual: + [OFString stringWithContentsOfFile: @"serialization.xml"]]) TEST(@"-[objectByDeserializing]", [[s objectByDeserializing] isEqual: d]) [pool drain]; } @end