Differences From Artifact [8a1b6d269b]:
- File
tests/OFSerializationTests.m
— part of check-in
[1483709ab2]
at
2022-08-01 21:20:54
on branch trunk
— Add support for embedding files into binaries
Embedded files are available via the objfw-embedded: URL scheme. (user: js, size: 2371) [annotate] [blame] [check-ins using] [more...]
To Artifact [ae574f4995]:
- File tests/OFSerializationTests.m — part of check-in [e7ab06503c] at 2022-09-28 21:40:00 on branch trunk — Rename OFUR{L -> I} in preparation for URI support (user: js, size: 2371) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
37 38 39 40 41 42 43 | [array addObject: [OFDate dateWithTimeIntervalSince1970: 1234.5678]]; [dict setObject: @"Hello" forKey: array]; [dict setObject: @"B\"la" forKey: @"Blub"]; [list appendObject: @"Hello"]; [list appendObject: @"Wo\rld!\nHow are you?"]; | | | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | [array addObject: [OFDate dateWithTimeIntervalSince1970: 1234.5678]]; [dict setObject: @"Hello" forKey: array]; [dict setObject: @"B\"la" forKey: @"Blub"]; [list appendObject: @"Hello"]; [list appendObject: @"Wo\rld!\nHow are you?"]; [list appendObject: [OFURI URIWithString: @"https://objfw.nil.im/"]]; [list appendObject: [OFXMLElement elementWithXMLString: @"<x><y/><![CDATA[<]]></x>"]]; [list appendObject: [OFSet setWithObjects: @"foo", @"foo", @"bar", nil]]; [list appendObject: [OFCountedSet setWithObjects: @"foo", @"foo", @"bar", nil]]; [dict setObject: @"list" forKey: list]; data = [OFData dataWithItems: "0123456789:;<ABCDEFGHJIKLMNOPQRSTUVWXYZ" count: 39]; [dict setObject: @"data" forKey: data]; UUID = [OFUUID UUIDWithUUIDString: @"01234567-89AB-CDEF-FEDC-BA9876543210"]; [dict setObject: @"uuid" forKey: UUID]; TEST(@"-[stringBySerializing]", (string = dict.stringBySerializing) && [string isEqual: [OFString stringWithContentsOfURI: [OFURI URIWithString: @"objfw-embedded:///serialization.xml"]]]) TEST(@"-[objectByDeserializing]", [string.objectByDeserializing isEqual: dict]) objc_autoreleasePoolPop(pool); } @end |