41 lines
703 B
C
41 lines
703 B
C
// Kyler Olsen
|
|
// YREA SLS
|
|
// Tests Header
|
|
// October 2025
|
|
|
|
#ifndef SLS_TESTS_H
|
|
#define SLS_TESTS_H
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "../sls/sls_errors.h"
|
|
|
|
extern const char *TEST_FILE_NAME;
|
|
|
|
typedef enum {
|
|
TEST_ERROR,
|
|
TEST_LOGIC_FAIL,
|
|
TEST_ERROR_FAIL,
|
|
TEST_PASS,
|
|
TEST_NOT_IMPLEMENTED,
|
|
} TestResultType;
|
|
|
|
typedef struct {
|
|
const char *name;
|
|
TestResultType status;
|
|
union {
|
|
char *message; // status in { TEST_LOGIC_FAIL, }
|
|
SlsError error; // status in { TEST_ERROR, TEST_ERROR_FAIL, }
|
|
};
|
|
} TestResult;
|
|
|
|
typedef struct {
|
|
const char *section;
|
|
size_t count;
|
|
TestResult* tests;
|
|
} TestsReport;
|
|
|
|
TestsReport run_lexer_tests();
|
|
|
|
#endif // SLS_TESTS_H
|