From 8ebcc3f1b39633c54650c5be373f4cef5ee4d0af Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sat, 22 Oct 2011 16:37:07 -0400 Subject: [PATCH] [#25] Removed duplicate code from MemberBuilderValidator method test --- test/MemberBuilderValidator/MethodTest.js | 30 ++--------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/test/MemberBuilderValidator/MethodTest.js b/test/MemberBuilderValidator/MethodTest.js index e58551b..3804999 100644 --- a/test/MemberBuilderValidator/MethodTest.js +++ b/test/MemberBuilderValidator/MethodTest.js @@ -236,20 +236,7 @@ require( 'common' ).testCase( */ 'Cannot override non-virtual methods': function() { - var name = 'foo', - _self = this; - - this.quickFailureTest( name, 'non-virtual', function() - { - // override provided, but not 'virtual' - _self.sut.validateMethod( - name, - function() {}, - { override: true }, - { member: function() {} }, - {} - ); - } ); + this.quickKeywordMethodTest( [ 'override' ], 'non-virtual', [] ); }, @@ -261,20 +248,7 @@ require( 'common' ).testCase( */ 'Cannot override concrete method with abstract method': function() { - var name = 'foo', - _self = this; - - this.quickFailureTest( name, 'concrete', function() - { - // attempting to override concrete (non-abstract) method - _self.sut.validateMethod( - name, - function() {}, - { 'abstract': true }, - { member: function() {} }, - {} - ); - } ); + this.quickKeywordMethodTest( [ 'abstract' ], 'concrete', [] ); },