MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / testRoundtrip

Function testRoundtrip

tests/applesingle.cc:18–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18static void testRoundtrip()
19{
20 AppleSingle t;
21 t.data = Bytes("This is the data fork");
22 t.rsrc = Bytes("This is the resource fork");
23 t.creator = Bytes("CREA");
24 t.type = Bytes("TYPE");
25
26 Bytes tb = t.render();
27 AppleSingle s;
28 s.parse(tb);
29
30 AssertThat(s.data, Equals(t.data));
31 AssertThat(s.rsrc, Equals(t.rsrc));
32 AssertThat(s.creator, Equals(t.creator));
33 AssertThat(s.type, Equals(t.type));
34}
35
36int main(void)
37{

Callers 1

mainFunction · 0.85

Calls 3

BytesClass · 0.50
renderMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected