Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

43 lines
713 B
C#

public class Switch {
public static int test (int n) {
switch (n) {
case 0: return 1;
case 1: return 0;
case -1: return 2;
default:
return 0xff;
}
return 100;
}
const string long_str =
"{http://schemas.xmlsoap.org/ws/2003/03/business-process/}partnerLinks";
// bug #54473
public static int test_string (string s) {
switch (s) {
case "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}partnerLinks":
return 1;
default:
return 0;
}
}
public static int Main () {
if (test(0) != 1)
return 1;
if (test(1) != 0)
return 2;
if (test(-1) != 2)
return 3;
if (test(3) != 0xff)
return 4;
if (test_string (long_str) != 1)
return 5;
return 0;
}
}