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' ), var common = require( './common' ),
assert = require( 'assert' ), 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' ), ( function testProperlyRetrievesName()
keywords = data.keywords; {
assert.equal(
data.name,
'foo',
"Property keyword parser properly retrieves name"
);
} )();
assert.equal(
data.name,
'foo',
"Property keyword parser properly retrieves name"
);
assert.ok( ( function testProperlyRetrievesAllKeywords()
( ( keywords['final'] === true ) {
&& ( keywords['static'] === true ) assert.ok(
&& ( keywords['abstract'] === true ) ( ( keywords['final'] === true )
), && ( keywords['static'] === true )
"Property keyword parser properly retrieves all keywords" && ( keywords['abstract'] === true )
); ),
"Property keyword parser properly retrieves all keywords"
);
} )();