#ifndef SEGMENT_CX4_TEST_INC_CPP
#define SEGMENT_CX4_TEST_INC_CPP
#include "segment.test.inc.cpp"
#include "segment.cx4.inc.cpp"
class Cx4Test: public SegmentTest {
public:
static bool test(const char *name, const Layout &l, int msz, int x, int y, int z) {
Stage st(name);
{
SegmentCx4 s(l.getD(), msz);
testSegment("SegmentCx4", s, l, x, y, z, 0.001);
}
return st;
}
static bool test(const char *name = "cx4") {
Stage st(name);
test("square-16x3", Layout(16, 16, 3), 5, 1, 2, 0);
test("random-rect", Layout(23, 58, 4).expandX(2, 0).expandY(5, 3).expandZ(3, 1), 7, 4, 5, 3);
return st;
}
};
#endif