@@ -100,6 +100,50 @@ nuget_structure_test = analysistest.make(
100100 },
101101)
102102
103+ def _nuget_targeting_pack_overrides_test_impl (ctx ):
104+ env = analysistest .begin (ctx )
105+
106+ target_under_test = analysistest .target_under_test (env )
107+ nuget_provider = target_under_test [NuGetInfo ]
108+
109+ targeting_pack_overrides = nuget_provider .targeting_pack_overrides
110+ asserts .true (
111+ env ,
112+ sorted (ctx .attr .expected_targeting_pack_overrides ) == sorted (targeting_pack_overrides ),
113+ "\n Expected targeting_pack_overrides:\n {}\n Actual targeting_pack_overrides:\n {}" .format (ctx .attr .expected_targeting_pack_overrides , targeting_pack_overrides ),
114+ )
115+
116+ return analysistest .end (env )
117+
118+ nuget_targeting_pack_overrides_test = analysistest .make (
119+ _nuget_targeting_pack_overrides_test_impl ,
120+ attrs = {
121+ "expected_targeting_pack_overrides" : attr .string_dict (default = {}),
122+ },
123+ )
124+
125+ def _nuget_framework_list_test_impl (ctx ):
126+ env = analysistest .begin (ctx )
127+
128+ target_under_test = analysistest .target_under_test (env )
129+ nuget_provider = target_under_test [NuGetInfo ]
130+
131+ framework_list = nuget_provider .framework_list
132+ asserts .true (
133+ env ,
134+ sorted (ctx .attr .expected_framework_list ) == sorted (framework_list ),
135+ "\n Expected framework_list:\n {}\n Actual framework_list:\n {}" .format (ctx .attr .expected_framework_list , framework_list ),
136+ )
137+
138+ return analysistest .end (env )
139+
140+ nuget_framework_list_test = analysistest .make (
141+ _nuget_framework_list_test_impl ,
142+ attrs = {
143+ "expected_framework_list" : attr .string_dict (default = {}),
144+ },
145+ )
146+
103147def _nuget_test_wrapper (ctx ):
104148 return [ctx .attr .package [0 ][DotnetAssemblyCompileInfo ], ctx .attr .package [0 ][DotnetAssemblyRuntimeInfo ], ctx .attr .package [0 ][NuGetInfo ]]
105149
0 commit comments