[Debtags-commits] [svn] r1730 - in tagcoll/2.0: . tagcoll tagcoll/stream tagcoll/tests

Enrico Zini enrico at costa.debian.org
Tue May 9 00:27:11 UTC 2006


Author: enrico
Date: Tue May  9 00:27:10 2006
New Revision: 1730

Modified:
   tagcoll/2.0/   (props changed)
   tagcoll/2.0/configure.ac
   tagcoll/2.0/tagcoll/Consumer.cc
   tagcoll/2.0/tagcoll/Expression.cc
   tagcoll/2.0/tagcoll/InputMerger.cc
   tagcoll/2.0/tagcoll/PatchCollection.cc
   tagcoll/2.0/tagcoll/Patches.cc
   tagcoll/2.0/tagcoll/TextFormat.cc
   tagcoll/2.0/tagcoll/filters.cc
   tagcoll/2.0/tagcoll/stream/   (props changed)
   tagcoll/2.0/tagcoll/stream/sink.cc
   tagcoll/2.0/tagcoll/stream/sink.h
   tagcoll/2.0/tagcoll/tests/test-utils.h
Log:
 r2617 at viaza:  enrico | 2006-05-08 12:44:21 -0500
 Moved stream/sink in a stream subnamespace
 Removed using namespace lines from test-utils.h


Modified: tagcoll/2.0/configure.ac
==============================================================================
--- tagcoll/2.0/configure.ac	(original)
+++ tagcoll/2.0/configure.ac	Tue May  9 00:27:10 2006
@@ -3,7 +3,7 @@
 AC_INIT(tagcoll, 1.6.2, [enrico at debian.org])
 AC_CONFIG_SRCDIR([configure.ac])
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE([foreign])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
 
 AC_ARG_ENABLE(docs,
 		[  --enable-docs    Turn on generation of documentation],

Modified: tagcoll/2.0/tagcoll/Consumer.cc
==============================================================================
--- tagcoll/2.0/tagcoll/Consumer.cc	(original)
+++ tagcoll/2.0/tagcoll/Consumer.cc	Tue May  9 00:27:10 2006
@@ -34,6 +34,8 @@
 
 namespace wibble {
 namespace tut {
+using namespace std;
+using namespace tagcoll;
 using namespace tagcoll::tests;
 
 struct tagcoll_consumer_shar {

Modified: tagcoll/2.0/tagcoll/Expression.cc
==============================================================================
--- tagcoll/2.0/tagcoll/Expression.cc	(original)
+++ tagcoll/2.0/tagcoll/Expression.cc	Tue May  9 00:27:10 2006
@@ -211,6 +211,7 @@
 
 namespace wibble {
 namespace tut {
+using namespace tagcoll;
 using namespace tagcoll::tests;
 
 struct tagcoll_expression_shar {

Modified: tagcoll/2.0/tagcoll/InputMerger.cc
==============================================================================
--- tagcoll/2.0/tagcoll/InputMerger.cc	(original)
+++ tagcoll/2.0/tagcoll/InputMerger.cc	Tue May  9 00:27:10 2006
@@ -197,6 +197,8 @@
 
 namespace wibble {
 namespace tut {
+using namespace std;
+using namespace tagcoll;
 using namespace tagcoll::tests;
 
 struct tagcoll_inputmerger_shar {

Modified: tagcoll/2.0/tagcoll/PatchCollection.cc
==============================================================================
--- tagcoll/2.0/tagcoll/PatchCollection.cc	(original)
+++ tagcoll/2.0/tagcoll/PatchCollection.cc	Tue May  9 00:27:10 2006
@@ -208,6 +208,7 @@
 
 namespace wibble {
 namespace tut {
+using namespace tagcoll;
 using namespace tagcoll::tests;
 
 struct tagcoll_patchcollection_shar {

Modified: tagcoll/2.0/tagcoll/Patches.cc
==============================================================================
--- tagcoll/2.0/tagcoll/Patches.cc	(original)
+++ tagcoll/2.0/tagcoll/Patches.cc	Tue May  9 00:27:10 2006
@@ -32,6 +32,8 @@
 
 namespace wibble {
 namespace tut {
+using namespace std;
+using namespace tagcoll;
 using namespace tagcoll::tests;
 using namespace wibble::operators;
 

Modified: tagcoll/2.0/tagcoll/TextFormat.cc
==============================================================================
--- tagcoll/2.0/tagcoll/TextFormat.cc	(original)
+++ tagcoll/2.0/tagcoll/TextFormat.cc	Tue May  9 00:27:10 2006
@@ -163,6 +163,7 @@
 
 namespace wibble {
 namespace tut {
+using namespace tagcoll;
 using namespace tagcoll::tests;
 
 struct tagcoll_textformat_shar {

Modified: tagcoll/2.0/tagcoll/filters.cc
==============================================================================
--- tagcoll/2.0/tagcoll/filters.cc	(original)
+++ tagcoll/2.0/tagcoll/filters.cc	Tue May  9 00:27:10 2006
@@ -29,6 +29,8 @@
 
 namespace wibble {
 namespace tut {
+using namespace std;
+using namespace tagcoll;
 using namespace tagcoll::tests;
 
 struct tagcoll_filters_shar {
@@ -207,7 +209,7 @@
 	int count1 = 0;
 	int count2 = 0;
 
-	parseCollection(input_coll, teeFilter(countingSink(count1), countingSink(count2)));
+	parseCollection(input_coll, teeFilter(stream::countingSink(count1), stream::countingSink(count2)));
 
 	ensure_equals(count1, 3);
 	ensure_equals(count2, 3);

Modified: tagcoll/2.0/tagcoll/stream/sink.cc
==============================================================================
--- tagcoll/2.0/tagcoll/stream/sink.cc	(original)
+++ tagcoll/2.0/tagcoll/stream/sink.cc	Tue May  9 00:27:10 2006
@@ -41,7 +41,7 @@
 			"c: 2, 3\n"
 			);
 	int count = 0;
-	parseCollection(input_coll, countingSink(count));
+	parseCollection(input_coll, tagcoll::stream::countingSink(count));
 
 	ensure_equals(count, 3);
 }

Modified: tagcoll/2.0/tagcoll/stream/sink.h
==============================================================================
--- tagcoll/2.0/tagcoll/stream/sink.h	(original)
+++ tagcoll/2.0/tagcoll/stream/sink.h	Tue May  9 00:27:10 2006
@@ -26,8 +26,8 @@
 #include <wibble/mixin.h>
 #include <utility>
 
-namespace tagcoll
-{
+namespace tagcoll {
+namespace stream {
 
 /**
  * Consumer that discards its input
@@ -74,7 +74,8 @@
 }
 
 
-};
+}
+}
 
 // vim:set ts=4 sw=4:
 #endif

Modified: tagcoll/2.0/tagcoll/tests/test-utils.h
==============================================================================
--- tagcoll/2.0/tagcoll/tests/test-utils.h	(original)
+++ tagcoll/2.0/tagcoll/tests/test-utils.h	Tue May  9 00:27:10 2006
@@ -21,10 +21,6 @@
 namespace tagcoll {
 namespace tests {
 
-using namespace std;
-using namespace tagcoll;
-using namespace wibble::tests;
-
 template<class ITEM, class TAG>
 class TestConsumer : public tagcoll::Consumer<ITEM, TAG>
 {
@@ -56,18 +52,18 @@
 }
 
 #define ensure_coll_equals(a, b) \
-	__tc_ensure_coll_equals(Location(__FILE__, __LINE__, #a " == " #b), a, b)
+	__tc_ensure_coll_equals(wibble::tests::Location(__FILE__, __LINE__, #a " == " #b), a, b)
 #define inner_ensure_coll_equals(a, b) \
-	__tc_ensure_coll_equals(Location(loc, __FILE__, __LINE__, #a " == " #b), a, b)
+	__tc_ensure_coll_equals(wibble::tests::Location(loc, __FILE__, __LINE__, #a " == " #b), a, b)
 template<typename COLL1, typename COLL2>
-void __tc_ensure_coll_equals(const Location& loc, const COLL1& c1, const COLL2& c2);
+void __tc_ensure_coll_equals(const wibble::tests::Location& loc, const COLL1& c1, const COLL2& c2);
 
 #define ensure_contains(a, b) \
-	_ensure_contains(Location(__FILE__, __LINE__, #a " contains " #b), a, b)
+	_ensure_contains(wibble::tests::Location(__FILE__, __LINE__, #a " contains " #b), a, b)
 #define inner_ensure_contains(a, b) \
-	_ensure_contains(Location(loc, __FILE__, __LINE__, #a " contains " #b), a, b)
+	_ensure_contains(wibble::tests::Location(loc, __FILE__, __LINE__, #a " contains " #b), a, b)
 template<class T>
-void _ensure_contains(const Location& loc, const std::set<T>& s, const T& item)
+void _ensure_contains(const wibble::tests::Location& loc, const std::set<T>& s, const T& item)
 {
 	if (s.find(item) == s.end())
 	{
@@ -86,11 +82,11 @@
 }
 
 #define gen_ensure_not_contains(a, b) \
-	_ensure_not_contains(Location(__FILE__, __LINE__, #a " contains " #b), a, b)
+	_ensure_not_contains(wibble::tests::Location(__FILE__, __LINE__, #a " contains " #b), a, b)
 #define inner_ensure_not_contains(a, b) \
-	_ensure_not_contains(Location(loc, __FILE__, __LINE__, #a " contains " #b), a, b)
+	_ensure_not_contains(wibble::tests::Location(loc, __FILE__, __LINE__, #a " contains " #b), a, b)
 template<class T>
-void _ensure_not_contains(const Location& loc, const std::set<T>& s, const T& item)
+void _ensure_not_contains(const wibble::tests::Location& loc, const std::set<T>& s, const T& item)
 {
 	if (s.find(item) != s.end())
 	{
@@ -112,20 +108,20 @@
 
 // Output a test collection for later testing with test_tagged_collection_ro
 
-#define output_test_collection(x) (__output_test_collection(Location(__FILE__, __LINE__, #x), (x)))
-#define inner_output_test_collection(x) (__output_test_collection(Location(loc, __FILE__, __LINE__, $x), (x)))
+#define output_test_collection(x) (__output_test_collection(wibble::tests::Location(__FILE__, __LINE__, #x), (x)))
+#define inner_output_test_collection(x) (__output_test_collection(wibble::tests::Location(loc, __FILE__, __LINE__, $x), (x)))
 template<typename OUT>
-void __output_test_collection(const Location& loc, OUT tc);
+void __output_test_collection(const wibble::tests::Location& loc, OUT tc);
 
-#define test_readonly_collection(x) (__test_readonly_collection(Location(__FILE__, __LINE__, #x), (x)))
-#define inner_test_readonly_collection(x) (__test_readonly_collection(Location(loc, __FILE__, __LINE__, #x), (x)))
+#define test_readonly_collection(x) (__test_readonly_collection(wibble::tests::Location(__FILE__, __LINE__, #x), (x)))
+#define inner_test_readonly_collection(x) (__test_readonly_collection(wibble::tests::Location(loc, __FILE__, __LINE__, #x), (x)))
 template<typename ROCOLL>
-void __test_readonly_collection(const Location& loc, const ROCOLL& tc);
+void __test_readonly_collection(const wibble::tests::Location& loc, const ROCOLL& tc);
 
 
-#define test_collection(x) (__test_collection(Location(__FILE__, __LINE__, #x), (x)))
+#define test_collection(x) (__test_collection(wibble::tests::Location(__FILE__, __LINE__, #x), (x)))
 template<typename COLL>
-void __test_collection(const Location& loc, COLL& tc);
+void __test_collection(const wibble::tests::Location& loc, COLL& tc);
 
 #endif
 }



More information about the Debtags-commits mailing list