Skip to content

Commit

Permalink
wop
Browse files Browse the repository at this point in the history
  • Loading branch information
martis42 committed Jan 15, 2024
1 parent 85dcff4 commit 62abb1f
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd test
cd aspect
python execute_tests.py -t using_transitive_dep/detect_using_transitive_dep -v -b 7.0.0 -p 3.11.6
python execute_tests.py -v -b 7.0.0 -p 3.11.6
# integration-tests-apply-fixes:
# runs-on: ubuntu-22.04
Expand Down
4 changes: 3 additions & 1 deletion test/aspect/alias/test_invalid_dependency_through_alias.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from result import ExpectedResult, Result
from test_case import TestCaseBase

Expand All @@ -6,7 +8,7 @@ class TestCase(TestCaseBase):
def execute_test_logic(self) -> Result:
expected = ExpectedResult(
success=False,
invalid_includes=["File='alias/use_a_and_b.cpp', include='alias/a.h'"],
invalid_includes=[f"File='{Path('alias/use_a_and_b.cpp')}', include='alias/a.h'"],
)
actual = self._run_dwyu(target="//alias:use_a_transitively", aspect=self.default_aspect)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from result import ExpectedResult, Result
from test_case import TestCaseBase

Expand All @@ -7,7 +9,7 @@ def execute_test_logic(self) -> Result:
expected = ExpectedResult(
success=False,
invalid_includes=[
"File='ignore_includes/use_not_ignored_header.h', include='example_substring_matching_does_not_work_here.h'"
f"File='{Path('ignore_includes/use_not_ignored_header.h')}', include='example_substring_matching_does_not_work_here.h'"
],
)
actual = self._run_dwyu(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from result import ExpectedResult, Result
from test_case import TestCaseBase

Expand All @@ -6,7 +8,7 @@ class TestCase(TestCaseBase):
def execute_test_logic(self) -> Result:
expected = ExpectedResult(
success=False,
invalid_includes=["File='target_mapping/use_lib_c.cpp', include='target_mapping/libs/c.h'"],
invalid_includes=[f"File='{Path('target_mapping/use_lib_c.cpp')}', include='target_mapping/libs/c.h'"],
unused_public_deps=["//target_mapping/libs:a"],
)
actual = self._run_dwyu(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from result import ExpectedResult, Result
from test_case import TestCaseBase

Expand All @@ -6,7 +8,7 @@ class TestCase(TestCaseBase):
def execute_test_logic(self) -> Result:
expected = ExpectedResult(
success=False,
invalid_includes=["File='target_mapping/use_lib_c.cpp', include='target_mapping/libs/c.h'"],
invalid_includes=[f"File='{Path('target_mapping/use_lib_c.cpp')}', include='target_mapping/libs/c.h'"],
unused_public_deps=["//target_mapping/libs:a"],
)
actual = self._run_dwyu(
Expand Down
6 changes: 5 additions & 1 deletion test/aspect/tree_artifact/test_invalid_tree_artifact.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from result import ExpectedResult, Result
from test_case import TestCaseBase

Expand All @@ -7,7 +9,9 @@ def execute_test_logic(self) -> Result:
expected = ExpectedResult(
success=False,
# We omit "File='bazel-out/<compilation_mode_and_platform> to allow testing in various environments
invalid_includes=["/bin/tree_artifact/sources.cc/tree_lib.cc', include='tree_artifact/some_lib.h'"],
invalid_includes=[
f"{Path('/bin/tree_artifact/sources.cc/tree_lib.cc')}', include='tree_artifact/some_lib.h'"
],
)
actual = self._run_dwyu(
target="//tree_artifact:tree_artifact_library",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from result import ExpectedResult, Result
from test_case import TestCaseBase

Expand All @@ -6,7 +8,7 @@ class TestCase(TestCaseBase):
def execute_test_logic(self) -> Result:
expected = ExpectedResult(
success=False,
invalid_includes=["File='using_transitive_dep/main.cpp', include='using_transitive_dep/foo.h'"],
invalid_includes=[f"File='{Path('using_transitive_dep/main.cpp')}', include='using_transitive_dep/foo.h'"],
)
actual = self._run_dwyu(target="//using_transitive_dep:main", aspect=self.default_aspect)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from result import ExpectedResult, Result
from test_case import TestCaseBase

Expand All @@ -7,7 +9,7 @@ def execute_test_logic(self) -> Result:
expected = ExpectedResult(
success=False,
invalid_includes=[
"File='using_transitive_dep/transitive_usage_through_impl_deps.h', include='using_transitive_dep/foo.h'"
f"File='{Path('using_transitive_dep/transitive_usage_through_impl_deps.h')}', include='using_transitive_dep/foo.h'"
],
)
actual = self._run_dwyu(
Expand Down

0 comments on commit 62abb1f

Please sign in to comment.