Example #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
Example #2
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
Example #3
0
    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
Example #4
0
    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
Example #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)
Example #6
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)
Example #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)
Example #8
0
    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)
Example #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
Example #10
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