jquery fx: removing a needless comment after the last commit.
[jquery.git] / test / unit / core.js
index fccf8e4..bfaceca 100644 (file)
@@ -121,10 +121,10 @@ test("isFunction", function() {
 \r
        // Check built-ins\r
        // Safari uses "(Internal Function)"\r
-       ok( jQuery.isFunction(String), "String Function" );\r
-       ok( jQuery.isFunction(Array), "Array Function" );\r
-       ok( jQuery.isFunction(Object), "Object Function" );\r
-       ok( jQuery.isFunction(Function), "Function Function" );\r
+       ok( jQuery.isFunction(String), "String Function("+String+")" );\r
+       ok( jQuery.isFunction(Array), "Array Function("+Array+")" );\r
+       ok( jQuery.isFunction(Object), "Object Function("+Object+")" );\r
+       ok( jQuery.isFunction(Function), "Function Function("+Function+")" );\r
 \r
        // When stringified, this could be misinterpreted\r
        var mystr = "function";\r
@@ -374,13 +374,15 @@ test("attr(Hash)", function() {
 \r
 test("attr(String, Object)", function() {\r
        expect(17);\r
-       var div = $("div");\r
-       div.attr("foo", "bar");\r
-       var pass = true;\r
+       var div = $("div").attr("foo", "bar");\r
+               fail = false;\r
        for ( var i = 0; i < div.size(); i++ ) {\r
-               if ( div.get(i).getAttribute('foo') != "bar" ) pass = false;\r
+               if ( div.get(i).getAttribute('foo') != "bar" ){\r
+                       fail = i;\r
+                       break;\r
+               }\r
        }\r
-       ok( pass, "Set Attribute" );\r
+       equals( fail, false, "Set Attribute, the #"+fail+" element didn't get the attribute 'foo'" );\r
 \r
        ok( $("#foo").attr({"width": null}), "Try to set an attribute to nothing" );    \r
        \r
@@ -412,7 +414,7 @@ test("attr(String, Object)", function() {
 \r
        j.attr("name", "attrvalue");\r
        equals( j.attr("name"), "attrvalue", "Check node,textnode,comment for attr" );\r
-       j.removeAttr("name")\r
+       j.removeAttr("name");\r
 \r
        reset();\r
 \r