Added tests for @member.

This commit is contained in:
Michael Mathews 2011-01-16 12:32:57 +00:00
parent 97ae97b46f
commit a00113b32c
4 changed files with 27 additions and 0 deletions

View File

11
test/cases/memberoftag.js Normal file
View File

@ -0,0 +1,11 @@
/** @constructor
@member mathlib
*/
function Data() {
/** @property */
this.point = {};
}
/** @namespace */
mathlib = {Data: Data};

View File

@ -97,6 +97,7 @@ testFile('test/t/cases/deprecatedtag.js');
testFile('test/t/cases/exceptiontag.js');
testFile('test/t/cases/globaltag.js');
testFile('test/t/cases/ignoretag.js');
testFile('test/t/cases/memberoftag.js');
testFile('test/t/cases/paramtag.js');
testFile('test/t/cases/privatetag.js');
testFile('test/t/cases/readonlytag.js');

View File

@ -0,0 +1,15 @@
(function() {
var docSet = testhelpers.getDocSetFromFile('test/cases/memberoftag.js'),
Data = docSet.getByLongname('mathlib.Data')[0],
point = docSet.getByLongname('mathlib.Data#point')[0];
//dump(docSet.doclets); exit(0);
test('When a symbol has an @member tag, the doclet has a long name that includes the parent.', function() {
assert.equal(typeof Data, 'object');
assert.equal(typeof point, 'object');
assert.equal(Data.memberof, 'mathlib');
assert.equal(Data.name, 'Data');
});
})();