25 using namespace analysis;
27 class TestAutoIndex :
public MinIndexSelection {
29 TestAutoIndex() : MinIndexSelection() {}
31 int getNumMatchings() {
32 return matching.getNumMatchings();
40 for (
size_t i = 0;
i < arity; ++
i) {
49 TEST(Matching, StaticTest_1) {
54 uint64_t patterns[] = {1, 3, 5, 7, 15, 23, 31};
55 for (
auto pattern : patterns) {
57 order.addSearch(search);
62 int num = order.getNumMatchings();
67 TEST(Matching, StaticTest_2) {
73 uint64_t patterns[] = {7, 11, 23, 32, 33, 39, 49, 53, 104, 121};
74 for (
auto pattern : patterns) {
75 SearchSignature search =
setBits(arity, pattern);
76 order.addSearch(search);
81 int num = order.getNumMatchings();
86 TEST(Matching, TestOver64BitSignature) {
91 SearchSignature first(arity);
115 nodes.insert(second);
117 nodes.insert(fourth);
120 order.addSearch(first);
121 order.addSearch(second);
122 order.addSearch(third);
123 order.addSearch(fourth);
124 order.addSearch(fifth);
127 int num = order.getNumMatchings();