コード例 #1
0
    def test_empty_package_with_dependency(self):
        r = PackageResolver(P('r')/'g2')

        p1 = r.resolve('g2p1', {})
        assert('g2p1' == p1.name)
        assert([]     == p1.dependencies())

        p2 = r.resolve('g2p2', { 'g2p1': p1 })
        assert('g2p2' == p2.name)
        assert([p1]   == p2.dependencies())
コード例 #2
0
ファイル: test_resolver.py プロジェクト: tdoug870/bde-meta
    def test_empty_package_with_dependency(self):
        r = PackageResolver(P('r')/'g2')

        p1 = r.resolve('g2p1', {})
        assert('g2p1' == p1)
        assert([]     == p1.dependencies())

        p2 = r.resolve('g2p2', { 'g2p1': p1 })
        assert('g2p2' == p2)
        assert([p1]   == p2.dependencies())
コード例 #3
0
    def test_level_two_package_has_dependency(self):
        r = PackageResolver(P('r')/'g2')

        p1 = r.resolve('g2p1', {})
        assert('g2p1'                    == p1.name)
        assert([]                        == p1.dependencies())
        assert([str(P('r')/'g2'/'g2p1')] == list(p1.includes()))
        assert(0                         == len(list(p1.sources())))

        p2 = r.resolve('g2p2', { 'g2p1': p1 })
        assert('g2p2'                    == p2.name)
        assert([p1]                      == p2.dependencies())
        assert([str(P('r')/'g2'/'g2p2')] == list(p2.includes()))
        assert([]                        == list(p2.sources()))
コード例 #4
0
ファイル: test_resolver.py プロジェクト: tdoug870/bde-meta
    def test_level_two_package_has_dependency(self):
        r = PackageResolver(P('r')/'g2')

        p1 = r.resolve('g2p1', {})
        assert('g2p1'               == p1)
        assert([]                   == p1.dependencies())
        assert([P('r')/'g2'/'g2p1'] == list(p1.includes()))
        assert(0                    == len(list(p1.sources())))

        p2 = r.resolve('g2p2', { 'g2p1': p1 })
        assert('g2p2'               == p2)
        assert([p1]                 == p2.dependencies())
        assert([P('r')/'g2'/'g2p2'] == list(p2.includes()))
        assert([]                   == list(p2.sources()))
