Skip to content

Commit 5d91f9c

Browse files
authored
cpage_test.cxx: Fix build error caused by mismatching defines (#15)
The PageValidationBig() test uses #ifdef DEBUG and #ifndef RTM as if they were interchangeable, but this is not so at least in the RelWithDebInfo cmake configuration. This currently causes the following errors in that configuration: error C2065: 'fPreviouslySet': undeclared identifier Fix this by consistently using #ifndef RTM, as it's already being used in the other similar tests in cpage_test.cxx. (Perhaps, the `RelWithDebInfo` configuration could use the same defines as `Release`, but the code discrepancy seems to be worth fixing by itself.)
1 parent da53c84 commit 5d91f9c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

dev/ese/src/ese/cpage_test.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,12 @@ JETUNITTEST ( CPAGE, PageValidationBig )
561561
CHECK( pgno == validationaction.m_pgnoExpected );
562562
CHECK( ( 2 * pgno ) == validationaction.m_pgno );
563563

564-
#ifdef DEBUG
564+
#ifndef RTM
565565
const bool fPreviouslySet = FNegTestSet( fCorruptingPagePgnos );
566566
#endif
567567
CHECK( cpage.PgnoThis() == ( 2 * pgno ) );
568568
CHECK( cpage.PgnoThis() != pgno );
569-
#ifdef DEBUG
569+
#ifndef RTM
570570
if ( !fPreviouslySet )
571571
{
572572
FNegTestUnset( fCorruptingPagePgnos );
@@ -575,11 +575,11 @@ JETUNITTEST ( CPAGE, PageValidationBig )
575575

576576
cpage.SetPgno( pgno );
577577
pvBuffer[200] = ~pvBuffer[200];
578-
#ifdef DEBUG
578+
#ifndef RTM
579579
FNegTestSet( fCorruptingWithLostFlush );
580580
#endif
581581
CHECK( JET_errReadVerifyFailure == cpage.ErrValidatePage( pgvfDoNotCheckForLostFlush, &validationaction ) );
582-
#ifdef DEBUG
582+
#ifndef RTM
583583
FNegTestSet( fPreviouslySet );
584584
#endif
585585

0 commit comments

Comments
 (0)