==> tests/fields.c <==1/* disjoint and fields_end, with the cases of the Rust's layout_tests
2 * (the clash the n-way / being-port merge had: H_SYSTEMS and H_CC both at 0x30). */
3#include "mesh/abi/fields.h"
4#include "mesh/check.h"
5
6int main(void) {
7 const mesh_field same[] = {{0x30, 4}, {0x30, 4}}, inside[] = {{0x50, 32}, {0x54, 4}}, apart[] = {{0x30, 4}, {0x34, 4}};
8 CHECK(!mesh_disjoint(same, 2));
9 CHECK(!mesh_disjoint(inside, 2));
10 CHECK(mesh_disjoint(apart, 2));
11 CHECK(mesh_disjoint(apart, 0));
12 CHECK_U(mesh_fields_end(apart, 2), 0x38);
13 CHECK_U(mesh_fields_end(inside, 2), 0x70);
14 CHECK_U(mesh_fields_end(apart, 0), 0);
15 return mesh_check_done();
16}