Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2001-12-04 03:54:29 +0300
committerMiguel de Icaza <miguel@gnome.org>2001-12-04 03:54:29 +0300
commit9b240f5e20ba55cecf41848bbabd59f8329443c3 (patch)
tree1d35f75aa69536533378b478584664c71db3af82 /mcs/tests/gen-cast-test.cs
parentc736b252ac8f644d27efeb8346fc103689ed5109 (diff)
Add new tests
svn path=/trunk/mcs/; revision=1516
Diffstat (limited to 'mcs/tests/gen-cast-test.cs')
-rwxr-xr-xmcs/tests/gen-cast-test.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/mcs/tests/gen-cast-test.cs b/mcs/tests/gen-cast-test.cs
index f0d4052ed0c..d1f9531d2f1 100755
--- a/mcs/tests/gen-cast-test.cs
+++ b/mcs/tests/gen-cast-test.cs
@@ -2,6 +2,8 @@ using System;
class Stress {
+ static string mode = "unchecked";
+
static string [] types = {
"int", "uint",
"short", "ushort",
@@ -38,7 +40,7 @@ class Stress {
static void call (string type, string name)
{
- w ("\t\treceive_" + type + " (unchecked ((" + type + ") " + name + "));\n");
+ w ("\t\treceive_" + type + " (" + mode + "((" + type + ") " + name + "));\n");
}
static void generate_emision ()
@@ -72,8 +74,19 @@ class Stress {
wl ("\t}");
}
- static void Main ()
+ static void Main (string [] args)
{
+ foreach (string arg in args){
+ if (arg == "-h" || arg == "--help"){
+ Console.WriteLine ("-h, --help Shows help");
+ Console.WriteLine ("-c, --checked Generate checked contexts");
+ return;
+ }
+ if (arg == "--checked" || arg == "-c"){
+ mode = "checked";
+ continue;
+ }
+ }
wl ("using System;\nclass Test {\n");
generate_receptors ();