40 lines
719 B
C
40 lines
719 B
C
// Kyler Olsen
|
|
// YREA SLS
|
|
// Tests Header
|
|
// October 2025
|
|
|
|
#ifndef SLS_TESTS_H
|
|
#define SLS_TESTS_H
|
|
|
|
#include <stdint.h>
|
|
#include "../sls/sls_errors.h"
|
|
|
|
const char *TEST_FILE_NAME = "TEST_FILE.SLS";
|
|
|
|
typedef enum {
|
|
TEST_ERROR,
|
|
TEST_LOGIC_FAIL,
|
|
TEST_ERROR_FAIL,
|
|
TEST_PASS,
|
|
TEST_NOT_IMPLEMENTED,
|
|
} TestResultType;
|
|
|
|
typedef struct {
|
|
const char *name;
|
|
TestResultType status;
|
|
union {
|
|
const 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
|