class Stress {
+ static string mode = "unchecked";
+
static string [] types = {
"int", "uint",
"short", "ushort",
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 ()
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 ();