forked from VUnit/vunit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests for xunit classename attribute and default empty test name.
- Loading branch information
Showing
6 changed files
with
36 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
-- License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
-- You can obtain one at http://mozilla.org/MPL/2.0/. | ||
-- | ||
-- Copyright (c) 2015, Lars Asplund [email protected] | ||
-- Copyright (c) 2015-2016, Lars Asplund [email protected] | ||
|
||
library vunit_lib; | ||
context vunit_lib.vunit_context; | ||
|
@@ -30,7 +30,7 @@ begin | |
begin | ||
test_runner_setup(runner, runner_cfg); | ||
check_has_suffix(tb_path, "acceptance/artificial/vhdl/"); | ||
check_has_suffix(output_path, "acceptance/artificial out/tests/lib.tb_magic_paths/"); | ||
check_has_suffix(output_path, "acceptance/artificial out/tests/lib.tb_magic_paths.all/"); | ||
test_runner_cleanup(runner); | ||
wait; | ||
end process; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
# Copyright (c) 2014-2015, Lars Asplund [email protected] | ||
# Copyright (c) 2014-2016, Lars Asplund [email protected] | ||
|
||
""" | ||
Tests the test scanner | ||
|
@@ -46,15 +46,15 @@ def test_that_single_vhdl_test_is_created(self): | |
ent = lib.add_entity("tb_entity") | ||
ent.set_contents("") | ||
tests = self.test_scanner.from_project(project) | ||
self.assert_has_tests(tests, ["lib.tb_entity"]) | ||
self.assert_has_tests(tests, ["lib.tb_entity.all"]) | ||
|
||
def test_that_single_verilog_test_is_created(self): | ||
project = ProjectStub() | ||
lib = project.add_library("lib") | ||
module = lib.add_module("tb_module") | ||
module.set_contents("") | ||
tests = self.test_scanner.from_project(project) | ||
self.assert_has_tests(tests, ["lib.tb_module"]) | ||
self.assert_has_tests(tests, ["lib.tb_module.all"]) | ||
|
||
def test_that_tests_are_filtered(self): | ||
project = ProjectStub() | ||
|
@@ -74,9 +74,9 @@ def test_that_tests_are_filtered(self): | |
|
||
tests = self.test_scanner.from_project(project, entity_filter=tb_filter) | ||
self.assert_has_tests(tests, | ||
["lib.entity_tb", | ||
"lib.tb_entity", | ||
"lib.tb_entity2"]) | ||
["lib.entity_tb.all", | ||
"lib.tb_entity.all", | ||
"lib.tb_entity2.all"]) | ||
|
||
def test_that_two_tests_are_created_from_two_architectures(self): | ||
project = ProjectStub() | ||
|
@@ -89,8 +89,8 @@ def test_that_two_tests_are_created_from_two_architectures(self): | |
|
||
tests = self.test_scanner.from_project(project) | ||
self.assert_has_tests(tests, | ||
["lib.tb_entity.arch", | ||
"lib.tb_entity.arch2"]) | ||
["lib.tb_entity.arch.all", | ||
"lib.tb_entity.arch2.all"]) | ||
|
||
def test_create_tests_with_runner_cfg_generic(self): | ||
project = ProjectStub() | ||
|
@@ -206,7 +206,7 @@ def test_create_default_test_with_runner_cfg_generic(self): | |
|
||
tests = self.test_scanner.from_project(project) | ||
self.assert_has_tests(tests, | ||
["lib.tb_entity"]) | ||
["lib.tb_entity.all"]) | ||
|
||
def test_that_pragma_run_in_same_simulation_works(self): | ||
project = ProjectStub() | ||
|
@@ -237,8 +237,8 @@ def test_adds_tb_path_generic(self): | |
|
||
tests = self.test_scanner.from_project(project) | ||
|
||
with_path_generics = find_generics(tests, "lib.tb_entity_with_tb_path") | ||
without_path_generics = find_generics(tests, "lib.tb_entity_without_tb_path") | ||
with_path_generics = find_generics(tests, "lib.tb_entity_with_tb_path.all") | ||
without_path_generics = find_generics(tests, "lib.tb_entity_without_tb_path.all") | ||
self.assertEqual(with_path_generics["tb_path"], (out() + "/").replace("\\", "/")) | ||
self.assertNotIn("tb_path", without_path_generics) | ||
|
||
|
@@ -262,7 +262,7 @@ def test_warning_on_non_overrriden_tb_path(self, mock_logger): | |
self.assertIn("lib.tb_entity", call_args) | ||
self.assertIn(tb_path_non_overriden_value, call_args) | ||
self.assertIn(tb_path_value, call_args) | ||
generics = find_generics(tests, "lib.tb_entity") | ||
generics = find_generics(tests, "lib.tb_entity.all") | ||
self.assertEqual(generics["tb_path"], tb_path_value) | ||
|
||
@mock.patch("vunit.test_scanner.LOGGER") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters