aboutsummaryrefslogtreecommitdiffstats
path: root/t/t4034/cpp/post
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2021-10-08 19:09:54 +0000
committerJunio C Hamano <gitster@pobox.com>2021-10-08 13:04:07 -0700
commit3e063de46e6270606e058b96bfcc0baebc4aea81 (patch)
tree414a5dff81f7d2a1e84d670b04d405d7a4219154 /t/t4034/cpp/post
parent1cf93847c1edf3128f3a2fd87db6a490470ce4ec (diff)
downloadgit-3e063de46e6270606e058b96bfcc0baebc4aea81.tar.gz
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>
Diffstat (limited to 't/t4034/cpp/post')
-rw-r--r--t/t4034/cpp/post18
1 files changed, 16 insertions, 2 deletions
diff --git a/t/t4034/cpp/post b/t/t4034/cpp/post
index 4229868ae6..3feae6f430 100644
--- a/t/t4034/cpp/post
+++ b/t/t4034/cpp/post
@@ -1,6 +1,20 @@
-Foo() : x(0&42) { bar(x); }
+Foo() : x(0&42) { bar(x.Find); }
cout<<"Hello World?\n"<<endl;
-(1) (-1e10) (0xabcdef) 'y'
+(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