Corrected non-virtual override test
parent
08dc2559b4
commit
8b33471e42
|
@ -81,9 +81,6 @@ mb_common.assertCommon();
|
||||||
{
|
{
|
||||||
// attempt to override (should throw exception; non-virtual)
|
// attempt to override (should throw exception; non-virtual)
|
||||||
mb_common.buildMemberQuick( {}, true );
|
mb_common.buildMemberQuick( {}, true );
|
||||||
|
|
||||||
// should not get to this point
|
|
||||||
assert.fail( "Should not be able to override non-virtual method" );
|
|
||||||
}
|
}
|
||||||
catch ( e )
|
catch ( e )
|
||||||
{
|
{
|
||||||
|
@ -97,7 +94,11 @@ mb_common.assertCommon();
|
||||||
e.message.search( mb_common.name ) !== -1,
|
e.message.search( mb_common.name ) !== -1,
|
||||||
"Method name should be provided in non-virtual error message"
|
"Method name should be provided in non-virtual error message"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert.fail( "Should not be permitted to override non-virtual methods" );
|
||||||
} )();
|
} )();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue