5
// Lluis Sanchez Gual <lluis@novell.com>
7
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
// of this software and associated documentation files (the "Software"), to deal
11
// in the Software without restriction, including without limitation the rights
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
// copies of the Software, and to permit persons to whom the Software is
14
// furnished to do so, subject to the following conditions:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
using System.Collections;
29
using System.Collections.Generic;
30
using System.Diagnostics;
32
namespace UnitTests.TestApp
36
public static void Main (string[] args)
38
MainClass mc = new MainClass ();
39
typeof (MainClass).GetMethod (args[0]).Invoke (mc, null);
44
static string staticString = "some static";
45
string someString = "hi";
46
string[] numbers = new string[] { "one","two","three" };
48
public void TestEvaluation ()
51
decimal dec = 123.456m;
52
ArrayList alist = new ArrayList ();
61
WithDisplayString withDisplayString = new WithDisplayString ();
62
WithProxy withProxy = new WithProxy ();
63
WithToString withToString = new WithToString ();
65
int[][] numbersArrays = new int [2][];
66
int[,,] numbersMulti = new int [3,4,5];
68
var dict = new Dictionary<int, string[]> ();
69
var dictArray = new Dictionary<int, string[]> [2,3];
70
var thing = new Thing<string> ();
71
var done = new Thing<string>.Done<int> ();
73
Console.WriteLine (n); Debugger.Break ();
76
public int TestMethod ()
82
public int TestMethod (string a)
84
return int.Parse (a) + 1;
87
public int TestMethod (int a)
92
public static int TestMethod (bool b)
97
public string BoxingTestMethod (object a)
102
public string EscapedStrings {
103
get { return " \" \\ \a \b \f \v \n \r \t"; }
110
public virtual int Prop { get { return 1; } }
111
public int PropNoVirt1 { get { return 1; } }
112
public virtual int PropNoVirt2 { get { return 1; } }
117
public override int Prop { get { return 2; } }
118
public new int PropNoVirt1 { get { return 2; } }
119
public new int PropNoVirt2 { get { return 2; } }
126
[DebuggerDisplay ("Some {Val1} Value {Val2} End")]
127
class WithDisplayString
129
internal string Val1 = "one";
130
public int Val2 { get { return 2; } }
135
public override string ToString ()
141
[DebuggerTypeProxy (typeof(TheProxy))]
145
get { return "one"; }
153
public TheProxy (WithProxy wp)
159
get { return wp.Val1; }
169
public Done<int>[] done = new Done<int> [1];