@@ -138,7 +138,31 @@ def test_assertion_on_unknown_backend(self, check_output):
138138 self .assertRaises (AssertionError , GHDLInterface .determine_backend , "prefix" )
139139
140140 @mock .patch ("vunit.sim_if.check_output" , autospec = True , return_value = "" ) # pylint: disable=no-self-use
141- def test_compile_project_2008 (self , check_output ):
141+ @mock .patch .object (GHDLInterface , "determine_version" , return_value = 6.0 )
142+ def test_compile_project_2019 (self , determine_version , check_output ):
143+ simif = GHDLInterface (prefix = "prefix" , output_path = "" )
144+ write_file ("file.vhd" , "" )
145+
146+ project = Project ()
147+ project .add_library ("lib" , "lib_path" )
148+ project .add_source_file ("file.vhd" , "lib" , file_type = "vhdl" , vhdl_standard = VHDL .standard ("2019" ))
149+ simif .compile_project (project )
150+ check_output .assert_called_once_with (
151+ [
152+ str (Path ("prefix" ) / "ghdl" ),
153+ "-a" ,
154+ "--workdir=lib_path" ,
155+ "--work=lib" ,
156+ "--std=19" ,
157+ "-Plib_path" ,
158+ "file.vhd" ,
159+ ],
160+ env = simif .get_env (),
161+ )
162+
163+ @mock .patch ("vunit.sim_if.check_output" , autospec = True , return_value = "" ) # pylint: disable=no-self-use
164+ @mock .patch .object (GHDLInterface , "determine_version" , return_value = 5.0 )
165+ def test_compile_project_2008 (self , determine_version , check_output ):
142166 simif = GHDLInterface (prefix = "prefix" , output_path = "" )
143167 write_file ("file.vhd" , "" )
144168
@@ -160,7 +184,8 @@ def test_compile_project_2008(self, check_output):
160184 )
161185
162186 @mock .patch ("vunit.sim_if.check_output" , autospec = True , return_value = "" ) # pylint: disable=no-self-use
163- def test_compile_project_2002 (self , check_output ):
187+ @mock .patch .object (GHDLInterface , "determine_version" , return_value = 5.0 )
188+ def test_compile_project_2002 (self , determine_version , check_output ):
164189 simif = GHDLInterface (prefix = "prefix" , output_path = "" )
165190 write_file ("file.vhd" , "" )
166191
@@ -182,7 +207,8 @@ def test_compile_project_2002(self, check_output):
182207 )
183208
184209 @mock .patch ("vunit.sim_if.check_output" , autospec = True , return_value = "" ) # pylint: disable=no-self-use
185- def test_compile_project_93 (self , check_output ):
210+ @mock .patch .object (GHDLInterface , "determine_version" , return_value = 5.0 )
211+ def test_compile_project_93 (self , determine_version , check_output ):
186212 simif = GHDLInterface (prefix = "prefix" , output_path = "" )
187213 write_file ("file.vhd" , "" )
188214
@@ -204,7 +230,8 @@ def test_compile_project_93(self, check_output):
204230 )
205231
206232 @mock .patch ("vunit.sim_if.check_output" , autospec = True , return_value = "" ) # pylint: disable=no-self-use
207- def test_compile_project_extra_flags (self , check_output ):
233+ @mock .patch .object (GHDLInterface , "determine_version" , return_value = 5.0 )
234+ def test_compile_project_extra_flags (self , determine_version , check_output ):
208235 simif = GHDLInterface (prefix = "prefix" , output_path = "" )
209236 write_file ("file.vhd" , "" )
210237
@@ -228,7 +255,8 @@ def test_compile_project_extra_flags(self, check_output):
228255 env = simif .get_env (),
229256 )
230257
231- def test_elaborate_e_project (self ):
258+ @mock .patch .object (GHDLInterface , "determine_version" , return_value = 5.0 )
259+ def test_elaborate_e_project (self , determine_version ):
232260 design_unit = Entity ("tb_entity" , file_name = str (Path ("tempdir" ) / "file.vhd" ))
233261 design_unit .original_file_name = str (Path ("tempdir" ) / "other_path" / "original_file.vhd" )
234262 design_unit .generic_names = ["runner_cfg" , "tb_path" ]
@@ -258,7 +286,8 @@ def test_elaborate_e_project(self):
258286 ],
259287 )
260288
261- def test_compile_project_verilog_error (self ):
289+ @mock .patch .object (GHDLInterface , "determine_version" , return_value = 5.0 )
290+ def test_compile_project_verilog_error (self , determine_version ):
262291 simif = GHDLInterface (prefix = "prefix" , output_path = "" )
263292 write_file ("file.v" , "" )
264293
0 commit comments