homebeaver commented on PR #217:
URL: 
https://github.com/apache/commons-validator/pull/217#issuecomment-2096067917

   > ...I don't see tests that make sure _invalid_ input is in fact invalid. 
For example, when the check digit is incorrect.
   
   @garydgregory 
   
   Test `AbstractCheckDigitTest.testIsValidFalse` implemets it and it runs :-)
   
   The theoretical MIN valid EC-Number is 000-001-6; `testIsValidFalse` 
generates all invalid check digits!  See log:
   
   ```
      0 Testing Invalid Check Digit, Code=[0000010]
      1 Testing Invalid Check Digit, Code=[0000011]
      2 Testing Invalid Check Digit, Code=[0000012]
      3 Testing Invalid Check Digit, Code=[0000013]
      4 Testing Invalid Check Digit, Code=[0000014]
      5 Testing Invalid Check Digit, Code=[0000015]
      6 Testing Invalid Check Digit, Code=[0000017]
      7 Testing Invalid Check Digit, Code=[0000018]
      8 Testing Invalid Check Digit, Code=[0000019]
      9 Testing Invalid Check Digit, Code=[000001 ]
      10 Testing Invalid Check Digit, Code=[000001A]
      11 Testing Invalid Check Digit, Code=[000001B]
      12 Testing Invalid Check Digit, Code=[000001C]
      13 Testing Invalid Check Digit, Code=[000001D]
      14 Testing Invalid Check Digit, Code=[000001E]
      15 Testing Invalid Check Digit, Code=[000001F]
      16 Testing Invalid Check Digit, Code=[000001H]
      17 Testing Invalid Check Digit, Code=[000001I]
      18 Testing Invalid Check Digit, Code=[000001J]
      19 Testing Invalid Check Digit, Code=[000001K]
      20 Testing Invalid Check Digit, Code=[000001L]
      21 Testing Invalid Check Digit, Code=[000001M]
      22 Testing Invalid Check Digit, Code=[000001N]
      23 Testing Invalid Check Digit, Code=[000001O]
      24 Testing Invalid Check Digit, Code=[000001P]
      25 Testing Invalid Check Digit, Code=[000001Q]
      26 Testing Invalid Check Digit, Code=[000001R]
      27 Testing Invalid Check Digit, Code=[000001S]
      28 Testing Invalid Check Digit, Code=[000001T]
      29 Testing Invalid Check Digit, Code=[000001U]
      30 Testing Invalid Check Digit, Code=[000001V]
      31 Testing Invalid Check Digit, Code=[000001W]
      32 Testing Invalid Check Digit, Code=[000001X]
      33 Testing Invalid Check Digit, Code=[000001Y]
      34 Testing Invalid Check Digit, Code=[000001Z]
      35 Testing Invalid Check Digit, Code=[000001      ]
   ...
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to