winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
865 discussions
Start a n
N
ew thread
Jeff Smith : gdiplus: Fix GdipGetAllPropertyItems return value when no properties exist.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: b48a37f450ed17d45130ec56eddafd18b36a3187 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b48a37f450ed17d45130ec56eddafd…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Tue Jul 11 10:03:53 2023 -0500 gdiplus: Fix GdipGetAllPropertyItems return value when no properties exist. Discovered in researching
https://bugs.winehq.org/show_bug.cgi?id=54748
--- dlls/gdiplus/image.c | 2 +- dlls/gdiplus/tests/image.c | 52 +++++++++++++++++++++++----------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 7ad3ca0347e..4ba6b1efd95 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -2846,7 +2846,7 @@ GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage *image, UINT size, } reader = ((GpBitmap *)image)->metadata_reader; - if (!reader) return PropertyNotFound; + if (!reader) return GenericError; hr = IWICMetadataReader_GetEnumerator(reader, &enumerator); if (FAILED(hr)) return hresult_to_status(hr); diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index b718a6fca16..b5f86c7e1b9 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -3681,6 +3681,7 @@ static void test_image_properties(void) }; GpStatus status, expected; GpImage *image; + PropertyItem *prop_item; UINT prop_count, prop_size, i; PROPID prop_id[16] = { 0 }; ImageType image_type; @@ -3816,6 +3817,31 @@ static void test_image_properties(void) status = GdipGetPropertySize(image, &prop_size, &prop_count); expect(expected, status); + status = GdipGetAllPropertyItems(image, 0, 0, NULL); + expect(InvalidParameter, status); + status = GdipGetAllPropertyItems(image, prop_size, prop_count, NULL); + expect(InvalidParameter, status); + prop_item = HeapAlloc(GetProcessHeap(), 0, prop_size); + expected = (image_type == ImageTypeMetafile) ? NotImplemented : InvalidParameter; + if (prop_count != 1) + { + status = GdipGetAllPropertyItems(image, prop_size, 1, prop_item); + expect(expected, status); + } + if (prop_size != 0) + { + status = GdipGetAllPropertyItems(image, 0, prop_count, prop_item); + expect(expected, status); + } + status = GdipGetAllPropertyItems(image, prop_size + 1, prop_count, prop_item); + expect(expected, status); + if (image_type != ImageTypeMetafile) + expected = (prop_count == 0) ? GenericError : Ok; + status = GdipGetAllPropertyItems(image, prop_size, prop_count, prop_item); + ok(status == expected || broken(status == Ok && prop_count == 0), /* XP */ + "Expected %d, got %d\n", expected, status); + HeapFree(GetProcessHeap(), 0, prop_item); + GdipDisposeImage(image); winetest_pop_context(); @@ -4176,19 +4202,6 @@ static void test_GdipGetAllPropertyItems(void) "expected total property size %u, got %u\n", prop_size, total_size); prop_item = HeapAlloc(GetProcessHeap(), 0, prop_size); - - status = GdipGetAllPropertyItems(image, 0, prop_count, prop_item); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, prop_size, 1, prop_item); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, prop_size, prop_count, NULL); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, prop_size, prop_count, NULL); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, 0, 0, NULL); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, prop_size + 1, prop_count, prop_item); - expect(InvalidParameter, status); status = GdipGetAllPropertyItems(image, prop_size, prop_count, prop_item); expect(Ok, status); @@ -4932,19 +4945,6 @@ static void test_gif_properties(void) "expected total property size %u, got %u\n", prop_size, total_size); prop_item = HeapAlloc(GetProcessHeap(), 0, prop_size); - - status = GdipGetAllPropertyItems(image, 0, prop_count, prop_item); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, prop_size, 1, prop_item); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, prop_size, prop_count, NULL); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, prop_size, prop_count, NULL); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, 0, 0, NULL); - expect(InvalidParameter, status); - status = GdipGetAllPropertyItems(image, prop_size + 1, prop_count, prop_item); - expect(InvalidParameter, status); status = GdipGetAllPropertyItems(image, prop_size, prop_count, prop_item); expect(Ok, status);
1
0
0
0
Jeff Smith : gdiplus: Fix GdipGetPropertySize return value when no properties exist.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 1517342faccc841c4af4ed6230eb67ab81560a60 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1517342faccc841c4af4ed6230eb67…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Tue Jul 11 10:02:29 2023 -0500 gdiplus: Fix GdipGetPropertySize return value when no properties exist. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54748
--- dlls/gdiplus/image.c | 7 ++++++- dlls/gdiplus/tests/image.c | 28 ++++++++++++---------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 50a666c5bc9..7ad3ca0347e 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -2760,7 +2760,12 @@ GpStatus WINGDIPAPI GdipGetPropertySize(GpImage *image, UINT *size, UINT *count) } reader = ((GpBitmap *)image)->metadata_reader; - if (!reader) return PropertyNotFound; + if (!reader) + { + *count = 0; + *size = 0; + return Ok; + } hr = IWICMetadataReader_GetCount(reader, &prop_count); if (FAILED(hr)) return hresult_to_status(hr); diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index a2dcd448143..b718a6fca16 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -3804,6 +3804,18 @@ static void test_image_properties(void) "expected property id %#lx, got %#lx\n", prop_id[0], item.data.id); } + status = GdipGetPropertySize(NULL, &prop_size, &prop_count); + expect(InvalidParameter, status); + status = GdipGetPropertySize(image, &prop_size, NULL); + expect(InvalidParameter, status); + status = GdipGetPropertySize(image, NULL, &prop_count); + expect(InvalidParameter, status); + status = GdipGetPropertySize(image, NULL, NULL); + expect(InvalidParameter, status); + expected = (image_type == ImageTypeMetafile) ? NotImplemented : Ok; + status = GdipGetPropertySize(image, &prop_size, &prop_count); + expect(expected, status); + GdipDisposeImage(image); winetest_pop_context(); @@ -4154,14 +4166,6 @@ static void test_GdipGetAllPropertyItems(void) HeapFree(GetProcessHeap(), 0, prop_id); - status = GdipGetPropertySize(NULL, &total_size, &total_count); - expect(InvalidParameter, status); - status = GdipGetPropertySize(image, &total_size, NULL); - expect(InvalidParameter, status); - status = GdipGetPropertySize(image, NULL, &total_count); - expect(InvalidParameter, status); - status = GdipGetPropertySize(image, NULL, NULL); - expect(InvalidParameter, status); total_size = 0xdeadbeef; total_count = 0xdeadbeef; status = GdipGetPropertySize(image, &total_size, &total_count); @@ -4918,14 +4922,6 @@ static void test_gif_properties(void) HeapFree(GetProcessHeap(), 0, prop_id); - status = GdipGetPropertySize(NULL, &total_size, &total_count); - expect(InvalidParameter, status); - status = GdipGetPropertySize(image, &total_size, NULL); - expect(InvalidParameter, status); - status = GdipGetPropertySize(image, NULL, &total_count); - expect(InvalidParameter, status); - status = GdipGetPropertySize(image, NULL, NULL); - expect(InvalidParameter, status); total_size = 0xdeadbeef; total_count = 0xdeadbeef; status = GdipGetPropertySize(image, &total_size, &total_count);
1
0
0
0
Jeff Smith : gdiplus/tests: Pare down image property tests that are not run for Wine.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: d84210f00aac49ba478077e1885987072f6b5efd URL:
https://gitlab.winehq.org/wine/wine/-/commit/d84210f00aac49ba478077e1885987…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Jul 12 16:58:35 2023 -0500 gdiplus/tests: Pare down image property tests that are not run for Wine. --- dlls/gdiplus/tests/image.c | 102 ++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 61 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 27b60d740cd..a2dcd448143 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -3679,7 +3679,7 @@ static void test_image_properties(void) { gifimage, sizeof(gifimage), ImageTypeBitmap, 1, 4, 4, ~0, 0x5100, ~0, 16 }, { wmfimage, sizeof(wmfimage), ImageTypeMetafile, 0, ~0, 0, ~0, 0, ~0, -GenericError } }; - GpStatus status; + GpStatus status, expected; GpImage *image; UINT prop_count, prop_size, i; PROPID prop_id[16] = { 0 }; @@ -3750,78 +3750,58 @@ static void test_image_properties(void) else expect(PropertyNotFound, status); - /* FIXME: remove once Wine is fixed */ - if (!(td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count))) - { - GdipDisposeImage(image); - winetest_pop_context(); - continue; - } - status = GdipGetPropertyIdList(NULL, prop_count, prop_id); expect(InvalidParameter, status); status = GdipGetPropertyIdList(image, prop_count, NULL); expect(InvalidParameter, status); - status = GdipGetPropertyIdList(image, 0, prop_id); - if (image_type == ImageTypeMetafile) - expect(NotImplemented, status); - else if (prop_count == 0) - expect(Ok, status); - else - expect(InvalidParameter, status); + expected = (image_type == ImageTypeMetafile) ? NotImplemented : InvalidParameter; status = GdipGetPropertyIdList(image, prop_count - 1, prop_id); - if (image_type == ImageTypeMetafile) - expect(NotImplemented, status); - else - expect(InvalidParameter, status); + expect(expected, status); status = GdipGetPropertyIdList(image, prop_count + 1, prop_id); - if (image_type == ImageTypeMetafile) - expect(NotImplemented, status); - else - expect(InvalidParameter, status); + expect(expected, status); + if (image_type != ImageTypeMetafile && prop_count == 0) + expected = Ok; + status = GdipGetPropertyIdList(image, 0, prop_id); + expect(expected, status); + expected = (image_type == ImageTypeMetafile) ? NotImplemented : Ok; status = GdipGetPropertyIdList(image, prop_count, prop_id); + expect(expected, status); + + status = GdipGetPropertyItemSize(image, prop_id[0], &prop_size); if (image_type == ImageTypeMetafile) expect(NotImplemented, status); - else + else if (prop_count == 0) + expect(PropertyNotFound, status); + /* FIXME: remove condition once Wine is fixed, i.e. this should just be an else */ + else if (td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count)) { - expect(Ok, status); - if (prop_count != 0) - ok(td[i].prop_id == prop_id[0] || (td[i].prop_id2 != ~0 && td[i].prop_id2 == prop_id[0]), - "expected property id %#x or %#x, got %#lx\n", - td[i].prop_id, td[i].prop_id2, prop_id[0]); - } + ok(td[i].prop_id == prop_id[0] || (td[i].prop_id2 != ~0 && td[i].prop_id2 == prop_id[0]), + "expected property id %#x or %#x, got %#lx\n", + td[i].prop_id, td[i].prop_id2, prop_id[0]); - if (status == Ok) - { - status = GdipGetPropertyItemSize(image, prop_id[0], &prop_size); - if (prop_count == 0) - expect(PropertyNotFound, status); - else - { - expect(Ok, status); + expect(Ok, status); - assert(sizeof(item) >= prop_size); - ok(prop_size > sizeof(PropertyItem), "got too small prop_size %u\n", - prop_size); - ok(td[i].prop_size + sizeof(PropertyItem) == prop_size || - (td[i].prop_size2 != ~0 && td[i].prop_size2 + sizeof(PropertyItem) == prop_size), - "expected property size (%u or %u)+%u, got %u\n", - td[i].prop_size, td[i].prop_size2, (UINT) sizeof(PropertyItem), prop_size); - - status = GdipGetPropertyItem(image, prop_id[0], 0, &item.data); - ok(status == InvalidParameter || status == GenericError /* Win7 */, - "expected InvalidParameter, got %d\n", status); - status = GdipGetPropertyItem(image, prop_id[0], prop_size - 1, &item.data); - ok(status == InvalidParameter || status == GenericError /* Win7 */, - "expected InvalidParameter, got %d\n", status); - status = GdipGetPropertyItem(image, prop_id[0], prop_size + 1, &item.data); - ok(status == InvalidParameter || status == GenericError /* Win7 */, - "expected InvalidParameter, got %d\n", status); - status = GdipGetPropertyItem(image, prop_id[0], prop_size, &item.data); - expect(Ok, status); - ok(prop_id[0] == item.data.id, - "expected property id %#lx, got %#lx\n", prop_id[0], item.data.id); - } + assert(sizeof(item) >= prop_size); + ok(prop_size > sizeof(PropertyItem), "got too small prop_size %u\n", + prop_size); + ok(td[i].prop_size + sizeof(PropertyItem) == prop_size || + (td[i].prop_size2 != ~0 && td[i].prop_size2 + sizeof(PropertyItem) == prop_size), + "expected property size (%u or %u)+%u, got %u\n", + td[i].prop_size, td[i].prop_size2, (UINT) sizeof(PropertyItem), prop_size); + + status = GdipGetPropertyItem(image, prop_id[0], 0, &item.data); + ok(status == InvalidParameter || status == GenericError /* Win7 */, + "expected InvalidParameter, got %d\n", status); + status = GdipGetPropertyItem(image, prop_id[0], prop_size - 1, &item.data); + ok(status == InvalidParameter || status == GenericError /* Win7 */, + "expected InvalidParameter, got %d\n", status); + status = GdipGetPropertyItem(image, prop_id[0], prop_size + 1, &item.data); + ok(status == InvalidParameter || status == GenericError /* Win7 */, + "expected InvalidParameter, got %d\n", status); + status = GdipGetPropertyItem(image, prop_id[0], prop_size, &item.data); + expect(Ok, status); + ok(prop_id[0] == item.data.id, + "expected property id %#lx, got %#lx\n", prop_id[0], item.data.id); } GdipDisposeImage(image);
1
0
0
0
Jeff Smith : gdiplus/tests: Use test context for test ran in a loop.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 7c8a4c1ce864506038035bc372eeeb1e45c0503b URL:
https://gitlab.winehq.org/wine/wine/-/commit/7c8a4c1ce864506038035bc372eeeb…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Mon Jul 10 14:22:04 2023 -0500 gdiplus/tests: Use test context for test ran in a loop. --- dlls/gdiplus/tests/image.c | 52 ++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 256d834e50d..27b60d740cd 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -3693,39 +3693,42 @@ static void test_image_properties(void) for (i = 0; i < ARRAY_SIZE(td); i++) { + winetest_push_context("%u", i); + image = load_image(td[i].image_data, td[i].image_size, TRUE, FALSE); if (!image) { - trace("%u: failed to load image data\n", i); + trace("failed to load image data\n"); + winetest_pop_context(); continue; } status = GdipGetImageType(image, &image_type); - ok(status == Ok, "%u: GdipGetImageType error %d\n", i, status); - ok(td[i].image_type == image_type, "%u: expected image_type %d, got %d\n", - i, td[i].image_type, image_type); + ok(status == Ok, "GdipGetImageType error %d\n", status); + ok(td[i].image_type == image_type, "expected image_type %d, got %d\n", + td[i].image_type, image_type); palette_size = -1; status = GdipGetImagePaletteSize(image, &palette_size); if (td[i].palette_size >= 0) { - ok(status == Ok, "%u: GdipGetImagePaletteSize error %d\n", i, status); - ok(td[i].palette_size == palette_size, "%u: expected palette_size %d, got %d\n", - i, td[i].palette_size, palette_size); + ok(status == Ok, "GdipGetImagePaletteSize error %d\n", status); + ok(td[i].palette_size == palette_size, "expected palette_size %d, got %d\n", + td[i].palette_size, palette_size); } else { - ok(status == -td[i].palette_size, "%u: GdipGetImagePaletteSize returned %d\n", i, status); - ok(palette_size == 0, "%u: expected palette_size 0, got %d\n", - i, palette_size); + ok(status == -td[i].palette_size, "GdipGetImagePaletteSize returned %d\n", status); + ok(palette_size == 0, "expected palette_size 0, got %d\n", + palette_size); } status = GdipGetPropertyCount(image, &prop_count); - ok(status == Ok, "%u: GdipGetPropertyCount error %d\n", i, status); + ok(status == Ok, "GdipGetPropertyCount error %d\n", status); todo_wine_if(td[i].image_data == pngimage || td[i].image_data == jpgimage || td[i].image_data == gifimage) ok(td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count), - " %u: expected property count %u or %u, got %u\n", - i, td[i].prop_count, td[i].prop_count2, prop_count); + "expected property count %u or %u, got %u\n", + td[i].prop_count, td[i].prop_count2, prop_count); status = GdipGetPropertyItemSize(NULL, 0, &prop_size); expect(InvalidParameter, status); @@ -3751,6 +3754,7 @@ static void test_image_properties(void) if (!(td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count))) { GdipDisposeImage(image); + winetest_pop_context(); continue; } @@ -3783,8 +3787,8 @@ static void test_image_properties(void) expect(Ok, status); if (prop_count != 0) ok(td[i].prop_id == prop_id[0] || (td[i].prop_id2 != ~0 && td[i].prop_id2 == prop_id[0]), - " %u: expected property id %#x or %#x, got %#lx\n", - i, td[i].prop_id, td[i].prop_id2, prop_id[0]); + "expected property id %#x or %#x, got %#lx\n", + td[i].prop_id, td[i].prop_id2, prop_id[0]); } if (status == Ok) @@ -3797,30 +3801,32 @@ static void test_image_properties(void) expect(Ok, status); assert(sizeof(item) >= prop_size); - ok(prop_size > sizeof(PropertyItem), "%u: got too small prop_size %u\n", - i, prop_size); + ok(prop_size > sizeof(PropertyItem), "got too small prop_size %u\n", + prop_size); ok(td[i].prop_size + sizeof(PropertyItem) == prop_size || (td[i].prop_size2 != ~0 && td[i].prop_size2 + sizeof(PropertyItem) == prop_size), - " %u: expected property size (%u or %u)+%u, got %u\n", - i, td[i].prop_size, td[i].prop_size2, (UINT) sizeof(PropertyItem), prop_size); + "expected property size (%u or %u)+%u, got %u\n", + td[i].prop_size, td[i].prop_size2, (UINT) sizeof(PropertyItem), prop_size); status = GdipGetPropertyItem(image, prop_id[0], 0, &item.data); ok(status == InvalidParameter || status == GenericError /* Win7 */, - "%u: expected InvalidParameter, got %d\n", i, status); + "expected InvalidParameter, got %d\n", status); status = GdipGetPropertyItem(image, prop_id[0], prop_size - 1, &item.data); ok(status == InvalidParameter || status == GenericError /* Win7 */, - "%u: expected InvalidParameter, got %d\n", i, status); + "expected InvalidParameter, got %d\n", status); status = GdipGetPropertyItem(image, prop_id[0], prop_size + 1, &item.data); ok(status == InvalidParameter || status == GenericError /* Win7 */, - "%u: expected InvalidParameter, got %d\n", i, status); + "expected InvalidParameter, got %d\n", status); status = GdipGetPropertyItem(image, prop_id[0], prop_size, &item.data); expect(Ok, status); ok(prop_id[0] == item.data.id, - "%u: expected property id %#lx, got %#lx\n", i, prop_id[0], item.data.id); + "expected property id %#lx, got %#lx\n", prop_id[0], item.data.id); } } GdipDisposeImage(image); + + winetest_pop_context(); } }
1
0
0
0
Jeff Smith : gdiplus/tests: Add GIF to image properties tests.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 95be1044435efe2e737fcadd3780dc05e6162866 URL:
https://gitlab.winehq.org/wine/wine/-/commit/95be1044435efe2e737fcadd3780dc…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Jul 12 12:27:56 2023 -0500 gdiplus/tests: Add GIF to image properties tests. --- dlls/gdiplus/tests/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 00bfd937dad..256d834e50d 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -3676,6 +3676,7 @@ static void test_image_properties(void) { jpgimage, sizeof(jpgimage), ImageTypeBitmap, 2, ~0, 128, ~0, 0x5090, 0x5091, 12 }, { tiffimage, sizeof(tiffimage), ImageTypeBitmap, 16, ~0, 4, ~0, 0xfe, ~0, 12 }, { bmpimage, sizeof(bmpimage), ImageTypeBitmap, 0, ~0, 0, ~0, 0, ~0, 16 }, + { gifimage, sizeof(gifimage), ImageTypeBitmap, 1, 4, 4, ~0, 0x5100, ~0, 16 }, { wmfimage, sizeof(wmfimage), ImageTypeMetafile, 0, ~0, 0, ~0, 0, ~0, -GenericError } }; GpStatus status; @@ -3721,7 +3722,7 @@ static void test_image_properties(void) status = GdipGetPropertyCount(image, &prop_count); ok(status == Ok, "%u: GdipGetPropertyCount error %d\n", i, status); - todo_wine_if(td[i].image_data == pngimage || td[i].image_data == jpgimage) + todo_wine_if(td[i].image_data == pngimage || td[i].image_data == jpgimage || td[i].image_data == gifimage) ok(td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count), " %u: expected property count %u or %u, got %u\n", i, td[i].prop_count, td[i].prop_count2, prop_count);
1
0
0
0
Jeff Smith : gdiplus/tests: Use consistent no-alternate value for image properties.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 211d538d358c5940f73ff457ba8e476a0a1d2164 URL:
https://gitlab.winehq.org/wine/wine/-/commit/211d538d358c5940f73ff457ba8e47…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Jul 12 11:19:38 2023 -0500 gdiplus/tests: Use consistent no-alternate value for image properties. --- dlls/gdiplus/tests/image.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 41a5441a199..00bfd937dad 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -3662,21 +3662,21 @@ static void test_image_properties(void) UINT image_size; ImageType image_type; UINT prop_count; - UINT prop_count2; /* if win7 behaves differently */ + UINT prop_count2; /* if win7+ behaves differently, else ~0 */ /* 1st property attributes */ UINT prop_size; - UINT prop_size2; /* if win7 behaves differently */ + UINT prop_size2; /* if win7+ behaves differently, else ~0 */ UINT prop_id; - UINT prop_id2; /* if win7 behaves differently */ + UINT prop_id2; /* if win7+ behaves differently, else ~0 */ INT palette_size; } td[] = { { pngimage, sizeof(pngimage), ImageTypeBitmap, 4, ~0, 1, 20, 0x5110, 0x132, 12 }, - { jpgimage, sizeof(jpgimage), ImageTypeBitmap, 2, ~0, 128, 0, 0x5090, 0x5091, 12 }, - { tiffimage, sizeof(tiffimage), ImageTypeBitmap, 16, 0, 4, 0, 0xfe, 0, 12 }, - { bmpimage, sizeof(bmpimage), ImageTypeBitmap, 0, 0, 0, 0, 0, 0, 16 }, - { wmfimage, sizeof(wmfimage), ImageTypeMetafile, 0, 0, 0, 0, 0, 0, -GenericError } + { jpgimage, sizeof(jpgimage), ImageTypeBitmap, 2, ~0, 128, ~0, 0x5090, 0x5091, 12 }, + { tiffimage, sizeof(tiffimage), ImageTypeBitmap, 16, ~0, 4, ~0, 0xfe, ~0, 12 }, + { bmpimage, sizeof(bmpimage), ImageTypeBitmap, 0, ~0, 0, ~0, 0, ~0, 16 }, + { wmfimage, sizeof(wmfimage), ImageTypeMetafile, 0, ~0, 0, ~0, 0, ~0, -GenericError } }; GpStatus status; GpImage *image; @@ -3722,7 +3722,7 @@ static void test_image_properties(void) status = GdipGetPropertyCount(image, &prop_count); ok(status == Ok, "%u: GdipGetPropertyCount error %d\n", i, status); todo_wine_if(td[i].image_data == pngimage || td[i].image_data == jpgimage) - ok(td[i].prop_count == prop_count || td[i].prop_count2 == prop_count, + ok(td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count), " %u: expected property count %u or %u, got %u\n", i, td[i].prop_count, td[i].prop_count2, prop_count); @@ -3747,7 +3747,7 @@ static void test_image_properties(void) expect(PropertyNotFound, status); /* FIXME: remove once Wine is fixed */ - if (td[i].prop_count != prop_count) + if (!(td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count))) { GdipDisposeImage(image); continue; @@ -3781,7 +3781,7 @@ static void test_image_properties(void) { expect(Ok, status); if (prop_count != 0) - ok(td[i].prop_id == prop_id[0] || td[i].prop_id2 == prop_id[0], + ok(td[i].prop_id == prop_id[0] || (td[i].prop_id2 != ~0 && td[i].prop_id2 == prop_id[0]), " %u: expected property id %#x or %#x, got %#lx\n", i, td[i].prop_id, td[i].prop_id2, prop_id[0]); } @@ -3799,9 +3799,9 @@ static void test_image_properties(void) ok(prop_size > sizeof(PropertyItem), "%u: got too small prop_size %u\n", i, prop_size); ok(td[i].prop_size + sizeof(PropertyItem) == prop_size || - td[i].prop_size2 + sizeof(PropertyItem) == prop_size, - " %u: expected property size %u or %u, got %u\n", - i, td[i].prop_size, td[i].prop_size2, prop_size); + (td[i].prop_size2 != ~0 && td[i].prop_size2 + sizeof(PropertyItem) == prop_size), + " %u: expected property size (%u or %u)+%u, got %u\n", + i, td[i].prop_size, td[i].prop_size2, (UINT) sizeof(PropertyItem), prop_size); status = GdipGetPropertyItem(image, prop_id[0], 0, &item.data); ok(status == InvalidParameter || status == GenericError /* Win7 */,
1
0
0
0
Billy Laws : ntdll/tests: Test that NtContinue restores all register state on arm64.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 1ed5dd7e8a0d5ff020981f22c0fa4999fe803e5b URL:
https://gitlab.winehq.org/wine/wine/-/commit/1ed5dd7e8a0d5ff020981f22c0fa49…
Author: Billy Laws <blaws05(a)gmail.com> Date: Sun Jul 16 16:02:17 2023 +0100 ntdll/tests: Test that NtContinue restores all register state on arm64. --- dlls/ntdll/tests/exception.c | 122 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index f2ba16f4bae..ed3939e9c04 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -8066,6 +8066,127 @@ static void test_debug_service(DWORD numexc) /* not supported */ } +static void test_continue(void) +{ + struct context_pair { + CONTEXT before; + CONTEXT after; + } contexts; + unsigned int i; + NTSTATUS (*func_ptr)( struct context_pair *, BOOL alertable, void *continue_func, void *capture_func ) = code_mem; + + static const DWORD call_func[] = + { + 0xa9bd7bfd, /* stp x29, x30, [sp, #-0x30]! */ + /* stash volatile registers before calling capture */ + 0xa90107e0, /* stp x0, x1, [sp, #0x10] */ + 0xa9020fe2, /* stp x2, x3, [sp, #0x20] */ + 0xd63f0060, /* blr x3 * capture context from before NtContinue to contexts->before */ + 0xa9420fe2, /* ldp x2, x3, [sp, #0x20] */ + 0xa94107e0, /* ldp x0, x1, [sp, #0x10] */ + /* overwrite the contents of x4...k28 with a dummy value */ + 0xd297dde4, /* mov x4, #0xbeef */ + 0xf2bbd5a4, /* movk x4, #0xdead, lsl #16 */ + 0xaa048084, /* orr x4, x4, x4, lsl #32 */ + 0xaa0403e5, /* mov x5, x4 */ + 0xaa0403e6, /* mov x6, x4 */ + 0xaa0403e7, /* mov x7, x4 */ + 0xaa0403e8, /* mov x8, x4 */ + 0xaa0403e9, /* mov x9, x4 */ + 0xaa0403ea, /* mov x10, x4 */ + 0xaa0403eb, /* mov x11, x4 */ + 0xaa0403ec, /* mov x12, x4 */ + 0xaa0403ed, /* mov x13, x4 */ + 0xaa0403ee, /* mov x14, x4 */ + 0xaa0403ef, /* mov x15, x4 */ + 0xaa0403f0, /* mov x16, x4 */ + 0xaa0403f1, /* mov x17, x4 */ + /* avoid overwriting the TEB in x18 */ + 0xaa0403f3, /* mov x19, x4 */ + 0xaa0403f4, /* mov x20, x4 */ + 0xaa0403f5, /* mov x21, x4 */ + 0xaa0403f6, /* mov x22, x4 */ + 0xaa0403f7, /* mov x23, x4 */ + 0xaa0403f8, /* mov x24, x4 */ + 0xaa0403f9, /* mov x25, x4 */ + 0xaa0403fa, /* mov x26, x4 */ + 0xaa0403fb, /* mov x27, x4 */ + 0xaa0403fc, /* mov x28, x4 */ + /* overwrite the contents all vector registers a dummy value */ + 0x4e080c80, /* dup v0.2d, x4 */ + 0x4ea01c01, /* mov v1.2d, v0.2d */ + 0x4ea01c02, /* mov v2.2d, v0.2d */ + 0x4ea01c03, /* mov v3.2d, v0.2d */ + 0x4ea01c04, /* mov v4.2d, v0.2d */ + 0x4ea01c05, /* mov v5.2d, v0.2d */ + 0x4ea01c06, /* mov v6.2d, v0.2d */ + 0x4ea01c07, /* mov v7.2d, v0.2d */ + 0x4ea01c08, /* mov v8.2d, v0.2d */ + 0x4ea01c09, /* mov v9.2d, v0.2d */ + 0x4ea01c0a, /* mov v10.2d, v0.2d */ + 0x4ea01c0b, /* mov v11.2d, v0.2d */ + 0x4ea01c0c, /* mov v12.2d, v0.2d */ + 0x4ea01c0d, /* mov v13.2d, v0.2d */ + 0x4ea01c0e, /* mov v14.2d, v0.2d */ + 0x4ea01c0f, /* mov v15.2d, v0.2d */ + 0x4ea01c10, /* mov v16.2d, v0.2d */ + 0x4ea01c11, /* mov v17.2d, v0.2d */ + 0x4ea01c12, /* mov v18.2d, v0.2d */ + 0x4ea01c13, /* mov v19.2d, v0.2d */ + 0x4ea01c14, /* mov v20.2d, v0.2d */ + 0x4ea01c15, /* mov v21.2d, v0.2d */ + 0x4ea01c16, /* mov v22.2d, v0.2d */ + 0x4ea01c17, /* mov v23.2d, v0.2d */ + 0x4ea01c18, /* mov v24.2d, v0.2d */ + 0x4ea01c19, /* mov v25.2d, v0.2d */ + 0x4ea01c1a, /* mov v26.2d, v0.2d */ + 0x4ea01c1b, /* mov v27.2d, v0.2d */ + 0x4ea01c1c, /* mov v28.2d, v0.2d */ + 0x4ea01c1d, /* mov v29.2d, v0.2d */ + 0x4ea01c1e, /* mov v30.2d, v0.2d */ + 0x4ea01c1f, /* mov v31.2d, v0.2d */ + 0xd51b441f, /* msr fpcr, xzr */ + 0xd51b443f, /* msr fpsr, xzr */ + /* setup the control context so execution continues from label 1 */ + 0x10000064, /* adr x4, #0xc */ + 0xf9008404, /* str x4, [x0, #0x108] */ + 0xd63f0040, /* blr x2 * restore the captured integer and floating point context */ + 0xf94017e3, /* 1: ldr x3, [sp, #0x28] */ + 0xf9400be0, /* ldr x0, [sp, #0x10] */ + 0x910e4000, /* add x0, x0, #0x390 * adjust contexts to point to contexts->after */ + 0xd63f0060, /* blr x3 * capture context from after NtContinue to contexts->after */ + 0xa8c37bfd, /* ldp x29, x30, [sp], #0x30 */ + 0xd65f03c0, /* ret */ + }; + + if (!pRtlCaptureContext) + { + win_skip("RtlCaptureContext is not available.\n"); + return; + } + + memcpy( func_ptr, call_func, sizeof(call_func) ); + FlushInstructionCache( GetCurrentProcess(), func_ptr, sizeof(call_func) ); + +#define COMPARE(reg) \ + ok( contexts.before.reg == contexts.after.reg, "wrong " #reg " %p/%p\n", (void *)(ULONG64)contexts.before.reg, (void *)(ULONG64)contexts.after.reg ) +#define COMPARE_INDEXED(reg) \ + ok( contexts.before.reg == contexts.after.reg, "wrong " #reg " i: %u, %p/%p\n", i, (void *)(ULONG64)contexts.before.reg, (void *)(ULONG64)contexts.after.reg ) + + func_ptr( &contexts, FALSE, NtContinue, pRtlCaptureContext ); + + for (i = 1; i < 29; i++) COMPARE_INDEXED( X[i] ); + + COMPARE( Fpcr ); + COMPARE( Fpsr ); + + for (i = 0; i < 32; i++) + { + COMPARE_INDEXED( V[i].Low ); + COMPARE_INDEXED( V[i].High ); + } +#undef COMPARE +} #endif /* __aarch64__ */ #if defined(__i386__) || defined(__x86_64__) @@ -11076,6 +11197,7 @@ START_TEST(exception) #elif defined(__aarch64__) + test_continue(); test_virtual_unwind(); #elif defined(__arm__)
1
0
0
0
Alistair Leslie-Hughes : d3drm/tests: Show that viewport::render does not clear the background.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: fb49ae52d55ca06770d3a66aa0def34326f6c0a1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fb49ae52d55ca06770d3a66aa0def3…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Jul 18 07:24:36 2022 +1000 d3drm/tests: Show that viewport::render does not clear the background. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/d3drm/tests/d3drm.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index a65a03c5b49..1dfddc25a64 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -7122,6 +7122,15 @@ static void test_viewport_clear1(void) ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color); CHECK_REFCOUNT(frame1, 1); + hr = IDirect3DRMFrame_SetSceneBackgroundRGB(frame1, 0.5f, 0.5f, 0.5f); + ok(SUCCEEDED(hr), "Cannot set scene background RGB, hr %#lx\n", hr); + + hr = IDirect3DRMViewport_Render(viewport1, frame1); + ok(SUCCEEDED(hr), "Cannot Render, hr %#lx\n", hr); + + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color); + hr = IDirect3DRMFrame_SetSceneBackgroundRGB(frame1, 0.0f, 0.0f, 1.0f); ok(SUCCEEDED(hr), "Cannot set scene background RGB, hr %#lx\n", hr); ret_color = IDirect3DRMFrame_GetSceneBackground(frame1); @@ -7327,6 +7336,18 @@ static void test_viewport_clear2(void) ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color); CHECK_REFCOUNT(frame3, 1); + hr = IDirect3DRMFrame3_SetSceneBackgroundRGB(frame3, 0.5f, 0.5f, 0.5f); + ok(SUCCEEDED(hr), "Cannot set scene background RGB, hr %#lx\n", hr); + + hr = IDirect3DRMViewport2_Render(viewport2, frame3); + ok(SUCCEEDED(hr), "Cannot Render, hr %#lx\n", hr); + + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color); + + hr = IDirect3DRMFrame3_SetSceneBackgroundRGB(frame3, 1.0f, 1.0f, 1.0f); + ok(SUCCEEDED(hr), "Cannot set scene background RGB, hr %#lx\n", hr); + hr = IDirect3DRMViewport2_GetDirect3DViewport(viewport2, &d3d_viewport); ok(SUCCEEDED(hr), "Cannot get IDirect3DViewport interface, hr %#lx.\n", hr);
1
0
0
0
Alex Henrie : webservices/tests: Use WS_STRING_VALUE and WS_XML_STRING_VALUE.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 17b212a5c2db6281c63192e1ab4b30e7bf3c948c URL:
https://gitlab.winehq.org/wine/wine/-/commit/17b212a5c2db6281c63192e1ab4b30…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Jul 17 22:56:55 2023 -0600 webservices/tests: Use WS_STRING_VALUE and WS_XML_STRING_VALUE. --- dlls/webservices/tests/channel.c | 2 +- dlls/webservices/tests/msg.c | 4 ++-- dlls/webservices/tests/proxy.c | 22 +++++++++++----------- dlls/webservices/tests/reader.c | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/webservices/tests/channel.c b/dlls/webservices/tests/channel.c index 7e0a9becbc5..4cf39c10732 100644 --- a/dlls/webservices/tests/channel.c +++ b/dlls/webservices/tests/channel.c @@ -403,7 +403,7 @@ static void test_WsCreateChannelForListener(void) static void test_WsResetListener(void) { - WS_STRING url = { ARRAY_SIZE( L"net.tcp://+:2017/path" ) - 1, (WCHAR *)L"net.tcp://+:2017/path" }; + static const WS_STRING url = WS_STRING_VALUE( L"net.tcp://+:2017/path" ); WS_LISTENER *listener; WS_LISTENER_STATE state; WS_LISTENER_PROPERTY prop; diff --git a/dlls/webservices/tests/msg.c b/dlls/webservices/tests/msg.c index b1c0237dc3f..bf9c700a931 100644 --- a/dlls/webservices/tests/msg.c +++ b/dlls/webservices/tests/msg.c @@ -1206,8 +1206,8 @@ static void test_WsReadBody(void) "<s:Envelope xmlns:s=\"
http://schemas.xmlsoap.org/soap/envelope/\
"><s:Body>" "<s:Fault><faultcode>s:Client</faultcode><faultstring>OLS Exception</faultstring></s:Fault>" "</s:Body></s:Envelope>"; - static const WS_XML_STRING faultcode = { 6, (BYTE *)"Client" }; - static const WS_STRING faultstring = { 13, (WCHAR *)L"OLS Exception" }; + static const WS_XML_STRING faultcode = WS_XML_STRING_VALUE( "Client" ); + static const WS_STRING faultstring = WS_STRING_VALUE( L"OLS Exception" ); WS_HEAP *heap; WS_MESSAGE *msg, *msg2, *msg3; WS_XML_READER *reader; diff --git a/dlls/webservices/tests/proxy.c b/dlls/webservices/tests/proxy.c index 59d571fb5c3..89046acd859 100644 --- a/dlls/webservices/tests/proxy.c +++ b/dlls/webservices/tests/proxy.c @@ -812,17 +812,17 @@ static const char resp_test5[] = static void test_fault_response( int port ) { - WS_XML_STRING faultcode = {6, (BYTE *)"Client"}; - WS_STRING faultstring = {13, (WCHAR *)L"OLS Exception"}; - WS_XML_STRING req = {3, (BYTE *)"req"}; - WS_XML_STRING resp = {4, (BYTE *)"resp"}; - WS_XML_STRING req_action = {9, (BYTE *)"req_test5"}; - WS_XML_STRING resp_action = {10, (BYTE *)"resp_test5"}; - WS_XML_STRING req_elem = {9, (BYTE *)"req_test5"}; - WS_XML_STRING resp_elem = {10, (BYTE *)"resp_test5"}; - WS_XML_STRING ns = {2, (BYTE *)"ns"}; - WS_XML_STRING ns2 = {0, (BYTE *)""}; - WS_XML_STRING val = {3, (BYTE *)"val"}; + static const WS_XML_STRING faultcode = WS_XML_STRING_VALUE( "Client" ); + static const WS_STRING faultstring = WS_STRING_VALUE( L"OLS Exception" ); + WS_XML_STRING req = WS_XML_STRING_VALUE( "req" ); + WS_XML_STRING resp = WS_XML_STRING_VALUE( "resp" ); + WS_XML_STRING req_action = WS_XML_STRING_VALUE( "req_test5" ); + WS_XML_STRING resp_action = WS_XML_STRING_VALUE( "resp_test5" ); + WS_XML_STRING req_elem = WS_XML_STRING_VALUE( "req_test5" ); + WS_XML_STRING resp_elem = WS_XML_STRING_VALUE( "resp_test5" ); + WS_XML_STRING ns = WS_XML_STRING_VALUE( "ns" ); + WS_XML_STRING ns2 = WS_XML_STRING_VALUE( "" ); + WS_XML_STRING val = WS_XML_STRING_VALUE( "val" ); HRESULT hr; WS_SERVICE_PROXY *proxy; WS_FIELD_DESCRIPTION f, *fields[1]; diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c index 64acc4fcfc0..3f83c66d962 100644 --- a/dlls/webservices/tests/reader.c +++ b/dlls/webservices/tests/reader.c @@ -7144,11 +7144,11 @@ static void test_description_type(void) static void test_WsAddErrorString(void) { + static const WS_STRING emptystr = { 0 }; + static const WS_STRING str1 = WS_STRING_VALUE( L"str1" ); + static const WS_STRING str2 = WS_STRING_VALUE( L"str2" ); ULONG count; WS_ERROR *error; - WS_STRING emptystr = { 0 }; - WS_STRING str1 = { 4, (WCHAR *) L"str1" }; - WS_STRING str2 = { 4, (WCHAR *) L"str2" }; WS_STRING out; HRESULT hr;
1
0
0
0
Alex Henrie : include: Add WS_STRING_VALUE and WS_XML_STRING_VALUE.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 18daf628d5ebe13bbe0567644b8d1ed41b981386 URL:
https://gitlab.winehq.org/wine/wine/-/commit/18daf628d5ebe13bbe0567644b8d1e…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Jul 17 22:56:55 2023 -0600 include: Add WS_STRING_VALUE and WS_XML_STRING_VALUE. --- include/webservices.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/webservices.h b/include/webservices.h index 542670967c0..7784ee31df0 100644 --- a/include/webservices.h +++ b/include/webservices.h @@ -1879,6 +1879,9 @@ HRESULT WINAPI WsXmlStringEquals(const WS_XML_STRING*, const WS_XML_STRING*, WS_ #define WS_E_SECURITY_TOKEN_EXPIRED 0x803d0022 #define WS_E_SECURITY_SYSTEM_FAILURE 0x803d0023 +#define WS_STRING_VALUE(s) { sizeof(s) / sizeof((s)[0]) - 1, (WCHAR *)(s) } +#define WS_XML_STRING_VALUE(s) { sizeof(s) - 1, (BYTE *)(s) } + #ifdef __cplusplus } #endif /* __cplusplus */
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200