summaryrefslogtreecommitdiff
path: root/test/VersionSuite.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2018-11-16 07:16:51 +0100
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2018-11-16 07:16:51 +0100
commitcd9c1ea3e9c54da1a211563736d6f84664058da8 (patch)
treef1d883b562a669deb6bfd59b4de27bfaaa63d8a5 /test/VersionSuite.cpp
parent71a38df59b7b10358477073c9bc053055aa394ce (diff)
parent5ef83547e904e4d411239ea0a27571e7d1a0b5b4 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'test/VersionSuite.cpp')
-rw-r--r--test/VersionSuite.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/VersionSuite.cpp b/test/VersionSuite.cpp
index 1c2d072..fb28c15 100644
--- a/test/VersionSuite.cpp
+++ b/test/VersionSuite.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "VersionSuite.h"
+#include <gtest/gtest.h>
#ifndef _GNU_SOURCE
# define _GNU_SOURCE // for asprintf
@@ -30,12 +30,11 @@
#include <uriparser/UriBase.h>
-void VersionSuite::ensure_version_defines_in_sync() {
+TEST(VersionSuite, EnsureVersionDefinesInSync) {
char * INSIDE_VERSION = NULL;
const int bytes_printed = asprintf(&INSIDE_VERSION, "%d.%d.%d%s",
URI_VER_MAJOR, URI_VER_MINOR, URI_VER_RELEASE, URI_VER_SUFFIX_ANSI);
- TEST_ASSERT(bytes_printed != -1);
- printf("bytes_printed: %d\n", bytes_printed);
+ ASSERT_TRUE(bytes_printed != -1);
const bool equal = !strcmp(INSIDE_VERSION, PACKAGE_VERSION);
if (! equal) {
@@ -44,5 +43,5 @@ void VersionSuite::ensure_version_defines_in_sync() {
printf(" Header defines version: <%s>\n", INSIDE_VERSION);
}
free(INSIDE_VERSION);
- TEST_ASSERT(equal);
+ ASSERT_TRUE(equal);
}