func TestMatcher(t *testing.T) {
	tt := []matcherTestcase{
		{
			Name: "simple",
			R: claircore.IndexRecord{
				Package: &claircore.Package{
					Version: "0.9.8",
					NormalizedVersion: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 0, 9, 8, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			V: claircore.Vulnerability{
				Range: &claircore.Range{
					Lower: claircore.Version{Kind: "pep440"},
					Upper: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			Want:    true,
			Matcher: &python.Matcher{},
		},
		{
			Name: "bounded/hit",
			R: claircore.IndexRecord{
				Package: &claircore.Package{
					Version: "1.4.3",
					NormalizedVersion: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 4, 3, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			V: claircore.Vulnerability{
				Range: &claircore.Range{
					Lower: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
					},
					Upper: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 5, 0, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			Want:    true,
			Matcher: &python.Matcher{},
		},
		{
			Name: "bounded/miss",
			R: claircore.IndexRecord{
				Package: &claircore.Package{
					Version: "1.4.3",
					NormalizedVersion: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 4, 3, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			V: claircore.Vulnerability{
				Range: &claircore.Range{
					Lower: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
					},
					Upper: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 4, 3, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			Matcher: &python.Matcher{},
		},
	}

	for _, tc := range tt {
		t.Run(tc.Name, tc.Run)
	}
}
// TestMatcher tests the python matcher.
TestMatcher tests the python matcher.
// TestMatcher tests the python matcher .
func TestMatcher(t *testing.T) {
	tt := []matcherTestcase{
		{
			Name: "simple",
			R: claircore.IndexRecord{
				Package: &claircore.Package{
					Version: "0.9.8",
					NormalizedVersion: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 0, 9, 8, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			V: claircore.Vulnerability{
				Range: &claircore.Range{
					Lower: claircore.Version{Kind: "pep440"},
					Upper: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			Want:    true,
			Matcher: &python.Matcher{},
		},
		{
			Name: "bounded/hit",
			R: claircore.IndexRecord{
				Package: &claircore.Package{
					Version: "1.4.3",
					NormalizedVersion: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 4, 3, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			V: claircore.Vulnerability{
				Range: &claircore.Range{
					Lower: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
					},
					Upper: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 5, 0, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			Want:    true,
			Matcher: &python.Matcher{},
		},
		{
			Name: "bounded/miss",
			R: claircore.IndexRecord{
				Package: &claircore.Package{
					Version: "1.4.3",
					NormalizedVersion: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 4, 3, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			V: claircore.Vulnerability{
				Range: &claircore.Range{
					Lower: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
					},
					Upper: claircore.Version{
						Kind: "pep440",
						V:    [...]int32{0, 1, 4, 3, 0, 0, 0, 0, 0, 0},
					},
				},
			},
			Matcher: &python.Matcher{},
		},
	}
	for _, tc := range tt {
		t.Run(tc.Name, tc.Run)
	}
}
func TestMatcher ( t * testing . T ) { tt := [ ] matcherTestcase { { Name : " " , R : claircore . IndexRecord { Package : & claircore . Package { Version : " " , NormalizedVersion : claircore . Version { Kind : " " , V : [ ... ] int32 { 0 , 0 , 9 , 8 , 0 , 0 , 0 , 0 , 0 , 0 } , } , } , } , V : claircore . Vulnerability { Range : & claircore . Range { Lower : claircore . Version { Kind : " " } , Upper : claircore . Version { Kind : " " , V : [ ... ] int32 { 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , } , } , } , Want : true , Matcher : & python . Matcher { } , } , { Name : " " , R : claircore . IndexRecord { Package : & claircore . Package { Version : " " , NormalizedVersion : claircore . Version { Kind : " " , V : [ ... ] int32 { 0 , 1 , 4 , 3 , 0 , 0 , 0 , 0 , 0 , 0 } , } , } , } , V : claircore . Vulnerability { Range : & claircore . Range { Lower : claircore . Version { Kind : " " , V : [ ... ] int32 { 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , } , Upper : claircore . Version { Kind : " " , V : [ ... ] int32 { 0 , 1 , 5 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , } , } , } , Want : true , Matcher : & python . Matcher { } , } , { Name : " " , R : claircore . IndexRecord { Package : & claircore . Package { Version : " " , NormalizedVersion : claircore . Version { Kind : " " , V : [ ... ] int32 { 0 , 1 , 4 , 3 , 0 , 0 , 0 , 0 , 0 , 0 } , } , } , } , V : claircore . Vulnerability { Range : & claircore . Range { Lower : claircore . Version { Kind : " " , V : [ ... ] int32 { 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , } , Upper : claircore . Version { Kind : " " , V : [ ... ] int32 { 0 , 1 , 4 , 3 , 0 , 0 , 0 , 0 , 0 , 0 } , } , } , } , Matcher : & python . Matcher { } , } , } for _ , tc := range tt { t . Run ( tc . Name , tc . Run ) } }
TestMatcher tests the python matcher.
TestMatcher tests the python matcher .