From b8e512c69e6f430ba1e213591f76e32b1d5959a3 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 29 Mar 2011 23:28:37 -0400 Subject: [PATCH] Formatted prop_parser tests --- test/test-prop_parser-parse-keywords.js | 38 +++++++++++++++---------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/test/test-prop_parser-parse-keywords.js b/test/test-prop_parser-parse-keywords.js index 3595bf8..6bc4234 100644 --- a/test/test-prop_parser-parse-keywords.js +++ b/test/test-prop_parser-parse-keywords.js @@ -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" + ); +} )();