MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / testBufferProvider

Method testBufferProvider

tests/test_core.cpp:114–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 void testBufferProvider() {
115 QByteArray data(16, '\0');
116 data[0] = 0x42;
117 data[4] = 0x10;
118 data[5] = 0x20;
119
120 rcx::BufferProvider prov(data);
121 QVERIFY(prov.isValid());
122 QCOMPARE(prov.size(), 16);
123 QCOMPARE(prov.readU8(0), (uint8_t)0x42);
124 QCOMPARE(prov.readU16(4), (uint16_t)0x2010);
125 }
126
127 void testNullProvider() {
128 rcx::NullProvider prov;

Callers

nothing calls this directly

Calls 4

isValidMethod · 0.80
readU8Method · 0.80
readU16Method · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected