#include <stdio.h>
#include <string.h>

#include "bio/bio_gguf.h"

int main(void) {
    uint32_t toks[16];
    char text[16];
    const char *prompt = "hi";
    const uint32_t n = bio_tokenize_bytes(prompt, toks, 16u);
    if (n != 2u || toks[0] != 'h' || toks[1] != 'i') {
        fprintf(stderr, "byte tokenizer failed\n");
        return 1;
    }
    if (bio_detokenize_bytes(toks, n, text, sizeof(text)) != 2u ||
        strcmp(text, "hi") != 0) {
        fprintf(stderr, "byte detokenizer failed\n");
        return 1;
    }
    puts("bio-tests: tokenizer fallback ok");
    return 0;
}
