Member builder recognizes private members
parent
0ba3122db5
commit
f27b0b01ab
|
@ -47,5 +47,9 @@ exports.buildProp = function( members, meta, name, value, keywords )
|
||||||
{
|
{
|
||||||
members[ 'protected' ][ name ] = value;
|
members[ 'protected' ][ name ] = value;
|
||||||
}
|
}
|
||||||
|
else if ( keywords[ 'private' ] )
|
||||||
|
{
|
||||||
|
members[ 'private' ][ name ] = value;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -72,3 +72,17 @@ function buildPropQuick( keywords )
|
||||||
);
|
);
|
||||||
} )();
|
} )();
|
||||||
|
|
||||||
|
|
||||||
|
( function testRecognizesPrivateProperty()
|
||||||
|
{
|
||||||
|
var keywords = { 'private': true },
|
||||||
|
result = buildPropQuick( keywords )
|
||||||
|
;
|
||||||
|
|
||||||
|
assert.equal(
|
||||||
|
members[ 'private' ][ name ],
|
||||||
|
value,
|
||||||
|
"Private properties are copied to the private member prototype"
|
||||||
|
);
|
||||||
|
} )();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue