зеркало из https://github.com/microsoft/git.git
t4018: test cases for the built-in cpp pattern
A later patch changes the built-in cpp pattern. These test cases demonstrate aspects of the pattern that we do not want to change. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
ad5070fb36
Коммит
02907a08cc
|
@ -0,0 +1,4 @@
|
|||
Item RIGHT::DoSomething( Args with_spaces )
|
||||
{
|
||||
ChangeMe;
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
class RIGHT
|
||||
{
|
||||
int ChangeMe;
|
||||
};
|
|
@ -0,0 +1,5 @@
|
|||
class RIGHT :
|
||||
public Baseclass
|
||||
{
|
||||
int ChangeMe;
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
const char *get_it_RIGHT(char *ptr)
|
||||
{
|
||||
ChangeMe;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
class RIGHT : public Baseclass
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
private:
|
||||
void DoSomething();
|
||||
int ChangeMe;
|
||||
};
|
|
@ -0,0 +1,9 @@
|
|||
struct item RIGHT(int i)
|
||||
// Do not
|
||||
// pick up
|
||||
/* these
|
||||
** comments.
|
||||
*/
|
||||
{
|
||||
ChangeMe;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
void RIGHT (void)
|
||||
{
|
||||
repeat: // C++ comment
|
||||
next: /* C comment */
|
||||
do_something();
|
||||
|
||||
ChangeMe;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
struct RIGHT {
|
||||
unsigned
|
||||
/* this bit field looks like a label and should not be picked up */
|
||||
decoy_bitfield: 2,
|
||||
more : 1;
|
||||
int filler;
|
||||
|
||||
int ChangeMe;
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
void RIGHT (void)
|
||||
{
|
||||
ChangeMe;
|
||||
}
|
Загрузка…
Ссылка в новой задаче