==> tests/constants.c <==1/* Every constant of @ajax/mesh-abi-backend 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/backend.h"
4#include "mesh/check.h"
5
6#include <stdint.h>
7#include <string.h>
8
9int main(void) {
10 CHECK_U(MESH_BACKEND_CUDA, UINT64_C(0));
11 CHECK_U(MESH_BACKEND_METAL, UINT64_C(1));
12 CHECK_U(MESH_BACKEND_WASM, UINT64_C(2));
13 CHECK_U(MESH_BACKEND_NATIVE, UINT64_C(3));
14 CHECK_U(MESH_BACKENDS_LEN, 4);
15 CHECK_S(MESH_BACKENDS[0], "cuda");
16 CHECK_S(MESH_BACKENDS[1], "metal");
17 CHECK_S(MESH_BACKENDS[2], "wasm");
18 CHECK_S(MESH_BACKENDS[3], "native");
19 CHECK(mesh_backend_kind(mesh_backend_word(MESH_BACKEND_METAL, 9)) == MESH_BACKEND_METAL); /* backend_kind(backend_word(BACKEND_METAL, 9)) == BACKEND_METAL */
20 CHECK(mesh_backend_family(mesh_backend_word(MESH_BACKEND_METAL, 9)) == 9); /* backend_family(backend_word(BACKEND_METAL, 9)) == 9 */
21 CHECK(mesh_backend_word(MESH_BACKEND_CUDA, 0) == 0); /* backend_word(BACKEND_CUDA, 0) == 0 */
22 return mesh_check_done();
23}