Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Fixed some compile errors in unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgdev committed Aug 14, 2014
1 parent 7ed86e3 commit 377a2e9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
10 changes: 5 additions & 5 deletions test/attribute_test.cpp
Expand Up @@ -7,19 +7,19 @@ namespace riemann = riemannpp;
TEST_CASE("attributes can be created and set", "[attribute]") {
SECTION("new and delete") {
{
riemann::attribute attrib();
REQUIRE((riemann_attribute_t*)attrib != nullptr)
riemann::attribute attrib;
REQUIRE((riemann_attribute_t*)attrib != nullptr);
}
REQUIRE(errno == EINVAL);
}
SECTION("attribute set") {
riemann::attribute attrib();
riemann::attribute attrib;
REQUIRE_NOTHROW(attrib.set_key(""));
REQUIRE_NOTHROW(attrib.set_value(""));
REQUIRE_NOTHROW(attrib.set("", ""));
}
SECTION("attribute create") {
riemann::attribute attrib("", "");
REQUIRE((riemann_attribute_t*)attrib != nullptr)
REQUIRE((riemann_attribute_t*)attrib != nullptr);
}
}
}
6 changes: 3 additions & 3 deletions test/client_test.cpp
Expand Up @@ -7,8 +7,8 @@ namespace riemann = riemannpp;
TEST_CASE("clients can be created and connect", "[client]") {
SECTION("new and delete") {
{
riemann::client client();
REQUIRE((riemann_client_t*)client != nullptr)
riemann::client client;
REQUIRE((riemann_client_t*)client != nullptr);
}
REQUIRE(errno == EINVAL);
}
Expand All @@ -18,4 +18,4 @@ TEST_CASE("clients can be created and connect", "[client]") {
SECTION("send message") {

}
}
}
6 changes: 3 additions & 3 deletions test/event_test.cpp
Expand Up @@ -7,8 +7,8 @@ namespace riemann = riemannpp;
TEST_CASE("events can be created and set", "[event]") {
SECTION("new and delete") {
{
riemann::event event();
REQUIRE((riemann_event_t*)event != nullptr)
riemann::event event;
REQUIRE((riemann_event_t*)event != nullptr);
}
REQUIRE(errno == EINVAL);
}
Expand All @@ -24,4 +24,4 @@ TEST_CASE("events can be created and set", "[event]") {
SECTION("event add attribute") {

}
}
}
12 changes: 5 additions & 7 deletions test/message_test.cpp
Expand Up @@ -7,17 +7,15 @@ namespace riemann = riemannpp;
TEST_CASE("messages can be created and set", "[message]") {
SECTION("new and delete") {
{
riemann::message msg();
REQUIRE((riemann_message_t*)msg != nullptr)
riemann::message msg;
REQUIRE((riemann_message_t*)msg != nullptr);
}
REQUIRE(errno == EINVAL);
}
SECTION("message set events") {
riemann::message msg();
REQUIRE((riemann_message_t*)msg != nullptr)

}
SECTION("message set query") {
riemann::message msg("", "");
REQUIRE((riemann_message_t*)msg != nullptr)

}
}
}

0 comments on commit 377a2e9

Please sign in to comment.