C#: Add tests for methods with default parameters

This commit is contained in:
Tom Hvitved
2026-04-21 13:42:33 +02:00
parent 77639817fe
commit d792e11b7f
17 changed files with 185 additions and 0 deletions

View File

@@ -433,6 +433,8 @@
| Conditions.cs:146:9:149:49 | After if (...) ... | Conditions.cs:143:10:143:12 | Exit | 4 |
| Conditions.cs:146:13:146:13 | After access to parameter b [false] | Conditions.cs:149:13:149:49 | After ...; | 14 |
| Conditions.cs:146:13:146:13 | After access to parameter b [true] | Conditions.cs:147:13:147:49 | After ...; | 14 |
| DefaultParam.cs:1:7:1:18 | Entry | DefaultParam.cs:1:7:1:18 | Exit | 11 |
| DefaultParam.cs:3:12:3:13 | Entry | DefaultParam.cs:3:12:3:13 | Exit | 21 |
| ExitMethods.cs:6:7:6:17 | Entry | ExitMethods.cs:6:7:6:17 | Exit | 11 |
| ExitMethods.cs:8:10:8:11 | Entry | ExitMethods.cs:8:10:8:11 | Exit | 12 |
| ExitMethods.cs:14:10:14:11 | Entry | ExitMethods.cs:14:10:14:11 | Exit | 12 |

View File

@@ -0,0 +1,7 @@
class DefaultParam
{
string M1(bool b, string s = "", int i = 0)
{
return b + s + i;
}
}

View File

