Add future tests for implicit auto, when it gets fully adopted in cling.

The adoption should be done soon.
This commit is contained in:
Vassil Vassilev 2013-10-11 18:05:16 +02:00 committed by sftnight
parent 1179f9a9ec
commit 3d7b328517
2 changed files with 36 additions and 0 deletions

View 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

View 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