MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / initialize_sample

Function initialize_sample

tests/DCPS/Compiler/vread_vwrite/VreadVwriteTest.cpp:124–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void initialize_sample(Mod::Sample& sample)
125{
126 sample.id = 5;
127 sample.data = "The most rapid of JSONs";
128 sample.enu = Mod::three;
129 sample.enu2 = Mod::two;
130 sample.bt.o = 129;
131#if OPENDDS_HAS_EXPLICIT_INTS
132 sample.bt.u8 = 130;
133 sample.bt.i8 = -50;
134#endif
135 sample.bt.us = 32777u;
136 sample.bt.s = -32765;
137 sample.bt.ul = 2147483690u;
138 sample.bt.l = -2147483632;
139 sample.bt.ull = 9223372036854775810ull;
140 sample.bt.ll = -9223372036854775806ll;
141 sample.bt.f = 0.00141f;
142 sample.bt.d = -0.00000141;
143 ACE_CDR_LONG_DOUBLE_ASSIGNMENT(sample.bt.ld, 1e34);
144 sample.bt.b = false;
145 sample.bt.c = '\r';
146 sample.bt.str = "The most JSON of rapids";
147 sample.bt.wstr = L"\u03a4\u03b7\u03b9\u03c3\u0020\u03b9\u03c3\u0020\u03b1\u0020\u03c4\u03b5\u03c3\u03c4\u0020\u03bf\u03c6\u0020\u03c4\u03b7\u03b5\u0020\u03b5\u03bc\u03b5\u03c1\u03b3\u03b5\u03bd\u03c8\u03c5\u0020\u03b2\u03c1\u03bf\u03b1\u03b4\u03c8\u03b1\u03c3\u03c4\u0020\u03c3\u03c5\u03c3\u03c4\u03b5\u03bc\u002e\u0020\u05e4\u05da\u05e7\u05e9\u05d3\u05e7\u0020\u05dc\u05e7\u05e7\u05e4\u0020\u05d8\u05dd\u05d5\u05e8\u0020\u05d9\u05e9\u05de\u05d2\u05d3\u0020\u05df\u05de\u05d3\u05df\u05d2\u05e7\u0020\u05d0\u05d9\u05e7\u0020\u05d4\u05e7\u05d9\u05df\u05d1\u05da\u05e7\u0020\u05e9\u05d0\u0020\u05e9\u05da\u05da\u0020\u05d0\u05df\u05e6\u05e7\u05d3";
148 sample.seq1.length(7);
149 sample.seq1[0] = 1;
150 sample.seq1[1] = 1;
151 sample.seq1[2] = 2;
152 sample.seq1[3] = 3;
153 sample.seq1[4] = 5;
154 sample.seq1[5] = 8;
155 sample.seq1[6] = 13;
156 sample.seq2.length(3);
157 sample.seq2[0] = 42;
158 sample.seq2[1] = 777;
159 sample.seq2[2] = 123454321;
160 sample.seq3.length(8);
161 sample.seq3[0] = 1;
162 sample.seq3[1] = 1;
163 sample.seq3[2] = 2;
164 sample.seq3[3] = 3;
165 sample.seq3[4] = 5;
166 sample.seq3[5] = 8;
167 sample.seq3[6] = 13;
168 sample.seq3[7] = 21;
169 sample.ns.length(2);
170 sample.ns[0].length(3);
171 sample.ns[0][0] = "alvin";
172 sample.ns[0][1] = "simon";
173 sample.ns[0][2] = "theodore";
174 sample.ns[1].length(4);
175 sample.ns[1][0] = "leonardo";
176 sample.ns[1][1] = "donatello";
177 sample.ns[1][2] = "michelangelo";
178 sample.ns[1][3] = "raphael";
179 sample.mu._d(Mod::three);
180 sample.mu.d(5678);
181 sample.ca[0] = 'f';

Callers 1

TESTFunction · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected