up_rust/test_support/mod.rs
1/********************************************************************************
2 * Copyright (c) 2026 Contributors to the Eclipse Foundation
3 *
4 * See the NOTICE file(s) distributed with this work for additional
5 * information regarding copyright ownership.
6 *
7 * This program and the accompanying materials are made available under the
8 * terms of the Apache License Version 2.0 which is available at
9 * https://www.apache.org/licenses/LICENSE-2.0
10 *
11 * SPDX-License-Identifier: Apache-2.0
12 ********************************************************************************/
13
14//! Test, fake, proof, and fixture support. These are not production transport evidence.
15
16#[cfg(feature = "payload-contract-fixtures")]
17pub use crate::bench_fixtures;
18#[cfg(feature = "test-util")]
19pub use crate::utransport::MockLocalUriProvider;
20#[cfg(all(feature = "test-util", feature = "zero-copy-transport"))]
21pub use crate::InMemoryZeroCopyTransport;
22#[cfg(feature = "test-util")]
23pub use crate::{MockTransport, MockUListener};
24
25#[cfg(any(test, feature = "test-util"))]
26#[repr(C)]
27#[derive(
28 Clone,
29 Copy,
30 Debug,
31 Default,
32 Eq,
33 PartialEq,
34 crate::StablePayload,
35 crate::ByteBackedStablePayload,
36 crate::StablePayloadInit,
37)]
38#[stable_payload(type_name = "uprotocol.test.StableTestBytes")]
39/// Four fixed bytes with stable-payload derives, for contract tests.
40pub struct StableTestBytes {
41 /// The payload bytes.
42 pub bytes: [u8; 4],
43}