Opened 12 years ago

Closed 12 years ago

#4350 closed defect (fixed)

[dojox.validate] d.validation.tests fails to run most of tests

Reported by: guest Owned by: alex
Priority: high Milestone: 1.1
Component: TestFramework Version: 0.9
Keywords: Cc: bookstack@…
Blocked By: Blocking:

Description

Test is against r10412, Firefox 2.0.0.6 on Genoo.

When runTests.html is rendered, all test cases consume NaN ms except isText, isIpAddress. And if I toggle test.f and test.t in tests/creditCard.js as this:

Index: creditcard.js =================================================================== --- creditcard.js (revision 10412) +++ creditcard.js (working copy) @@ -5,12 +5,12 @@

[{

name:"isValidLuhn", runTests: function(tests) {

  • tests.t(dojox.validate.isValidLuhn('5105105105105100')); test string input
  • tests.t(dojox.validate.isValidLuhn('5105-1051 0510-5100')); test string input with dashes and spaces (commonly used when entering card #'s)

+ tests.f(dojox.validate.isValidLuhn('5105105105105100')); test string input + tests.f(dojox.validate.isValidLuhn('5105-1051 0510-5100')); test string input with dashes and spaces (commonly used when entering card #'s)

tests.t(dojox.validate.isValidLuhn(38520000023237)); test numerical input as well tests.f(dojox.validate.isValidLuhn(3852000002323)); testing failures tests.t(dojox.validate.isValidLuhn(18)); length doesnt matter

  • tests.f(dojox.validate.isValidLuhn(818181)); short length failure

+ tests.t(dojox.validate.isValidLuhn(818181)); short length failure

}

}, {

The dojox.validate.tests.creditcard still succeeded.It is supposed to fail.

Change History (6)

comment:1 Changed 12 years ago by Adam Peller

Cc: bookstack@… added
Component: TestFrameworkDojox
Owner: changed from alex to dante

comment:2 Changed 12 years ago by dante

Status: newassigned

comment:3 Changed 12 years ago by dante

(In [10414]) fixes #4351 - adding dojox.validate.isbn validation checking courtesy bookstack [cla/soc champ]. adds DOH unit tests, that may or may not be validating properly (refs #4350). tests were ported from 0.4 unit tests, and all 'passed' as expected, so didn't double check forced failure. I must have set up the tests wrong, somehow.

comment:4 Changed 12 years ago by dante

Summary: dojox.validate.tests fails to run most of tests[dojox.validate] d.validation.tests fails to run most of tests

me wished he'd have never heard of dojox.validate :P

comment:5 Changed 12 years ago by Adam Peller

Component: DojoxTestFramework
Milestone: 1.1
Owner: changed from dante to alex
Status: assignednew

comment:6 Changed 12 years ago by dante

Resolution: fixed
Status: newclosed

(In [12452]) fixes #4350 - new errors being found via extensive existing unit test using wrong runTest: function()

Note: See TracTickets for help on using tickets.