-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mr/backport/release-25.1-issue-eng/ide/libadalang-tools…
…_36' into '25.1' [25.1] Backport of eng/ide/libadalang-tools#36 See merge request eng/ide/libadalang-tools!279
- Loading branch information
Showing
13 changed files
with
91 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package body Dep is | ||
|
||
function Baz (X : Integer) return Integer is | ||
begin | ||
return X; | ||
end Baz; | ||
|
||
end Dep; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package Dep is | ||
|
||
function Baz (X : Integer) return Integer; | ||
|
||
end Dep; |
10 changes: 10 additions & 0 deletions
10
testsuite/tests/test/36-stub_dangling_setters/new/root.adb
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
with Dep; | ||
|
||
package body Root is | ||
|
||
function Foo (X : Integer) return Integer is | ||
begin | ||
return Dep.Baz (X); | ||
end Foo; | ||
|
||
end Root; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package Root is | ||
|
||
function Foo (X : Integer) return Integer; | ||
|
||
end Root; |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package body Dep is | ||
|
||
function Bar (X : My_Int) return My_Int is | ||
begin | ||
return X; | ||
end Bar; | ||
|
||
end Dep; |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package Dep is | ||
|
||
subtype My_Int is Integer; | ||
|
||
function Bar (X : My_Int) return My_Int; | ||
|
||
end Dep; |
10 changes: 10 additions & 0 deletions
10
testsuite/tests/test/36-stub_dangling_setters/old/root.adb
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
with Dep; | ||
|
||
package body Root is | ||
|
||
function Foo (X : Integer) return Integer is | ||
begin | ||
return Dep.Bar (X); | ||
end Foo; | ||
|
||
end Root; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package Root is | ||
|
||
function Foo (X : Integer) return Integer; | ||
|
||
end Root; |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
project Prj is | ||
|
||
type Source is ("old", "new"); | ||
for Source_Dirs use (external ("SRC_DIR", "old")); | ||
for Object_Dir use "obj"; | ||
|
||
end Prj; | ||
|
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! /bin/bash | ||
|
||
# Generate a stubbing harness with the old sources, containing a custom type | ||
gnattest -P prj.gpr -q -XSRC_DIR=old --stub | ||
|
||
# Re-generate the harness but with the custom type dissapearing. Any remaining | ||
# references to it will cause a compilation failure | ||
gnattest -P prj.gpr -XSRC_DIR=new --stub | ||
|
||
# Build the harness to check that the unused setters are not causing any | ||
# problems. | ||
gprbuild -P obj/gnattest_stub/harness/test_drivers.gpr -q -XSRC_DIR=new |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: | ||
Check that dangling setters in a stubbing harness do not cause any compilation | ||
issues. They used to not be commented out, which could result in lingering | ||
references to types or objects no longer present in the codebase. | ||
|
||
driver: shell_script |