コード例 #5
0
 def test_thirdparty_package_with_header(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1+p7', {})
     assert('g1+p7'                          == p.name)
     assert([]                               == p.dependencies())
     assert([str(P('r')/'g1'/'g1+p7')]       == list(p.includes()))
     assert([str(P('r')/'g1'/'g1+p7'/'a.h')] == list(p.headers()))
コード例 #6
0
ファイル: test_resolver.py プロジェクト: tdoug870/bde-meta
 def test_thirdparty_package_lists_cs(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1+p5', {})
     assert('g1+p5'                     == p)
     assert([]                          == p.dependencies())
     assert([P('r')/'g1'/'g1+p5']       == list(p.includes()))
     assert([P('r')/'g1'/'g1+p5'/'a.c'] == list(p.sources()))
コード例 #7
0
ファイル: test_resolver.py プロジェクト: tdoug870/bde-meta
 def test_thirdparty_package_ignores_non_c_non_cpp(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1+p6', {})
     assert('g1+p6'               == p)
     assert([]                    == p.dependencies())
     assert([P('r')/'g1'/'g1+p6'] == list(p.includes()))
     assert([]                    == list(p.sources()))
コード例 #8
0
ファイル: test_resolver.py プロジェクト: tdoug870/bde-meta
 def test_empty_package(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1p1', {})
     assert('g1p1'               == p)
     assert([]                   == p.dependencies())
     assert([P('r')/'g1'/'g1p1'] == list(p.includes()))
     assert([]                   == list(p.sources()))
コード例 #9
0
 def test_empty_package(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1p1', {})
     assert('g1p1'                    == p.name)
     assert([]                        == p.dependencies())
     assert([str(P('r')/'g1'/'g1p1')] == list(p.includes()))
     assert([]                        == list(p.sources()))
コード例 #10
0
 def test_thirdparty_package_ignores_non_c_non_cpp(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1+p6', {})
     assert('g1+p6'                    == p.name)
     assert([]                         == p.dependencies())
     assert([str(P('r')/'g1'/'g1+p6')] == list(p.includes()))
     assert([]                         == list(p.sources()))
コード例 #11
0
 def test_thirdparty_package_lists_cs(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1+p5', {})
     assert('g1+p5'                          == p.name)
     assert([]                               == p.dependencies())
     assert([str(P('r')/'g1'/'g1+p5')]       == list(p.includes()))
     assert([str(P('r')/'g1'/'g1+p5'/'a.c')] == list(p.sources()))
コード例 #12
0
 def test_one_non_driver_component(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1p2', {})
     assert('g1p2'                                  == p.name)
     assert([]                                      == p.dependencies())
     assert([str(P('r')/'g1'/'g1p2')]               == list(p.includes()))
     assert([str(P('r')/'g1'/'g1p2'/'g1p2_c1.cpp')] == list(p.sources()))
     assert([]                                      == list(p.drivers()))
コード例 #13
0
ファイル: test_resolver.py プロジェクト: tdoug870/bde-meta
 def test_one_non_driver_component(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1p2', {})
     assert('g1p2'                             == p)
     assert([]                                 == p.dependencies())
     assert([P('r')/'g1'/'g1p2']               == list(p.includes()))
     assert([P('r')/'g1'/'g1p2'/'g1p2_c1.cpp'] == list(p.sources()))
     assert([]                                 == list(p.drivers()))
コード例 #14
0
ファイル: test_resolver.py プロジェクト: cppguru/bdemeta
 def test_one_driver_component(self):
     r = PackageResolver(P('r')/'g1')
     p = r.resolve('g1p3', {})
     assert('g1p3'                                    == p.name)
     assert([]                                        == p.dependencies())
     assert([str(P('r')/'g1'/'g1p3')]                 == list(p.includes()))
     assert([str(P('r')/'g1'/'g1p3'/'g1p3_c1.h')]     == list(p.headers()))
     assert([str(P('r')/'g1'/'g1p3'/'g1p3_c1.cpp')]   == list(p.sources()))
     assert([str(P('r')/'g1'/'g1p3'/'g1p3_c1.t.cpp')] == list(p.drivers()))
コード例 #15
0
 def test_one_driver_component(self):
     r = PackageResolver(P('r') / 'g1')
     p = r.resolve('g1p3', {})
     assert ('g1p3' == p)
     assert ([] == p.dependencies())
     assert ([P('r') / 'g1' / 'g1p3'] == list(p.includes()))
     assert ([P('r') / 'g1' / 'g1p3' / 'g1p3_c1.h'] == list(p.headers()))
     assert ([P('r') / 'g1' / 'g1p3' / 'g1p3_c1.cpp'] == list(p.sources()))
     assert ([P('r') / 'g1' / 'g1p3' / 'g1p3_c1.t.cpp'
              ] == list(p.drivers()))
コード例 #16
0
ファイル: test_resolver.py プロジェクト: tdoug870/bde-meta
    def test_thirdparty_package_lists_cpps(self):
        r = PackageResolver(P('r')/'g1')
        p = r.resolve('g1+p4', {})

        assert('g1+p4'               == p)
        assert([]                    == p.dependencies())
        assert([P('r')/'g1'/'g1+p4'] == list(p.includes()))

        assert(2                           == len(list(p.sources())))
        assert(P('r')/'g1'/'g1+p4'/'a.cpp' in list(p.sources()))
        assert(P('r')/'g1'/'g1+p4'/'b.cpp' in list(p.sources()))
コード例 #17
0
    def test_thirdparty_package_lists_cpps(self):
        r = PackageResolver(P('r')/'g1')
        p = r.resolve('g1+p4', {})

        assert('g1+p4'                    == p.name)
        assert([]                         == p.dependencies())
        assert([str(P('r')/'g1'/'g1+p4')] == list(p.includes()))

        assert(2                                == len(list(p.sources())))
        assert(str(P('r')/'g1'/'g1+p4'/'a.cpp') in list(p.sources()))
        assert(str(P('r')/'g1'/'g1+p4'/'b.cpp') in list(p.sources()))