コード例 #1
0
    def test02_empty_list_type(self):
        """Test behavior of empty list<int> (part of cintdlls)"""

        from cppyy.gbl import std

        a = std.list(int)()
        for arg in a:
            pass
コード例 #2
0
ファイル: PyROOT_stltests.py プロジェクト: bbannier/roottest
    def test02_empty_list_type(self):
        """Test behavior of empty list<int> (part of cintdlls)"""

        from cppyy.gbl import std

        a = std.list(int)()
        for arg in a:
            pass
コード例 #3
0
ファイル: test_stltypes.py プロジェクト: cms-sw/root
    def test02_empty_list_type(self):
        """Test behavior of empty list<int>"""

        import cppyy
        from cppyy.gbl import std

        a = std.list(int)()
        for arg in a:
            pass
コード例 #4
0
ファイル: test_stltypes.py プロジェクト: clarkm1811/root-1
    def test02_empty_list_type(self):
        """Test behavior of empty list<int>"""

        import cppyy
        from cppyy.gbl import std

        a = std.list(int)()
        for arg in a:
            pass
コード例 #5
0
    def test02_builtin_list_iterators(self):
        """Test iterator comparison for list"""

        from cppyy.gbl import std

        l = std.list(int)()
        l.push_back(1)

        self.__run_tests(l)
コード例 #6
0
ファイル: PyROOT_stltests.py プロジェクト: bbannier/roottest
    def test02_builtin_list_iterators(self):
        """Test iterator comparison for list"""

        from cppyy.gbl import std

        l = std.list(int)()
        l.push_back(1)

        self.__run_tests(l)
コード例 #7
0
    def test01_any_class(self):
        """Availability of boost::any"""

        import cppyy
        assert cppyy.gbl.boost.any

        from cppyy.gbl import std
        from cppyy.gbl.boost import any

        assert std.list(any)
コード例 #8
0
ファイル: test_boost_any.py プロジェクト: zhufengGNSS/root
    def test01_any_class(self):
        """Availability of boost::any"""

        if self.disable:
            import warnings
            warnings.warn("no boost/any.hpp found, skipping test01_any_class")
            return

        import cppyy
        assert cppyy.gbl.boost.any

        from cppyy.gbl import std
        from cppyy.gbl.boost import any

        assert std.list(any)
コード例 #9
0
    def test01_builtin_list_type(self):
        """Test access to a list<int> (part of cintdlls)"""

        from cppyy.gbl import std

        a = std.list(int)()
        for i in range(self.N):
            a.push_back(i)

        assert len(a) == self.N
        assert 11 in a

        ll = list(a)
        for i in range(self.N):
            assert ll[i] == i

        for val in a:
            assert ll[ll.index(val)] == val
コード例 #10
0
ファイル: PyROOT_stltests.py プロジェクト: bbannier/roottest
    def test01_builtin_list_type(self):
        """Test access to a list<int> (part of cintdlls)"""

        from cppyy.gbl import std

        a = std.list(int)()
        for i in range(self.N):
            a.push_back( i )

        assert len(a) == self.N
        assert 11 in a

        ll = list(a)
        for i in range(self.N):
            assert ll[i] == i

        for val in a:
            assert ll[ ll.index(val) ] == val