@@ -40,22 +40,9 @@ class accessor
4040{
4141public:
4242 using block::block;
43-
44- size_t malleated32_size () const NOEXCEPT
45- {
46- return block::malleated32_size ();
47- }
48-
49- bool is_malleated32_ (size_t width) const NOEXCEPT
50- {
51- return block::is_malleated32 (width);
52- }
53-
54- static constexpr bool is_malleable32_ (size_t set,
55- size_t width) NOEXCEPT
56- {
57- return block::is_malleable32 (set, width);
58- }
43+ using block::malleated32_size;
44+ using block::is_malleated32;
45+ using block::is_malleable32;
5946};
6047
6148struct txs
@@ -155,9 +142,9 @@ BOOST_AUTO_TEST_CASE(block__malleable__empty__false)
155142 BOOST_REQUIRE (!instance.is_malleable ());
156143 BOOST_REQUIRE (!instance.is_malleable64 ());
157144 BOOST_REQUIRE (!instance.is_malleable32 ());
158- BOOST_REQUIRE (!instance.is_malleable32_ (0 , 0 ));
145+ BOOST_REQUIRE (!instance.is_malleable32 (0 , 0 ));
159146 BOOST_REQUIRE (!instance.is_malleated32 ());
160- BOOST_REQUIRE (!instance.is_malleated32_ (0 ));
147+ BOOST_REQUIRE (!instance.is_malleated32 (0 ));
161148}
162149
163150// is_malleable
@@ -326,108 +313,108 @@ BOOST_AUTO_TEST_CASE(block__is_malleable64__three_64_64_64__true)
326313
327314BOOST_AUTO_TEST_CASE (block__is_malleable32__overflow__false)
328315{
329- BOOST_REQUIRE (!accessor::is_malleable32_ (0 , 1 ));
330- BOOST_REQUIRE (!accessor::is_malleable32_ (1 , 50 ));
331- BOOST_REQUIRE (!accessor::is_malleable32_ (2 , 100 ));
316+ BOOST_REQUIRE (!accessor::is_malleable32 (0 , 1 ));
317+ BOOST_REQUIRE (!accessor::is_malleable32 (1 , 50 ));
318+ BOOST_REQUIRE (!accessor::is_malleable32 (2 , 100 ));
332319}
333320
334321BOOST_AUTO_TEST_CASE (block__is_malleable32__various__expected)
335322{
336- BOOST_REQUIRE (!accessor::is_malleable32_ (1 , 1 ));
337-
338- BOOST_REQUIRE (!accessor::is_malleable32_ (2 , 1 ));
339- BOOST_REQUIRE (!accessor::is_malleable32_ (2 , 2 ));
340-
341- BOOST_REQUIRE ( accessor::is_malleable32_ (3 , 1 )); // 4:1
342- BOOST_REQUIRE (!accessor::is_malleable32_ (3 , 2 ));
343- BOOST_REQUIRE (!accessor::is_malleable32_ (3 , 3 ));
344-
345- BOOST_REQUIRE (!accessor::is_malleable32_ (4 , 1 ));
346- BOOST_REQUIRE (!accessor::is_malleable32_ (4 , 2 ));
347- BOOST_REQUIRE (!accessor::is_malleable32_ (4 , 3 ));
348- BOOST_REQUIRE (!accessor::is_malleable32_ (4 , 4 ));
349-
350- BOOST_REQUIRE ( accessor::is_malleable32_ (5 , 1 )); // 6:1
351- BOOST_REQUIRE (!accessor::is_malleable32_ (5 , 2 ));
352- BOOST_REQUIRE (!accessor::is_malleable32_ (5 , 3 ));
353- BOOST_REQUIRE (!accessor::is_malleable32_ (5 , 4 ));
354- BOOST_REQUIRE (!accessor::is_malleable32_ (5 , 5 ));
355-
356- BOOST_REQUIRE (!accessor::is_malleable32_ (6 , 1 ));
357- BOOST_REQUIRE ( accessor::is_malleable32_ (6 , 2 )); // 8:2
358- BOOST_REQUIRE (!accessor::is_malleable32_ (6 , 3 ));
359- BOOST_REQUIRE (!accessor::is_malleable32_ (6 , 4 ));
360- BOOST_REQUIRE (!accessor::is_malleable32_ (6 , 5 ));
361- BOOST_REQUIRE (!accessor::is_malleable32_ (6 , 6 ));
362-
363- BOOST_REQUIRE ( accessor::is_malleable32_ (7 , 1 )); // 8:1
364- BOOST_REQUIRE (!accessor::is_malleable32_ (7 , 2 ));
365- BOOST_REQUIRE (!accessor::is_malleable32_ (7 , 3 ));
366- BOOST_REQUIRE (!accessor::is_malleable32_ (7 , 4 ));
367- BOOST_REQUIRE (!accessor::is_malleable32_ (7 , 5 ));
368- BOOST_REQUIRE (!accessor::is_malleable32_ (7 , 6 ));
369- BOOST_REQUIRE (!accessor::is_malleable32_ (7 , 7 ));
370-
371- BOOST_REQUIRE (!accessor::is_malleable32_ (8 , 1 ));
372- BOOST_REQUIRE (!accessor::is_malleable32_ (8 , 2 ));
373- BOOST_REQUIRE (!accessor::is_malleable32_ (8 , 3 ));
374- BOOST_REQUIRE (!accessor::is_malleable32_ (8 , 4 ));
375- BOOST_REQUIRE (!accessor::is_malleable32_ (8 , 5 ));
376- BOOST_REQUIRE (!accessor::is_malleable32_ (8 , 6 ));
377- BOOST_REQUIRE (!accessor::is_malleable32_ (8 , 7 ));
378- BOOST_REQUIRE (!accessor::is_malleable32_ (8 , 8 ));
379-
380- BOOST_REQUIRE ( accessor::is_malleable32_ (9 , 1 )); // 10:1
381- BOOST_REQUIRE (!accessor::is_malleable32_ (9 , 2 ));
382- BOOST_REQUIRE (!accessor::is_malleable32_ (9 , 3 ));
383- BOOST_REQUIRE (!accessor::is_malleable32_ (9 , 4 ));
384- BOOST_REQUIRE (!accessor::is_malleable32_ (9 , 5 ));
385- BOOST_REQUIRE (!accessor::is_malleable32_ (9 , 6 ));
386- BOOST_REQUIRE (!accessor::is_malleable32_ (9 , 7 ));
387- BOOST_REQUIRE (!accessor::is_malleable32_ (9 , 8 ));
388- BOOST_REQUIRE (!accessor::is_malleable32_ (9 , 9 ));
389-
390- BOOST_REQUIRE (!accessor::is_malleable32_ (10 , 1 ));
391- BOOST_REQUIRE ( accessor::is_malleable32_ (10 , 2 )); // 12:2
392- BOOST_REQUIRE (!accessor::is_malleable32_ (10 , 3 ));
393- BOOST_REQUIRE ( accessor::is_malleable32_ (11 , 1 )); // 12:1
394- BOOST_REQUIRE (!accessor::is_malleable32_ (11 , 2 ));
395- BOOST_REQUIRE (!accessor::is_malleable32_ (12 , 1 ));
396- BOOST_REQUIRE (!accessor::is_malleable32_ (12 , 2 ));
397- BOOST_REQUIRE (!accessor::is_malleable32_ (12 , 3 ));
398- BOOST_REQUIRE ( accessor::is_malleable32_ (12 , 4 )); // 16:4
399- BOOST_REQUIRE ( accessor::is_malleable32_ (13 , 1 )); // 14:1
400- BOOST_REQUIRE (!accessor::is_malleable32_ (13 , 2 ));
401- BOOST_REQUIRE (!accessor::is_malleable32_ (14 , 1 ));
402- BOOST_REQUIRE ( accessor::is_malleable32_ (14 , 2 )); // 16:2
403- BOOST_REQUIRE (!accessor::is_malleable32_ (14 , 3 ));
404- BOOST_REQUIRE ( accessor::is_malleable32_ (15 , 1 )); // 16:1
405- BOOST_REQUIRE (!accessor::is_malleable32_ (16 , 1 ));
406- BOOST_REQUIRE ( accessor::is_malleable32_ (17 , 1 )); // 18:1
407- BOOST_REQUIRE (!accessor::is_malleable32_ (18 , 1 ));
408- BOOST_REQUIRE ( accessor::is_malleable32_ (18 , 2 )); // 20:2
409- BOOST_REQUIRE ( accessor::is_malleable32_ (19 , 1 )); // 20:1
410- BOOST_REQUIRE (!accessor::is_malleable32_ (20 , 1 ));
411- BOOST_REQUIRE (!accessor::is_malleable32_ (20 , 2 ));
412- BOOST_REQUIRE (!accessor::is_malleable32_ (20 , 3 ));
413- BOOST_REQUIRE ( accessor::is_malleable32_ (20 , 4 )); // 24:4
414- BOOST_REQUIRE ( accessor::is_malleable32_ (21 , 1 )); // 22:1
415- BOOST_REQUIRE (!accessor::is_malleable32_ (22 , 1 ));
416- BOOST_REQUIRE ( accessor::is_malleable32_ (22 , 2 )); // 24:2
417- BOOST_REQUIRE ( accessor::is_malleable32_ (23 , 1 )); // 24:1
418- BOOST_REQUIRE (!accessor::is_malleable32_ (24 , 1 ));
419- BOOST_REQUIRE ( accessor::is_malleable32_ (25 , 1 )); // 26:1
420- BOOST_REQUIRE (!accessor::is_malleable32_ (26 , 1 ));
421- BOOST_REQUIRE ( accessor::is_malleable32_ (26 , 2 )); // 28:2
422- BOOST_REQUIRE ( accessor::is_malleable32_ (27 , 1 )); // 28:1
423- BOOST_REQUIRE (!accessor::is_malleable32_ (28 , 1 ));
424- BOOST_REQUIRE (!accessor::is_malleable32_ (28 , 2 ));
425- BOOST_REQUIRE (!accessor::is_malleable32_ (28 , 3 ));
426- BOOST_REQUIRE ( accessor::is_malleable32_ (28 , 4 )); // 32:4
427- BOOST_REQUIRE ( accessor::is_malleable32_ (29 , 1 )); // 30:1
428- BOOST_REQUIRE (!accessor::is_malleable32_ (30 , 1 ));
429- BOOST_REQUIRE ( accessor::is_malleable32_ (30 , 2 )); // 32:2
430- BOOST_REQUIRE ( accessor::is_malleable32_ (31 , 1 )); // 32:1
323+ BOOST_REQUIRE (!accessor::is_malleable32 (1 , 1 ));
324+
325+ BOOST_REQUIRE (!accessor::is_malleable32 (2 , 1 ));
326+ BOOST_REQUIRE (!accessor::is_malleable32 (2 , 2 ));
327+
328+ BOOST_REQUIRE ( accessor::is_malleable32 (3 , 1 )); // 4:1
329+ BOOST_REQUIRE (!accessor::is_malleable32 (3 , 2 ));
330+ BOOST_REQUIRE (!accessor::is_malleable32 (3 , 3 ));
331+
332+ BOOST_REQUIRE (!accessor::is_malleable32 (4 , 1 ));
333+ BOOST_REQUIRE (!accessor::is_malleable32 (4 , 2 ));
334+ BOOST_REQUIRE (!accessor::is_malleable32 (4 , 3 ));
335+ BOOST_REQUIRE (!accessor::is_malleable32 (4 , 4 ));
336+
337+ BOOST_REQUIRE ( accessor::is_malleable32 (5 , 1 )); // 6:1
338+ BOOST_REQUIRE (!accessor::is_malleable32 (5 , 2 ));
339+ BOOST_REQUIRE (!accessor::is_malleable32 (5 , 3 ));
340+ BOOST_REQUIRE (!accessor::is_malleable32 (5 , 4 ));
341+ BOOST_REQUIRE (!accessor::is_malleable32 (5 , 5 ));
342+
343+ BOOST_REQUIRE (!accessor::is_malleable32 (6 , 1 ));
344+ BOOST_REQUIRE ( accessor::is_malleable32 (6 , 2 )); // 8:2
345+ BOOST_REQUIRE (!accessor::is_malleable32 (6 , 3 ));
346+ BOOST_REQUIRE (!accessor::is_malleable32 (6 , 4 ));
347+ BOOST_REQUIRE (!accessor::is_malleable32 (6 , 5 ));
348+ BOOST_REQUIRE (!accessor::is_malleable32 (6 , 6 ));
349+
350+ BOOST_REQUIRE ( accessor::is_malleable32 (7 , 1 )); // 8:1
351+ BOOST_REQUIRE (!accessor::is_malleable32 (7 , 2 ));
352+ BOOST_REQUIRE (!accessor::is_malleable32 (7 , 3 ));
353+ BOOST_REQUIRE (!accessor::is_malleable32 (7 , 4 ));
354+ BOOST_REQUIRE (!accessor::is_malleable32 (7 , 5 ));
355+ BOOST_REQUIRE (!accessor::is_malleable32 (7 , 6 ));
356+ BOOST_REQUIRE (!accessor::is_malleable32 (7 , 7 ));
357+
358+ BOOST_REQUIRE (!accessor::is_malleable32 (8 , 1 ));
359+ BOOST_REQUIRE (!accessor::is_malleable32 (8 , 2 ));
360+ BOOST_REQUIRE (!accessor::is_malleable32 (8 , 3 ));
361+ BOOST_REQUIRE (!accessor::is_malleable32 (8 , 4 ));
362+ BOOST_REQUIRE (!accessor::is_malleable32 (8 , 5 ));
363+ BOOST_REQUIRE (!accessor::is_malleable32 (8 , 6 ));
364+ BOOST_REQUIRE (!accessor::is_malleable32 (8 , 7 ));
365+ BOOST_REQUIRE (!accessor::is_malleable32 (8 , 8 ));
366+
367+ BOOST_REQUIRE ( accessor::is_malleable32 (9 , 1 )); // 10:1
368+ BOOST_REQUIRE (!accessor::is_malleable32 (9 , 2 ));
369+ BOOST_REQUIRE (!accessor::is_malleable32 (9 , 3 ));
370+ BOOST_REQUIRE (!accessor::is_malleable32 (9 , 4 ));
371+ BOOST_REQUIRE (!accessor::is_malleable32 (9 , 5 ));
372+ BOOST_REQUIRE (!accessor::is_malleable32 (9 , 6 ));
373+ BOOST_REQUIRE (!accessor::is_malleable32 (9 , 7 ));
374+ BOOST_REQUIRE (!accessor::is_malleable32 (9 , 8 ));
375+ BOOST_REQUIRE (!accessor::is_malleable32 (9 , 9 ));
376+
377+ BOOST_REQUIRE (!accessor::is_malleable32 (10 , 1 ));
378+ BOOST_REQUIRE ( accessor::is_malleable32 (10 , 2 )); // 12:2
379+ BOOST_REQUIRE (!accessor::is_malleable32 (10 , 3 ));
380+ BOOST_REQUIRE ( accessor::is_malleable32 (11 , 1 )); // 12:1
381+ BOOST_REQUIRE (!accessor::is_malleable32 (11 , 2 ));
382+ BOOST_REQUIRE (!accessor::is_malleable32 (12 , 1 ));
383+ BOOST_REQUIRE (!accessor::is_malleable32 (12 , 2 ));
384+ BOOST_REQUIRE (!accessor::is_malleable32 (12 , 3 ));
385+ BOOST_REQUIRE ( accessor::is_malleable32 (12 , 4 )); // 16:4
386+ BOOST_REQUIRE ( accessor::is_malleable32 (13 , 1 )); // 14:1
387+ BOOST_REQUIRE (!accessor::is_malleable32 (13 , 2 ));
388+ BOOST_REQUIRE (!accessor::is_malleable32 (14 , 1 ));
389+ BOOST_REQUIRE ( accessor::is_malleable32 (14 , 2 )); // 16:2
390+ BOOST_REQUIRE (!accessor::is_malleable32 (14 , 3 ));
391+ BOOST_REQUIRE ( accessor::is_malleable32 (15 , 1 )); // 16:1
392+ BOOST_REQUIRE (!accessor::is_malleable32 (16 , 1 ));
393+ BOOST_REQUIRE ( accessor::is_malleable32 (17 , 1 )); // 18:1
394+ BOOST_REQUIRE (!accessor::is_malleable32 (18 , 1 ));
395+ BOOST_REQUIRE ( accessor::is_malleable32 (18 , 2 )); // 20:2
396+ BOOST_REQUIRE ( accessor::is_malleable32 (19 , 1 )); // 20:1
397+ BOOST_REQUIRE (!accessor::is_malleable32 (20 , 1 ));
398+ BOOST_REQUIRE (!accessor::is_malleable32 (20 , 2 ));
399+ BOOST_REQUIRE (!accessor::is_malleable32 (20 , 3 ));
400+ BOOST_REQUIRE ( accessor::is_malleable32 (20 , 4 )); // 24:4
401+ BOOST_REQUIRE ( accessor::is_malleable32 (21 , 1 )); // 22:1
402+ BOOST_REQUIRE (!accessor::is_malleable32 (22 , 1 ));
403+ BOOST_REQUIRE ( accessor::is_malleable32 (22 , 2 )); // 24:2
404+ BOOST_REQUIRE ( accessor::is_malleable32 (23 , 1 )); // 24:1
405+ BOOST_REQUIRE (!accessor::is_malleable32 (24 , 1 ));
406+ BOOST_REQUIRE ( accessor::is_malleable32 (25 , 1 )); // 26:1
407+ BOOST_REQUIRE (!accessor::is_malleable32 (26 , 1 ));
408+ BOOST_REQUIRE ( accessor::is_malleable32 (26 , 2 )); // 28:2
409+ BOOST_REQUIRE ( accessor::is_malleable32 (27 , 1 )); // 28:1
410+ BOOST_REQUIRE (!accessor::is_malleable32 (28 , 1 ));
411+ BOOST_REQUIRE (!accessor::is_malleable32 (28 , 2 ));
412+ BOOST_REQUIRE (!accessor::is_malleable32 (28 , 3 ));
413+ BOOST_REQUIRE ( accessor::is_malleable32 (28 , 4 )); // 32:4
414+ BOOST_REQUIRE ( accessor::is_malleable32 (29 , 1 )); // 30:1
415+ BOOST_REQUIRE (!accessor::is_malleable32 (30 , 1 ));
416+ BOOST_REQUIRE ( accessor::is_malleable32 (30 , 2 )); // 32:2
417+ BOOST_REQUIRE ( accessor::is_malleable32 (31 , 1 )); // 32:1
431418}
432419
433420BOOST_AUTO_TEST_SUITE_END ()
0 commit comments