ObjXMPP  Check-in [8402175d15]

Overview
Comment:Adapt tests for checking a stanza's JID
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8402175d15f7bd3ca701d27b83807c23203f4784bbd0536f63ef3ca7cd10516f
User & Date: florob@babelmonkeys.de on 2011-02-19 22:17:39
Other Links: manifest | tags
Context
2011-02-19
22:39
Fix mechanisms parsing check-in: 5027cc014a user: florob@babelmonkeys.de tags: trunk
22:17
Adapt tests for checking a stanza's JID check-in: 8402175d15 user: florob@babelmonkeys.de tags: trunk
16:40
Use XMPPJID for from and to. check-in: e5d6fa6802 user: js tags: trunk
Changes

Modified tests/test.m from [0d992352d5] to [00843fd022].

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
	OFXMLElement *elem = [OFXMLElement elementWithName: @"iq"];
	[elem addAttributeWithName: @"from" stringValue: @"bob@localhost"];
	[elem addAttributeWithName: @"to" stringValue: @"alice@localhost"];
	[elem addAttributeWithName: @"type" stringValue: @"get"];
	[elem addAttributeWithName: @"id" stringValue: @"42"];
	XMPPStanza *stanza = [XMPPStanza stanzaWithElement: elem];
	assert([[elem stringValue] isEqual: [stanza stringValue]]);
	assert(([[OFString stringWithFormat: @"%@, %@, %@, %@", stanza.from,
	    stanza.to, stanza.type, stanza.ID]
	    isEqual: @"bob@localhost, alice@localhost, get, 42"]));

	conn = [[XMPPConnection alloc] init];

	if (arguments.count != 3) {
		of_log(@"Invalid count of command line arguments!");
		[OFApplication terminateWithStatus: 1];







|
|







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
	OFXMLElement *elem = [OFXMLElement elementWithName: @"iq"];
	[elem addAttributeWithName: @"from" stringValue: @"bob@localhost"];
	[elem addAttributeWithName: @"to" stringValue: @"alice@localhost"];
	[elem addAttributeWithName: @"type" stringValue: @"get"];
	[elem addAttributeWithName: @"id" stringValue: @"42"];
	XMPPStanza *stanza = [XMPPStanza stanzaWithElement: elem];
	assert([[elem stringValue] isEqual: [stanza stringValue]]);
	assert(([[OFString stringWithFormat: @"%@, %@, %@, %@",
	    stanza.from.fullJID, stanza.to.fullJID, stanza.type, stanza.ID]
	    isEqual: @"bob@localhost, alice@localhost, get, 42"]));

	conn = [[XMPPConnection alloc] init];

	if (arguments.count != 3) {
		of_log(@"Invalid count of command line arguments!");
		[OFApplication terminateWithStatus: 1];