[javascriptlint-commit] SF.net SVN: javascriptlint: [176] trunk/tests
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2008-03-20 21:38:21
|
Revision: 176 http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=176&view=rev Author: matthiasmiller Date: 2008-03-20 14:38:16 -0700 (Thu, 20 Mar 2008) Log Message: ----------- tests: fix some more incorrect line positions Modified Paths: -------------- trunk/tests/control_comments/declare.js trunk/tests/errors/unterminated_comment.js trunk/tests/warnings/ambiguous_newline.js trunk/tests/warnings/block_without_braces.js trunk/tests/warnings/empty_statement.js Modified: trunk/tests/control_comments/declare.js =================================================================== --- trunk/tests/control_comments/declare.js 2008-03-20 21:31:06 UTC (rev 175) +++ trunk/tests/control_comments/declare.js 2008-03-20 21:38:16 UTC (rev 176) @@ -1,10 +1,10 @@ /*jsl:option explicit*/ function declare() { window.alert('http://www.javascriptlint.com/'); - /*jsl:declare window*/ + /*jsl:declare window*/ /*warning:redeclared_var*/ /* redeclaration only at local scope */ - var window;/*warning:redeclared_var*/ + var window; var document; /*jsl:declare document*//*warning:redeclared_var*/ } @@ -17,8 +17,8 @@ document.write('<a href="http://www.javascriptlint.com/">JavaScript Lint</a>'); -/*jsl:declare document*/ -function document()/*warning:redeclared_var*/ +/*jsl:declare document*/ /*warning:redeclared_var*/ +function document() { } Modified: trunk/tests/errors/unterminated_comment.js =================================================================== --- trunk/tests/errors/unterminated_comment.js 2008-03-20 21:31:06 UTC (rev 175) +++ trunk/tests/errors/unterminated_comment.js 2008-03-20 21:38:16 UTC (rev 176) @@ -1,8 +1,8 @@ function unterminated_comment() { - /* - This should not produce a syntax error - when ending a multiline-comment like this: - ////////////////////////////////////////////////////////*/ /*warning:nested_comment*/ - - return true; + /* + This should not produce a syntax error + when ending a multiline-comment like this: + ////////////////////////////////////////////////////////*/ /*warning:nested_comment*/ + + return true; } Modified: trunk/tests/warnings/ambiguous_newline.js =================================================================== --- trunk/tests/warnings/ambiguous_newline.js 2008-03-20 21:31:06 UTC (rev 175) +++ trunk/tests/warnings/ambiguous_newline.js 2008-03-20 21:38:16 UTC (rev 176) @@ -218,15 +218,15 @@ + "!"; /*warning:ambiguous_newline*/ /* illegal: ++ */ - b = i++ - || true; /*warning:ambiguous_newline*//*warning:inc_dec_within_stmt*/ + b = i++ /*warning:inc_dec_within_stmt*/ + || true; /*warning:ambiguous_newline*/ /* illegal: -- */ - s = i-- - + " = i"; /*warning:ambiguous_newline*//*warning:inc_dec_within_stmt*/ + s = i-- /*warning:inc_dec_within_stmt*/ + + " = i"; /*warning:ambiguous_newline*/ /* legal */ - if (true) + if (true) /*warning:meaningless_block*/ { i++; } Modified: trunk/tests/warnings/block_without_braces.js =================================================================== --- trunk/tests/warnings/block_without_braces.js 2008-03-20 21:31:06 UTC (rev 175) +++ trunk/tests/warnings/block_without_braces.js 2008-03-20 21:38:16 UTC (rev 176) @@ -5,8 +5,8 @@ if (i) i++; /*warning:block_without_braces*/ - do i--; /*warning:block_without_braces*/ - while (i); + do i--; + while (i); /*warning:block_without_braces*/ for (i = 0; i < 10; i++) i *= 2; /*warning:block_without_braces*/ Modified: trunk/tests/warnings/empty_statement.js =================================================================== --- trunk/tests/warnings/empty_statement.js 2008-03-20 21:31:06 UTC (rev 175) +++ trunk/tests/warnings/empty_statement.js 2008-03-20 21:38:16 UTC (rev 176) @@ -7,16 +7,16 @@ while (false); /*warning:empty_statement*/ while (false) /*jsl:pass*/; /*warning:invalid_pass*//*warning:empty_statement*/ + while (false) { /*warning:empty_statement*/ + } while (false) { - } /*warning:empty_statement*/ - while (false) { /*jsl:pass*/ } /* empty block within for; useless expression */ + for (i = 0; i < 2; i += 1) { /*warning:empty_statement*/ + } for (i = 0; i < 2; i += 1) { - } /*warning:empty_statement*/ - for (i = 0; i < 2; i += 1) { /*jsl:pass*/ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |