| 22 | } |
| 23 | |
| 24 | UNIT_TEST(BWT_Smoke) |
| 25 | { |
| 26 | { |
| 27 | TEST_EQUAL(BWT(0 /* n */, nullptr /* s */, nullptr /* r */), 0, ()); |
| 28 | } |
| 29 | |
| 30 | { |
| 31 | string r; |
| 32 | TEST_EQUAL(BWT(string() /* s */, r /* r */), 0, ()); |
| 33 | } |
| 34 | |
| 35 | { |
| 36 | string const s = "aaaaaa"; |
| 37 | string r; |
| 38 | TEST_EQUAL(BWT(s, r), 5, ()); |
| 39 | TEST_EQUAL(r, s, ()); |
| 40 | } |
| 41 | |
| 42 | { |
| 43 | string const s = "mississippi"; |
| 44 | string r; |
| 45 | TEST_EQUAL(BWT(s, r), 4, ()); |
| 46 | TEST_EQUAL(r, "pssmipissii", ()); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | UNIT_TEST(RevBWT_Smoke) |
| 51 | { |