Browse Source

t4018: test cases showing that the cpp pattern misses many anchor points

Most of the tests show C++ code, but there is also a union definition and
a GNU style function definition that are not recognized.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Johannes Sixt 11 years ago committed by Junio C Hamano
parent
commit
9cc444f057
  1. 5
      t/t4018/cpp-class-constructor
  2. 6
      t/t4018/cpp-class-constructor-mem-init
  3. 5
      t/t4018/cpp-class-destructor
  4. 5
      t/t4018/cpp-function-returning-global-type
  5. 6
      t/t4018/cpp-function-returning-nested
  6. 5
      t/t4018/cpp-function-returning-reference
  7. 6
      t/t4018/cpp-gnu-style-function
  8. 5
      t/t4018/cpp-namespace-definition
  9. 5
      t/t4018/cpp-operator-definition
  10. 8
      t/t4018/cpp-struct-single-line
  11. 5
      t/t4018/cpp-template-function-definition
  12. 5
      t/t4018/cpp-union-definition

5
t/t4018/cpp-class-constructor

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
Item::Item(int RIGHT)
{
ChangeMe;
broken;
}

6
t/t4018/cpp-class-constructor-mem-init

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
Item::Item(int RIGHT) :
member(0)
{
ChangeMe;
broken;
}

5
t/t4018/cpp-class-destructor

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
RIGHT::~RIGHT()
{
ChangeMe;
broken;
}

5
t/t4018/cpp-function-returning-global-type

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
::Item get::it::RIGHT()
{
ChangeMe;
broken;
}

6
t/t4018/cpp-function-returning-nested

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
get::Item get::it::RIGHT()
{
ChangeMe;
broken;
}

5
t/t4018/cpp-function-returning-reference

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
string& get::it::RIGHT(char *ptr)
{
ChangeMe;
broken;
}

6
t/t4018/cpp-gnu-style-function

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
const char *
RIGHT(int arg)
{
ChangeMe;
broken;
}

5
t/t4018/cpp-namespace-definition

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
namespace RIGHT
{
ChangeMe;
broken;
}

5
t/t4018/cpp-operator-definition

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
Value operator+(Value LEFT, Value RIGHT)
{
ChangeMe;
broken;
}

8
t/t4018/cpp-struct-single-line

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
void wrong()
{
}

struct RIGHT_iterator_tag {};

int ChangeMe;
// broken

5
t/t4018/cpp-template-function-definition

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
template<class T> int RIGHT(T arg)
{
ChangeMe;
broken;
}

5
t/t4018/cpp-union-definition

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
union RIGHT {
double v;
int ChangeMe;
broken;
};
Loading…
Cancel
Save