summaryrefslogtreecommitdiff
path: root/test/VersionSuite.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2018-11-16 07:14:58 +0100
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2018-11-16 07:14:58 +0100
commit37162209a3da8812203022de6b81e4f05015043a (patch)
tree19d8a4b4a3e6cd31c64c608b46c6fe710f8e6eb8 /test/VersionSuite.cpp
parent21ce7e27a89c3f9c2fb4bc8bd59877dc2d8cd6b9 (diff)
New upstream version 0.9.0upstream/0.9.0
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);
}