MCPcopy Create free account
hub / github.com/catboost/catboost / TestVirtualInheritance

Method TestVirtualInheritance

util/generic/yexception_ut.cpp:191–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189#endif
190
191 inline void TestVirtualInheritance() {
192 TStringStream ss;
193
194 OUTS = &ss;
195
196 class TA {
197 public:
198 inline TA() {
199 *OUTS << "A";
200 }
201 };
202
203 class TB {
204 public:
205 inline TB() {
206 *OUTS << "B";
207 }
208 };
209
210 class TC: public virtual TB, public virtual TA {
211 public:
212 inline TC() {
213 *OUTS << "C";
214 }
215 };
216
217 class TD: public virtual TA {
218 public:
219 inline TD() {
220 *OUTS << "D";
221 }
222 };
223
224 class TE: public TC, public TD {
225 public:
226 inline TE() {
227 *OUTS << "E";
228 }
229 };
230
231 TE e;
232
233 UNIT_ASSERT_EQUAL(ss.Str(), "BACDE");
234 }
235
236 inline void TestVirtuality() {
237 try {

Callers

nothing calls this directly

Calls 1

StrMethod · 0.45

Tested by

no test coverage detected