Module: wine
Branch: master
Commit: 43cf3b80afb7d626b53321aefe39e92fa202f4df
URL: http://source.winehq.org/git/wine.git/?a=commit;h=43cf3b80afb7d626b53321aef…
Author: Alex Villacís Lasso <a_villacis(a)palosanto.com>
Date: Sun Jul 20 12:29:57 2008 -0500
richedit: Shorten EM_AUTOURLDETECT tests.
EM_AUTOURLDETECT tests are taking too much time, so this patch tests
just one URL and one non-URL for all messages but WM_SETTEXT. Also,
remove one trace that spams the output needlessly.
---
dlls/riched20/tests/editor.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 8d22e85..8a55197 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -1383,6 +1383,9 @@ static HWND new_static_wnd(HWND parent) {
static void test_EM_AUTOURLDETECT(void)
{
+ /* DO NOT change the properties of the first two elements. To shorten the
+ tests, all tests after WM_SETTEXT test just the first two elements -
+ one non-URL and one URL */
struct urls_s {
const char *text;
int is_url;
@@ -1647,10 +1650,12 @@ static void test_EM_AUTOURLDETECT(void)
}
/* Test detection of URLs within normal text - WM_CHAR case. */
- for (i = 0; i < sizeof(urls)/sizeof(struct urls_s); i++) {
+ /* Test only the first two URL examples for brevity */
+ for (i = 0; i < 2; i++) {
hwndRichEdit = new_richedit(parent);
- for (j = 0; j < sizeof(templates_delim) / sizeof(const char *); j++) {
+ /* Also for brevity, test only the first three delimiters */
+ for (j = 0; j < 3; j++) {
char * at_pos;
int at_offset;
int end_offset;
@@ -1674,7 +1679,6 @@ static void test_EM_AUTOURLDETECT(void)
}
}
SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer);
- trace("Using template: %s\n", templates_delim[j]);
/* This assumes no templates start with the URL itself, and that they
have at least two characters before the URL text */
@@ -1784,7 +1788,8 @@ static void test_EM_AUTOURLDETECT(void)
}
/* Test detection of URLs within normal text - EM_SETTEXTEX case. */
- for (i = 0; i < sizeof(urls)/sizeof(struct urls_s); i++) {
+ /* Test just the first two URL examples for brevity */
+ for (i = 0; i < 2; i++) {
SETTEXTEX st;
hwndRichEdit = new_richedit(parent);
@@ -1971,7 +1976,8 @@ static void test_EM_AUTOURLDETECT(void)
}
/* Test detection of URLs within normal text - EM_REPLACESEL case. */
- for (i = 0; i < sizeof(urls)/sizeof(struct urls_s); i++) {
+ /* Test just the first two URL examples for brevity */
+ for (i = 0; i < 2; i++) {
hwndRichEdit = new_richedit(parent);
/* Set selection with X to the URL */
Module: wine
Branch: master
Commit: d66c05ce1de614febd922ad507d586cf09e78b7c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d66c05ce1de614febd922ad50…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Thu Jul 10 13:38:35 2008 -0500
wined3d: Fix a copy and paste bug.
This happened to work because most cards have the same amount of
pshader and vshader constants, but for some reason this doesn't hold
true on this macbook pro here, which lead to a crash due to heap
corruption
---
dlls/wined3d/device.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 131e1b7..b3db3b7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -459,11 +459,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface,
object->changed.pixelShader = TRUE;
/* Pixel Shader Constants */
- for (i = 0; i < GL_LIMITS(vshader_constantsF); ++i) {
+ for (i = 0; i < GL_LIMITS(pshader_constantsF); ++i) {
object->contained_ps_consts_f[i] = i;
object->changed.pixelShaderConstantsF[i] = TRUE;
}
- object->num_contained_ps_consts_f = GL_LIMITS(vshader_constantsF);
+ object->num_contained_ps_consts_f = GL_LIMITS(pshader_constantsF);
for (i = 0; i < MAX_CONST_B; ++i) {
object->contained_ps_consts_b[i] = i;
object->changed.pixelShaderConstantsB[i] = TRUE;