mirror of
https://github.com/open-goal/jak-project
synced 2026-05-25 23:35:33 -04:00
65206823ef
* A little project cleanup
* Script to grep decompiler results
* Compiler: Implement VNOP -> FNOP (.nop.vf)
temp: test new addition
* Compiler: Implement VMUL.xyzw (.mul.vf)
squash: cleaning up files i don't want to accidentally stage
* Compiler: Implement V[ADD|SUB|MUL].dest instructions
* Compiler: Implement V[ADD|SUB|MUL][x|y|w|z].dest instructions
* Compiler: Implement V[MIN|MAX]{[x|y|z|w]}.dest instructions
* Compiler: Implement V[ABS]{[x|y|z|w]}.dest instructions
* Cleanup review feedback before adding tests and docs
* Tests: Added missing emitter tests
* tests/compiler: Comprehensively test all new instructions
* docs: Add documentation for newly supported operations
* Remove unused vector-h function
* Address review feedback
54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <optional>
|
|
|
|
#include "inja.hpp"
|
|
#include "goalc/compiler/Compiler.h"
|
|
|
|
namespace GoalTest {
|
|
|
|
std::string escaped_string(const std::string& in);
|
|
|
|
struct CompilerTestRunner {
|
|
public:
|
|
Compiler* c = nullptr;
|
|
|
|
struct Test {
|
|
std::vector<std::string> expected, actual;
|
|
std::string test_name;
|
|
bool auto_pass = false;
|
|
};
|
|
|
|
std::vector<Test> tests;
|
|
|
|
std::string test_file_name(std::string templateStr);
|
|
|
|
void run_static_test(inja::Environment& env,
|
|
std::string& testCategory,
|
|
const std::string& test_file,
|
|
const std::vector<std::string>& expected,
|
|
std::optional<int> truncate = {});
|
|
|
|
void run_test(const std::string& test_category,
|
|
const std::string& test_file,
|
|
const std::vector<std::string>& expected,
|
|
std::optional<int> truncate = {});
|
|
|
|
void run_always_pass(const std::string& test_category, const std::string& test_file);
|
|
|
|
void print_summary();
|
|
};
|
|
|
|
void runtime_no_kernel();
|
|
void runtime_with_kernel();
|
|
void runtime_with_kernel_no_debug_segment();
|
|
|
|
void createDirIfAbsent(const std::string& path);
|
|
std::string getTemplateDir(const std::string& category);
|
|
std::string getGeneratedDir(const std::string& category);
|
|
std::string getFailedDir(const std::string& category);
|
|
|
|
} // namespace GoalTest
|