@@ -2642,6 +2642,36 @@ dominance
| Conditions.cs:149:44:149:46 | Before {...} | Conditions.cs:149:45:149:45 | access to local variable s |
| Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:44:149:46 | After {...} |
| Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:44:149:46 | {...} |
| DefaultParam.cs:1:7:1:18 | After call to constructor Object | DefaultParam.cs:1:7:1:18 | {...} |
| DefaultParam.cs:1:7:1:18 | After call to method <object initializer> | DefaultParam.cs:1:7:1:18 | Before call to constructor Object |
| DefaultParam.cs:1:7:1:18 | Before call to constructor Object | DefaultParam.cs:1:7:1:18 | call to constructor Object |
| DefaultParam.cs:1:7:1:18 | Before call to method <object initializer> | DefaultParam.cs:1:7:1:18 | this access |
| DefaultParam.cs:1:7:1:18 | Entry | DefaultParam.cs:1:7:1:18 | Before call to method <object initializer> |
| DefaultParam.cs:1:7:1:18 | Normal Exit | DefaultParam.cs:1:7:1:18 | Exit |
| DefaultParam.cs:1:7:1:18 | call to constructor Object | DefaultParam.cs:1:7:1:18 | After call to constructor Object |
| DefaultParam.cs:1:7:1:18 | call to method <object initializer> | DefaultParam.cs:1:7:1:18 | After call to method <object initializer> |
| DefaultParam.cs:1:7:1:18 | this access | DefaultParam.cs:1:7:1:18 | call to method <object initializer> |
| DefaultParam.cs:1:7:1:18 | {...} | DefaultParam.cs:1:7:1:18 | Normal Exit |
| DefaultParam.cs:3:12:3:13 | Entry | DefaultParam.cs:4:5:6:5 | {...} |
| DefaultParam.cs:3:12:3:13 | Normal Exit | DefaultParam.cs:3:12:3:13 | Exit |
| DefaultParam.cs:4:5:6:5 | {...} | DefaultParam.cs:5:9:5:25 | Before return ...; |
| DefaultParam.cs:5:9:5:25 | Before return ...; | DefaultParam.cs:5:16:5:24 | Before ... + ... |
| DefaultParam.cs:5:9:5:25 | return ...; | DefaultParam.cs:3:12:3:13 | Normal Exit |
| DefaultParam.cs:5:16:5:16 | (...) ... | DefaultParam.cs:5:16:5:16 | After (...) ... |
| DefaultParam.cs:5:16:5:16 | After (...) ... | DefaultParam.cs:5:20:5:20 | access to parameter s |
| DefaultParam.cs:5:16:5:16 | Before (...) ... | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:5:16:5:16 | access to parameter b | DefaultParam.cs:5:16:5:16 | (...) ... |
| DefaultParam.cs:5:16:5:20 | ... + ... | DefaultParam.cs:5:16:5:20 | After ... + ... |
| DefaultParam.cs:5:16:5:20 | After ... + ... | DefaultParam.cs:5:24:5:24 | Before (...) ... |
| DefaultParam.cs:5:16:5:20 | Before ... + ... | DefaultParam.cs:5:16:5:16 | Before (...) ... |
| DefaultParam.cs:5:16:5:24 | ... + ... | DefaultParam.cs:5:16:5:24 | After ... + ... |
| DefaultParam.cs:5:16:5:24 | After ... + ... | DefaultParam.cs:5:9:5:25 | return ...; |
| DefaultParam.cs:5:16:5:24 | Before ... + ... | DefaultParam.cs:5:16:5:20 | Before ... + ... |
| DefaultParam.cs:5:20:5:20 | access to parameter s | DefaultParam.cs:5:16:5:20 | ... + ... |
| DefaultParam.cs:5:24:5:24 | (...) ... | DefaultParam.cs:5:24:5:24 | After (...) ... |
| DefaultParam.cs:5:24:5:24 | After (...) ... | DefaultParam.cs:5:16:5:24 | ... + ... |
| DefaultParam.cs:5:24:5:24 | Before (...) ... | DefaultParam.cs:5:24:5:24 | access to parameter i |
| DefaultParam.cs:5:24:5:24 | access to parameter i | DefaultParam.cs:5:24:5:24 | (...) ... |
| ExitMethods.cs:6:7:6:17 | After call to constructor Object | ExitMethods.cs:6:7:6:17 | {...} |
| ExitMethods.cs:6:7:6:17 | After call to method <object initializer> | ExitMethods.cs:6:7:6:17 | Before call to constructor Object |
| ExitMethods.cs:6:7:6:17 | Before call to constructor Object | ExitMethods.cs:6:7:6:17 | call to constructor Object |
@@ -10119,6 +10149,36 @@ postDominance
| Conditions.cs:149:44:149:46 | Before {...} | Conditions.cs:149:40:149:43 | "b = " |
| Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:45:149:45 | access to local variable s |
| Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:44:149:46 | Before {...} |
| DefaultParam.cs:1:7:1:18 | After call to constructor Object | DefaultParam.cs:1:7:1:18 | call to constructor Object |
| DefaultParam.cs:1:7:1:18 | After call to method <object initializer> | DefaultParam.cs:1:7:1:18 | call to method <object initializer> |
| DefaultParam.cs:1:7:1:18 | Before call to constructor Object | DefaultParam.cs:1:7:1:18 | After call to method <object initializer> |
| DefaultParam.cs:1:7:1:18 | Before call to method <object initializer> | DefaultParam.cs:1:7:1:18 | Entry |
| DefaultParam.cs:1:7:1:18 | Exit | DefaultParam.cs:1:7:1:18 | Normal Exit |
| DefaultParam.cs:1:7:1:18 | Normal Exit | DefaultParam.cs:1:7:1:18 | {...} |
| DefaultParam.cs:1:7:1:18 | call to constructor Object | DefaultParam.cs:1:7:1:18 | Before call to constructor Object |
| DefaultParam.cs:1:7:1:18 | call to method <object initializer> | DefaultParam.cs:1:7:1:18 | this access |
| DefaultParam.cs:1:7:1:18 | this access | DefaultParam.cs:1:7:1:18 | Before call to method <object initializer> |
| DefaultParam.cs:1:7:1:18 | {...} | DefaultParam.cs:1:7:1:18 | After call to constructor Object |
| DefaultParam.cs:3:12:3:13 | Exit | DefaultParam.cs:3:12:3:13 | Normal Exit |
| DefaultParam.cs:3:12:3:13 | Normal Exit | DefaultParam.cs:5:9:5:25 | return ...; |
| DefaultParam.cs:4:5:6:5 | {...} | DefaultParam.cs:3:12:3:13 | Entry |
| DefaultParam.cs:5:9:5:25 | Before return ...; | DefaultParam.cs:4:5:6:5 | {...} |
| DefaultParam.cs:5:9:5:25 | return ...; | DefaultParam.cs:5:16:5:24 | After ... + ... |
| DefaultParam.cs:5:16:5:16 | (...) ... | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:5:16:5:16 | After (...) ... | DefaultParam.cs:5:16:5:16 | (...) ... |
| DefaultParam.cs:5:16:5:16 | Before (...) ... | DefaultParam.cs:5:16:5:20 | Before ... + ... |
| DefaultParam.cs:5:16:5:16 | access to parameter b | DefaultParam.cs:5:16:5:16 | Before (...) ... |
| DefaultParam.cs:5:16:5:20 | ... + ... | DefaultParam.cs:5:20:5:20 | access to parameter s |
| DefaultParam.cs:5:16:5:20 | After ... + ... | DefaultParam.cs:5:16:5:20 | ... + ... |
| DefaultParam.cs:5:16:5:20 | Before ... + ... | DefaultParam.cs:5:16:5:24 | Before ... + ... |
| DefaultParam.cs:5:16:5:24 | ... + ... | DefaultParam.cs:5:24:5:24 | After (...) ... |
| DefaultParam.cs:5:16:5:24 | After ... + ... | DefaultParam.cs:5:16:5:24 | ... + ... |
| DefaultParam.cs:5:16:5:24 | Before ... + ... | DefaultParam.cs:5:9:5:25 | Before return ...; |
| DefaultParam.cs:5:20:5:20 | access to parameter s | DefaultParam.cs:5:16:5:16 | After (...) ... |
| DefaultParam.cs:5:24:5:24 | (...) ... | DefaultParam.cs:5:24:5:24 | access to parameter i |
| DefaultParam.cs:5:24:5:24 | After (...) ... | DefaultParam.cs:5:24:5:24 | (...) ... |
| DefaultParam.cs:5:24:5:24 | Before (...) ... | DefaultParam.cs:5:16:5:20 | After ... + ... |
| DefaultParam.cs:5:24:5:24 | access to parameter i | DefaultParam.cs:5:24:5:24 | Before (...) ... |
| ExitMethods.cs:6:7:6:17 | After call to constructor Object | ExitMethods.cs:6:7:6:17 | call to constructor Object |
| ExitMethods.cs:6:7:6:17 | After call to method <object initializer> | ExitMethods.cs:6:7:6:17 | call to method <object initializer> |
| ExitMethods.cs:6:7:6:17 | Before call to constructor Object | ExitMethods.cs:6:7:6:17 | After call to method <object initializer> |
@@ -16742,6 +16802,8 @@ blockDominance
| Conditions.cs:146:9:149:49 | After if (...) ... | Conditions.cs:146:9:149:49 | After if (...) ... |
| Conditions.cs:146:13:146:13 | After access to parameter b [false] | Conditions.cs:146:13:146:13 | After access to parameter b [false] |
| Conditions.cs:146:13:146:13 | After access to parameter b [true] | Conditions.cs:146:13:146:13 | After access to parameter b [true] |
| DefaultParam.cs:1:7:1:18 | Entry | DefaultParam.cs:1:7:1:18 | Entry |
| DefaultParam.cs:3:12:3:13 | Entry | DefaultParam.cs:3:12:3:13 | Entry |
| ExitMethods.cs:6:7:6:17 | Entry | ExitMethods.cs:6:7:6:17 | Entry |
| ExitMethods.cs:8:10:8:11 | Entry | ExitMethods.cs:8:10:8:11 | Entry |
| ExitMethods.cs:14:10:14:11 | Entry | ExitMethods.cs:14:10:14:11 | Entry |
@@ -20977,6 +21039,8 @@ postBlockDominance
| Conditions.cs:146:9:149:49 | After if (...) ... | Conditions.cs:146:13:146:13 | After access to parameter b [true] |
| Conditions.cs:146:13:146:13 | After access to parameter b [false] | Conditions.cs:146:13:146:13 | After access to parameter b [false] |
| Conditions.cs:146:13:146:13 | After access to parameter b [true] | Conditions.cs:146:13:146:13 | After access to parameter b [true] |
| DefaultParam.cs:1:7:1:18 | Entry | DefaultParam.cs:1:7:1:18 | Entry |
| DefaultParam.cs:3:12:3:13 | Entry | DefaultParam.cs:3:12:3:13 | Entry |
| ExitMethods.cs:6:7:6:17 | Entry | ExitMethods.cs:6:7:6:17 | Entry |
| ExitMethods.cs:8:10:8:11 | Entry | ExitMethods.cs:8:10:8:11 | Entry |
| ExitMethods.cs:14:10:14:11 | Entry | ExitMethods.cs:14:10:14:11 | Entry |

View File

@@ -2829,6 +2829,38 @@ nodeEnclosing
| Conditions.cs:149:44:149:46 | Before {...} | Conditions.cs:143:10:143:12 | M11 |
| Conditions.cs:149:44:149:46 | {...} | Conditions.cs:143:10:143:12 | M11 |
| Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:143:10:143:12 | M11 |
| DefaultParam.cs:1:7:1:18 | After call to constructor Object | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | After call to method <object initializer> | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | Before call to constructor Object | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | Before call to method <object initializer> | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | Entry | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | Exit | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | Normal Exit | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | call to constructor Object | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | call to method <object initializer> | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | this access | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:1:7:1:18 | {...} | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:3:12:3:13 | Entry | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:3:12:3:13 | Exit | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:3:12:3:13 | Normal Exit | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:4:5:6:5 | {...} | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:9:5:25 | Before return ...; | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:9:5:25 | return ...; | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:16 | (...) ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:16 | After (...) ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:16 | Before (...) ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:16 | access to parameter b | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:20 | ... + ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:20 | After ... + ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:20 | Before ... + ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:24 | ... + ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:24 | After ... + ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:16:5:24 | Before ... + ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:20:5:20 | access to parameter s | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:24:5:24 | (...) ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:24:5:24 | After (...) ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:24:5:24 | Before (...) ... | DefaultParam.cs:3:12:3:13 | M1 |
| DefaultParam.cs:5:24:5:24 | access to parameter i | DefaultParam.cs:3:12:3:13 | M1 |
| ExitMethods.cs:6:7:6:17 | After call to constructor Object | ExitMethods.cs:6:7:6:17 | ExitMethods |
| ExitMethods.cs:6:7:6:17 | After call to method <object initializer> | ExitMethods.cs:6:7:6:17 | ExitMethods |
| ExitMethods.cs:6:7:6:17 | Before call to constructor Object | ExitMethods.cs:6:7:6:17 | ExitMethods |
@@ -8487,6 +8519,8 @@ blockEnclosing
| Conditions.cs:146:9:149:49 | After if (...) ... | Conditions.cs:143:10:143:12 | M11 |
| Conditions.cs:146:13:146:13 | After access to parameter b [false] | Conditions.cs:143:10:143:12 | M11 |
| Conditions.cs:146:13:146:13 | After access to parameter b [true] | Conditions.cs:143:10:143:12 | M11 |
| DefaultParam.cs:1:7:1:18 | Entry | DefaultParam.cs:1:7:1:18 | DefaultParam |
| DefaultParam.cs:3:12:3:13 | Entry | DefaultParam.cs:3:12:3:13 | M1 |
| ExitMethods.cs:6:7:6:17 | Entry | ExitMethods.cs:6:7:6:17 | ExitMethods |
| ExitMethods.cs:8:10:8:11 | Entry | ExitMethods.cs:8:10:8:11 | M1 |
| ExitMethods.cs:14:10:14:11 | Entry | ExitMethods.cs:14:10:14:11 | M2 |

View File

@@ -1271,6 +1271,19 @@
| Conditions.cs:149:40:149:43 | "b = " | Conditions.cs:149:40:149:43 | "b = " |
| Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:45:149:45 | access to local variable s |
| Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:45:149:45 | access to local variable s |
| DefaultParam.cs:1:7:1:18 | call to constructor Object | DefaultParam.cs:1:7:1:18 | call to constructor Object |
| DefaultParam.cs:1:7:1:18 | call to method <object initializer> | DefaultParam.cs:1:7:1:18 | this access |
| DefaultParam.cs:1:7:1:18 | this access | DefaultParam.cs:1:7:1:18 | this access |
| DefaultParam.cs:1:7:1:18 | {...} | DefaultParam.cs:1:7:1:18 | {...} |
| DefaultParam.cs:4:5:6:5 | {...} | DefaultParam.cs:4:5:6:5 | {...} |
| DefaultParam.cs:5:9:5:25 | return ...; | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:5:16:5:16 | (...) ... | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:5:16:5:16 | access to parameter b | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:5:16:5:20 | ... + ... | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:5:16:5:24 | ... + ... | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:5:20:5:20 | access to parameter s | DefaultParam.cs:5:20:5:20 | access to parameter s |
| DefaultParam.cs:5:24:5:24 | (...) ... | DefaultParam.cs:5:24:5:24 | access to parameter i |
| DefaultParam.cs:5:24:5:24 | access to parameter i | DefaultParam.cs:5:24:5:24 | access to parameter i |
| ExitMethods.cs:6:7:6:17 | call to constructor Object | ExitMethods.cs:6:7:6:17 | call to constructor Object |
| ExitMethods.cs:6:7:6:17 | call to method <object initializer> | ExitMethods.cs:6:7:6:17 | this access |
| ExitMethods.cs:6:7:6:17 | this access | ExitMethods.cs:6:7:6:17 | this access |

View File

@@ -2882,6 +2882,36 @@
| Conditions.cs:149:44:149:46 | Before {...} | Conditions.cs:149:45:149:45 | access to local variable s | |
| Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:44:149:46 | After {...} | |
| Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:44:149:46 | {...} | |
| DefaultParam.cs:1:7:1:18 | After call to constructor Object | DefaultParam.cs:1:7:1:18 | {...} | |
| DefaultParam.cs:1:7:1:18 | After call to method <object initializer> | DefaultParam.cs:1:7:1:18 | Before call to constructor Object | |
| DefaultParam.cs:1:7:1:18 | Before call to constructor Object | DefaultParam.cs:1:7:1:18 | call to constructor Object | |
| DefaultParam.cs:1:7:1:18 | Before call to method <object initializer> | DefaultParam.cs:1:7:1:18 | this access | |
| DefaultParam.cs:1:7:1:18 | Entry | DefaultParam.cs:1:7:1:18 | Before call to method <object initializer> | |
| DefaultParam.cs:1:7:1:18 | Normal Exit | DefaultParam.cs:1:7:1:18 | Exit | |
| DefaultParam.cs:1:7:1:18 | call to constructor Object | DefaultParam.cs:1:7:1:18 | After call to constructor Object | |
| DefaultParam.cs:1:7:1:18 | call to method <object initializer> | DefaultParam.cs:1:7:1:18 | After call to method <object initializer> | |
| DefaultParam.cs:1:7:1:18 | this access | DefaultParam.cs:1:7:1:18 | call to method <object initializer> | |
| DefaultParam.cs:1:7:1:18 | {...} | DefaultParam.cs:1:7:1:18 | Normal Exit | |
| DefaultParam.cs:3:12:3:13 | Entry | DefaultParam.cs:4:5:6:5 | {...} | |
| DefaultParam.cs:3:12:3:13 | Normal Exit | DefaultParam.cs:3:12:3:13 | Exit | |
| DefaultParam.cs:4:5:6:5 | {...} | DefaultParam.cs:5:9:5:25 | Before return ...; | |
| DefaultParam.cs:5:9:5:25 | Before return ...; | DefaultParam.cs:5:16:5:24 | Before ... + ... | |
| DefaultParam.cs:5:9:5:25 | return ...; | DefaultParam.cs:3:12:3:13 | Normal Exit | return |
| DefaultParam.cs:5:16:5:16 | (...) ... | DefaultParam.cs:5:16:5:16 | After (...) ... | |
| DefaultParam.cs:5:16:5:16 | After (...) ... | DefaultParam.cs:5:20:5:20 | access to parameter s | |
| DefaultParam.cs:5:16:5:16 | Before (...) ... | DefaultParam.cs:5:16:5:16 | access to parameter b | |
| DefaultParam.cs:5:16:5:16 | access to parameter b | DefaultParam.cs:5:16:5:16 | (...) ... | |
| DefaultParam.cs:5:16:5:20 | ... + ... | DefaultParam.cs:5:16:5:20 | After ... + ... | |
| DefaultParam.cs:5:16:5:20 | After ... + ... | DefaultParam.cs:5:24:5:24 | Before (...) ... | |
| DefaultParam.cs:5:16:5:20 | Before ... + ... | DefaultParam.cs:5:16:5:16 | Before (...) ... | |
| DefaultParam.cs:5:16:5:24 | ... + ... | DefaultParam.cs:5:16:5:24 | After ... + ... | |
| DefaultParam.cs:5:16:5:24 | After ... + ... | DefaultParam.cs:5:9:5:25 | return ...; | |
| DefaultParam.cs:5:16:5:24 | Before ... + ... | DefaultParam.cs:5:16:5:20 | Before ... + ... | |
| DefaultParam.cs:5:20:5:20 | access to parameter s | DefaultParam.cs:5:16:5:20 | ... + ... | |
| DefaultParam.cs:5:24:5:24 | (...) ... | DefaultParam.cs:5:24:5:24 | After (...) ... | |
| DefaultParam.cs:5:24:5:24 | After (...) ... | DefaultParam.cs:5:16:5:24 | ... + ... | |
| DefaultParam.cs:5:24:5:24 | Before (...) ... | DefaultParam.cs:5:24:5:24 | access to parameter i | |
| DefaultParam.cs:5:24:5:24 | access to parameter i | DefaultParam.cs:5:24:5:24 | (...) ... | |
| ExitMethods.cs:6:7:6:17 | After call to constructor Object | ExitMethods.cs:6:7:6:17 | {...} | |
| ExitMethods.cs:6:7:6:17 | After call to method <object initializer> | ExitMethods.cs:6:7:6:17 | Before call to constructor Object | |
| ExitMethods.cs:6:7:6:17 | Before call to constructor Object | ExitMethods.cs:6:7:6:17 | call to constructor Object | |

View File

@@ -59,6 +59,7 @@
| Conditions.cs:113:10:113:11 | M9 | Conditions.cs:114:5:124:5 | {...} |
| Conditions.cs:129:10:129:12 | M10 | Conditions.cs:130:5:141:5 | {...} |
| Conditions.cs:143:10:143:12 | M11 | Conditions.cs:144:5:150:5 | {...} |
| DefaultParam.cs:3:12:3:13 | M1 | DefaultParam.cs:4:5:6:5 | {...} |
| ExitMethods.cs:8:10:8:11 | M1 | ExitMethods.cs:9:5:12:5 | {...} |
| ExitMethods.cs:14:10:14:11 | M2 | ExitMethods.cs:15:5:18:5 | {...} |
| ExitMethods.cs:20:10:20:11 | M3 | ExitMethods.cs:21:5:24:5 | {...} |

View File

@@ -527,6 +527,8 @@
| LocalDataFlow.cs:381:13:381:13 | access to local variable x | LocalDataFlow.cs:381:13:381:29 | SSA def(x) |
| LocalDataFlow.cs:381:13:381:29 | SSA def(x) | LocalDataFlow.cs:382:15:382:15 | access to local variable x |
| LocalDataFlow.cs:381:17:381:29 | "not tainted" | LocalDataFlow.cs:381:13:381:13 | access to local variable x |
| LocalDataFlow.cs:385:34:385:34 | SSA param(s) | LocalDataFlow.cs:387:15:387:15 | access to parameter s |
| LocalDataFlow.cs:385:34:385:34 | s | LocalDataFlow.cs:385:34:385:34 | SSA param(s) |
| SSA.cs:3:14:3:16 | this | SSA.cs:3:14:3:16 | this access |
| SSA.cs:5:17:5:17 | SSA entry def(this.S) | SSA.cs:67:9:67:14 | access to field S |
| SSA.cs:5:17:5:17 | this | SSA.cs:67:9:67:12 | this access |

View File

@@ -381,4 +381,9 @@ public class LocalDataFlow
x = "not tainted";
Check(x);
}
void DefaultParamFlow(string s = "taint source")
{
Check(s);
}
}

View File

@@ -639,6 +639,8 @@
| LocalDataFlow.cs:381:13:381:13 | access to local variable x | LocalDataFlow.cs:381:13:381:29 | SSA def(x) |
| LocalDataFlow.cs:381:13:381:29 | SSA def(x) | LocalDataFlow.cs:382:15:382:15 | access to local variable x |
| LocalDataFlow.cs:381:17:381:29 | "not tainted" | LocalDataFlow.cs:381:13:381:13 | access to local variable x |
| LocalDataFlow.cs:385:34:385:34 | SSA param(s) | LocalDataFlow.cs:387:15:387:15 | access to parameter s |
| LocalDataFlow.cs:385:34:385:34 | s | LocalDataFlow.cs:385:34:385:34 | SSA param(s) |
| SSA.cs:3:14:3:16 | this | SSA.cs:3:14:3:16 | this access |
| SSA.cs:5:17:5:17 | SSA entry def(this.S) | SSA.cs:67:9:67:14 | access to field S |
| SSA.cs:5:17:5:17 | this | SSA.cs:67:9:67:12 | this access |

View File

@@ -61,6 +61,9 @@
| DefUse.cs:166:9:166:14 | Field5 | DefUse.cs:188:13:188:22 | ... = ... | DefUse.cs:189:17:189:22 | access to field Field5 |
| DefUse.cs:171:23:171:23 | a | DefUse.cs:171:23:180:9 | Action a = ... | DefUse.cs:181:9:181:9 | access to local variable a |
| DefUse.cs:171:23:171:23 | a | DefUse.cs:186:9:190:9 | ... = ... | DefUse.cs:191:9:191:9 | access to local variable a |
| DefaultParam.cs:3:20:3:20 | b | DefaultParam.cs:3:20:3:20 | b | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:3:30:3:30 | s | DefaultParam.cs:3:30:3:30 | s | DefaultParam.cs:5:20:5:20 | access to parameter s |
| DefaultParam.cs:3:42:3:42 | i | DefaultParam.cs:3:42:3:42 | i | DefaultParam.cs:5:24:5:24 | access to parameter i |
| Example.cs:4:9:4:13 | Field | Example.cs:8:9:8:22 | ... = ... | Example.cs:9:13:9:22 | access to field Field |
| Example.cs:6:23:6:23 | i | Example.cs:6:23:6:23 | i | Example.cs:8:22:8:22 | access to parameter i |
| Example.cs:18:16:18:16 | p | Example.cs:18:16:18:16 | p | Example.cs:22:17:22:17 | access to parameter p |

View File

@@ -0,0 +1,7 @@
class DefaultParam
{
string M1(bool b, string s = "", int i = 0)
{
return b + s + i;
}
}

View File

@@ -93,6 +93,9 @@
| DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:184:9:184:18 | SSA def(this.Field5) |
| DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:191:9:191:11 | SSA call def(this.Field5) |
| DefUse.cs:188:13:188:18 | this.Field5 | DefUse.cs:188:13:188:22 | SSA def(this.Field5) |
| DefaultParam.cs:3:20:3:20 | b | DefaultParam.cs:3:20:3:20 | SSA param(b) |
| DefaultParam.cs:3:30:3:30 | s | DefaultParam.cs:3:30:3:30 | SSA param(s) |
| DefaultParam.cs:3:42:3:42 | i | DefaultParam.cs:3:42:3:42 | SSA param(i) |
| Example.cs:6:23:6:23 | i | Example.cs:6:23:6:23 | SSA param(i) |
| Example.cs:8:9:8:18 | this.Field | Example.cs:8:9:8:22 | SSA def(this.Field) |
| Example.cs:8:9:8:18 | this.Field | Example.cs:10:9:13:24 | SSA phi(this.Field) |

View File

@@ -88,6 +88,9 @@
| DefUse.cs:186:9:190:9 | SSA def(a) | DefUse.cs:186:9:190:9 | ... = ... |
| DefUse.cs:188:13:188:22 | SSA def(this.Field5) | DefUse.cs:188:13:188:22 | ... = ... |
| DefUse.cs:191:9:191:11 | SSA call def(this.Field5) | DefUse.cs:191:9:191:11 | delegate call |
| DefaultParam.cs:3:20:3:20 | SSA param(b) | DefaultParam.cs:3:20:3:20 | b |
| DefaultParam.cs:3:30:3:30 | SSA param(s) | DefaultParam.cs:3:30:3:30 | s |
| DefaultParam.cs:3:42:3:42 | SSA param(i) | DefaultParam.cs:3:42:3:42 | i |
| Example.cs:6:23:6:23 | SSA param(i) | Example.cs:6:23:6:23 | i |
| Example.cs:8:9:8:22 | SSA def(this.Field) | Example.cs:8:9:8:22 | ... = ... |
| Example.cs:11:13:11:30 | SSA def(this.Field) | Example.cs:11:13:11:30 | ... = ... |

View File

