| 110 | |
| 111 | |
| 112 | static void test_featurebits_or(void) |
| 113 | { |
| 114 | u8 *f1 = tal_arr(tmpctx, u8, 0); |
| 115 | u8 *f2 = tal_arr(tmpctx, u8, 0); |
| 116 | u8 *control = tal_arr(tmpctx, u8, 0); |
| 117 | for (size_t i = 0; i < 100; i += 3) { |
| 118 | set_feature_bit(&f1, i); |
| 119 | set_feature_bit(&control, i); |
| 120 | } |
| 121 | |
| 122 | for (size_t i = 0; i < 10; i += 2) { |
| 123 | set_feature_bit(&f2, i); |
| 124 | set_feature_bit(&control, i); |
| 125 | } |
| 126 | u8 *result = featurebits_or(tmpctx, take(f1), f2); |
| 127 | assert(tal_arr_eq(result, control)); |
| 128 | } |
| 129 | |
| 130 | static bool feature_set_eq(const struct feature_set *f1, |
| 131 | const struct feature_set *f2) |
no test coverage detected