aboutsummaryrefslogtreecommitdiff
path: root/tvloader/parser2v2/parse_package_test.go
diff options
context:
space:
mode:
authorspecter25 <ujjwalcoding012@gmail.com>2021-05-12 19:26:25 +0530
committerspecter25 <ujjwalcoding012@gmail.com>2021-05-12 19:26:25 +0530
commit4efac7b1447c34fd10fa3b5a8cdb1e690d2b6be6 (patch)
tree4c0370f7547c235070328010c70b171f1a6a4ed5 /tvloader/parser2v2/parse_package_test.go
parent7985e5bdac9e2328e648e8d00ced420da3a3c11d (diff)
downloadspdx-tools-4efac7b1447c34fd10fa3b5a8cdb1e690d2b6be6.tar.gz
Structural modifications in error checks
-- Added file name display in error messages - Structured the tests in respective files Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
Diffstat (limited to 'tvloader/parser2v2/parse_package_test.go')
-rw-r--r--tvloader/parser2v2/parse_package_test.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/tvloader/parser2v2/parse_package_test.go b/tvloader/parser2v2/parse_package_test.go
index 6ed5dce..1028a64 100644
--- a/tvloader/parser2v2/parse_package_test.go
+++ b/tvloader/parser2v2/parse_package_test.go
@@ -5,7 +5,6 @@ import (
"testing"
"github.com/spdx/tools-golang/spdx"
- "github.com/spdx/tools-golang/tvloader/reader"
)
// ===== Parser package section state change tests =====
@@ -1122,20 +1121,9 @@ func TestParser2_2PackageWithoutSpdxIdentifierThrowsError(t *testing.T) {
t.Errorf("expected 1 package, got %d", len(parser.doc.Packages))
}
- // Case 2: Checks the Last package
pkgName := "p2"
err := parser.parsePair2_2("PackageName", pkgName)
if err == nil {
t.Errorf("packages withoutSpdx Identifiers getting accepted")
}
- tvPairs := []reader.TagValuePair{
- {Tag: "SPDXVersion", Value: "SPDX-2.2"},
- {Tag: "DataLicense", Value: "CC0-1.0"},
- {Tag: "SPDXID", Value: "SPDXRef-DOCUMENT"},
- {Tag: "PackageName", Value: "p1"},
- }
- _, err = ParseTagValues(tvPairs)
- if err == nil {
- t.Errorf("packages withoutSpdx Identifiers getting accepted")
- }
}