Skip to content

Commit

Permalink
fix: cpp-gen: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SGSSGene committed Dec 18, 2024
1 parent e017f88 commit 920e317
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions schema_salad/tests/cpp_tests/01_single_record.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ struct MyRecord {
};
}

template <typename T>
example_com::heap_object<T>::~heap_object() = default;
namespace example_com {
template <typename T> heap_object<T>::~heap_object() = default;

inline auto example_com::MyRecord::toYaml([[maybe_unused]] ::example_com::store_config const& config) const -> YAML::Node {
using ::example_com::toYaml;
Expand Down Expand Up @@ -525,7 +525,7 @@ auto load_document_from_string(std::string document) -> DocumentRootType {
return load_document_from_yaml(YAML::Load(document));
}
auto load_document(std::filesystem::path path) -> DocumentRootType {
return load_document_from_yaml(YAML::LoadFile(path));
return load_document_from_yaml(YAML::LoadFile(path.string()));
}
void store_document(DocumentRootType const& root, std::ostream& ostream, store_config config={}) {
auto y = toYaml(root, config);
Expand Down
6 changes: 3 additions & 3 deletions schema_salad/tests/cpp_tests/02_two_records.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ struct MyRecordTwo {
};
}

template <typename T>
example_com::heap_object<T>::~heap_object() = default;
namespace example_com {
template <typename T> heap_object<T>::~heap_object() = default;

inline auto example_com::MyRecordOne::toYaml([[maybe_unused]] ::example_com::store_config const& config) const -> YAML::Node {
using ::example_com::toYaml;
Expand Down Expand Up @@ -572,7 +572,7 @@ auto load_document_from_string(std::string document) -> DocumentRootType {
return load_document_from_yaml(YAML::Load(document));
}
auto load_document(std::filesystem::path path) -> DocumentRootType {
return load_document_from_yaml(YAML::LoadFile(path));
return load_document_from_yaml(YAML::LoadFile(path.string()));
}
void store_document(DocumentRootType const& root, std::ostream& ostream, store_config config={}) {
auto y = toYaml(root, config);
Expand Down
6 changes: 3 additions & 3 deletions schema_salad/tests/cpp_tests/03_simple_inheritance.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ struct MyRecordTwo
};
}

template <typename T>
example_com::heap_object<T>::~heap_object() = default;
namespace example_com {
template <typename T> heap_object<T>::~heap_object() = default;

inline auto example_com::MyRecordOne::toYaml([[maybe_unused]] ::example_com::store_config const& config) const -> YAML::Node {
using ::example_com::toYaml;
Expand Down Expand Up @@ -575,7 +575,7 @@ auto load_document_from_string(std::string document) -> DocumentRootType {
return load_document_from_yaml(YAML::Load(document));
}
auto load_document(std::filesystem::path path) -> DocumentRootType {
return load_document_from_yaml(YAML::LoadFile(path));
return load_document_from_yaml(YAML::LoadFile(path.string()));
}
void store_document(DocumentRootType const& root, std::ostream& ostream, store_config config={}) {
auto y = toYaml(root, config);
Expand Down
6 changes: 3 additions & 3 deletions schema_salad/tests/cpp_tests/04_abstract_inheritance.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ struct MyRecordTwo
};
}

template <typename T>
example_com::heap_object<T>::~heap_object() = default;
namespace example_com {
template <typename T> heap_object<T>::~heap_object() = default;

inline example_com::MyRecordOne::~MyRecordOne() = default;
inline auto example_com::MyRecordOne::toYaml([[maybe_unused]] ::example_com::store_config const& config) const -> YAML::Node {
Expand Down Expand Up @@ -560,7 +560,7 @@ auto load_document_from_string(std::string document) -> DocumentRootType {
return load_document_from_yaml(YAML::Load(document));
}
auto load_document(std::filesystem::path path) -> DocumentRootType {
return load_document_from_yaml(YAML::LoadFile(path));
return load_document_from_yaml(YAML::LoadFile(path.string()));
}
void store_document(DocumentRootType const& root, std::ostream& ostream, store_config config={}) {
auto y = toYaml(root, config);
Expand Down
6 changes: 3 additions & 3 deletions schema_salad/tests/cpp_tests/05_specialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ struct MyRecordTwo {
};
}

template <typename T>
example_com::heap_object<T>::~heap_object() = default;
namespace example_com {
template <typename T> heap_object<T>::~heap_object() = default;

inline auto example_com::FieldRecordA::toYaml([[maybe_unused]] ::example_com::store_config const& config) const -> YAML::Node {
using ::example_com::toYaml;
Expand Down Expand Up @@ -649,7 +649,7 @@ auto load_document_from_string(std::string document) -> DocumentRootType {
return load_document_from_yaml(YAML::Load(document));
}
auto load_document(std::filesystem::path path) -> DocumentRootType {
return load_document_from_yaml(YAML::LoadFile(path));
return load_document_from_yaml(YAML::LoadFile(path.string()));
}
void store_document(DocumentRootType const& root, std::ostream& ostream, store_config config={}) {
auto y = toYaml(root, config);
Expand Down

0 comments on commit 920e317

Please sign in to comment.