1
0
Fork 0

Formatted prop_parser tests

closure/master
Mike Gerwitz 2011-03-29 23:28:37 -04:00
parent 08771b2b97
commit b8e512c69e
1 changed files with 23 additions and 15 deletions

View File

@ -24,23 +24,31 @@
var common = require( './common' ),
assert = require( 'assert' ),
parse = common.require( 'prop_parser' ).parseKeywords;
parse = common.require( 'prop_parser' ).parseKeywords,
data = parse( 'final static abstract foo' ),
keywords = data.keywords
;
var data = parse( 'final static abstract foo' ),
keywords = data.keywords;
( function testProperlyRetrievesName()
{
assert.equal(
data.name,
'foo',
"Property keyword parser properly retrieves name"
);
} )();
assert.equal(
data.name,
'foo',
"Property keyword parser properly retrieves name"
);
assert.ok(
( ( keywords['final'] === true )
&& ( keywords['static'] === true )
&& ( keywords['abstract'] === true )
),
"Property keyword parser properly retrieves all keywords"
);
( function testProperlyRetrievesAllKeywords()
{
assert.ok(
( ( keywords['final'] === true )
&& ( keywords['static'] === true )
&& ( keywords['abstract'] === true )
),
"Property keyword parser properly retrieves all keywords"
);
} )();