#include #include "../src/piece-table.h" int main() { piece_table *pt = piece_table_create("1234567890"); piece_table_insert(pt, 10, "abcdefgh", 8); piece_table_insert(pt, 18, "abcdefgh", 8); if (strcmp(piece_table_to_string(pt), "1234567890abcdefghabcdefgh")) return 1; /* TODO: must have two pieces if optimized properly 1234567890 abcdefghabcdefgh TODO: check other things too */ piece_table_destroy(pt); return 0; }