git-commit-vandalism/t/t4034/cpp/post
Johannes Sixt 3e063de46e t4034: add tests showing problematic cpp tokenizations
The word regex is too loose and matches long streaks of characters
that should actually be separate tokens.  Add these problematic test
cases. Separate the lines with text that will remain identical in the
pre- and post-image so that the diff algorithm will not lump removals
and additions of consecutive lines together. This makes the expected
output easier to read.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-08 13:04:07 -07:00

31 lines
425 B
Plaintext

Foo() : x(0&42) { bar(x.Find); }
cout<<"Hello World?\n"<<endl;
(1 +1e10 0xabcdef) 'y'
// long double
3.141592654e+10l
// float
120E6f
// hex
0xdeadBeaf+7ULL
// octal
01234560
// binary
0b1100+e1
// expression
1.5-e+3+f
// another one
str.e+75
[a] b->*v d.*e
~!a !~b c+ d- e**f g&&h
a*=b c/=d e%=f
a++b c--d
a<<=b c>>=d
a<=b c<d e>=f g>h
a!=b c=d
a^=b c|=d e&=f
a|b
a?:b
a==b c+d e-f g*h i/j k%l m<<n o>>p q&r s^t u|v
a,b
a:b