]> git.saurik.com Git - apt.git/blobdiff - test/libapt/getarchitectures_test.cc
fix test/integration/test-apt-helper
[apt.git] / test / libapt / getarchitectures_test.cc
index 1500caeeddca06a602de59962d41125759afbd7e..f4dfc6ae8d69d38a0b4241b2bb10bdce39b3e92f 100644 (file)
@@ -1,20 +1,14 @@
+#include <config.h>
+
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/configuration.h>
 
-#include "assert.h"
 #include <string>
 #include <vector>
 
-#include <iostream>
-
-// simple helper to quickly output a vector of strings
-void dumpVector(std::vector<std::string> vec) {
-       for (std::vector<std::string>::const_iterator v = vec.begin();
-            v != vec.end(); v++)
-               std::cout << *v << std::endl;
-}
+#include "assert.h"
 
-int main(int argc,char *argv[])
+int main()
 {
        std::vector<std::string> vec;
 
@@ -39,6 +33,12 @@ int main(int argc,char *argv[])
        _config->Set("APT::Architecture", "armel");
        vec = APT::Configuration::getArchitectures(false);
        equals(vec.size(), 2);
+       equals(vec[0], "armel");
+       equals(vec[1], "i386");
+
+       _config->Set("APT::Architectures::2", "armel");
+       vec = APT::Configuration::getArchitectures(false);
+       equals(vec.size(), 2);
        equals(vec[0], "i386");
        equals(vec[1], "armel");