make a more realistic test for self-parameter

This commit is contained in:
Erik Krogh Kristensen
2022-05-17 11:10:31 +02:00
parent 55ffdb4aa1
commit aef592fec8
3 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ isSink
| test.py:33:22:33:24 | ControlFlowNode for one | test-source |
| test.py:33:27:33:29 | ControlFlowNode for two | test-source |
| test.py:33:32:33:36 | ControlFlowNode for three | test-source |
| test.py:57:7:57:12 | ControlFlowNode for ArgPos | test-source |
| test.py:57:27:57:33 | ControlFlowNode for arg_pos | test-source |
| test.py:66:17:66:20 | ControlFlowNode for arg1 | test-source |
| test.py:66:23:66:26 | ControlFlowNode for arg2 | test-source |
| test.py:66:34:66:43 | ControlFlowNode for namedThing | test-source |

View File

@@ -54,7 +54,7 @@ val = inst.foo()
from testlib import ArgPos
val = ArgPos.selfThing(arg, named=2)
arg_pos = ArgPos(); val = arg_pos.self_thing(arg, named=2);
class SubClass (ArgPos.MyClass):
def foo(self, arg, named=2, otherName=3):
@@ -95,4 +95,4 @@ from foo1.bar import baz1
baz1(baz1) # no match, and that's the point.
from foo2.bar import baz2
baz2(baz2) # match
baz2(baz2) # match

View File

@@ -44,7 +44,7 @@ class Sinks extends ModelInput::SinkModelCsv {
"testlib;;Member[CallFilter].Member[arityOne].WithArity[1].Argument[any];test-source", //
"testlib;;Member[CallFilter].Member[twoOrMore].WithArity[2..].Argument[0..];test-source", //
// testing non-positional arguments
"testlib;;Member[ArgPos].Member[selfThing].Argument[self];test-source", //
"testlib;;Member[ArgPos].Instance.Member[self_thing].Argument[self];test-source", //
// any argument
"testlib;;Member[ArgPos].Member[anyParam].Argument[any];test-source", //
"testlib;;Member[ArgPos].Member[anyNamed].Argument[any-named];test-source", //