fixing a macro name mismatch that was making our test case succeed for the wrong reason; plus a minor code change to the CPP side of the test which eases debugging efforts

llvm-svn: 150213
This commit is contained in:
Enrico Granata
2012-02-10 00:10:27 +00:00
parent 591b7de030
commit 55031d28ba
2 changed files with 4 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ class CppValueCastTestCase(TestBase):
self.source = 'sbvalue-cast.cpp';
self.line = line_number(self.source, '// Set breakpoint here.')
self.exe_name = self.testMethodName
self.d_virtual = {'CXX_SOURCES': self.source, 'EXE': self.exe_name, 'CFLAGS_EXTRAS': '-DDO_VIRTUAL_VIRTUAL'}
self.d_virtual = {'CXX_SOURCES': self.source, 'EXE': self.exe_name, 'CFLAGS_EXTRAS': '-DDO_VIRTUAL_INHERITANCE'}
self.d_regular = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
def do_sbvalue_cast (self, exe_name):

View File

@@ -67,7 +67,9 @@ private:
int
main(int argc, char **argv)
{
Base *array[2] = {new DerivedA(10), new DerivedB(12)};
DerivedA* dA = new DerivedA(10);
DerivedB* dB = new DerivedB(12);
Base *array[2] = {dA, dB};
Base *teller = NULL;
for (int i = 0; i < 2; ++i) {
teller = array[i];