ObjFW  Diff

Differences From Artifact [36d27ced4a]:

To Artifact [43eb47dbde]:


55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
		    prefix == nil && ns == nil && attrs == nil)
		break;
	case 3:
		TEST(msg, et == TAG_END && [name isEqual: @"bar"] &&
		    prefix == nil && ns == nil && attrs == nil)
		break;
	case 4:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 5:
		TEST(msg, et == TAG_START && [name isEqual: @"foobar"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"] &&
		    [attrs count] == 1 &&
		    /* xmlns attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"xmlns"] &&
		    [[attrs objectAtIndex: 0] namespace] == nil &&
		    [[[attrs objectAtIndex: 0] stringValue] isEqual:
		    @"urn:objfw:test:foobar"])
		break;
	case 6:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 7:
		TEST(msg, et == TAG_START && [name isEqual: @"qux"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"] &&
		    [attrs count] == 1 &&
		    /* xmlns:foo attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"foo"] &&
		    [[[attrs objectAtIndex: 0] namespace] isEqual:
		    @"http://www.w3.org/2000/xmlns/"] &&
		    [[[attrs objectAtIndex: 0] stringValue] isEqual:
		    @"urn:objfw:test:foo"])
		break;
	case 8:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 9:
		TEST(msg, et == TAG_START && [name isEqual: @"bla"] &&
		    [prefix isEqual: @"foo"] &&
		    [ns isEqual: @"urn:objfw:test:foo"] &&
		    [attrs count] == 2 &&
		    /* foo:bla attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"bla"] &&
		    [[[attrs objectAtIndex: 0] namespace] isEqual:
		    @"urn:objfw:test:foo"] &&
		    [[[attrs objectAtIndex: 0] stringValue] isEqual: @"bla"] &&
		    /* blafoo attr */
		    [[[attrs objectAtIndex: 1] name] isEqual: @"blafoo"] &&
		    [[[attrs objectAtIndex: 1] namespace] isEqual:
		    @"urn:objfw:test:foo"] &&
		    [[[attrs objectAtIndex: 1] stringValue] isEqual: @"foo"])
		break;
	case 10:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 11:
		TEST(msg, et == TAG_START && [name isEqual: @"blup"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"] &&
		    [attrs count] == 2 &&
		    /* foo:qux attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"qux"] &&







<
|












<
|













<
|


















<
|







55
56
57
58
59
60
61

62
63
64
65
66
67
68
69
70
71
72
73
74

75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115
		    prefix == nil && ns == nil && attrs == nil)
		break;
	case 3:
		TEST(msg, et == TAG_END && [name isEqual: @"bar"] &&
		    prefix == nil && ns == nil && attrs == nil)
		break;
	case 4:

		TEST(msg, et == STRING && [string isEqual: @"\n"])
		break;
	case 5:
		TEST(msg, et == TAG_START && [name isEqual: @"foobar"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"] &&
		    [attrs count] == 1 &&
		    /* xmlns attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"xmlns"] &&
		    [[attrs objectAtIndex: 0] namespace] == nil &&
		    [[[attrs objectAtIndex: 0] stringValue] isEqual:
		    @"urn:objfw:test:foobar"])
		break;
	case 6:

		TEST(msg, et == STRING && [string isEqual: @"\n "])
		break;
	case 7:
		TEST(msg, et == TAG_START && [name isEqual: @"qux"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"] &&
		    [attrs count] == 1 &&
		    /* xmlns:foo attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"foo"] &&
		    [[[attrs objectAtIndex: 0] namespace] isEqual:
		    @"http://www.w3.org/2000/xmlns/"] &&
		    [[[attrs objectAtIndex: 0] stringValue] isEqual:
		    @"urn:objfw:test:foo"])
		break;
	case 8:

		TEST(msg, et == STRING && [string isEqual: @"\n  "])
		break;
	case 9:
		TEST(msg, et == TAG_START && [name isEqual: @"bla"] &&
		    [prefix isEqual: @"foo"] &&
		    [ns isEqual: @"urn:objfw:test:foo"] &&
		    [attrs count] == 2 &&
		    /* foo:bla attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"bla"] &&
		    [[[attrs objectAtIndex: 0] namespace] isEqual:
		    @"urn:objfw:test:foo"] &&
		    [[[attrs objectAtIndex: 0] stringValue] isEqual: @"bla"] &&
		    /* blafoo attr */
		    [[[attrs objectAtIndex: 1] name] isEqual: @"blafoo"] &&
		    [[[attrs objectAtIndex: 1] namespace] isEqual:
		    @"urn:objfw:test:foo"] &&
		    [[[attrs objectAtIndex: 1] stringValue] isEqual: @"foo"])
		break;
	case 10:

		TEST(msg, et == STRING && [string isEqual: @"\n   "])
		break;
	case 11:
		TEST(msg, et == TAG_START && [name isEqual: @"blup"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"] &&
		    [attrs count] == 2 &&
		    /* foo:qux attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"qux"] &&
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
		    [[[attrs objectAtIndex: 1] stringValue] isEqual: @"test"])
		break;
	case 12:
		TEST(msg, et == TAG_END && [name isEqual: @"blup"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"])
		break;
	case 13:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 14:
		TEST(msg, et == TAG_START && [name isEqual: @"bla"] &&
		    [prefix isEqual: @"bla"] &&
		    [ns isEqual: @"urn:objfw:test:bla"] && [attrs count] == 3 &&
		    /* xmlns:bla attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"bla"] &&







<
|







123
124
125
126
127
128
129

130
131
132
133
134
135
136
137
		    [[[attrs objectAtIndex: 1] stringValue] isEqual: @"test"])
		break;
	case 12:
		TEST(msg, et == TAG_END && [name isEqual: @"blup"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"])
		break;
	case 13:

		TEST(msg, et == STRING && [string isEqual: @"\n   "])
		break;
	case 14:
		TEST(msg, et == TAG_START && [name isEqual: @"bla"] &&
		    [prefix isEqual: @"bla"] &&
		    [ns isEqual: @"urn:objfw:test:bla"] && [attrs count] == 3 &&
		    /* xmlns:bla attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"bla"] &&
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
		break;
	case 15:
		TEST(msg, et == TAG_END && [name isEqual: @"bla"] &&
		    [prefix isEqual: @"bla"] &&
		    [ns isEqual: @"urn:objfw:test:bla"])
		break;
	case 16:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 17:
		TEST(msg, et == TAG_START && [name isEqual: @"abc"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:abc"] &&
		    [attrs count] == 3 &&
		    /* xmlns attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"xmlns"] &&







<
|







152
153
154
155
156
157
158

159
160
161
162
163
164
165
166
		break;
	case 15:
		TEST(msg, et == TAG_END && [name isEqual: @"bla"] &&
		    [prefix isEqual: @"bla"] &&
		    [ns isEqual: @"urn:objfw:test:bla"])
		break;
	case 16:

		TEST(msg, et == STRING && [string isEqual: @"\n   "])
		break;
	case 17:
		TEST(msg, et == TAG_START && [name isEqual: @"abc"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:abc"] &&
		    [attrs count] == 3 &&
		    /* xmlns attr */
		    [[[attrs objectAtIndex: 0] name] isEqual: @"xmlns"] &&
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
		    [[[attrs objectAtIndex: 2] stringValue] isEqual: @"abc"])
		break;
	case 18:
		TEST(msg, et == TAG_END && [name isEqual: @"abc"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:abc"])
		break;
	case 19:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 20:
		TEST(msg, et == TAG_END && [name isEqual: @"bla"] &&
		    [prefix isEqual: @"foo"] &&
		    [ns isEqual: @"urn:objfw:test:foo"])
		break;
	case 21:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 22:
		TEST(msg, et == COMMENT && [comment isEqual: @"commänt"])
		break;
	case 23:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 24:
		TEST(msg, et == TAG_END && [name isEqual: @"qux"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"])
		break;
	case 25:
		/* FIXME: -[removeLeadingAndTrailingWhitespaces removes this */
		TEST(msg, et == STRING && [string isEqual: @""])
		break;
	case 26:
		TEST(msg, et == TAG_END && [name isEqual: @"foobar"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"])
		break;
	}
}







<
|







<
|





<
|






<
|







179
180
181
182
183
184
185

186
187
188
189
190
191
192
193

194
195
196
197
198
199

200
201
202
203
204
205
206

207
208
209
210
211
212
213
214
		    [[[attrs objectAtIndex: 2] stringValue] isEqual: @"abc"])
		break;
	case 18:
		TEST(msg, et == TAG_END && [name isEqual: @"abc"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:abc"])
		break;
	case 19:

		TEST(msg, et == STRING && [string isEqual: @"\n  "])
		break;
	case 20:
		TEST(msg, et == TAG_END && [name isEqual: @"bla"] &&
		    [prefix isEqual: @"foo"] &&
		    [ns isEqual: @"urn:objfw:test:foo"])
		break;
	case 21:

		TEST(msg, et == STRING && [string isEqual: @"\n  "])
		break;
	case 22:
		TEST(msg, et == COMMENT && [comment isEqual: @"commänt"])
		break;
	case 23:

		TEST(msg, et == STRING && [string isEqual: @"\n "])
		break;
	case 24:
		TEST(msg, et == TAG_END && [name isEqual: @"qux"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"])
		break;
	case 25:

		TEST(msg, et == STRING && [string isEqual: @"\n"])
		break;
	case 26:
		TEST(msg, et == TAG_END && [name isEqual: @"foobar"] &&
		    prefix == nil && [ns isEqual: @"urn:objfw:test:foobar"])
		break;
	}
}