1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 ZeroDDS Contributors
//! **Counter-check.** `Dialect::Hdds` reproduces each of the four
//! recorded departures from XTypes 1.3, and the axis that carries it is
//! the only thing that does.
//!
//! Each test names the recorded `.bin` it reads, encodes the case under
//! `Dialect::Hdds` and holds the result against those octets, and then
//! encodes the same case under `Dialect::Specification` and asserts the
//! two differ — so an axis that stopped reaching the wire fails here as
//! a recorded row that no longer comes out, rather than passing on a
//! constant.
//!
//! The cases and their samples are `tests/interop-corpus/<case>/`; the
//! octets are `tests/interop-results/<case>/hdds/`.
use PathBuf;
use ;
use ;
use ProbeRequest;
/// The octets `tests/interop-results/<case>/hdds/<slot>.bin` records.
/// One case from `tests/interop-corpus/<case>/`, encoded under `dialect`.
/// The writer under `Dialect::Hdds` and the recorded bytes are the same,
/// and `Dialect::Specification` — the clause — is not.
/// [`ElementPadding::Packed`]: the second `long` of a `Cell items[2]`
/// follows the first element's `short` with no padding to a four-octet
/// boundary — the `01000000 0200 03000000` of the recorded row.
///
/// [`ElementPadding::Packed`]: zerodds_ast_layout::ElementPadding::Packed
/// [`AggregateDelimiter::Never`]: an `@appendable` sample takes no
/// DHEADER under XCDR2, where §7.4.3.5.3 rule (2) writes `0e000000`.
///
/// [`AggregateDelimiter::Never`]: zerodds_ast_layout::AggregateDelimiter::Never
/// [`SequenceElementDelimiter::BeforeEachNonFinalElement`]: the `06 00
/// 00 00` in front of each `@appendable Cell` element of a `sequence`,
/// under XCDR1 as well as XCDR2.
///
/// [`SequenceElementDelimiter::BeforeEachNonFinalElement`]: zerodds_ast_layout::SequenceElementDelimiter::BeforeEachNonFinalElement
/// [`WstringCodeUnits::Utf8`]: `w = "abc"` goes out as `04 00 00 00 61
/// 62 63 00`, three UTF-8 octets and a NUL inside the declared length.
///
/// [`WstringCodeUnits::Utf8`]: zerodds_ast_layout::WstringCodeUnits::Utf8