From 8b33471e421e9540add1289bf7b6ee6e15416824 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 9 Jun 2011 19:47:03 -0400 Subject: [PATCH] Corrected non-virtual override test --- test/test-member_builder-method.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test-member_builder-method.js b/test/test-member_builder-method.js index 45567a6..58b7621 100644 --- a/test/test-member_builder-method.js +++ b/test/test-member_builder-method.js @@ -81,9 +81,6 @@ mb_common.assertCommon(); { // attempt to override (should throw exception; non-virtual) mb_common.buildMemberQuick( {}, true ); - - // should not get to this point - assert.fail( "Should not be able to override non-virtual method" ); } catch ( e ) { @@ -97,7 +94,11 @@ mb_common.assertCommon(); e.message.search( mb_common.name ) !== -1, "Method name should be provided in non-virtual error message" ); + + return; } + + assert.fail( "Should not be permitted to override non-virtual methods" ); } )();