@@ -114,7 +114,7 @@ test_module(void **state)
114
114
assert_int_equal (LY_SUCCESS , ly_in_new_memory (str , & in ));
115
115
assert_int_equal (LY_EEXIST , lys_parse (UTEST_LYCTX , in , LYS_IN_YANG , NULL , & mod ));
116
116
ly_in_free (in , 0 );
117
- CHECK_LOG_CTX ("Duplicate identifier \"a\" of data definition/RPC/action/notification statement." , "/aa:a" , 0 );
117
+ CHECK_LOG_CTX ("Duplicate identifier \"/aa: a\" of data definition/RPC/action/notification statement." , "/aa:a" , 0 );
118
118
}
119
119
120
120
static void
@@ -146,23 +146,23 @@ test_name_collisions(void **state)
146
146
" leaf c {type empty;}"
147
147
"}" ;
148
148
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , yang_data , LYS_IN_YANG , NULL ));
149
- CHECK_LOG_CTX ("Duplicate identifier \"c\" of data definition/RPC/action/notification statement." , "/a:c" , 0 );
149
+ CHECK_LOG_CTX ("Duplicate identifier \"/a: c\" of data definition/RPC/action/notification statement." , "/a:c" , 0 );
150
150
151
151
yang_data = "module a {namespace urn:a;prefix a;"
152
152
" container c;"
153
153
" leaf a {type empty;}"
154
154
" notification c;"
155
155
"}" ;
156
156
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , yang_data , LYS_IN_YANG , NULL ));
157
- CHECK_LOG_CTX ("Duplicate identifier \"c\" of data definition/RPC/action/notification statement." , "/a:c" , 0 );
157
+ CHECK_LOG_CTX ("Duplicate identifier \"/a: c\" of data definition/RPC/action/notification statement." , "/a:c" , 0 );
158
158
159
159
yang_data = "module a {namespace urn:a;prefix a;"
160
160
" container c;"
161
161
" leaf a {type empty;}"
162
162
" rpc c;"
163
163
"}" ;
164
164
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , yang_data , LYS_IN_YANG , NULL ));
165
- CHECK_LOG_CTX ("Duplicate identifier \"c\" of data definition/RPC/action/notification statement." , "/a:c" , 0 );
165
+ CHECK_LOG_CTX ("Duplicate identifier \"/a: c\" of data definition/RPC/action/notification statement." , "/a:c" , 0 );
166
166
167
167
yang_data = "module a {namespace urn:a;prefix a;"
168
168
" container c;"
@@ -175,29 +175,29 @@ test_name_collisions(void **state)
175
175
" }"
176
176
"}" ;
177
177
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , yang_data , LYS_IN_YANG , NULL ));
178
- CHECK_LOG_CTX ("Duplicate identifier \"c\" of data definition/RPC/action/notification statement." , "/a:ch/c/c" , 0 );
178
+ CHECK_LOG_CTX ("Duplicate identifier \"/a: c\" of data definition/RPC/action/notification statement." , "/a:ch/c/c" , 0 );
179
179
180
180
/* nested */
181
181
yang_data = "module a {namespace urn:a;prefix a;container c { list l {key \"k\"; leaf k {type string;}"
182
182
"leaf-list a {type string;}"
183
183
"container a;"
184
184
"}}}" ;
185
185
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , yang_data , LYS_IN_YANG , NULL ));
186
- CHECK_LOG_CTX ("Duplicate identifier \"a\" of data definition/RPC/action/notification statement." , "/a:c/l/a" , 0 );
186
+ CHECK_LOG_CTX ("Duplicate identifier \"/a:c/l/ a\" of data definition/RPC/action/notification statement." , "/a:c/l/a" , 0 );
187
187
188
188
yang_data = "module a {yang-version 1.1;namespace urn:a;prefix a;container c { list l {key \"k\"; leaf k {type string;}"
189
189
"leaf-list a {type string;}"
190
190
"notification a;"
191
191
"}}}" ;
192
192
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , yang_data , LYS_IN_YANG , NULL ));
193
- CHECK_LOG_CTX ("Duplicate identifier \"a\" of data definition/RPC/action/notification statement." , "/a:c/l/a" , 0 );
193
+ CHECK_LOG_CTX ("Duplicate identifier \"/a:c/l/ a\" of data definition/RPC/action/notification statement." , "/a:c/l/a" , 0 );
194
194
195
195
yang_data = "module a {yang-version 1.1;namespace urn:a;prefix a;container c { list l {key \"k\"; leaf k {type string;}"
196
196
"leaf-list a {type string;}"
197
197
"action a;"
198
198
"}}}" ;
199
199
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , yang_data , LYS_IN_YANG , NULL ));
200
- CHECK_LOG_CTX ("Duplicate identifier \"a\" of data definition/RPC/action/notification statement." , "/a:c/l/a" , 0 );
200
+ CHECK_LOG_CTX ("Duplicate identifier \"/a:c/l/ a\" of data definition/RPC/action/notification statement." , "/a:c/l/a" , 0 );
201
201
202
202
/* grouping */
203
203
}
@@ -502,16 +502,16 @@ test_node_choice(void **state)
502
502
503
503
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module aa {namespace urn:aa;prefix aa;"
504
504
"choice ch {case a {leaf x {type string;}}leaf x {type string;}}}" , LYS_IN_YANG , NULL ));
505
- CHECK_LOG_CTX ("Duplicate identifier \"x\" of data definition/RPC/action/notification statement." , "/aa:ch/x/x" , 0 );
505
+ CHECK_LOG_CTX ("Duplicate identifier \"/aa:ch/a/ x\" of data definition/RPC/action/notification statement." , "/aa:ch/x/x" , 0 );
506
506
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module aa2 {namespace urn:aa2;prefix aa;"
507
507
"choice ch {case a {leaf y {type string;}}case b {leaf y {type string;}}}}" , LYS_IN_YANG , NULL ));
508
- CHECK_LOG_CTX ("Duplicate identifier \"y\" of data definition/RPC/action/notification statement." , "/aa2:ch/b/y" , 0 );
508
+ CHECK_LOG_CTX ("Duplicate identifier \"/aa2:ch/a/ y\" of data definition/RPC/action/notification statement." , "/aa2:ch/b/y" , 0 );
509
509
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module bb {namespace urn:bb;prefix bb;"
510
510
"choice ch {case a {leaf x {type string;}}leaf a {type string;}}}" , LYS_IN_YANG , NULL ));
511
- CHECK_LOG_CTX ("Duplicate identifier \"a\" of case statement." , "/bb:ch/a" , 0 );
511
+ CHECK_LOG_CTX ("Duplicate identifier \"/bb:ch/ a\" of case statement." , "/bb:ch/a" , 0 );
512
512
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module bb2 {namespace urn:bb2;prefix bb;"
513
513
"choice ch {case b {leaf x {type string;}}case b {leaf y {type string;}}}}" , LYS_IN_YANG , NULL ));
514
- CHECK_LOG_CTX ("Duplicate identifier \"b\" of case statement." , "/bb2:ch/b" , 0 );
514
+ CHECK_LOG_CTX ("Duplicate identifier \"/bb2:ch/ b\" of case statement." , "/bb2:ch/b" , 0 );
515
515
516
516
assert_int_equal (LY_EVALID , lys_parse_mem (UTEST_LYCTX , "module ca {namespace urn:ca;prefix ca;"
517
517
"choice ch {default c;case a {leaf x {type string;}}case b {leaf y {type string;}}}}" , LYS_IN_YANG , NULL ));
@@ -589,14 +589,14 @@ test_action(void **state)
589
589
590
590
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module bb {namespace urn:bb;prefix bb;leaf x{type string;} rpc x;}" ,
591
591
LYS_IN_YANG , NULL ));
592
- CHECK_LOG_CTX ("Duplicate identifier \"x\" of data definition/RPC/action/notification statement." , "/bb:x" , 0 );
592
+ CHECK_LOG_CTX ("Duplicate identifier \"/bb: x\" of data definition/RPC/action/notification statement." , "/bb:x" , 0 );
593
593
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module cc {yang-version 1.1; namespace urn:cc;prefix cc;container c {leaf y {type string;} action y;}}" , LYS_IN_YANG , NULL ));
594
- CHECK_LOG_CTX ("Duplicate identifier \"y\" of data definition/RPC/action/notification statement." , "/cc:c/y" , 0 );
594
+ CHECK_LOG_CTX ("Duplicate identifier \"/cc:c/ y\" of data definition/RPC/action/notification statement." , "/cc:c/y" , 0 );
595
595
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module dd {yang-version 1.1; namespace urn:dd;prefix dd;container c {action z; action z;}}" , LYS_IN_YANG , NULL ));
596
- CHECK_LOG_CTX ("Duplicate identifier \"z\" of data definition/RPC/action/notification statement." , "/dd:c/z" , 0 );
596
+ CHECK_LOG_CTX ("Duplicate identifier \"/dd:c/ z\" of data definition/RPC/action/notification statement." , "/dd:c/z" , 0 );
597
597
ly_ctx_set_module_imp_clb (UTEST_LYCTX , test_imp_clb , "submodule eesub {belongs-to ee {prefix ee;} notification w;}" );
598
598
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module ee {yang-version 1.1; namespace urn:ee;prefix ee;include eesub; rpc w;}" , LYS_IN_YANG , NULL ));
599
- CHECK_LOG_CTX ("Duplicate identifier \"w\" of data definition/RPC/action/notification statement." , "/ee:w" , 0 );
599
+ CHECK_LOG_CTX ("Duplicate identifier \"/ee: w\" of data definition/RPC/action/notification statement." , "/ee:w" , 0 );
600
600
601
601
assert_int_equal (LY_EVALID , lys_parse_mem (UTEST_LYCTX , "module ff {yang-version 1.1; namespace urn:ff;prefix ff; rpc test {input {container a {leaf b {type string;}}}}"
602
602
"augment /test/input/a {action invalid {input {leaf x {type string;}}}}}" , LYS_IN_YANG , NULL ));
@@ -660,14 +660,14 @@ test_notification(void **state)
660
660
NULL , 1 );
661
661
662
662
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module bb {namespace urn:bb;prefix bb;leaf x{type string;} notification x;}" , LYS_IN_YANG , NULL ));
663
- CHECK_LOG_CTX ("Duplicate identifier \"x\" of data definition/RPC/action/notification statement." , "/bb:x" , 0 );
663
+ CHECK_LOG_CTX ("Duplicate identifier \"/bb: x\" of data definition/RPC/action/notification statement." , "/bb:x" , 0 );
664
664
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module cc {yang-version 1.1; namespace urn:cc;prefix cc;container c {leaf y {type string;} notification y;}}" , LYS_IN_YANG , NULL ));
665
- CHECK_LOG_CTX ("Duplicate identifier \"y\" of data definition/RPC/action/notification statement." , "/cc:c/y" , 0 );
665
+ CHECK_LOG_CTX ("Duplicate identifier \"/cc:c/ y\" of data definition/RPC/action/notification statement." , "/cc:c/y" , 0 );
666
666
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module dd {yang-version 1.1; namespace urn:dd;prefix dd;container c {notification z; notification z;}}" , LYS_IN_YANG , NULL ));
667
- CHECK_LOG_CTX ("Duplicate identifier \"z\" of data definition/RPC/action/notification statement." , "/dd:c/z" , 0 );
667
+ CHECK_LOG_CTX ("Duplicate identifier \"/dd:c/ z\" of data definition/RPC/action/notification statement." , "/dd:c/z" , 0 );
668
668
ly_ctx_set_module_imp_clb (UTEST_LYCTX , test_imp_clb , "submodule eesub {belongs-to ee {prefix ee;} rpc w;}" );
669
669
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module ee {yang-version 1.1; namespace urn:ee;prefix ee;include eesub; notification w;}" , LYS_IN_YANG , NULL ));
670
- CHECK_LOG_CTX ("Duplicate identifier \"w\" of data definition/RPC/action/notification statement." , "/ee:w" , 0 );
670
+ CHECK_LOG_CTX ("Duplicate identifier \"/ee: w\" of data definition/RPC/action/notification statement." , "/ee:w" , 0 );
671
671
672
672
assert_int_equal (LY_EVALID , lys_parse_mem (UTEST_LYCTX , "module ff {yang-version 1.1; namespace urn:ff;prefix ff; rpc test {input {container a {leaf b {type string;}}}}"
673
673
"augment /test/input/a {notification invalid {leaf x {type string;}}}}" , LYS_IN_YANG , NULL ));
@@ -2633,7 +2633,7 @@ test_uses(void **state)
2633
2633
2634
2634
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module dd {namespace urn:dd;prefix dd;grouping grp{leaf a{type string;}}"
2635
2635
"leaf a {type string;}uses grp;}" , LYS_IN_YANG , & mod ));
2636
- CHECK_LOG_CTX ("Duplicate identifier \"a\" of data definition/RPC/action/notification statement." ,
2636
+ CHECK_LOG_CTX ("Duplicate identifier \"/dd: a\" of data definition/RPC/action/notification statement." ,
2637
2637
"/dd:{uses='grp'}/dd:a" , 0 );
2638
2638
2639
2639
assert_int_equal (LY_EVALID , lys_parse_mem (UTEST_LYCTX , "module ee {namespace urn:ee;prefix ee;grouping grp {leaf l {type string; status deprecated;}}"
@@ -2643,11 +2643,11 @@ test_uses(void **state)
2643
2643
2644
2644
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module ff {namespace urn:ff;prefix ff;grouping grp {leaf l {type string;}}"
2645
2645
"leaf l {type int8;}uses grp;}" , LYS_IN_YANG , & mod ));
2646
- CHECK_LOG_CTX ("Duplicate identifier \"l\" of data definition/RPC/action/notification statement." ,
2646
+ CHECK_LOG_CTX ("Duplicate identifier \"/ff: l\" of data definition/RPC/action/notification statement." ,
2647
2647
"/ff:{uses='grp'}/ff:l" , 0 );
2648
2648
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module fg {namespace urn:fg;prefix fg;grouping grp {leaf m {type string;}}"
2649
2649
"uses grp;leaf m {type int8;}}" , LYS_IN_YANG , & mod ));
2650
- CHECK_LOG_CTX ("Duplicate identifier \"m\" of data definition/RPC/action/notification statement." , "/fg:m" , 0 );
2650
+ CHECK_LOG_CTX ("Duplicate identifier \"/fg: m\" of data definition/RPC/action/notification statement." , "/fg:m" , 0 );
2651
2651
2652
2652
assert_int_equal (LY_EVALID , lys_parse_mem (UTEST_LYCTX , "module gg {namespace urn:gg;prefix gg; grouping grp {container g;}"
2653
2653
"leaf g {type string;}"
@@ -2984,7 +2984,7 @@ test_augment(void **state)
2984
2984
2985
2985
assert_int_equal (LY_EEXIST , lys_parse_mem (UTEST_LYCTX , "module bb {namespace urn:bb;prefix bb; container c {leaf a {type string;}}"
2986
2986
"augment /c {leaf a {type int8;}}}" , LYS_IN_YANG , & mod ));
2987
- CHECK_LOG_CTX ("Duplicate identifier \"a\" of data definition/RPC/action/notification statement." , "/bb:{augment='/c'}/a" , 0 );
2987
+ CHECK_LOG_CTX ("Duplicate identifier \"/bb:c/ a\" of data definition/RPC/action/notification statement." , "/bb:{augment='/c'}/a" , 0 );
2988
2988
2989
2989
assert_int_equal (LY_ENOTFOUND , lys_parse_mem (UTEST_LYCTX , "module cc {namespace urn:cc;prefix cc; container c {leaf a {type string;}}"
2990
2990
"augment /c/a {leaf a {type int8;}}}" , LYS_IN_YANG , & mod ));
0 commit comments