05ba8a3a07
git-svn-id: http://root.cern.ch/svn/root/trunk@45844 27541ba8-7e3a-0410-8455-c3a389f83636
26 lines
805 B
C
26 lines
805 B
C
// RUN: cat %s | %cling
|
|
// RUN: cat %s | %cling 2>&1 | FileCheck %s
|
|
// Test handling and recovery from calling an unresolved symbol.
|
|
|
|
.rawInput
|
|
int foo(); // extern C++
|
|
.rawInput
|
|
extern "C" int functionWithoutDefinition();
|
|
|
|
int i = 42;
|
|
i = functionWithoutDefinition();
|
|
// CHECK: ExecutionContext::executeFunction: symbol 'functionWithoutDefinition' unresolved
|
|
i = foo();
|
|
// CHECK: ExecutionContext::executeFunction: symbol '{{.*}}foo{{.*}}' unresolved
|
|
|
|
extern "C" int printf(const char* fmt, ...);
|
|
printf("got i=%d\n", i); // CHECK: got i=42
|
|
int a = 12// CHECK: (int) 12
|
|
|
|
foo()
|
|
// CHECK: ExecutionContext::executeFunction: symbol '{{.*}}foo{{.*}}' unresolved
|
|
functionWithoutDefinition();
|
|
// CHECK: ExecutionContext::executeFunction: symbol 'functionWithoutDefinition' unresolved
|
|
|
|
i = 13 //CHECK: (int) 13
|