Skip to content

Commit bfaaf19

Browse files
j6tgitster
authored andcommitted
userdiff-cpp: prepare test cases with yet unsupported features
We are going to add support for C++'s digit-separating single-quote and the spaceship operator. By adding the test cases in this separate commit, the effect on the word highlighting will become more obvious as the features are implemented and the file cpp/expect is updated. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 350b87c commit bfaaf19

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

t/t4034/cpp/expect

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<BOLD>diff --git a/pre b/post<RESET>
2-
<BOLD>index 1229cdb..3feae6f 100644<RESET>
2+
<BOLD>index 144cd98..64e78af 100644<RESET>
33
<BOLD>--- a/pre<RESET>
44
<BOLD>+++ b/post<RESET>
55
<CYAN>@@ -1,30 +1,30 @@<RESET>
66
Foo() : x(0<RED>&&1<RESET><GREEN>&42<RESET>) { <RED>foo0<RESET><GREEN>bar<RESET>(x.<RED>find<RESET><GREEN>Find<RESET>); }
77
cout<<"Hello World<RED>!<RESET><GREEN>?<RESET>\n"<<endl;
8-
<GREEN>(<RESET>1 <RED>-<RESET><GREEN>+<RESET>1e10 0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>y<RESET>'
8+
<GREEN>(<RESET>1 <RED>-<RESET><GREEN>+<RESET>1e10 0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>.<RESET>'
99
// long double<RESET>
10-
<RED>3.141592653e-10l<RESET><GREEN>3.141592654e+10l<RESET>
10+
3.141'592'<RED>653e-10l<RESET><GREEN>654e+10l<RESET>
1111
// float<RESET>
1212
<RED>120E5f<RESET><GREEN>120E6f<RESET>
1313
// hex<RESET>
14-
<RED>0xdeadbeaf<RESET><GREEN>0xdeadBeaf<RESET>+<RED>8ULL<RESET><GREEN>7ULL<RESET>
14+
0xdead'<RED>beaf<RESET><GREEN>Beaf<RESET>+<RED>8ULL<RESET><GREEN>7ULL<RESET>
1515
// octal<RESET>
16-
<RED>01234567<RESET><GREEN>01234560<RESET>
16+
0123'<RED>4567<RESET><GREEN>4560<RESET>
1717
// binary<RESET>
18-
<RED>0b1000<RESET><GREEN>0b1100<RESET>+e1
18+
<RED>0b10<RESET><GREEN>0b11<RESET>'00+e1
1919
// expression<RESET>
2020
1.5-e+<RED>2<RESET><GREEN>3<RESET>+f
2121
// another one<RESET>
@@ -25,7 +25,7 @@ str.e+<RED>65<RESET><GREEN>75<RESET>
2525
a<RED>*<RESET><GREEN>*=<RESET>b c<RED>/<RESET><GREEN>/=<RESET>d e<RED>%<RESET><GREEN>%=<RESET>f
2626
a<RED>+<RESET><GREEN>++<RESET>b c<RED>-<RESET><GREEN>--<RESET>d
2727
a<RED><<<RESET><GREEN><<=<RESET>b c<RED>>><RESET><GREEN>>>=<RESET>d
28-
a<RED><<RESET><GREEN><=<RESET>b c<RED><=<RESET><GREEN><<RESET>d e<RED>><RESET><GREEN>>=<RESET>f g<RED>>=<RESET><GREEN>><RESET>h
28+
a<RED><<RESET><GREEN><=<RESET>b c<RED><=<RESET><GREEN><<RESET>d e<RED>><RESET><GREEN>>=<RESET>f g<RED>>=<RESET><GREEN>><RESET>h i<=<GREEN>><RESET>j
2929
a<RED>==<RESET><GREEN>!=<RESET>b c<RED>!=<RESET><GREEN>=<RESET>d
3030
a<RED>^<RESET><GREEN>^=<RESET>b c<RED>|<RESET><GREEN>|=<RESET>d e<RED>&&<RESET><GREEN>&=<RESET>f
3131
a<RED>||<RESET><GREEN>|<RESET>b

t/t4034/cpp/post

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Foo() : x(0&42) { bar(x.Find); }
22
cout<<"Hello World?\n"<<endl;
3-
(1 +1e10 0xabcdef) 'y'
3+
(1 +1e10 0xabcdef) '.'
44
// long double
5-
3.141592654e+10l
5+
3.141'592'654e+10l
66
// float
77
120E6f
88
// hex
9-
0xdeadBeaf+7ULL
9+
0xdead'Beaf+7ULL
1010
// octal
11-
01234560
11+
0123'4560
1212
// binary
13-
0b1100+e1
13+
0b11'00+e1
1414
// expression
1515
1.5-e+3+f
1616
// another one
@@ -20,7 +20,7 @@ str.e+75
2020
a*=b c/=d e%=f
2121
a++b c--d
2222
a<<=b c>>=d
23-
a<=b c<d e>=f g>h
23+
a<=b c<d e>=f g>h i<=>j
2424
a!=b c=d
2525
a^=b c|=d e&=f
2626
a|b

t/t4034/cpp/pre

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ Foo():x(0&&1){ foo0( x.find); }
22
cout<<"Hello World!\n"<<endl;
33
1 -1e10 0xabcdef 'x'
44
// long double
5-
3.141592653e-10l
5+
3.141'592'653e-10l
66
// float
77
120E5f
88
// hex
9-
0xdeadbeaf+8ULL
9+
0xdead'beaf+8ULL
1010
// octal
11-
01234567
11+
0123'4567
1212
// binary
13-
0b1000+e1
13+
0b10'00+e1
1414
// expression
1515
1.5-e+2+f
1616
// another one
@@ -20,7 +20,7 @@ str.e+65
2020
a*b c/d e%f
2121
a+b c-d
2222
a<<b c>>d
23-
a<b c<=d e>f g>=h
23+
a<b c<=d e>f g>=h i<=j
2424
a==b c!=d
2525
a^b c|d e&&f
2626
a||b

0 commit comments

Comments
 (0)