[#25] Removed duplicate code from MemberBuilderValidator method test
parent
cf99aa88e8
commit
8ebcc3f1b3
|
@ -236,20 +236,7 @@ require( 'common' ).testCase(
|
||||||
*/
|
*/
|
||||||
'Cannot override non-virtual methods': function()
|
'Cannot override non-virtual methods': function()
|
||||||
{
|
{
|
||||||
var name = 'foo',
|
this.quickKeywordMethodTest( [ 'override' ], 'non-virtual', [] );
|
||||||
_self = this;
|
|
||||||
|
|
||||||
this.quickFailureTest( name, 'non-virtual', function()
|
|
||||||
{
|
|
||||||
// override provided, but not 'virtual'
|
|
||||||
_self.sut.validateMethod(
|
|
||||||
name,
|
|
||||||
function() {},
|
|
||||||
{ override: true },
|
|
||||||
{ member: function() {} },
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
} );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -261,20 +248,7 @@ require( 'common' ).testCase(
|
||||||
*/
|
*/
|
||||||
'Cannot override concrete method with abstract method': function()
|
'Cannot override concrete method with abstract method': function()
|
||||||
{
|
{
|
||||||
var name = 'foo',
|
this.quickKeywordMethodTest( [ 'abstract' ], 'concrete', [] );
|
||||||
_self = this;
|
|
||||||
|
|
||||||
this.quickFailureTest( name, 'concrete', function()
|
|
||||||
{
|
|
||||||
// attempting to override concrete (non-abstract) method
|
|
||||||
_self.sut.validateMethod(
|
|
||||||
name,
|
|
||||||
function() {},
|
|
||||||
{ 'abstract': true },
|
|
||||||
{ member: function() {} },
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
} );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue