Skip to content

Commit c536b8a

Browse files
committed
Style.
1 parent 4f905fb commit c536b8a

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

include/bitcoin/server/error.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ enum error_t : uint8_t
5959

6060
/// server (rpc response codes)
6161
not_found,
62-
invalid_argument,
63-
not_implemented
62+
not_implemented,
63+
invalid_argument
6464
};
6565

6666
// No current need for error_code equivalence mapping.

src/error.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ DEFINE_ERROR_T_MESSAGE_MAP(error)
4949

5050
// server (rpc response codes)
5151
{ not_found, "not_found" },
52-
{ invalid_argument, "invalid_argument" },
53-
{ not_implemented, "not_implemented" }
52+
{ not_implemented, "not_implemented" },
53+
{ invalid_argument, "invalid_argument" }
5454
};
5555

5656
DEFINE_ERROR_T_CATEGORY(error, "server", "server code")

test/error.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,22 +191,22 @@ BOOST_AUTO_TEST_CASE(error_t__code__not_found__true_expected_message)
191191
BOOST_REQUIRE_EQUAL(ec.message(), "not_found");
192192
}
193193

194-
BOOST_AUTO_TEST_CASE(error_t__code__invalid_argument__true_expected_message)
194+
BOOST_AUTO_TEST_CASE(error_t__code__not_implemented__true_expected_message)
195195
{
196-
constexpr auto value = error::invalid_argument;
196+
constexpr auto value = error::not_implemented;
197197
const auto ec = code(value);
198198
BOOST_REQUIRE(ec);
199199
BOOST_REQUIRE(ec == value);
200-
BOOST_REQUIRE_EQUAL(ec.message(), "invalid_argument");
200+
BOOST_REQUIRE_EQUAL(ec.message(), "not_implemented");
201201
}
202202

203-
BOOST_AUTO_TEST_CASE(error_t__code__not_implemented__true_expected_message)
203+
BOOST_AUTO_TEST_CASE(error_t__code__invalid_argument__true_expected_message)
204204
{
205-
constexpr auto value = error::not_implemented;
205+
constexpr auto value = error::invalid_argument;
206206
const auto ec = code(value);
207207
BOOST_REQUIRE(ec);
208208
BOOST_REQUIRE(ec == value);
209-
BOOST_REQUIRE_EQUAL(ec.message(), "not_implemented");
209+
BOOST_REQUIRE_EQUAL(ec.message(), "invalid_argument");
210210
}
211211

212212
BOOST_AUTO_TEST_SUITE_END()

0 commit comments

Comments
 (0)