jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McComsey, Doug" <Doug.Mccom...@ca.com>
Subject TCK; testEmptyMultiStringParent
Date Fri, 29 Jul 2005 16:19:06 GMT
The testEmptyMultiStringParent test in the TCK looks like this:

    public void testEmptyMultiStringParent() throws RepositoryException {
        String[] emptyStringArray = new String[]{null};

        assertEquals("Property.setValue(emptyStringArray) did not set the property to an empty
                      0, property2.getValues().length);
This test would make sense if emptyStringArray had been defined this way:

        String[] emptyStringArray = new String[0];

As it is defined, it is not an empty array. It has one value, a null, and a length of one.
My implementation fails this test because it returns exactly what was given to it. Zero does
not equal one.

Is the test wrong or should I be checking the content of the array and removing nulls? 

Doug McComsey
Computer Associates

View raw message