On Fr, 2007-10-12 at 19:42 -0500, a_villacis@palosanto.com wrote:
You must use your real name to get a patch accepted.
- /* Maximum limits set by EM_SETLIMITTEXT vary by OS version */
- osVersion = GetVersion();
- if (osVersion < 0x80000000) {
/* WinNT, Win2K, WinXP */
limitSingleLine = 2147483646UL;
limitMultiLine = 4294967295UL;
- } else {
/* Win9x, WinME */
limitSingleLine = 32766;
limitMultiLine = 65535;
- }
The tests should not depend on the OS-Version. Please handle both possible results in the ok()
- /* Test default limit for single-line control */
- trace("EDIT: buffer limit for single-line\n");
- hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
- r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0);
- ok(r == 30000, "Incorrect default text limit, expected 30000 got
%u\n", r);
- SendMessage(hwEdit, EM_SETLIMITTEXT, 0, 0);
- r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0);
/* Win9x+ME: 32766; WinNT: 2147483646UL */ ok( (r == 32766) || (r == 2147483646UL), "got limit %u (expected 32766 or 2147483646)\n", r);
- ok(r == limitSingleLine, "Incorrect default text limit, expected
%u got %u\n", limitSingleLine, r);
Your looks like a copy&paste error ("default text limit" is wrong here).
Change the multiline-test the same way.
To allow an easy review, you can split your patch: one patch for the implementation and a second patch for the test.
Thanks for helping wine