Skip to content

Commit cf40d2d

Browse files
committed
C#: Change the capture neutral model test to use the content/heuristic version instead.
1 parent 359cd8c commit cf40d2d

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

Diff for: csharp/ql/test/utils/modelgenerator/dataflow/CaptureHeuristicNeutralModels.ql renamed to csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import utils.modelgenerator.internal.CaptureModels
33
import utils.test.InlineMadTest
44

55
module InlineMadTestConfig implements InlineMadTestConfigSig {
6-
string getCapturedModel(Callable c) { result = Heuristic::captureNoFlow(c) }
6+
string getCapturedModel(Callable c) { result = captureNeutral(c) }
77

88
string getKind() { result = "neutral" }
99
}

Diff for: csharp/ql/test/utils/modelgenerator/dataflow/Summaries.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -510,22 +510,19 @@ public Type M6(Type t)
510510
// the content based model generation is able to produce flow summaries for them.
511511
public class HigherOrderParameters
512512
{
513-
// neutral=Models;HigherOrderParameters;M1;(System.String,System.Func<System.String,System.String>);summary;df-generated
514513
// contentbased-summary=Models;HigherOrderParameters;false;M1;(System.String,System.Func<System.String,System.String>);;Argument[0];ReturnValue;value;dfc-generated
515514
public string M1(string s, Func<string, string> map)
516515
{
517516
return s;
518517
}
519518

520-
// neutral=Models;HigherOrderParameters;Apply;(System.Func<System.Object,System.Object>,System.Object);summary;df-generated
521519
// contentbased-summary=Models;HigherOrderParameters;false;Apply;(System.Func<System.Object,System.Object>,System.Object);;Argument[1];Argument[0].Parameter[0];value;dfc-generated
522520
// contentbased-summary=Models;HigherOrderParameters;false;Apply;(System.Func<System.Object,System.Object>,System.Object);;Argument[0].ReturnValue;ReturnValue;value;dfc-generated
523521
public object Apply(Func<object, object> f, object o)
524522
{
525523
return f(o);
526524
}
527525

528-
// neutral=Models;HigherOrderParameters;Apply2;(System.Object,System.Func<System.Object,System.Object,System.Object>);summary;df-generated
529526
// contentbased-summary=Models;HigherOrderParameters;false;Apply2;(System.Object,System.Func<System.Object,System.Object,System.Object>);;Argument[0];Argument[1].Parameter[1];value;dfc-generated
530527
// contentbased-summary=Models;HigherOrderParameters;false;Apply2;(System.Object,System.Func<System.Object,System.Object,System.Object>);;Argument[1].ReturnValue;ReturnValue;value;dfc-generated
531528
public object Apply2(object o, Func<object, object, object> f)
@@ -534,7 +531,6 @@ public object Apply2(object o, Func<object, object, object> f)
534531
return x;
535532
}
536533

537-
// neutral=Models;HigherOrderParameters;Apply;(System.Action<System.Object>,System.Object);summary;df-generated
538534
// contentbased-summary=Models;HigherOrderParameters;false;Apply;(System.Action<System.Object>,System.Object);;Argument[1];Argument[0].Parameter[0];value;dfc-generated
539535
public void Apply(Action<object> a, object o)
540536
{
@@ -544,7 +540,6 @@ public void Apply(Action<object> a, object o)
544540

545541
public static class HigherOrderExtensionMethods
546542
{
547-
// neutral=Models;HigherOrderExtensionMethods;Select<TSource,TResult>;(System.Collections.Generic.IEnumerable<TSource>,System.Func<TSource,TResult>);summary;df-generated
548543
// contentbased-summary=Models;HigherOrderExtensionMethods;false;Select<TSource,TResult>;(System.Collections.Generic.IEnumerable<TSource>,System.Func<TSource,TResult>);;Argument[0].Element;Argument[1].Parameter[0];value;dfc-generated
549544
// contentbased-summary=Models;HigherOrderExtensionMethods;false;Select<TSource,TResult>;(System.Collections.Generic.IEnumerable<TSource>,System.Func<TSource,TResult>);;Argument[1].ReturnValue;ReturnValue.Element;value;dfc-generated
550545
public static IEnumerable<TResult> Select<TSource, TResult>(
@@ -661,11 +656,13 @@ public override string Id(string x)
661656

662657
public interface IPublic3
663658
{
659+
// neutral=Models;Inheritance+IPublic3;get_Prop;();summary;df-generated
664660
string Prop { get; }
665661
}
666662

667663
public abstract class D : IPublic3
668664
{
665+
// neutral=Models;Inheritance+D;get_Prop;();summary;df-generated
669666
public abstract string Prop { get; }
670667
}
671668

@@ -826,7 +823,6 @@ public void SetChainBegin(string v)
826823
chainBegin = v;
827824
}
828825

829-
// neutral=Models;SyntheticFields;CopyChainValue;();summary;df-generated
830826
// contentbased-summary=Models;SyntheticFields;false;CopyChainValue;();;Argument[this].SyntheticField[Models.SyntheticFields.chainBegin];Argument[this].SyntheticField[Models.SyntheticFields.chainEnd];value;dfc-generated
831827
public void CopyChainValue()
832828
{
@@ -933,6 +929,7 @@ public class Fanout
933929

934930
public abstract class Base1
935931
{
932+
// neutral=Models;Fanout+Base1;GetValue;();summary;df-generated
936933
public abstract string GetValue();
937934
}
938935

0 commit comments

Comments
 (0)