/**
 * @fileoverview Checker (output validator) compilation, testing, and execution utilities.
 * Provides functions to run checkers on solution outputs, validate checker behavior,
 * and test checkers against their own test suites.
 */
import type { LocalChecker, CheckerVerdict, SolutionTag } from '../types';
/**
 * Runs a checker program to validate solution output against expected answer.
 * The checker receives three files: input, output (participant's answer), and answer (jury's answer).
 *
 * @param {string} execCommand - Path to compiled checker executable
 * @param {string} inputFilePath - Path to test input file
 * @param {string} outputFilePath - Path to participant's output file
 * @param {string} answerFilePath - Path to jury's answer file
 * @param {CheckerVerdict} expectedVerdict - Expected verdict (OK, WA, PE)
 *
 * @throws {Error} If checker verdict doesn't match expected verdict
 * @throws {Error} If checker exceeds time or memory limits (exits process)
 *
 * @example
 * await runChecker(
 *   './checker',
 *   'tests/test1.txt',
 *   'output.txt',
 *   'answer.txt',
 *   'OK'
 * );
 */
export declare function runChecker(execCommand: string, inputFilePath: string, outputFilePath: string, answerFilePath: string, expectedVerdict: CheckerVerdict): Promise<void>;
/**
 * Ensures a checker is defined in the configuration.
 * Type assertion function that throws if checker is undefined.
 *
 * @param {LocalChecker | undefined} checker - Checker configuration to validate
 *
 * @throws {Error} If no checker is defined in configuration
 *
 * @example
 * const config = readConfigFile();
 * ensureCheckerExists(config.checker);
 * // Now TypeScript knows checker is defined
 */
export declare function ensureCheckerExists(checker: LocalChecker | undefined): asserts checker is LocalChecker;
/**
 * Tests the checker against its own test suite.
 * Compiles the checker, creates test files, runs all tests, and cleans up.
 * This is a cancellation point - fails fast on first error.
 *
 * @throws {Error} If checker tests fail
 * @throws {Error} If checker compilation fails
 * @throws {Error} If test file parsing fails
 *
 * @example
 * // From actions.ts testWhat command
 * await testCheckerItself();
 */
export declare function testCheckerItself(): Promise<void>;
/**
 * Runs all checker self-tests and validates results.
 * Uses pre-compiled checker via getCompiledCommandToRun.
 * Fails fast - throws on first test failure.
 *
 * @param {LocalChecker} checker - Checker configuration
 *
 * @throws {Error} If checker compilation fails
 * @throws {Error} If any test fails
 *
 * @example
 * const config = readConfigFile();
 * await runCheckerTests(config.checker);
 */
export declare function runCheckerTests(checker: LocalChecker): Promise<void>;
/**
 * Compiles a checker program.
 * Handles both custom checkers and standard testlib checkers.
 * Wrapper around compileCPP with consistent error handling.
 *
 * @param {LocalChecker} checker - Checker configuration
 * @returns {Promise<string>} Path to compiled checker executable
 *
 * @throws {Error} If compilation fails
 *
 * @example
 * // Custom checker
 * const path = await compileChecker({ name: 'checker', source: 'checker/Checker.cpp', isStandard: false });
 *
 * @example
 * // Standard checker
 * const path = await compileChecker({ name: 'wcmp', source: 'wcmp.cpp', isStandard: true });
 */
export declare function compileChecker(checker: LocalChecker): Promise<void>;
/**
 * Determines expected checker verdict based on solution tag (Polygon format).
 * Maps Polygon solution tags to their expected checker verdicts.
 *
 * @param {SolutionTag} tag - Polygon solution tag
 * @returns {CheckerVerdict} Expected verdict for this solution tag
 *
 * @example
 * getExpectedCheckerVerdict('MA');  // Returns: 'OK' (Main Accepted)
 * getExpectedCheckerVerdict('OK');  // Returns: 'OK' (Alternative correct)
 * getExpectedCheckerVerdict('WA');  // Returns: 'WRONG_ANSWER'
 * getExpectedCheckerVerdict('PE');  // Returns: 'PRESENTATION_ERROR'
 * getExpectedCheckerVerdict('TL');  // Returns: 'OK' (TLE handled elsewhere)
 * getExpectedCheckerVerdict('RJ');  // Returns: 'WRONG_ANSWER' (Rejected)
 */
export declare function getExpectedCheckerVerdict(tag: SolutionTag): CheckerVerdict;
//# sourceMappingURL=checker.d.ts.map