mirror of
https://github.com/Green-Sky/crdt_tests.git
synced 2024-12-22 07:53:24 +01:00
rename stuff
This commit is contained in:
parent
e486d79dc3
commit
175042eb7c
@ -10,17 +10,17 @@ target_include_directories(crdt_version0 INTERFACE "${PROJECT_SOURCE_DIR}")
|
||||
|
||||
########################################
|
||||
|
||||
add_executable(test1
|
||||
add_executable(v0_test1
|
||||
./test1.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test1 PUBLIC crdt_version0)
|
||||
target_link_libraries(v0_test1 PUBLIC crdt_version0)
|
||||
|
||||
########################################
|
||||
|
||||
add_executable(test2
|
||||
add_executable(v0_test2
|
||||
./test2.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test2 PUBLIC crdt_version0)
|
||||
target_link_libraries(v0_test2 PUBLIC crdt_version0)
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace GreenCRDT {
|
||||
namespace GreenCRDT::V0 {
|
||||
|
||||
template<typename ValueType, typename AgentType>
|
||||
struct List {
|
||||
@ -243,5 +243,5 @@ struct List {
|
||||
}
|
||||
};
|
||||
|
||||
} // GreenCRDT
|
||||
} // GreenCRDT::V0
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
//#include <iostream> // debug
|
||||
|
||||
namespace GreenCRDT {
|
||||
namespace GreenCRDT::V0 {
|
||||
|
||||
template<typename AgentType>
|
||||
struct TextDocument {
|
||||
@ -281,5 +281,5 @@ struct TextDocument {
|
||||
}
|
||||
};
|
||||
|
||||
} // GreenCRDT
|
||||
} // GreenCRDT::V0
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <crdt/list.hpp>
|
||||
#include <crdt/text_document.hpp>
|
||||
#include <green_crdt/v0/list.hpp>
|
||||
#include <green_crdt/v0/text_document.hpp>
|
||||
|
||||
#include <numeric>
|
||||
#include <random>
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
// single letter agent, for testing only
|
||||
using Agent = char;
|
||||
using DocType = GreenCRDT::TextDocument<Agent>;
|
||||
using DocType = GreenCRDT::V0::TextDocument<Agent>;
|
||||
using ListType = DocType::ListType;
|
||||
|
||||
void testSingle1(void) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <crdt/text_document.hpp>
|
||||
#include <green_crdt/v0/text_document.hpp>
|
||||
|
||||
#include <numeric>
|
||||
#include <optional>
|
||||
@ -9,8 +9,8 @@
|
||||
|
||||
// single letter agent, for testing only
|
||||
using Agent = char;
|
||||
using Doc = GreenCRDT::TextDocument<Agent>;
|
||||
using Op = GreenCRDT::TextDocument<Agent>::Op;
|
||||
using Doc = GreenCRDT::V0::TextDocument<Agent>;
|
||||
using Op = Doc::Op;
|
||||
using ListType = Doc::ListType;
|
||||
|
||||
// maybe switch it up?
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <crdt/text_document.hpp>
|
||||
#include <green_crdt/v0/text_document.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
extern "C" {
|
||||
@ -15,7 +15,7 @@ extern "C" {
|
||||
// single letter agent, for testing only
|
||||
//using Agent = char;
|
||||
using Agent = uint16_t; // tmp local port
|
||||
using Doc = GreenCRDT::TextDocument<Agent>;
|
||||
using Doc = GreenCRDT::V0::TextDocument<Agent>;
|
||||
using ListType = Doc::ListType;
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const std::optional<ListType::ListID>& id) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <crdt/text_document.hpp>
|
||||
#include <green_crdt/v0/text_document.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
extern "C" {
|
||||
@ -59,7 +59,7 @@ struct std::hash<ToxPubKey> {
|
||||
//using Agent = char;
|
||||
//using Agent = uint16_t; // tmp local port
|
||||
using Agent = ToxPubKey;
|
||||
using Doc = GreenCRDT::TextDocument<Agent>;
|
||||
using Doc = GreenCRDT::V0::TextDocument<Agent>;
|
||||
using ListType = Doc::ListType;
|
||||
|
||||
struct Command {
|
||||
@ -89,7 +89,7 @@ namespace std {
|
||||
}
|
||||
} // namespace std
|
||||
|
||||
namespace GreenCRDT {
|
||||
namespace GreenCRDT::V0 {
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ListType::ListID,
|
||||
id,
|
||||
@ -107,7 +107,7 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ListType::OpDel,
|
||||
id
|
||||
)
|
||||
|
||||
} // namespace GreenCRDT
|
||||
} // namespace GreenCRDT::V0
|
||||
|
||||
// bc variant <.<
|
||||
namespace std {
|
||||
|
Loading…
Reference in New Issue
Block a user