diff options
author | tastytea | 2020-11-13 14:01:09 +0100 |
---|---|---|
committer | tastytea | 2020-11-13 14:01:09 +0100 |
commit | 3a93aec9410ff2f828bd9795241ab032a0cd0b10 (patch) | |
tree | 8d4815d22e15dfd46483bbc78125865d6a1fd003 | |
parent | 9efc8d2dfdfbf1c1e464e9dc269590c0a53b60d2 (diff) | |
download | mastodonpp-3a93aec9410ff2f828bd9795241ab032a0cd0b10.tar mastodonpp-3a93aec9410ff2f828bd9795241ab032a0cd0b10.tar.gz mastodonpp-3a93aec9410ff2f828bd9795241ab032a0cd0b10.zip |
Reformat tests.
-rw-r--r-- | tests/test_connection.cpp | 9 | ||||
-rw-r--r-- | tests/test_html_unescape.cpp | 8 | ||||
-rw-r--r-- | tests/test_instance.cpp | 16 |
3 files changed, 16 insertions, 17 deletions
diff --git a/tests/test_connection.cpp b/tests/test_connection.cpp index db8f223..05d7668 100644 --- a/tests/test_connection.cpp +++ b/tests/test_connection.cpp @@ -14,8 +14,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "instance.hpp" #include "connection.hpp" +#include "instance.hpp" #include <catch.hpp> @@ -24,12 +24,11 @@ namespace mastodonpp { - -SCENARIO ("mastodonpp::Connection.") +SCENARIO("mastodonpp::Connection.") { bool exception = false; - WHEN ("Connection is instantiated.") + WHEN("Connection is instantiated.") { try { @@ -41,7 +40,7 @@ SCENARIO ("mastodonpp::Connection.") exception = true; } - THEN ("No exception is thrown") + THEN("No exception is thrown") { REQUIRE_FALSE(exception); } diff --git a/tests/test_html_unescape.cpp b/tests/test_html_unescape.cpp index 0f80ec7..d141921 100644 --- a/tests/test_html_unescape.cpp +++ b/tests/test_html_unescape.cpp @@ -26,11 +26,11 @@ namespace mastodonpp using std::string; -SCENARIO ("mastodonpp::html_unescape()") +SCENARIO("mastodonpp::html_unescape()") { bool exception = false; - WHEN ("html_unescape() is called.") + WHEN("html_unescape() is called.") { string result; try @@ -42,8 +42,8 @@ SCENARIO ("mastodonpp::html_unescape()") exception = true; } - THEN ("No exception is thrown") - AND_THEN("Result is as expected.") + THEN("No exception is thrown") + AND_THEN("Result is as expected.") { REQUIRE_FALSE(exception); REQUIRE(result == "2€ = 2€ = 2€"); diff --git a/tests/test_instance.cpp b/tests/test_instance.cpp index 646a271..768cc2a 100644 --- a/tests/test_instance.cpp +++ b/tests/test_instance.cpp @@ -26,11 +26,11 @@ namespace mastodonpp using std::string; -SCENARIO ("mastopp::Instance") +SCENARIO("mastopp::Instance") { bool exception = false; - WHEN ("Instance is instantiated.") + WHEN("Instance is instantiated.") { try { @@ -41,13 +41,13 @@ SCENARIO ("mastopp::Instance") exception = true; } - THEN ("No exception is thrown") + THEN("No exception is thrown") { REQUIRE_FALSE(exception); } } - WHEN ("Variables are set.") + WHEN("Variables are set.") { constexpr auto hostname{"likeable.space"}; constexpr auto proxy{"socks4a://[::1]:9050"}; @@ -64,10 +64,10 @@ SCENARIO ("mastopp::Instance") exception = true; } - THEN ("No exception is thrown") - AND_THEN ("get_access_token() returns the set value.") - AND_THEN ("get_hostname() returns the set value.") - AND_THEN ("get_baseuri() returns the expected value.") + THEN("No exception is thrown") + AND_THEN("get_access_token() returns the set value.") + AND_THEN("get_hostname() returns the set value.") + AND_THEN("get_baseuri() returns the expected value.") { REQUIRE_FALSE(exception); REQUIRE(instance.get_access_token() == access_token); |