Minimal dependency-free XML parser and serializer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cbort: rename get_mem/get_int_mem/get_nth → mem/int_mem/nth (merlint E331)

Updated across 11 files in the monorepo that reference these functions.

+8 -8
+8 -8
test/test_xmlt.ml
··· 1170 1170 let codec = Xmlt.attr "email" in 1171 1171 decode_err codec {|<person name="Alice"/>|} 1172 1172 1173 - (* get_nth: extract the nth child element *) 1173 + (* nth: extract the nth child element *) 1174 1174 let test_get_nth () = 1175 1175 let codec = Xmlt.nth 1 Xmlt.string in 1176 1176 let v = 1177 1177 decode_ok codec "<root><a>first</a><b>second</b><c>third</c></root>" 1178 1178 in 1179 - Alcotest.(check string) "get_nth 1" "second" v 1179 + Alcotest.(check string) "nth 1" "second" v 1180 1180 1181 1181 let test_get_nth_first () = 1182 1182 let codec = Xmlt.nth 0 Xmlt.int in 1183 1183 let v = decode_ok codec "<items><n>10</n><n>20</n><n>30</n></items>" in 1184 - Alcotest.(check int) "get_nth 0" 10 v 1184 + Alcotest.(check int) "nth 0" 10 v 1185 1185 1186 1186 let test_get_nth_last () = 1187 1187 let codec = Xmlt.nth 2 Xmlt.string in 1188 1188 let v = decode_ok codec "<items><a>x</a><b>y</b><c>z</c></items>" in 1189 - Alcotest.(check string) "get_nth 2" "z" v 1189 + Alcotest.(check string) "nth 2" "z" v 1190 1190 1191 1191 let test_get_nth_oob () = 1192 1192 let codec = Xmlt.nth 5 Xmlt.string in ··· 1419 1419 Alcotest.test_case "get_attr" `Quick test_get_attr; 1420 1420 Alcotest.test_case "get_attr second" `Quick test_get_attr_second; 1421 1421 Alcotest.test_case "get_attr missing" `Quick test_get_attr_missing; 1422 - Alcotest.test_case "get_nth 1" `Quick test_get_nth; 1423 - Alcotest.test_case "get_nth 0" `Quick test_get_nth_first; 1424 - Alcotest.test_case "get_nth 2" `Quick test_get_nth_last; 1425 - Alcotest.test_case "get_nth out of bounds" `Quick test_get_nth_oob; 1422 + Alcotest.test_case "nth 1" `Quick test_get_nth; 1423 + Alcotest.test_case "nth 0" `Quick test_get_nth_first; 1424 + Alcotest.test_case "nth 2" `Quick test_get_nth_last; 1425 + Alcotest.test_case "nth out of bounds" `Quick test_get_nth_oob; 1426 1426 (* Updates *) 1427 1427 (* Introspection *) 1428 1428 Alcotest.test_case "kind string" `Quick test_kind_string;