PS: Add test.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-09-26 18:44:40 +01:00
parent 5803e0611e
commit 5e2051bdea

View File

@@ -3,4 +3,37 @@ function Foo($a) {
}
$x = Source "1"
Foo $x
Foo $x
function ThreeArgs($x, $y, $z) {
Sink $x # $ MISSING: hasValueFlow=x
Sink $y # $ MISSING: hasValueFlow=y
Sink $z # $ MISSING: hasValueFlow=z
}
$first = Source "x"
$second = Source "y"
$third = Source "z"
ThreeArgs $first $second $third
ThreeArgs $second -x $first $third
ThreeArgs -x $first $second $third
ThreeArgs $first -y $second $third
ThreeArgs -y $second $first $third
ThreeArgs $second -x $first -z $third
ThreeArgs -x $first $second -z $third
ThreeArgs $first -y $second -z $third
ThreeArgs -y $second $first -z $third
ThreeArgs $second -x $first -z $third
ThreeArgs -x $first -z $third $second
ThreeArgs $first -y $second -z $third
ThreeArgs -y $second -z $third $first
ThreeArgs $second -z $third -x $first
ThreeArgs -x $first -z $third $second
ThreeArgs $first -z $third -y $second
ThreeArgs -y $second -z $third $first
ThreeArgs -z $third -y $second $first
ThreeArgs -z $third $second -x $first
ThreeArgs -z $third -x $first $second
ThreeArgs -z $third $first -y $second
ThreeArgs -z $third -y $second $first