~thopiekar/zypper/libzypp-manual-import

« back to all changes in this revision

Viewing changes to tests/sat/WhatObsoletes_test.cc

  • Committer: Thomas-Karl Pietrowski
  • Date: 2014-01-29 22:44:28 UTC
  • Revision ID: thopiekar@googlemail.com-20140129224428-gpcqnsdakby362n8
firstĀ import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "TestSetup.h"
 
2
#include <zypp/sat/WhatObsoletes.h>
 
3
 
 
4
namespace zypp
 
5
{
 
6
  namespace sat
 
7
  {
 
8
    // Obsoletes may either match against provides, or names.
 
9
    // Configuration depends on the behaviour of rpm.
 
10
    extern bool obsoleteUsesProvides;
 
11
  }
 
12
}
 
13
 
 
14
BOOST_AUTO_TEST_CASE(WhatObsoletes)
 
15
{
 
16
  TestSetup test( Arch_x86_64 );
 
17
  test.loadTestcaseRepos( TESTS_SRC_DIR"/data/TCWhatObsoletes" );
 
18
 
 
19
  sat::Solvable test1( 2 );
 
20
  BOOST_REQUIRE_EQUAL( test1.name(), "test1" );
 
21
 
 
22
  {
 
23
    sat::obsoleteUsesProvides = true;
 
24
    sat::WhatObsoletes w( test1 );
 
25
    BOOST_REQUIRE( w.size() == 2 );
 
26
    // (3)goaway-1-1.i586(@System)
 
27
    // (5)meetoo-1-1.i586(@System)
 
28
  }
 
29
  {
 
30
    sat::obsoleteUsesProvides = false;
 
31
    sat::WhatObsoletes w( test1 );
 
32
    BOOST_REQUIRE( w.size() == 1 );
 
33
    // (3)goaway-1-1.i586(@System)
 
34
  }
 
35
}
 
 
b'\\ No newline at end of file'