Skip to content

Commit 4a1fce9

Browse files
committed
Test non-promoted fields and methods
1 parent f61251c commit 4a1fce9

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test_fields.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,8 @@ func TestFieldsSEmbedSEmbedS1(t test.SEmbedSEmbedS1) {
3838
a := t.SourceField
3939
t.SinkField = a // $ S1[t] ql_S1 SEmbedS1[t]
4040
}
41+
42+
func TestFieldsSEmbedS1AndSEmbedS1(t test.SEmbedS1AndSEmbedS1) {
43+
a := t.SourceField
44+
t.SinkField = a // $ S1[t] ql_S1
45+
}

go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test_methods.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,9 @@ func TestMethodsSEmbedSEmbedS1(t test.SEmbedSEmbedS1) {
9999
y := t.Step(x)
100100
t.Sink(y) // $ I1[t] S1[t] SEmbedS1[t] ql_S1
101101
}
102+
103+
func TestMethodsSEmbedS1AndSEmbedS1(t test.SEmbedS1AndSEmbedS1) {
104+
x := t.Source()
105+
y := t.Step(x)
106+
t.Sink(y) // $ I1[t] S1[t] ql_S1
107+
}

go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)