skip to content
==> tests/constants.c <==
1/* Every constant of @ajax/mesh-abi-placement equals the Rust's (values printed by the Rust itself), and the
2 * Rust const asserts that need a function call hold. Generated from alpha-rust-mesh. */
3#include "mesh/abi/placement.h"
4#include "mesh/check.h"
5
6#include <stdint.h>
7#include <string.h>
8
9int main(void) {
10    CHECK_U(MESH_PLACE_CAP_NONE, UINT64_C(0));
11    CHECK_U(MESH_PLACE_CAP_PIN, UINT64_C(1));
12    CHECK_U(MESH_PLACE_CAP_SPLIT, UINT64_C(2));
13    CHECK_U(MESH_PLACE_CAPS_LEN, 3);
14    CHECK_S(MESH_PLACE_CAPS[0], "none");
15    CHECK_S(MESH_PLACE_CAPS[1], "pin");
16    CHECK_S(MESH_PLACE_CAPS[2], "split");
17    CHECK_U(MESH_PLACE_LOCAL, UINT64_C(0));
18    CHECK_U(MESH_PLACE_PIN, UINT64_C(1));
19    CHECK_U(MESH_PLACE_SPLIT, UINT64_C(2));
20    CHECK_U(MESH_PLACES_LEN, 3);
21    CHECK_S(MESH_PLACES[0], "local");
22    CHECK_S(MESH_PLACES[1], "pin");
23    CHECK_S(MESH_PLACES[2], "split");
24    CHECK_U(MESH_PLACE_PARTS_MAX, UINT64_C(32));
25    CHECK_U(MESH_PART_NONE, UINT64_C(255));
26    CHECK_U(MESH_SH_SEQ, UINT64_C(0));
27    CHECK_U(MESH_SH_MODE, UINT64_C(4));
28    CHECK_U(MESH_SH_SYS, UINT64_C(8));
29    CHECK_U(MESH_SH_LAT_US, UINT64_C(12));
30    CHECK_U(MESH_SH_BUF, UINT64_C(16));
31    CHECK_U(MESH_SH_BUF_BYTES, UINT64_C(16));
32    CHECK_U(MESH_SHB_FRAME, UINT64_C(0));
33    CHECK_U(MESH_SHB_SYS, UINT64_C(4));
34    CHECK_U(MESH_SH_DATA, UINT64_C(256));
35    return mesh_check_done();
36}