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

Function test_patternconstruction

tests/fluxpattern.cc:43–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void test_patternconstruction()
44{
45 {
46 FluxPattern fp(16, 0x0003);
47 assert(fp._bits, 16U);
48 assert(fp._intervals, ivector{1});
49 }
50
51 {
52 FluxPattern fp(16, 0xc000);
53 assert(fp._bits, 16U);
54 assert(fp._intervals, (ivector{1, 15}));
55 }
56
57 {
58 FluxPattern fp(16, 0x0050);
59 assert(fp._bits, 16U);
60 assert(fp._intervals, (ivector{2, 5}));
61 }
62
63 {
64 FluxPattern fp(16, 0x0070);
65 assert(fp._bits, 16U);
66 assert(fp._intervals, (ivector{1, 1, 5}));
67 }
68
69 {
70 FluxPattern fp(16, 0x0070);
71 assert(fp._bits, 16U);
72 assert(fp._intervals, (ivector{1, 1, 5}));
73 }
74
75 {
76 FluxPattern fp(16, 0x0110);
77 assert(fp._bits, 16U);
78 assert(fp._intervals, (ivector{4, 5}));
79 }
80}
81
82void test_patternmatchingwithouttrailingzeros()
83{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected