[Aptitude-svn-commit] r3957 - in branches/aptitude-0.3/aptitude: . tests

Daniel Burrows dburrows at costa.debian.org
Thu Aug 25 22:29:06 UTC 2005


Author: dburrows
Date: Thu Aug 25 22:29:04 2005
New Revision: 3957

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/tests/test_apt_universe.cc
Log:
Actually ignore stuff that fixes the dependency under consideration when testing connectivity (whoops).

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Thu Aug 25 22:29:04 2005
@@ -2,6 +2,11 @@
 
 	* tests/test_apt_universe.cc:
 
+	  Fix the connectivity test to actually ignore stuff that fixes
+	  the dependency under consideration (doh).
+
+	* tests/test_apt_universe.cc:
+
 	  Right, take sources into account in the other branch (this code
 	  should probably be reorganized to be less brittle!).
 

Modified: branches/aptitude-0.3/aptitude/tests/test_apt_universe.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/tests/test_apt_universe.cc	(original)
+++ branches/aptitude-0.3/aptitude/tests/test_apt_universe.cc	Thu Aug 25 22:29:04 2005
@@ -230,27 +230,28 @@
 	  for(aptitude_universe::package::version_iterator vi
 		= (*si).get_package().versions_begin(); !vi.end(); ++vi)
 	    {
-	      bool vi_found = false;
 	      // NB: relies on the properties of solved_by tested above.
 	      if(*vi != *si && !(*di).solved_by(*vi))
 		{
+		  bool vi_found = false;
+
 		  for(aptitude_universe::version::revdep_iterator rdi
-			= (*si).revdeps_begin();
+			= (*vi).revdeps_begin();
 		      !vi_found && !rdi.end(); ++rdi)
 		    if(*rdi == *di)
 		      vi_found = true;
-		}
 
-	      if(!vi_found)
-		{
-		  std::ostringstream out;
-		  out << "The dependency " << *di
-		      << " does not occur in the revdep list of either "
-		      << (*si).get_package().get_name() << " "
-		      << (*si).get_name() << " or "
-		      << (*vi).get_package().get_name() << " "
-		      << (*vi).get_name();
-		  CPPUNIT_FAIL(out.str());
+		  if(!vi_found)
+		    {
+		      std::ostringstream out;
+		      out << "The dependency " << *di
+			  << " does not occur in the revdep list of either "
+			  << (*si).get_package().get_name() << " "
+			  << (*si).get_name() << " or "
+			  << (*vi).get_package().get_name() << " "
+			  << (*vi).get_name();
+		      CPPUNIT_FAIL(out.str());
+		    }
 		}
 	    }
 	}



More information about the Aptitude-svn-commit mailing list