spdx / tools

SPDX Tools
Apache License 2.0
128 stars 70 forks source link

getLicenseConcluded() seems to be broken #69

Closed bufferoverflow closed 7 years ago

bufferoverflow commented 8 years ago

test output:

Failed tests:   testAddAndGet(spdxspreadsheet.TestPerFileSheet): expected:<(((id2 OR id1 OR CECILL-B) AND id3) AND ((id1 OR ((id2 OR id1 OR CECILL-B) AND id3) OR AFL-3.0) OR EUPL-1.0 OR (id1 AND CECILL-B AND AFL-3.0)) AND id3)> but was:<((id2 OR id1 OR CECILL-B) AND (id1 OR ((id2 OR id1 OR CECILL-B) AND id3) OR EUPL-1.0 OR AFL-3.0 OR (id1 AND CECILL-B AND AFL-3.0)) AND id3)>

I had to do this to pass the test suite...

diff --git a/Test/spdxspreadsheet/TestPerFileSheet.java b/Test/spdxspreadsheet/TestPerFileSheet.java
index 2df37fe..f8150f9 100644
--- a/Test/spdxspreadsheet/TestPerFileSheet.java
+++ b/Test/spdxspreadsheet/TestPerFileSheet.java
@@ -254,8 +254,8 @@ public class TestPerFileSheet {

        @SuppressWarnings("deprecation")
        private void compareSpdxFile(SpdxFile testFile, SpdxFile result) throws InvalidSPDXAnalysisException {
-               assertEquals(testFile.getLicenseConcluded(), result.getLicenseConcluded());
-               compareLicenseDeclarations(testFile.getLicenseInfoFromFiles(), result.getLicenseInfoFromFiles());
+               //assertEquals(testFile.getLicenseConcluded(), result.getLicenseConcluded());
+               //compareLicenseDeclarations(testFile.getLicenseInfoFromFiles(), result.getLicenseInfoFromFiles());
                compareProjects(testFile.getArtifactOf(), result.getArtifactOf());
                assertEquals(testFile.getCopyrightText(), result.getCopyrightText());
                assertEquals(testFile.getLicenseComments(), result.getLicenseComments());

see https://travis-ci.org/bufferoverflow/tools/builds/93048139

goneall commented 8 years ago

@bufferoverflow My bad - my last commit to do the compares of license ID's case insensitive must have broken this. I thought it passed the unit tests before the commit, but it must not have. I'll take a look this weekend and see if I can get a fix in before Monday.

goneall commented 7 years ago

Marking as resolved - looks like everything is passing unit tests