[csw-devel] SF.net SVN: gar:[17953] csw/mgar/pkg/libpqxx/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun May 6 09:41:45 CEST 2012


Revision: 17953
          http://gar.svn.sourceforge.net/gar/?rev=17953&view=rev
Author:   wahwah
Date:     2012-05-06 07:41:44 +0000 (Sun, 06 May 2012)
Log Message:
-----------
libpqxx/trunk: Tests require a running server.

Modified Paths:
--------------
    csw/mgar/pkg/libpqxx/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/libpqxx/trunk/files/0002-If-reviter-is-unavailable-don-t-test-for-it.patch

Modified: csw/mgar/pkg/libpqxx/trunk/Makefile
===================================================================
--- csw/mgar/pkg/libpqxx/trunk/Makefile	2012-05-06 07:21:00 UTC (rev 17952)
+++ csw/mgar/pkg/libpqxx/trunk/Makefile	2012-05-06 07:41:44 UTC (rev 17953)
@@ -16,8 +16,12 @@
 BUILD_DEP_PKGS = CSWpostgresql-dev
 
 PATCHFILES += 0001-Can-t-instantiate-a-const_reverse_iterator.patch
+PATCHFILES += 0002-If-reviter-is-unavailable-don-t-test-for-it.patch
 
 CONFIGURE_ARGS = $(DIRPATHS)
 
+# The tests require a running PostgreSQL server.
+SKIPTEST = 1
+
 include gar/category.mk
 

Added: csw/mgar/pkg/libpqxx/trunk/files/0002-If-reviter-is-unavailable-don-t-test-for-it.patch
===================================================================
--- csw/mgar/pkg/libpqxx/trunk/files/0002-If-reviter-is-unavailable-don-t-test-for-it.patch	                        (rev 0)
+++ csw/mgar/pkg/libpqxx/trunk/files/0002-If-reviter-is-unavailable-don-t-test-for-it.patch	2012-05-06 07:41:44 UTC (rev 17953)
@@ -0,0 +1,42 @@
+From 550d0970eb6dafc0e153b58bb471a382c9b84731 Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Sun, 6 May 2012 09:38:50 +0200
+Subject: [PATCH 3/3] If reviter is unavailable, don't test for it
+
+---
+ test/unit/test_binarystring.cxx |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/test/unit/test_binarystring.cxx b/test/unit/test_binarystring.cxx
+index 1c911d6..1df104a 100644
+--- a/test/unit/test_binarystring.cxx
++++ b/test/unit/test_binarystring.cxx
+@@ -20,7 +20,9 @@ void test_binarystring(transaction_base &T)
+   PQXX_CHECK_EQUAL(b.size(), 0u, "Empty binarystring has nonzero size.");
+   PQXX_CHECK_EQUAL(b.length(), 0u, "Length/size mismatch.");
+   PQXX_CHECK(b.begin() == b.end(), "Empty binarystring iterates.");
++#ifdef PQXX_HAVE_REVERSE_ITERATOR
+   PQXX_CHECK(b.rbegin() == b.rend(), "Empty binarystring reverse-iterates.");
++#endif
+   PQXX_CHECK_THROWS(b.at(0), out_of_range, "Empty binarystring accepts at().");
+ 
+   b = make_binarystring(T, "z");
+@@ -29,11 +31,15 @@ void test_binarystring(transaction_base &T)
+   PQXX_CHECK_EQUAL(b.size(), 1u, "Bad binarystring size.");
+   PQXX_CHECK_EQUAL(b.length(), 1u, "Length/size mismatch.");
+   PQXX_CHECK(b.begin() != b.end(), "Nonempty binarystring does not iterate.");
++#ifdef PQXX_HAVE_REVERSE_ITERATOR
+   PQXX_CHECK(
+ 	b.rbegin() != b.rend(),
+ 	 "Nonempty binarystring does not reverse-iterate.");
++#endif
+   PQXX_CHECK(b.begin() + 1 == b.end(), "Bad iteration.");
++#ifdef PQXX_HAVE_REVERSE_ITERATOR
+   PQXX_CHECK(b.rbegin() + 1 == b.rend(), "Bad reverse iteration.");
++#endif
+   PQXX_CHECK(b.front() == 'z', "Unexpected front().");
+   PQXX_CHECK(b.back() == 'z', "Unexpected back().");
+   PQXX_CHECK(b.at(0) == 'z', "Unexpected data at index 0.");
+-- 
+1.7.10
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list