This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2326 - svgunit.js does not supply function assert(msg, val)
Summary: svgunit.js does not supply function assert(msg, val)
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: ECMAScript Binding (show other bugs)
Version: unspecified
Hardware: Macintosh All
: P2 normal
Target Milestone: ---
Assignee: Curt Arnold
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-03 14:47 UTC by Curt Arnold
Modified: 2005-10-03 14:48 UTC (History)
1 user (show)

See Also:


Attachments

Description Curt Arnold 2005-10-03 14:47:21 UTC
From: 	  rwlbuis@xs4all.nl
	Subject: 	Re: Assert problem in svgunit.js
	Date: 	September 29, 2005 12:37:57 PM CDT
	To: 	  carnold@houston.rr.com

Hi Curt,

Great that you'll investigate it!
Here are the relevant lines:

svgunit.js:
line 67 assert(descr + ": No match found for " + expectedValue,false);
line 70 assert(descr + ": Multiple matches found for " + expectedValue, false);
line 97 assert(descr + ": No match found for " + expectedValue,false);
line 100 assert(descr + ": Multiple matches found for " + expectedValue, false);

rwlbuis@ubuntu:/svn/kdenonbeta/ksvg2/scripts/TestSuite/Level3Core$ grep "assert(" *
datatypenormalization17.js:      assert("content1","EMP 0001" != childValue);
datatypenormalization18.js:      assert("content1","EMP 0001" != childValue);
domstringlistgetlength01.js:      assert("domstringlistgetlength01_notZero",0 != listSize);
handleerror01.js:      assert("firstChildNotIntact","this is not ]]> good" != childValue);
nodecomparedocumentposition03.js:      assert("notBothPreceding",documentPosition1 != 
documentPosition2);
nodecomparedocumentposition03.js:      assert("notBothFollowing",documentPosition1 != 
documentPosition2);
nodecomparedocumentposition05.js:       assert("notBothPreceding",documentPosition1 != 
documentPosition2);
nodecomparedocumentposition05.js:      assert("notBothFollowing",documentPosition1 != 
documentPosition2);
nodecomparedocumentposition16.js:      assert("notBothPreceding",position1 != position2);
nodecomparedocumentposition16.js:      assert("notBothFollowing",position1 != position2);
nodecomparedocumentposition23.js:      assert("notBothPreceding",position1 != position2);
nodecomparedocumentposition23.js:      assert("notBothFollowing",position1 != position2);
nodecomparedocumentposition33.js:      assert("notBothPreceding",position1 != position2);
nodecomparedocumentposition33.js:      assert("notBothFollowing",position1 != position2);
nodecomparedocumentposition39.js:       assert("eitherFollowingOrPreceding",0 != attrPosition);
nodecomparedocumentposition39.js:      assert("onlyOnePreceding",swappedPosition != attrPosition);
nodecomparedocumentposition39.js:      assert("onlyOneFollowing",swappedPosition != attrPosition);
nodecomparedocumentposition40.js:       assert("eitherFollowingOrPreceding",0 != attrPosition);
nodecomparedocumentposition40.js:      assert("onlyOnePreceding",swappedPosition != attrPosition);
nodecomparedocumentposition40.js:      assert("onlyOneFollowing",swappedPosition != attrPosition);

Level3LS/DOMBuilderFilterTest1.js:      assert("attribute_node_test",2 != type);
Level3LS/DOMBuilderFilterTest1.js:      assert("entity_node_test",6 != type);
Level3LS/DOMBuilderFilterTest1.js:      assert("document_node_test",9 != type);
Level3LS/DOMBuilderFilterTest1.js:      assert("document_type_node_test",10 != type);
Level3LS/DOMBuilderFilterTest1.js:      assert("notation_node_test",12 != type);

There may be a few lines in there that I edited myself, so I'd advise you to do a grep on your set of
tests, if possible. Let me know if you need more info, I am in #ksvg and #webkit on irc.freenode.net/
irc.kde.org.
Cheers,

Rob.

On Thu, Sep 29, 2005 at 11:28:34AM -0500, Curt Arnold wrote:
Could you tell me which tests have calls to assert or where you  
encounted the problem?

JSUnit had an assert() function that deprecated to avoid conflict  
with JDK 1.4 asserts.  assertTrue should be used instead in the  
tests.  Another possibility is a type where assert() was called when  
alert() was intended.

I'll try to research the problem in a few hours, but any additional  
detail will help.


On Sep 29, 2005, at 2:27 AM, rwlbuis@xs4all.nl wrote:

Hi Curt,

Sorry to bother you again, and I am not sure whether I already asked
this before. I am assuming assert() is not defined in the javascript
language by default, so I am not sure where the assert() in svgunit.js
is referring to? Can you explain that situation? I already verified
Safari and konqueror can't handle the assert(). Would it be an idea
to add a fallback assert()? I made a very rough one myself, that seems
to help the test results.
Thnx again for the great tests btw :-)
Cheers,

Rob.
Comment 1 Curt Arnold 2005-10-03 14:48:50 UTC
Added definition for function assert(msg, val).