mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 19:07:47 -04:00
7c40d33db3
Phase 1a (boot slice): 30 instructions at 0xBFC00000, compiles clean. Phase 1b (instruction coverage): 54 opcodes implemented in strict_translator, 44,629 walker-reachable instructions covered, 0 missing. Phase 1c (function discovery): 76 functions from 2 seeds, 2,988 instructions, 199 call edges, 27 indirect jumps. All validated through StrictTranslator. Phase 1d (indirect control flow): 27 sites classified — 21 A0/B0/C0 dispatch stubs, 4 computed calls, 2 computed tail calls. Ghidra cross-referenced with 0 disagreements. Phase 1e (relocation): ROM-to-RAM copy at FUN_bfc00420 proven with both Ghidra (static) and DuckStation (runtime). 69 address aliases, 68/69 function entries match byte-for-byte in RAM. Normalization rule documented. Includes PRINCIPLES.md and DEBUG.md adapted from recomp-template. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
#include <toml/get.hpp>
|
|
#include <toml/parser.hpp>
|
|
|
|
#include "unit_test.hpp"
|
|
#include "test_parse_aux.hpp"
|
|
|
|
using namespace toml;
|
|
using namespace detail;
|
|
|
|
BOOST_AUTO_TEST_CASE(test_normal_table)
|
|
{
|
|
std::string table(
|
|
"key1 = \"value\"\n"
|
|
"key2 = 42\n"
|
|
"key3 = 3.14\n"
|
|
);
|
|
location loc("test", table);
|
|
|
|
const auto result = toml::detail::parse_ml_table<toml::value>(loc);
|
|
BOOST_TEST(result.is_ok());
|
|
const auto data = result.unwrap();
|
|
|
|
BOOST_TEST(toml::get<std::string >(data.at("key1")) == "value");
|
|
BOOST_TEST(toml::get<std::int64_t>(data.at("key2")) == 42);
|
|
BOOST_TEST(toml::get<double >(data.at("key3")) == 3.14);
|
|
}
|
|
|
|
BOOST_AUTO_TEST_CASE(test_nested_table)
|
|
{
|
|
std::string table(
|
|
"a.b = \"value\"\n"
|
|
"a.c.d = 42\n"
|
|
);
|
|
location loc("test", table);
|
|
|
|
const auto result = toml::detail::parse_ml_table<toml::value>(loc);
|
|
BOOST_TEST(result.is_ok());
|
|
const auto data = result.unwrap();
|
|
|
|
const auto a = toml::get<toml::table>(data.at("a"));
|
|
const auto c = toml::get<toml::table>(a.at("c"));
|
|
|
|
BOOST_TEST(toml::get<std::string >(a.at("b")) == "value");
|
|
BOOST_TEST(toml::get<std::int64_t>(c.at("d")) == 42);
|
|
}
|