Add future tests for implicit auto, when it gets fully adopted in cling.
The adoption should be done soon.
This commit is contained in:
parent
1179f9a9ec
commit
3d7b328517
21
test/Extensions/ImplicitAutoKeyword/Auto.C
Normal file
21
test/Extensions/ImplicitAutoKeyword/Auto.C
Normal file
@ -0,0 +1,21 @@
|
||||
// RUN: cat %s | %cling --enable-implicit-auto-keyword | FileCheck %s
|
||||
// XFAIL: *
|
||||
|
||||
// ROOT-5324
|
||||
b = 1
|
||||
//CHECK: (int) 1
|
||||
b += 1
|
||||
//CHECK: (int) 2
|
||||
b = 0
|
||||
//CHECK: (int) 0
|
||||
a = b
|
||||
//CHECK: (int) 0
|
||||
int c = a
|
||||
//CHECK: (int) 0
|
||||
// end ROOT-5324
|
||||
|
||||
auto explicitAuto = "test";
|
||||
explicitAuto
|
||||
//CHECK: (const char*) "test"
|
||||
|
||||
.q
|
15
test/Extensions/ImplicitAutoKeyword/AutoInitOrder.C
Normal file
15
test/Extensions/ImplicitAutoKeyword/AutoInitOrder.C
Normal file
@ -0,0 +1,15 @@
|
||||
// RUN: cat %s | %cling --enable-implicit-auto-keyword | FileCheck %s
|
||||
// XFAIL: *
|
||||
|
||||
class MyClass {
|
||||
public:
|
||||
int i;
|
||||
MyClass(int a) : i(a) {};
|
||||
};
|
||||
|
||||
MyClass* my1 = new MyClass(0); my1->i = 10; my2 = new MyClass(my1->i); my1->i++;
|
||||
my1->i
|
||||
//CHECK: (int) 11
|
||||
my2->i
|
||||
//CHECK: (int) 10
|
||||
.q
|
Loading…
Reference in New Issue
Block a user