Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyyan317 committed Dec 12, 2024
1 parent c8cec95 commit f3b0ee1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ A migrator satisfies the `MigratorSpec`(Spec.hpp) concept.

It contains:

- A `name` which will be used to identify the migrator. User will refer this migrator in command-line tool by this name. The name needs to be different with other migrators, otherwise a compiler error will be raised.
- A `name` which will be used to identify the migrator. User will refer this migrator in command-line tool by this name. The name needs to be different with other migrators, otherwise a compilation error will be raised.

- A `description` which is the detail information of the migrator.

Expand Down
3 changes: 3 additions & 0 deletions src/migration/Spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ concept MigratorSpec = requires(std::shared_ptr<Backend> const& backend, util::C
// Check that 'name' exists and is a string
{ T::name } -> std::convertible_to<std::string>;

// Check that 'description' exists and is a string
{ T::description } -> std::convertible_to<std::string>;

// Check that the migrator specifies the backend type it supports
typename T::Backend;

Expand Down
2 changes: 0 additions & 2 deletions tests/common/util/MockMigrationBackend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

#include <string>

using namespace data;

struct MockMigrationBackend : public MockBackend {
MockMigrationBackend(util::Config) : MockBackend(util::Config{})
{
Expand Down
17 changes: 0 additions & 17 deletions tests/common/util/StringUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
#include <xrpl/basics/base_uint.h>
#include <xrpl/protocol/LedgerHeader.h>

#include <sstream>
#include <string>
#include <vector>

std::string
hexStringToBinaryString(std::string const& hex)
Expand Down Expand Up @@ -57,18 +55,3 @@ ledgerHeaderToBinaryString(ripple::LedgerHeader const& info)

return strBlob;
};

std::vector<std::string>
splitLines(std::string const& rawlines, char delimiter)
{
std::vector<std::string> lines;
std::istringstream stream(rawlines);
std::string line;

// Read each line and add it to the vector
while (std::getline(stream, line, delimiter)) {
lines.push_back(line);
}

return lines;
}
3 changes: 0 additions & 3 deletions tests/common/util/StringUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@ binaryStringToUint256(std::string const& bin);

std::string
ledgerHeaderToBinaryString(ripple::LedgerHeader const& info);

std::vector<std::string>
splitLines(std::string const& rawlines, char delimiter);
4 changes: 2 additions & 2 deletions tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ target_sources(
Playground.cpp
ProfilerTests.cpp
# Migration
migration/cassandra/FullTableScannerTests.cpp
migration/cassandra/SpecTests.cpp
migration/MigratorRegisterTests.cpp
migration/MigratorStatusTests.cpp
migration/MigrationManagerBaseTests.cpp
migration/MigrationManagerFactoryTests.cpp
migration/SpecTests.cpp
migration/cassandra/FullTableScannerTests.cpp
migration/cassandra/SpecTests.cpp
# RPC
rpc/APIVersionTests.cpp
rpc/BaseTests.cpp
Expand Down

0 comments on commit f3b0ee1

Please sign in to comment.