Esempio n. 1
0
    def test_get_symbol(self):
        data = 'A B::C(D::E)'
        expected = 'C'
        actual = gj_index._get_symbol(data)
        self.assertEqual(expected, actual)

        data = 'A B::C()'
        expected = 'C'
        actual = gj_index._get_symbol(data)
        self.assertEqual(expected, actual)

        data = 'A B::C'
        expected = 'C'
        actual = gj_index._get_symbol(data)
        self.assertEqual(expected, actual)
Esempio n. 2
0
    def test_get_symbol(self):
        data = 'A B::C(D::E)'
        expected = 'C'
        actual = gj_index._get_symbol(data)
        self.assertEqual(expected, actual)

        data = 'A B::C()'
        expected = 'C'
        actual = gj_index._get_symbol(data)
        self.assertEqual(expected, actual)

        data = 'A B::C'
        expected = 'C'
        actual = gj_index._get_symbol(data)
        self.assertEqual(expected, actual)
Esempio n. 3
0
 def test_get_symbol_with_nested_parenthesis(self):
     data = '''A<(anonymous namespace)::B>::C((anonymous namespace)::D*)'''
     expected = 'C'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 4
0
 def test_get_symbol_with_nested_template(self):
     data = 'A<X::Y>::B<C::D<E::F> >()'
     expected = 'B'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 5
0
 def test_get_symbol_with_template(self):
     data = 'A::B<C::D>()'
     expected = 'B'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 6
0
 def test_get_symbol_with_operator(self):
     data = 'A::B::operator()()'
     expected = 'operator()'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 7
0
 def test_get_symbol_with_multiple_parenthesis(self):
     # The class and its methods are defined in a method.
     data = 'A::B()::C::D()'
     expected = 'D'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 8
0
 def test_get_symbol_with_nested_parenthesis(self):
     data = '''A<(anonymous namespace)::B>::C((anonymous namespace)::D*)'''
     expected = 'C'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 9
0
 def test_get_symbol_with_nested_template(self):
     data = 'A<X::Y>::B<C::D<E::F> >()'
     expected = 'B'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 10
0
 def test_get_symbol_with_template(self):
     data = 'A::B<C::D>()'
     expected = 'B'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 11
0
 def test_get_symbol_with_operator(self):
     data = 'A::B::operator()()'
     expected = 'operator()'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)
Esempio n. 12
0
 def test_get_symbol_with_multiple_parenthesis(self):
     # The class and its methods are defined in a method.
     data = 'A::B()::C::D()'
     expected = 'D'
     actual = gj_index._get_symbol(data)
     self.assertEqual(expected, actual)