fpc/tests/webtbs/tw31589.pp

192 lines
4.6 KiB
ObjectPascal

{ %opt=-O1 }
program testcase;
{$MODE DELPHI}
const
CM_ACTIVATE = $B000;
WM_LCL_SOCK_ASYNC = 1024 + $500;
WM_QUERYOPEN = 19;
WM_NULL = 0;
WM_ENTERIDLE = 289;
WM_ACTIVATE = 6;
WM_DPICHANGED = 736;
WM_IME_ENDCOMPOSITION = 270;
WM_CANCELMODE = 31;
WM_CAPTURECHANGED = 533;
WM_CHAR = 258;
WM_MENUCHAR = 288;
WM_CLOSE = 16;
WM_INITMENUPOPUP = 279;
WM_MENUSELECT = 287;
WM_COMMAND = 273;
WM_CTLCOLORMSGBOX = 306;
WM_CTLCOLORSTATIC = 312;
WM_CLEAR = 771;
WM_COPY = 769;
WM_CUT = 768;
WM_DESTROY = 2;
WM_DESTROYCLIPBOARD = 775;
WM_DRAWITEM = 43;
WM_ENABLE = 10;
WM_ERASEBKGND = 20;
WM_EXITMENULOOP = 530;
WM_GETDLGCODE = 135;
WM_HELP = 83;
WM_HOTKEY = 786;
WM_HSCROLL = 276;
WM_VSCROLL = 277;
WM_KEYDOWN = 256;
WM_KEYUP = 257;
WM_KILLFOCUS = 8;
WM_LBUTTONDBLCLK = 515;
WM_LBUTTONDOWN = 513;
WM_LBUTTONUP = 514;
WM_RBUTTONDBLCLK = 518;
WM_RBUTTONDOWN = 516;
WM_RBUTTONUP = 517;
WM_MBUTTONDBLCLK = 521;
WM_MBUTTONDOWN = 519;
WM_MBUTTONUP = 520;
WM_XBUTTONDBLCLK = 525;
WM_XBUTTONDOWN = 523;
WM_XBUTTONUP = 524;
WM_MOUSEHOVER = 673;
WM_MOUSELEAVE = 675;
WM_MOUSEMOVE = 512;
WM_MOUSEWHEEL = 522;
WM_DROPFILES = 563;
WM_NCHITTEST = 132;
WM_NCLBUTTONDOWN = 161;
WM_NCMOUSEMOVE = 160;
WM_NCMOUSEHOVER = 672;
WM_NOTIFY = 78;
WM_PAINT = 15;
WM_PRINTCLIENT = 792;
WM_PASTE = 770;
WM_CONTEXTMENU = 123;
WM_SETCURSOR = 32;
WM_SETFOCUS = 7;
WM_SHOWWINDOW = 24;
WM_SYSCHAR = 262;
WM_SYSCOMMAND = 274;
WM_SYSKEYDOWN = 260;
WM_SYSKEYUP = 261;
WM_TIMER = 275;
WM_WINDOWPOSCHANGING = 70;
WM_WINDOWPOSCHANGED = 71;
WM_MEASUREITEM = 44;
WM_SETTINGCHANGE = 26;
WM_THEMECHANGED = 794;
WM_UPDATEUISTATE = 296;
WM_IME_COMPOSITION = 271;
WM_IME_COMPOSITIONFULL = 644;
WM_IME_CONTROL = 643;
WM_IME_NOTIFY = 642;
WM_IME_REQUEST = 648;
WM_IME_SELECT = 645;
WM_IME_SETCONTEXT = 641;
WM_IME_STARTCOMPOSITION = 269;
WM_ACTIVATEAPP = 28;
WM_DISPLAYCHANGE = 126;
procedure DoError(c : Cardinal);
begin
writeln('Case ',c);
halt(c);
end;
var
Msg: Cardinal;
begin
Msg := WM_QUERYOPEN;
case Msg of
WM_NULL: DoError(1);
WM_ENTERIDLE: DoError(2);
WM_ACTIVATE: DoError(3);
WM_DPICHANGED: DoError(4);
WM_IME_ENDCOMPOSITION: DoError(5);
WM_CANCELMODE: DoError(6);
WM_CAPTURECHANGED: DoError(7);
WM_CHAR: DoError(8);
WM_MENUCHAR: DoError(9);
WM_CLOSE: DoError(10);
WM_INITMENUPOPUP: DoError(11);
WM_MENUSELECT: DoError(12);
WM_COMMAND: DoError(13);
WM_CTLCOLORMSGBOX..WM_CTLCOLORSTATIC: DoError(14);
WM_CLEAR: DoError(15);
WM_COPY: DoError(16);
WM_CUT: DoError(17);
WM_DESTROY: DoError(18);
WM_DESTROYCLIPBOARD: DoError(19);
WM_DRAWITEM: DoError(20);
WM_ENABLE: DoError(21);
WM_ERASEBKGND: DoError(22);
WM_EXITMENULOOP: DoError(23);
WM_GETDLGCODE: DoError(24);
WM_HELP: DoError(25);
WM_HOTKEY: DoError(26);
WM_HSCROLL,
WM_VSCROLL: DoError(27);
WM_KEYDOWN: DoError(28);
WM_KEYUP: DoError(29);
WM_KILLFOCUS: DoError(30);
WM_LBUTTONDBLCLK: DoError(31);
WM_LBUTTONDOWN: DoError(32);
WM_LBUTTONUP: DoError(33);
WM_RBUTTONDBLCLK: DoError(34);
WM_RBUTTONDOWN: DoError(35);
WM_RBUTTONUP: DoError(36);
WM_MBUTTONDBLCLK: DoError(37);
WM_MBUTTONDOWN: DoError(38);
WM_MBUTTONUP: DoError(39);
WM_XBUTTONDBLCLK: DoError(40);
WM_XBUTTONDOWN: DoError(41);
WM_XBUTTONUP: DoError(42);
WM_MOUSEHOVER: DoError(43);
WM_MOUSELEAVE: DoError(44);
WM_MOUSEMOVE: DoError(45);
WM_MOUSEWHEEL: DoError(46);
WM_DROPFILES: DoError(47);
WM_NCHITTEST: DoError(48);
WM_NCLBUTTONDOWN: DoError(49);
WM_NCMOUSEMOVE,
WM_NCMOUSEHOVER: DoError(50);
WM_NOTIFY: DoError(51);
WM_PAINT: DoError(52);
WM_PRINTCLIENT: DoError(53);
WM_PASTE: DoError(54);
WM_CONTEXTMENU: DoError(55);
WM_SETCURSOR: DoError(56);
CM_ACTIVATE: DoError(57);
WM_SETFOCUS: DoError(58);
WM_SHOWWINDOW: DoError(59);
WM_SYSCHAR: DoError(60);
WM_SYSCOMMAND: DoError(61);
WM_SYSKEYDOWN: DoError(62);
WM_SYSKEYUP: DoError(63);
WM_TIMER: DoError(64);
WM_WINDOWPOSCHANGING: DoError(65);
WM_WINDOWPOSCHANGED: DoError(66);
WM_MEASUREITEM: DoError(67);
WM_SETTINGCHANGE: DoError(68);
WM_THEMECHANGED: DoError(69);
WM_UPDATEUISTATE: DoError(70);
WM_LCL_SOCK_ASYNC: DoError(71);
WM_IME_COMPOSITION,
WM_IME_COMPOSITIONFULL,
WM_IME_CONTROL,
WM_IME_NOTIFY,
WM_IME_REQUEST,
WM_IME_SELECT,
WM_IME_SETCONTEXT,
WM_IME_STARTCOMPOSITION: DoError(72);
WM_ACTIVATEAPP: DoError(73);
WM_DISPLAYCHANGE: DoError(74);
end;
writeln('Ok');
end.