@@ -136,30 +136,23 @@ test_data_xml(void **state)
136136 TEST_ERROR_XML2 ("<list xmlns=\"urn:tests:defs\"><id>a</id></list>"
137137 "<list xmlns=\"urn:tests:defs\"><id>b</id><value>x</value></list>" ,
138138 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l1" , "/xdf:list[2]/xdf:value" , LY_EVALID );
139- CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list[2]/xdf:value\" value - semantic error." ,
140- "Schema location \"/defs:l1\", line number 1." );
141- CHECK_LOG_CTX ("Positional predicate defined for configuration list \"list\" in path." ,
139+ CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list[2]/xdf:value\" value - semantic error: "
140+ "Positional predicate defined for configuration list \"list\" in path." ,
142141 "Schema location \"/defs:l1\", line number 1." );
143142
144143 TEST_ERROR_XML2 ("" ,
145144 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l1" , "/t:cont/t:1l" , LY_EVALID );
146- CHECK_LOG_CTX ("Invalid instance-identifier \"/t:cont/t:1l\" value - syntax error." ,
147- "Schema location \"/defs:l1\", line number 1." );
148- CHECK_LOG_CTX ("Invalid character 't'[9] of expression '/t:cont/t:1l'." ,
145+ CHECK_LOG_CTX ("Invalid instance-identifier \"/t:cont/t:1l\" value - syntax error: Invalid character 't'[9] of expression '/t:cont/t:1l'." ,
149146 "Schema location \"/defs:l1\", line number 1." );
150147
151148 TEST_ERROR_XML2 ("" ,
152149 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l1" , "/t:cont:t:1l" , LY_EVALID );
153- CHECK_LOG_CTX ("Invalid instance-identifier \"/t:cont:t:1l\" value - syntax error." ,
154- "Schema location \"/defs:l1\", line number 1." );
155- CHECK_LOG_CTX ("Invalid character ':'[8] of expression '/t:cont:t:1l'." ,
150+ CHECK_LOG_CTX ("Invalid instance-identifier \"/t:cont:t:1l\" value - syntax error: Invalid character ':'[8] of expression '/t:cont:t:1l'." ,
156151 "Schema location \"/defs:l1\", line number 1." );
157152
158153 TEST_ERROR_XML2 ("" ,
159154 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l1" , "/xdf:cont/xdf:invalid/xdf:path" , LY_EVALID );
160- CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:cont/xdf:invalid/xdf:path\" value - semantic error." ,
161- "Schema location \"/defs:l1\", line number 1." );
162- CHECK_LOG_CTX ("Not found node \"invalid\" in path." ,
155+ CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:cont/xdf:invalid/xdf:path\" value - semantic error: Not found node \"invalid\" in path." ,
163156 "Schema location \"/defs:l1\", line number 1." );
164157
165158 /* non-existing instances, instance-identifier is here in JSON format because it is already in internal
@@ -198,100 +191,72 @@ test_data_xml(void **state)
198191 /* more errors */
199192 TEST_ERROR_XML2 ("<llist xmlns=\"urn:tests:defs\">x</llist>" ,
200193 "defs" , "xmlns:t=\"urn:tests:defs\"" , "t:l1" , "/t:llist[1" , LY_EVALID );
201- CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[1\" value - syntax error." ,
202- "Schema location \"/defs:l1\", line number 1." );
203- CHECK_LOG_CTX ("Unexpected XPath expression end." ,
194+ CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[1\" value - syntax error: Unexpected XPath expression end." ,
204195 "Schema location \"/defs:l1\", line number 1." );
205196
206197 TEST_ERROR_XML2 ("<cont xmlns=\"urn:tests:mod\"/>" ,
207198 "defs" , "xmlns:m=\"urn:tests:mod\"" , "l1" , "/m:cont[1]" , LY_EVALID );
208- CHECK_LOG_CTX ("Invalid instance-identifier \"/m:cont[1]\" value - semantic error." ,
209- "Schema location \"/defs:l1\", line number 1." );
210- CHECK_LOG_CTX ("Positional predicate defined for container \"cont\" in path." ,
199+ CHECK_LOG_CTX ("Invalid instance-identifier \"/m:cont[1]\" value - semantic error: Positional predicate defined for container \"cont\" in path." ,
211200 "Schema location \"/defs:l1\", line number 1." );
212201
213202 TEST_ERROR_XML2 ("<cont xmlns=\"urn:tests:mod\"/>" ,
214203 "defs" , "xmlns:m=\"urn:tests:mod\"" , "l1" , "[1]" , LY_EVALID );
215- CHECK_LOG_CTX ("Invalid instance-identifier \"[1]\" value - syntax error." ,
216- "Schema location \"/defs:l1\", line number 1." );
217- CHECK_LOG_CTX ("Unexpected XPath token \"[\" (\"[1]\"), expected \"Operator(Path)\"." ,
204+ CHECK_LOG_CTX ("Invalid instance-identifier \"[1]\" value - syntax error: Unexpected XPath token \"[\" (\"[1]\"), expected \"Operator(Path)\"." ,
218205 "Schema location \"/defs:l1\", line number 1." );
219206
220207 TEST_ERROR_XML2 ("<cont xmlns=\"urn:tests:mod\"><l2/></cont>" ,
221208 "defs" , "xmlns:m=\"urn:tests:mod\"" , "l1" , "/m:cont/m:l2[l2='1']" , LY_EVALID );
222- CHECK_LOG_CTX ("Invalid instance-identifier \"/m:cont/m:l2[l2='1']\" value - syntax error." ,
223- "Schema location \"/defs:l1\", line number 1." );
224- CHECK_LOG_CTX ("Prefix missing for \"l2\" in path." ,
209+ CHECK_LOG_CTX ("Invalid instance-identifier \"/m:cont/m:l2[l2='1']\" value - syntax error: Prefix missing for \"l2\" in path." ,
225210 "Schema location \"/defs:l1\", line number 1." );
226211
227212 TEST_ERROR_XML2 ("<cont xmlns=\"urn:tests:mod\"><l2/></cont>" ,
228213 "defs" , "xmlns:m=\"urn:tests:mod\"" , "l1" , "/m:cont/m:l2[m:l2='1']" , LY_EVALID );
229- CHECK_LOG_CTX ("Invalid instance-identifier \"/m:cont/m:l2[m:l2='1']\" value - semantic error." ,
230- "Schema location \"/defs:l1\", line number 1." );
231- CHECK_LOG_CTX ("List predicate defined for leaf \"l2\" in path." ,
214+ CHECK_LOG_CTX ("Invalid instance-identifier \"/m:cont/m:l2[m:l2='1']\" value - semantic error: List predicate defined for leaf \"l2\" in path." ,
232215 "Schema location \"/defs:l1\", line number 1." );
233216
234217 TEST_ERROR_XML2 ("<llist xmlns=\"urn:tests:defs\">1</llist><llist xmlns=\"urn:tests:defs\">2</llist>" ,
235218 "defs" , "xmlns:t=\"urn:tests:defs\"" , "t:l1" , "/t:llist[4]" , LY_EVALID );
236- CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[4]\" value - semantic error." ,
237- "Schema location \"/defs:l1\", line number 1." );
238- CHECK_LOG_CTX ("Positional predicate defined for configuration leaf-list \"llist\" in path." ,
219+ CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[4]\" value - semantic error: Positional predicate defined for configuration leaf-list \"llist\" in path." ,
239220 "Schema location \"/defs:l1\", line number 1." );
240221
241222 TEST_ERROR_XML2 ("" ,
242223 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l2" , "/t:llist[6]" , LY_EVALID );
243- CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[6]\" value - semantic error." ,
244- "Schema location \"/defs:l2\", line number 1." );
245- CHECK_LOG_CTX ("No module connected with the prefix \"t\" found (prefix format XML prefixes)." ,
224+ CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[6]\" value - semantic error: No module connected with the prefix \"t\" found (prefix format XML prefixes)." ,
246225 "Schema location \"/defs:l2\", line number 1." );
247226
248227 TEST_ERROR_XML2 ("<list xmlns=\"urn:tests:defs\"><id>1</id><value>x</value></list>" ,
249228 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l2" , "/xdf:list[xdf:value='x']" , LY_EVALID );
250- CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list[xdf:value='x']\" value - semantic error." ,
251- "Schema location \"/defs:l2\", line number 1." );
252- CHECK_LOG_CTX ("Key expected instead of leaf \"value\" in path." ,
229+ CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list[xdf:value='x']\" value - semantic error: Key expected instead of leaf \"value\" in path." ,
253230 "Schema location \"/defs:l2\", line number 1." );
254231
255232 TEST_ERROR_XML2 ("" ,
256233 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l2" , "/xdf:list[.='x']" , LY_EVALID );
257- CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list[.='x']\" value - semantic error." ,
258- "Schema location \"/defs:l2\", line number 1." );
259- CHECK_LOG_CTX ("Leaf-list predicate defined for list \"list\" in path." ,
234+ CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list[.='x']\" value - semantic error: Leaf-list predicate defined for list \"list\" in path." ,
260235 "Schema location \"/defs:l2\", line number 1." );
261236
262237 TEST_ERROR_XML2 ("<llist xmlns=\"urn:tests:defs\">1</llist>" ,
263238 "defs" , "xmlns:t=\"urn:tests:defs\"" , "t:l1" , "/t:llist[.='x']" , LY_EVALID );
264- CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[.='x']\" value - semantic error." ,
239+ CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[.='x']\" value - semantic error: Invalid type uint32 value \"x\" ." ,
265240 "Schema location \"/defs:l1\", line number 1." );
266- CHECK_LOG_CTX ("Invalid type uint32 value \"x\"." ,
267- "Schema location \"/defs:llist\", line number 1." );
268241
269242 TEST_ERROR_XML2 ("" ,
270243 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l2" , "/t:llist[1][2]" , LY_EVALID );
271- CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[1][2]\" value - syntax error." ,
272- "Schema location \"/defs:l2\", line number 1." );
273- CHECK_LOG_CTX ("Unparsed characters \"[2]\" left at the end of path." ,
244+ CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[1][2]\" value - syntax error: Unparsed characters \"[2]\" left at the end of path." ,
274245 "Schema location \"/defs:l2\", line number 1." );
275246
276247 TEST_ERROR_XML2 ("" ,
277248 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l2" , "/t:llist[.='a'][.='b']" , LY_EVALID );
278- CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[.='a'][.='b']\" value - syntax error." ,
279- "Schema location \"/defs:l2\", line number 1." );
280- CHECK_LOG_CTX ("Unparsed characters \"[.='b']\" left at the end of path." ,
249+ CHECK_LOG_CTX ("Invalid instance-identifier \"/t:llist[.='a'][.='b']\" value - syntax error: Unparsed characters \"[.='b']\" left at the end of path." ,
281250 "Schema location \"/defs:l2\", line number 1." );
282251
283252 TEST_ERROR_XML2 ("<list xmlns=\"urn:tests:defs\"><id>1</id><value>x</value></list>" ,
284253 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l2" , "/xdf:list[xdf:id='1'][xdf:id='2']/xdf:value" , LY_EVALID );
285- CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list[xdf:id='1'][xdf:id='2']/xdf:value\" value - syntax error." ,
286- "Schema location \"/defs:l2\", line number 1." );
287- CHECK_LOG_CTX ("Duplicate predicate key \"id\" in path." ,
254+ CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list[xdf:id='1'][xdf:id='2']/xdf:value\" value - syntax error: Duplicate predicate key \"id\" in path." ,
288255 "Schema location \"/defs:l2\", line number 1." );
289256
290257 TEST_ERROR_XML2 ("" ,
291258 "defs" , "xmlns:xdf=\"urn:tests:defs\"" , "xdf:l2" , "/xdf:list2[xdf:id='1']/xdf:value" , LY_EVALID );
292- CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list2[xdf:id='1']/xdf:value\" value - semantic error." ,
293- "Schema location \"/defs:l2\", line number 1." );
294- CHECK_LOG_CTX ("Predicate missing for a key of list \"list2\" in path." ,
259+ CHECK_LOG_CTX ("Invalid instance-identifier \"/xdf:list2[xdf:id='1']/xdf:value\" value - semantic error: Predicate missing for a key of list \"list2\" in path." ,
295260 "Schema location \"/defs:l2\", line number 1." );
296261}
297262
0 commit comments