From 9e2c75b548080b69a6ab350424a59af84fd7b221 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Fri, 11 Mar 2011 21:41:12 -0500 Subject: [PATCH] removing over-hash-comment --- test/array_literals.coffee | 2 +- test/assignment.coffee | 6 +++--- test/comments.coffee | 2 +- test/comprehensions.coffee | 2 +- test/control_flow.coffee | 6 +++--- test/exception_handling.coffee | 8 ++++---- test/formatting.coffee | 2 +- test/function_invocation.coffee | 6 +++--- test/function_literals.coffee | 6 +++--- test/helpers.coffee | 18 +++++++++--------- test/interpolation.coffee | 4 ++-- test/number_literals.coffee | 4 ++-- test/operators.coffee | 10 +++++----- test/regular_expression_literals.coffee | 2 +- test/slicing_and_splicing.coffee | 4 ++-- test/soaks.coffee | 6 +++--- 16 files changed, 44 insertions(+), 44 deletions(-) diff --git a/test/array_literals.coffee b/test/array_literals.coffee index 5f72f38b..fd2a79fe 100644 --- a/test/array_literals.coffee +++ b/test/array_literals.coffee @@ -27,7 +27,7 @@ ok result[0][0] is 'a' ok result[1]['b'] is 'c' -#### Splats in Array Literals +# Splats in Array Literals test "array splat expansions with assignments", -> nums = [1, 2, 3] diff --git a/test/assignment.coffee b/test/assignment.coffee index 0cc82496..fe8c6e0c 100644 --- a/test/assignment.coffee +++ b/test/assignment.coffee @@ -27,7 +27,7 @@ test "compound assignments should not declare", -> eq Math, (-> Math or= 0)() -#### Compound Assignment +# Compound Assignment test "boolean operators", -> nonce = {} @@ -136,7 +136,7 @@ test "more compound assignment", -> eq c, val -#### Destructuring Assignment +# Destructuring Assignment test "empty destructuring assignment", -> {} = [] = undefined @@ -251,7 +251,7 @@ test "#1024", -> eq 2 * [] = 3 + 5, 16 -#### Existential Assignment +# Existential Assignment test "existential assignment", -> nonce = {} diff --git a/test/comments.coffee b/test/comments.coffee index 6fbf8b57..106b21db 100644 --- a/test/comments.coffee +++ b/test/comments.coffee @@ -110,7 +110,7 @@ test "spaced comments with conditional statements", -> eq nonce, result -#### Block Comments +# Block Comments ### This is a here-comment. diff --git a/test/comprehensions.coffee b/test/comprehensions.coffee index 3c5658de..820859bf 100644 --- a/test/comprehensions.coffee +++ b/test/comprehensions.coffee @@ -341,7 +341,7 @@ test "expression conversion under explicit returns", -> arrayEq [nonce,nonce,nonce], fn() -#### Implicit Destructuring Assignment +# Implicit Destructuring Assignment test "implicit destructuring assignment in object of objects", -> a={}; b={}; c={} diff --git a/test/control_flow.coffee b/test/control_flow.coffee index f836cb1f..14a59ecc 100644 --- a/test/control_flow.coffee +++ b/test/control_flow.coffee @@ -14,7 +14,7 @@ # shared identity function id = (_) -> if arguments.length is 1 then _ else Array::slice.call(arguments) -#### Conditionals +# Conditionals test "basic conditionals", -> if false @@ -198,7 +198,7 @@ test "#748: trailing reserved identifiers", -> eq nonce, result -#### For / While / Until / Loop +# For / While / Until / Loop # TODO: refactor while tests @@ -298,7 +298,7 @@ test "break *not* at the top level", -> eq 2, someFunc() -#### Switch +# Switch # TODO: refactor switch tests diff --git a/test/exception_handling.coffee b/test/exception_handling.coffee index 99208ee4..c4d6de8d 100644 --- a/test/exception_handling.coffee +++ b/test/exception_handling.coffee @@ -5,13 +5,13 @@ nonce = {} -#### Throw +# Throw test "basic exception throwing", -> throws (-> throw 'error'), 'error' -#### Empty Try/Catch/Finally +# Empty Try/Catch/Finally test "try can exist alone", -> try @@ -43,7 +43,7 @@ test "single-line try/catch/finally with empty try, empty catch, empty finally", try catch err then finally -#### Try/Catch/Finally as an Expression +# Try/Catch/Finally as an Expression test "return the result of try when no exception is thrown", -> result = try @@ -81,7 +81,7 @@ test "optional catch", -> eq nonce, fn() -#### Try/Catch/Finally Interaction With Other Constructs +# Try/Catch/Finally Interaction With Other Constructs test "try/catch with empty catch as last statement in a function body", -> fn = -> diff --git a/test/formatting.coffee b/test/formatting.coffee index 8dcce4c2..7ada1349 100644 --- a/test/formatting.coffee +++ b/test/formatting.coffee @@ -21,7 +21,7 @@ test "multiple semicolon-separated statements in parentheticals", -> eq nonce, (1; 2; nonce) eq nonce, (-> return (1; 2; nonce))() -#### Line Continuation +# Line Continuation # Property Access diff --git a/test/function_invocation.coffee b/test/function_invocation.coffee index fe5bdbd5..98dd0fed 100644 --- a/test/function_invocation.coffee +++ b/test/function_invocation.coffee @@ -268,7 +268,7 @@ obj = ok obj[obj.index++].method([]...), 'should cache base value' -#### Splats in Function Invocations +# Splats in Function Invocations test "passing splats to functions", -> arrayEq [0..4], id id [0..4]... @@ -315,7 +315,7 @@ test "#1011: passing a splat to a method of a number", -> eq '1011', (131.0).toString [5]... -#### Implicit Return +# Implicit Return eq ok, new -> ok @@ -355,7 +355,7 @@ test "preserve context when generating closure wrappers for expression conversio eq nonce, obj.property -#### Explicit Returns +# Explicit Returns test "don't wrap \"pure\" statements in a closure", -> nonce = {} diff --git a/test/function_literals.coffee b/test/function_literals.coffee index 6437d24e..8b7e553c 100644 --- a/test/function_literals.coffee +++ b/test/function_literals.coffee @@ -11,7 +11,7 @@ # * Parameter Destructuring # * Default Parameters -#### Function Definition +# Function Definition x = 1 y = {} @@ -46,7 +46,7 @@ del = -> 5 ok del() is 5 -#### Bound Function Definition +# Bound Function Definition obj = bound: -> @@ -64,7 +64,7 @@ ok obj isnt obj.unbound() eq obj, obj.nested() -#### Parameter List Features +# Parameter List Features test "splats", -> arrayEq [0, 1, 2], (((splat...) -> splat) 0, 1, 2) diff --git a/test/helpers.coffee b/test/helpers.coffee index b64e3543..66819084 100644 --- a/test/helpers.coffee +++ b/test/helpers.coffee @@ -5,7 +5,7 @@ {starts, ends, compact, count, merge, extend, flatten, del, last} = CoffeeScript.helpers -#### `starts` +# `starts` test "the `starts` helper tests if a string starts with another string", -> ok starts('01234', '012') @@ -16,7 +16,7 @@ test "the `starts` helper can take an optional offset", -> ok not starts('01234', '01', 1) -#### `ends` +# `ends` test "the `ends` helper tests if a string ends with another string", -> ok ends('01234', '234') @@ -27,7 +27,7 @@ test "the `ends` helper can take an optional offset", -> ok not ends('01234', '234', 6) -#### `compact` +# `compact` test "the `compact` helper removes falsey values from an array, preserves truthy ones", -> allValues = [1, 0, false, obj={}, [], '', ' ', -1, null, undefined, true] @@ -35,7 +35,7 @@ test "the `compact` helper removes falsey values from an array, preserves truthy arrayEq truthyValues, compact(allValues) -#### `count` +# `count` test "the `count` helper counts the number of occurances of a string in another string", -> eq 1/0, count('abc', '') @@ -46,7 +46,7 @@ test "the `count` helper counts the number of occurances of a string in another eq 2, count('abcdabcd','abc') -#### `merge` +# `merge` test "the `merge` helper makes a new object with all properties of the objects given as its arguments", -> ary = [0, 1, 2, 3, 4] @@ -58,7 +58,7 @@ test "the `merge` helper makes a new object with all properties of the objects g eq val, merged[key] -#### `extend` +# `extend` test "the `extend` helper performs a shallow copy", -> ary = [0, 1, 2, 3] @@ -69,7 +69,7 @@ test "the `extend` helper performs a shallow copy", -> eq 2, obj[2] -#### `flatten` +# `flatten` test "the `flatten` helper flattens an array", -> success = yes @@ -77,7 +77,7 @@ test "the `flatten` helper flattens an array", -> ok success -#### `del` +# `del` test "the `del` helper deletes a property from an object and returns the deleted value", -> obj = [0, 1, 2] @@ -85,7 +85,7 @@ test "the `del` helper deletes a property from an object and returns the deleted ok 1 not of obj -#### `last` +# `last` test "the `last` helper returns the last item of an array-like object", -> ary = [0, 1, 2, 3, 4] diff --git a/test/interpolation.coffee b/test/interpolation.coffee index 8ed38dd2..c84191ab 100644 --- a/test/interpolation.coffee +++ b/test/interpolation.coffee @@ -4,7 +4,7 @@ # * String Interpolation # * Regular Expression Interpolation -#### String Interpolation +# String Interpolation # TODO: refactor string interpolation tests @@ -109,7 +109,7 @@ eq 'multiline nested "interpolations" work', """multiline #{ } work""" -#### Regular Expression Interpolation +# Regular Expression Interpolation # TODO: improve heregex interpolation tests diff --git a/test/number_literals.coffee b/test/number_literals.coffee index 511bec7e..9d2010f1 100644 --- a/test/number_literals.coffee +++ b/test/number_literals.coffee @@ -9,7 +9,7 @@ # * Non-Integer Literals -#### Decimal Integer Literals +# Decimal Integer Literals test "call methods directly on numbers", -> eq 4, 4.valueOf() @@ -23,7 +23,7 @@ eq Number::toString, 42['toString'] eq Number::toString, 42.toString -#### Non-Integer Literals +# Non-Integer Literals # Decimal number literals. value = .25 + .75 diff --git a/test/operators.coffee b/test/operators.coffee index 22fe585f..97ea24eb 100644 --- a/test/operators.coffee +++ b/test/operators.coffee @@ -59,7 +59,7 @@ test "use `::` operator on keywords `this` and `@`", -> eq nonce, obj.withThis() -#### Existential Operator (Binary) +# Existential Operator (Binary) test "binary existential operator", -> nonce = {} @@ -91,7 +91,7 @@ test "binary existential operator with negative number", -> eq -1, a -#### Existential Operator (Unary) +# Existential Operator (Unary) test "postfix existential operator", -> ok (if nonexistent? then false else true) @@ -114,7 +114,7 @@ test "postfix existential operator on expressions", -> eq true, (1 or 0)?, true -#### `is`,`isnt`,`==`,`!=` +# `is`,`isnt`,`==`,`!=` test "`==` and `is` should be interchangeable", -> a = b = 1 @@ -130,7 +130,7 @@ test "`!=` and `isnt` should be interchangeable", -> ok a isnt b -#### [not] in/of +# [not] in/of # - `in` should check if an array contains a value using `indexOf` # - `of` should check if a property is defined on an object using `in` @@ -185,7 +185,7 @@ test "#768: `in` should preserve evaluation order", -> eq 3, share -#### Chained Comparison +# Chained Comparison test "chainable operators", -> ok 100 > 10 > 1 > 0 > -1 diff --git a/test/regular_expression_literals.coffee b/test/regular_expression_literals.coffee index 0a116c53..2edba44c 100644 --- a/test/regular_expression_literals.coffee +++ b/test/regular_expression_literals.coffee @@ -35,7 +35,7 @@ test "#584: slashes are allowed unescaped in character classes", -> ok /^a\/[/]b$/.test 'a//b' -#### Heregexe(n|s) +# Heregexe(n|s) test "a heregex will ignore whitespace and comments", -> eq /^I'm\x20+[a]\s+Heregex?\/\/\//gim + '', /// diff --git a/test/slicing_and_splicing.coffee b/test/slicing_and_splicing.coffee index 30abaaa2..00206367 100644 --- a/test/slicing_and_splicing.coffee +++ b/test/slicing_and_splicing.coffee @@ -7,7 +7,7 @@ # shared array shared = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] -#### Slicing +# Slicing test "basic slicing", -> arrayEq [7, 8, 9] , shared[7..9] @@ -53,7 +53,7 @@ test "string slicing", -> ok str[-5..] is "vwxyz" -#### Splicing +# Splicing test "basic splicing", -> ary = [0..9] diff --git a/test/soaks.coffee b/test/soaks.coffee index 7d6d3bd4..68d3b762 100644 --- a/test/soaks.coffee +++ b/test/soaks.coffee @@ -6,7 +6,7 @@ # * Soaked Function Invocation -#### Soaked Property Access +# Soaked Property Access test "soaked property access", -> nonce = {} @@ -73,7 +73,7 @@ test "operations on soaked properties", -> eq yes, delete a?.b.c -#### Soaked Method Invocation +# Soaked Method Invocation test "soaked method invocation", -> nonce = {} @@ -96,7 +96,7 @@ test "#733", -> eq a.b?.c?([2, 3]...), 2 -#### Soaked Function Invocation +# Soaked Function Invocation test "soaked function invocation", -> nonce = {}