C#: Add test that exhibits bug in CSV overrides logic

This commit is contained in:
Tom Hvitved
2021-07-02 15:43:19 +02:00
parent 26881ec220
commit df29538840
3 changed files with 18 additions and 5 deletions

View File

@@ -40,6 +40,8 @@ namespace My.Qltest
var gen = new Generic<int>();
gen.StepGeneric(0);
gen.StepGeneric2(false);
new Sub().StepOverride("string");
}
object StepArgRes(object x) { return null; }
@@ -74,5 +76,15 @@ namespace My.Qltest
public T StepGeneric2<S>(S s) => throw null;
}
class Base<T>
{
public virtual T StepOverride(T t) => throw null;
}
class Sub : Base<string>
{
public override string StepOverride(string i) => throw null;
}
}
}

View File

@@ -11,10 +11,10 @@ summaryThroughStep
| Steps.cs:41:29:41:29 | 0 | Steps.cs:41:13:41:30 | call to method StepGeneric | true |
| Steps.cs:42:30:42:34 | false | Steps.cs:42:13:42:35 | call to method StepGeneric2 | true |
summaryGetterStep
| Steps.cs:28:13:28:16 | this access | Steps.cs:28:13:28:34 | call to method StepFieldGetter | Steps.cs:55:13:55:17 | field Field |
| Steps.cs:32:13:32:16 | this access | Steps.cs:32:13:32:37 | call to method StepPropertyGetter | Steps.cs:61:13:61:20 | property Property |
| Steps.cs:28:13:28:16 | this access | Steps.cs:28:13:28:34 | call to method StepFieldGetter | Steps.cs:57:13:57:17 | field Field |
| Steps.cs:32:13:32:16 | this access | Steps.cs:32:13:32:37 | call to method StepPropertyGetter | Steps.cs:63:13:63:20 | property Property |
| Steps.cs:36:13:36:16 | this access | Steps.cs:36:13:36:36 | call to method StepElementGetter | file://:0:0:0:0 | element |
summarySetterStep
| Steps.cs:30:34:30:34 | 0 | Steps.cs:30:13:30:16 | [post] this access | Steps.cs:55:13:55:17 | field Field |
| Steps.cs:34:37:34:37 | 0 | Steps.cs:34:13:34:16 | [post] this access | Steps.cs:61:13:61:20 | property Property |
| Steps.cs:30:34:30:34 | 0 | Steps.cs:30:13:30:16 | [post] this access | Steps.cs:57:13:57:17 | field Field |
| Steps.cs:34:37:34:37 | 0 | Steps.cs:34:13:34:16 | [post] this access | Steps.cs:63:13:63:20 | property Property |
| Steps.cs:38:36:38:36 | 0 | Steps.cs:38:13:38:16 | [post] this access | file://:0:0:0:0 | element |

View File

@@ -21,7 +21,8 @@ class SummaryModelTest extends SummaryModelCsv {
"My.Qltest;C;false;StepElementGetter;();;Element of Argument[-1];ReturnValue;value",
"My.Qltest;C;false;StepElementSetter;(System.Int32);;Argument[0];Element of Argument[-1];value",
"My.Qltest;C+Generic<>;false;StepGeneric;(T);;Argument[0];ReturnValue;value",
"My.Qltest;C+Generic<>;false;StepGeneric2;(S);;Argument[0];ReturnValue;value"
"My.Qltest;C+Generic<>;false;StepGeneric2;(S);;Argument[0];ReturnValue;value",
"My.Qltest;C+Base<>;true;StepOverride;(T);;Argument[0];ReturnValue;value"
]
}
}