package com.correx.testing.fixtures.inference

import com.correx.core.inference.Token
import com.correx.core.inference.Tokenizer

/**
 * Character-based approximation. Deterministic. Not model-accurate.
 * Sufficient for contract and budget tests.
 */
@Suppress("MagicNumber")
class MockTokenizer : Tokenizer {
    override suspend fun tokenize(text: String): List<Token> =
        List(text.chunked(4).size) { i -> Token(i) }   // 1 token ≈ 4 chars

    override suspend fun countTokens(text: String): Int =
        (text.length + 3) / 4
}
