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

Function test_split

tests/bytes.cc:129–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129static void test_split()
130{
131 AssertThat((Bytes{}).split(0), Equals(std::vector<Bytes>{Bytes{}}));
132
133 AssertThat(
134 (Bytes{0}).split(0), Equals(std::vector<Bytes>{Bytes{}, Bytes{}}));
135
136 AssertThat((Bytes{1}).split(0), Equals(std::vector<Bytes>{Bytes{1}}));
137
138 AssertThat(
139 (Bytes{1, 0}).split(0), Equals(std::vector<Bytes>{Bytes{1}, Bytes{}}));
140
141 AssertThat(
142 (Bytes{0, 1}).split(0), Equals(std::vector<Bytes>{Bytes{}, Bytes{1}}));
143
144 AssertThat((Bytes{1, 0, 1}).split(0),
145 Equals(std::vector<Bytes>{Bytes{1}, Bytes{1}}));
146}
147
148static void test_tobits()
149{

Callers 1

mainFunction · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected