// // // // // $Revision$ // using System; namespace Debugger.Tests.TestPrograms { public class FunctionArgumentVariables { public static void Main() { System.Diagnostics.Debugger.Break(); int ref_i = 2; int out_i; int out_i2; string ref_s = "B"; int? iNull = 5; int? iNull_null = null; StaticFunction( 1, "A", null, ref ref_i, out out_i, out out_i2, ref ref_s, iNull, iNull_null ); VarArgs(); VarArgs("A"); VarArgs("A", "B"); new FunctionArgumentVariables().Function(1, "A"); } static void StaticFunction(int i, string s, string s_null, ref int ref_i, out int out_i, out int out_i2, ref string ref_s, int? iNull, int? iNull_null) { out_i = 3; System.Diagnostics.Debugger.Break(); out_i2 = 4; } static void VarArgs(params string[] args) { System.Diagnostics.Debugger.Break(); } void Function(int i, string s) { System.Diagnostics.Debugger.Break(); } } } #if TEST_CODE namespace Debugger.Tests { public partial class DebuggerTests { [NUnit.Framework.Test] public void FunctionArgumentVariables() { StartTest("FunctionArgumentVariables.cs"); WaitForPause(); for(int i = 0; i < 5; i++) { process.Continue(); WaitForPause(); ObjectDump("Arguments", process.SelectedStackFrame.GetArgumentValues()); } process.Continue(); process.WaitForExit(); CheckXmlOutput(); } } } #endif #if EXPECTED_OUTPUT mscorlib.dll FunctionArgumentVariables.exe Break Break False False True True 1 i False 1 False System.Int32 False False True False A s False A False System.String False False False False s_null True <null> False System.Object False False True True 2 ref_i False 2 False System.Int32 False False True True 3 out_i False 3 False System.Int32 False False True True 0 out_i2 False 0 False System.Int32 False False True False B ref_s False B False System.String False True False False iNull False {System.Nullable<System.Int32>} False System.Nullable<System.Int32> False True False False iNull_null False {System.Nullable<System.Int32>} False System.Nullable<System.Int32> Break True 0 1 [0] False False False args False {System.String[]} False System.String[] Break True 1 1 [1] False False False args False {System.String[]} False System.String[] Break True 2 1 [2] False False False args False {System.String[]} False System.String[] Break False False True True 1 i False 1 False System.Int32 False False True False A s False A False System.String #endif // EXPECTED_OUTPUT