mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-16 19:32:32 +00:00
Add an implementation that uses JsonCpp (pretty slow!)
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
This commit is contained in:
parent
f3f6452119
commit
7a7b0046cd
@ -23,7 +23,6 @@
|
|||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<ProjectGuid>{894eb6ef-4c8d-4401-bbaa-aba05a021abb}</ProjectGuid>
|
<ProjectGuid>{894eb6ef-4c8d-4401-bbaa-aba05a021abb}</ProjectGuid>
|
||||||
<RootNamespace>HarteTest_6502</RootNamespace>
|
<RootNamespace>HarteTest_6502</RootNamespace>
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
||||||
<ProjectName>HarteTest_6502</ProjectName>
|
<ProjectName>HarteTest_6502</ProjectName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
@ -73,20 +72,20 @@
|
|||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<IncludePath>..\inc;..\..\inc;C:\Libraries\boost_1_77_0;$(IncludePath)</IncludePath>
|
<IncludePath>..\inc;..\..\inc;C:\Libraries\boost_1_77_0;$(ProjectDir)..\..\packages\JsonCpp.Windows.1.9.2\build\native\include;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<IncludePath>..\inc;..\..\inc;C:\Libraries\boost_1_77_0;$(IncludePath)</IncludePath>
|
<IncludePath>..\inc;..\..\inc;C:\Libraries\boost_1_77_0;$(ProjectDir)..\..\packages\JsonCpp.Windows.1.9.2\build\native\include;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<IncludePath>..\inc;..\..\inc;C:\Libraries\boost_1_77_0;$(IncludePath)</IncludePath>
|
<IncludePath>..\inc;..\..\inc;C:\Libraries\boost_1_77_0;$(ProjectDir)..\..\packages\JsonCpp.Windows.1.9.2\build\native\include;$(IncludePath)</IncludePath>
|
||||||
<LibraryPath>C:\Libraries\boost_1_77_0\lib64-msvc-14.2;$(LibraryPath)</LibraryPath>
|
<LibraryPath>C:\Libraries\boost_1_77_0\lib64-msvc-14.2;$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<IncludePath>..\inc;..\..\inc;C:\Libraries\boost_1_77_0;$(IncludePath)</IncludePath>
|
<IncludePath>..\inc;..\..\inc;C:\Libraries\boost_1_77_0;$(ProjectDir)..\..\packages\JsonCpp.Windows.1.9.2\build\native\include;$(IncludePath)</IncludePath>
|
||||||
<LibraryPath>C:\Libraries\boost_1_77_0\lib64-msvc-14.2;$(LibraryPath)</LibraryPath>
|
<LibraryPath>C:\Libraries\boost_1_77_0\lib64-msvc-14.2;$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
@ -108,11 +107,15 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<ControlFlowGuard>false</ControlFlowGuard>
|
||||||
|
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||||
|
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@ -140,11 +143,15 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<ControlFlowGuard>false</ControlFlowGuard>
|
||||||
|
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||||
|
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@ -184,7 +191,17 @@
|
|||||||
<Project>{d8726a1b-bbfe-47ef-9860-26b90140ba66}</Project>
|
<Project>{d8726a1b-bbfe-47ef-9860-26b90140ba66}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
<Import Project="..\..\packages\JsonCpp.Windows.1.9.2\build\JsonCpp.Windows.targets" Condition="Exists('..\..\packages\JsonCpp.Windows.1.9.2\build\JsonCpp.Windows.targets')" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\..\packages\JsonCpp.Windows.1.9.2\build\JsonCpp.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\JsonCpp.Windows.1.9.2\build\JsonCpp.Windows.targets'))" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
@ -9,6 +9,9 @@
|
|||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="Header Files\nlohmann">
|
||||||
|
<UniqueIdentifier>{1b676a2e-dff7-46aa-b021-f4319b0419d7}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="tests.cpp">
|
<ClCompile Include="tests.cpp">
|
||||||
@ -53,7 +56,10 @@
|
|||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="nlohmann\json.hpp">
|
<ClInclude Include="nlohmann\json.hpp">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files\nlohmann</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
26739
M6502/HarteTest_6502/nlohmann/json.hpp
Normal file
26739
M6502/HarteTest_6502/nlohmann/json.hpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,14 @@
|
|||||||
#include "opcode_test_suite_t.h"
|
#include "opcode_test_suite_t.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <exception>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
std::unique_ptr<Json::CharReader> opcode_test_suite_t::m_reader;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string opcode_test_suite_t::read(std::string path) {
|
std::string opcode_test_suite_t::read(std::string path) {
|
||||||
std::ifstream file(path, std::ios::in | std::ios::binary);
|
std::ifstream file(path, std::ios::in | std::ios::binary);
|
||||||
const auto size = std::filesystem::file_size(path);
|
const auto size = std::filesystem::file_size(path);
|
||||||
@ -37,4 +42,18 @@ void opcode_test_suite_t::load() {
|
|||||||
m_raw = nlohmann::json::parse(contents);
|
m_raw = nlohmann::json::parse(contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
|
||||||
|
void opcode_test_suite_t::load() {
|
||||||
|
if (m_reader == nullptr) {
|
||||||
|
Json::CharReaderBuilder builder;
|
||||||
|
m_reader.reset(builder.newCharReader());
|
||||||
|
}
|
||||||
|
const auto contents = read(path());
|
||||||
|
if (!m_reader->parse(contents.data(), contents.data() + contents.size(), &m_raw, nullptr))
|
||||||
|
throw std::runtime_error("Unable to parse tests");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -10,8 +10,17 @@
|
|||||||
# include "nlohmann/json.hpp"
|
# include "nlohmann/json.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
# include <memory>
|
||||||
|
# include <json/json.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class opcode_test_suite_t final {
|
class opcode_test_suite_t final {
|
||||||
private:
|
private:
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
static std::unique_ptr<Json::CharReader> m_reader;
|
||||||
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] static std::string read(std::string path);
|
[[nodiscard]] static std::string read(std::string path);
|
||||||
|
|
||||||
std::string m_path;
|
std::string m_path;
|
||||||
@ -21,6 +30,12 @@ private:
|
|||||||
#ifdef USE_NLOHMANN_JSON
|
#ifdef USE_NLOHMANN_JSON
|
||||||
nlohmann::json m_raw;
|
nlohmann::json m_raw;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_RAPIDJSON_JSON
|
||||||
|
rapidjson::Document m_raw;
|
||||||
|
#endif
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
Json::Value m_raw;
|
||||||
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
opcode_test_suite_t(std::string path);
|
opcode_test_suite_t(std::string path);
|
||||||
|
4
M6502/HarteTest_6502/packages.config
Normal file
4
M6502/HarteTest_6502/packages.config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="JsonCpp.Windows" version="1.9.2" targetFramework="native" />
|
||||||
|
</packages>
|
@ -76,3 +76,37 @@ void state_t::initialise(const nlohmann::json& serialised) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
|
||||||
|
state_t::state_t(const Json::Value& serialised) {
|
||||||
|
assert(serialised.isObject());
|
||||||
|
initialise(serialised);
|
||||||
|
assert(initialised());
|
||||||
|
}
|
||||||
|
|
||||||
|
void state_t::initialise(const Json::Value& serialised) {
|
||||||
|
|
||||||
|
assert(!initialised());
|
||||||
|
|
||||||
|
m_pc = serialised["pc"].asUInt();
|
||||||
|
m_s = serialised["s"].asUInt();
|
||||||
|
m_a = serialised["a"].asUInt();
|
||||||
|
m_x = serialised["x"].asUInt();
|
||||||
|
m_y = serialised["y"].asUInt();
|
||||||
|
m_p = serialised["p"].asUInt();
|
||||||
|
|
||||||
|
const auto& ram_entries = serialised["ram"];
|
||||||
|
assert(ram_entries.isArray());
|
||||||
|
for (const auto& ram_entry : ram_entries) {
|
||||||
|
assert(ram_entry.isArray());
|
||||||
|
assert(ram_entry.size() == 2);
|
||||||
|
const auto address = ram_entry[0].asUInt();
|
||||||
|
const auto value = ram_entry[1].asUInt();
|
||||||
|
m_ram[address] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_initialised = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
# include "nlohmann/json.hpp"
|
# include "nlohmann/json.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
# include <json/json.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "json_t.h"
|
#include "json_t.h"
|
||||||
|
|
||||||
class state_t final : public json_t {
|
class state_t final : public json_t {
|
||||||
@ -35,6 +39,10 @@ private:
|
|||||||
void initialise(const nlohmann::json& serialised);
|
void initialise(const nlohmann::json& serialised);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
void initialise(const Json::Value& serialised);
|
||||||
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
state_t();
|
state_t();
|
||||||
|
|
||||||
@ -47,6 +55,10 @@ public:
|
|||||||
state_t(const nlohmann::json& serialised);
|
state_t(const nlohmann::json& serialised);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
state_t(const Json::Value& serialised);
|
||||||
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] constexpr auto pc() const noexcept { return m_pc; }
|
[[nodiscard]] constexpr auto pc() const noexcept { return m_pc; }
|
||||||
[[nodiscard]] constexpr auto s() const noexcept { return m_s; }
|
[[nodiscard]] constexpr auto s() const noexcept { return m_s; }
|
||||||
[[nodiscard]] constexpr auto a() const noexcept { return m_a; }
|
[[nodiscard]] constexpr auto a() const noexcept { return m_a; }
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
//#define USE_BOOST_JSON
|
#define USE_BOOST_JSON
|
||||||
#define USE_NLOHMANN_JSON
|
//#define USE_NLOHMANN_JSON
|
||||||
|
//#define USE_JSONCPP_JSON
|
||||||
|
|
||||||
#ifdef USE_BOOST_JSON
|
#ifdef USE_BOOST_JSON
|
||||||
# include <boost/json.hpp>
|
# include <boost/json.hpp>
|
||||||
@ -20,4 +21,8 @@
|
|||||||
|
|
||||||
#ifdef USE_NLOHMANN_JSON
|
#ifdef USE_NLOHMANN_JSON
|
||||||
# include "nlohmann/json.hpp"
|
# include "nlohmann/json.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
# include <json/json.h>
|
||||||
|
#endif
|
||||||
|
@ -77,3 +77,30 @@ void test_t::initialise(const nlohmann::json& serialised) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
|
||||||
|
test_t::test_t(const Json::Value& serialised) {
|
||||||
|
assert(serialised.isObject());
|
||||||
|
initialise(serialised);
|
||||||
|
}
|
||||||
|
|
||||||
|
void test_t::initialise(const Json::Value& serialised) {
|
||||||
|
|
||||||
|
m_name = serialised["name"].asString();
|
||||||
|
m_initial_state = state_t(serialised["initial"]);
|
||||||
|
m_final_state = state_t(serialised["final"]);
|
||||||
|
|
||||||
|
const auto& cycles_array = serialised["cycles"];
|
||||||
|
m_cycles.reserve(cycles_array.size());
|
||||||
|
|
||||||
|
for (const auto& cycles_entry : cycles_array) {
|
||||||
|
assert(cycles_entry.size() == 3);
|
||||||
|
const auto address = cycles_entry[0].asUInt();
|
||||||
|
const auto contents = cycles_entry[1].asUInt();
|
||||||
|
const auto action = to_action(cycles_entry[2].asString());
|
||||||
|
m_cycles.push_back({ address, contents, action });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
# include "nlohmann/json.hpp"
|
# include "nlohmann/json.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
# include <json/json.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "state_t.h"
|
#include "state_t.h"
|
||||||
#include "json_t.h"
|
#include "json_t.h"
|
||||||
|
|
||||||
@ -40,6 +44,10 @@ private:
|
|||||||
void initialise(const nlohmann::json& serialised);
|
void initialise(const nlohmann::json& serialised);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
void initialise(const Json::Value& serialised);
|
||||||
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
#ifdef USE_BOOST_JSON
|
#ifdef USE_BOOST_JSON
|
||||||
@ -51,6 +59,10 @@ public:
|
|||||||
test_t(const nlohmann::json& serialised);
|
test_t(const nlohmann::json& serialised);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
test_t(const Json::Value& serialised);
|
||||||
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] constexpr const auto& name() const noexcept { return m_name; }
|
[[nodiscard]] constexpr const auto& name() const noexcept { return m_name; }
|
||||||
[[nodiscard]] constexpr const auto& initial_state() const noexcept { return m_initial_state; }
|
[[nodiscard]] constexpr const auto& initial_state() const noexcept { return m_initial_state; }
|
||||||
[[nodiscard]] constexpr const auto& final_state() const noexcept { return m_final_state; }
|
[[nodiscard]] constexpr const auto& final_state() const noexcept { return m_final_state; }
|
||||||
|
@ -30,6 +30,9 @@ int main() {
|
|||||||
#ifdef USE_NLOHMANN_JSON
|
#ifdef USE_NLOHMANN_JSON
|
||||||
const auto& opcode_test_array = opcode.raw();
|
const auto& opcode_test_array = opcode.raw();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_JSONCPP_JSON
|
||||||
|
const auto& opcode_test_array = opcode.raw();
|
||||||
|
#endif
|
||||||
|
|
||||||
bool opcode_bad = false;
|
bool opcode_bad = false;
|
||||||
for (const auto& opcode_test_element : opcode_test_array) {
|
for (const auto& opcode_test_element : opcode_test_array) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user