/trunk/Examples/test-suite/csharp/rename_simple_runme.cs
C# | 30 lines | 23 code | 7 blank | 0 comment | 2 complexity | a99ce5ebb8aa8e9003ef39929b6f6c6f MD5 | raw file
1 2using System; 3using rename_simpleNamespace; 4 5public class rename_simple_runme { 6 7 public static void Main() { 8 NewStruct s = new NewStruct(); 9 check(111, s.NewInstanceVariable, "NewInstanceVariable"); 10 check(222, s.NewInstanceMethod(), "NewInstanceMethod"); 11 check(333, NewStruct.NewStaticMethod(), "NewStaticMethod"); 12 check(444, NewStruct.NewStaticVariable, "NewStaticVariable"); 13 check(555, rename_simple.NewFunction(), "NewFunction"); 14 check(666, rename_simple.NewGlobalVariable, "NewGlobalVariable"); 15 16 s.NewInstanceVariable = 1111; 17 NewStruct.NewStaticVariable = 4444; 18 rename_simple.NewGlobalVariable = 6666; 19 20 check(1111, s.NewInstanceVariable, "NewInstanceVariable"); 21 check(4444, NewStruct.NewStaticVariable, "NewStaticVariable"); 22 check(6666, rename_simple.NewGlobalVariable, "NewGlobalVariable"); 23 } 24 25 public static void check(int expected, int actual, string msg) { 26 if (expected != actual) 27 throw new Exception("Failed: Expected: " + expected + " actual: " + actual + " " + msg); 28 } 29} 30