summaryrefslogtreecommitdiff
path: root/test/VersionSuite.cpp
diff options
context:
space:
mode:
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);
}