Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)