@@ -15,6 +15,9 @@
| DefUse.cs:128:19:128:19 | i | DefUse.cs:128:19:128:19 | SSA param(i) | DefUse.cs:128:19:128:19 | i |
| DefUse.cs:134:22:134:22 | d | DefUse.cs:134:22:134:22 | SSA param(d) | DefUse.cs:134:22:134:22 | d |
| DefUse.cs:142:68:142:69 | ie | DefUse.cs:142:68:142:69 | SSA param(ie) | DefUse.cs:142:68:142:69 | ie |
| DefaultParam.cs:3:20:3:20 | b | DefaultParam.cs:3:20:3:20 | SSA param(b) | DefaultParam.cs:3:20:3:20 | b |
| DefaultParam.cs:3:30:3:30 | s | DefaultParam.cs:3:30:3:30 | SSA param(s) | DefaultParam.cs:3:30:3:30 | s |
| DefaultParam.cs:3:42:3:42 | i | DefaultParam.cs:3:42:3:42 | SSA param(i) | DefaultParam.cs:3:42:3:42 | i |
| Example.cs:6:23:6:23 | i | Example.cs:6:23:6:23 | SSA param(i) | Example.cs:6:23:6:23 | i |
| Example.cs:18:16:18:16 | p | Example.cs:18:16:18:16 | SSA param(p) | Example.cs:18:16:18:16 | p |
| Example.cs:18:24:18:24 | b | Example.cs:18:24:18:24 | SSA param(b) | Example.cs:18:24:18:24 | b |

View File

@@ -99,6 +99,9 @@
| DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:184:9:184:18 | SSA def(this.Field5) | DefUse.cs:185:13:185:18 | access to field Field5 |
| DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:191:9:191:11 | SSA call def(this.Field5) | DefUse.cs:192:13:192:18 | access to field Field5 |
| DefUse.cs:188:13:188:18 | this.Field5 | DefUse.cs:188:13:188:22 | SSA def(this.Field5) | DefUse.cs:189:17:189:22 | access to field Field5 |
| DefaultParam.cs:3:20:3:20 | b | DefaultParam.cs:3:20:3:20 | SSA param(b) | DefaultParam.cs:5:16:5:16 | access to parameter b |
| DefaultParam.cs:3:30:3:30 | s | DefaultParam.cs:3:30:3:30 | SSA param(s) | DefaultParam.cs:5:20:5:20 | access to parameter s |
| DefaultParam.cs:3:42:3:42 | i | DefaultParam.cs:3:42:3:42 | SSA param(i) | DefaultParam.cs:5:24:5:24 | access to parameter i |
| Example.cs:6:23:6:23 | i | Example.cs:6:23:6:23 | SSA param(i) | Example.cs:8:22:8:22 | access to parameter i |
| Example.cs:6:23:6:23 | i | Example.cs:6:23:6:23 | SSA param(i) | Example.cs:10:13:10:13 | access to parameter i |
| Example.cs:6:23:6:23 | i | Example.cs:6:23:6:23 | SSA param(i) | Example.cs:11:26:11:26 | access to parameter i |

View File

@@ -99,6 +99,9 @@
| DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:191:9:191:11 | SSA call def(this.Field5) | DefUse.cs:184:9:184:18 | SSA def(this.Field5) |
| DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:191:9:191:11 | SSA call def(this.Field5) | DefUse.cs:191:9:191:11 | SSA call def(this.Field5) |
| DefUse.cs:188:13:188:18 | this.Field5 | DefUse.cs:188:13:188:22 | SSA def(this.Field5) | DefUse.cs:188:13:188:22 | SSA def(this.Field5) |
| DefaultParam.cs:3:20:3:20 | b | DefaultParam.cs:3:20:3:20 | SSA param(b) | DefaultParam.cs:3:20:3:20 | SSA param(b) |
| DefaultParam.cs:3:30:3:30 | s | DefaultParam.cs:3:30:3:30 | SSA param(s) | DefaultParam.cs:3:30:3:30 | SSA param(s) |
| DefaultParam.cs:3:42:3:42 | i | DefaultParam.cs:3:42:3:42 | SSA param(i) | DefaultParam.cs:3:42:3:42 | SSA param(i) |
| Example.cs:6:23:6:23 | i | Example.cs:6:23:6:23 | SSA param(i) | Example.cs:6:23:6:23 | SSA param(i) |
| Example.cs:8:9:8:18 | this.Field | Example.cs:8:9:8:22 | SSA def(this.Field) | Example.cs:8:9:8:22 | SSA def(this.Field) |
| Example.cs:8:9:8:18 | this.Field | Example.cs:10:9:13:24 | SSA phi(this.Field) | Example.cs:8:9:8:22 | SSA def(this.Field) |