ReactOS.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
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
List overview
Download
Ros-diffs
December 2009
----- 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
ros-diffs@reactos.org
22 participants
501 discussions
Start a n
N
ew thread
[gschneider] 44712: [win32k] - Add support for DIBINDEX, PALETTERGB, PALETTEINDEX macros in SetPixel(V) - Before it did just take every COLORREF as a RGB color, while it could also mean (dib-)palette indices - Fixes several gdi32 bitmap winetests (depending on bit depth between 2 and ~500), 2 palette tests and some palette drawing issues - One problem with palette indices remains in true color bit modes (see bitmap test)
by gschneider@svn.reactos.org
Author: gschneider Date: Tue Dec 22 17:17:44 2009 New Revision: 44712 URL:
http://svn.reactos.org/svn/reactos?rev=44712&view=rev
Log: [win32k] - Add support for DIBINDEX, PALETTERGB, PALETTEINDEX macros in SetPixel(V) - Before it did just take every COLORREF as a RGB color, while it could also mean (dib-)palette indices - Fixes several gdi32 bitmap winetests (depending on bit depth between 2 and ~500), 2 palette tests and some palette drawing issues - One problem with palette indices remains in true color bit modes (see bitmap test) Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Tue Dec 22 17:17:44 2009 @@ -16,7 +16,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ */ #include <w32k.h> @@ -656,6 +655,53 @@ return Ret; } +VOID IntHandleSpecialColorType(HDC hDC, COLORREF* Color) +{ + PDC pdc = NULL; + RGBQUAD quad; + PALETTEENTRY palEntry; + UINT index; + + switch (*Color >> 24) + { + case 0x10: /* DIBINDEX */ + if (IntGetDIBColorTable(hDC, LOWORD(*Color), 1, &quad) == 1) + { + *Color = RGB(quad.rgbRed, quad.rgbGreen, quad.rgbBlue); + } + else + { + /* Out of color table bounds - use black */ + *Color = RGB(0, 0, 0); + } + break; + case 0x02: /* PALETTERGB */ + pdc = DC_LockDc(hDC); + index = NtGdiGetNearestPaletteIndex(pdc->dclevel.hpal, *Color); + if (IntGetPaletteEntries(pdc->dclevel.hpal, index, 1, &palEntry) == 1) + { + *Color = RGB(palEntry.peRed, palEntry.peGreen, palEntry.peBlue); + } + else + { + DPRINT1("no wai!\n"); + } + DC_UnlockDc(pdc); + break; + case 0x01: /* PALETTEINDEX */ + pdc = DC_LockDc(hDC); + if (IntGetPaletteEntries(pdc->dclevel.hpal, LOWORD(*Color), 1, &palEntry) == 1) + { + *Color = RGB(palEntry.peRed, palEntry.peGreen, palEntry.peBlue); + } + DC_UnlockDc(pdc); + break; + default: + DPRINT("Unsupported color type %d passed\n", *Color >> 24); + break; + } +} + BOOL APIENTRY GdiSetPixelV( HDC hDC, @@ -663,22 +709,28 @@ INT Y, COLORREF Color) { - HBRUSH hbrush = NtGdiCreateSolidBrush(Color, NULL); + HBRUSH hBrush; HGDIOBJ OldBrush; - if (hbrush == NULL) - return(FALSE); - - OldBrush = NtGdiSelectBrush(hDC, hbrush); + if ((Color & 0xFF000000) != 0) + { + IntHandleSpecialColorType(hDC, &Color); + } + + hBrush = NtGdiCreateSolidBrush(Color, NULL); + if (hBrush == NULL) + return FALSE; + + OldBrush = NtGdiSelectBrush(hDC, hBrush); if (OldBrush == NULL) { - GreDeleteObject(hbrush); - return(FALSE); + GreDeleteObject(hBrush); + return FALSE; } NtGdiPatBlt(hDC, X, Y, 1, 1, PATCOPY); NtGdiSelectBrush(hDC, OldBrush); - GreDeleteObject(hbrush); + GreDeleteObject(hBrush); return TRUE; }
15 years
1
0
0
0
[gschneider] 44711: [win32k] Remove palette flag validation for get/setPaletteEntries
by gschneider@svn.reactos.org
Author: gschneider Date: Tue Dec 22 17:02:49 2009 New Revision: 44711 URL:
http://svn.reactos.org/svn/reactos?rev=44711&view=rev
Log: [win32k] Remove palette flag validation for get/setPaletteEntries Modified: trunk/reactos/subsystems/win32/win32k/objects/palette.c Modified: trunk/reactos/subsystems/win32/win32k/objects/palette.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/palette.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/palette.c [iso-8859-1] Tue Dec 22 17:02:49 2009 @@ -847,13 +847,6 @@ return 0; } memcpy(pe, palGDI->IndexedColors + StartIndex, Entries * sizeof(PALETTEENTRY)); - for (numEntries = 0; numEntries < Entries; numEntries++) - { - if (pe[numEntries].peFlags & 0xF0) - { - pe[numEntries].peFlags = 0; - } - } } else { @@ -959,7 +952,6 @@ Entries = numEntries - Start; } memcpy(palGDI->IndexedColors + Start, pe, Entries * sizeof(PALETTEENTRY)); - PALETTE_ValidateFlags(palGDI->IndexedColors, palGDI->NumColors); PALETTE_UnlockPalette(palGDI); return Entries;
15 years
1
0
0
0
[cwittich] 44710: sync netapi32_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:51:26 2009 New Revision: 44710 URL:
http://svn.reactos.org/svn/reactos?rev=44710&view=rev
Log: sync netapi32_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/netapi32/apibuf.c Modified: trunk/rostests/winetests/netapi32/apibuf.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/netapi32/apibuf…
============================================================================== --- trunk/rostests/winetests/netapi32/apibuf.c [iso-8859-1] (original) +++ trunk/rostests/winetests/netapi32/apibuf.c [iso-8859-1] Tue Dec 22 12:51:26 2009 @@ -59,6 +59,8 @@ /* border reallocate cases */ ok(pNetApiBufferReallocate(0, 1500, &p) == NERR_Success, "Reallocate with OldBuffer = NULL failed\n"); ok(p != NULL, "No memory got allocated\n"); + ok(pNetApiBufferFree(p) == NERR_Success, "NetApiBufferFree failed\n"); + ok(pNetApiBufferAllocate(1024, &p) == NERR_Success, "Memory not reserved\n"); ok(pNetApiBufferReallocate(p, 0, &p) == NERR_Success, "Not freed\n"); ok(p == NULL, "Pointer not cleared\n");
15 years
1
0
0
0
[cwittich] 44709: sync msvcrtd_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:50:11 2009 New Revision: 44709 URL:
http://svn.reactos.org/svn/reactos?rev=44709&view=rev
Log: sync msvcrtd_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/msvcrtd/debug.c Modified: trunk/rostests/winetests/msvcrtd/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrtd/debug.c…
============================================================================== --- trunk/rostests/winetests/msvcrtd/debug.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrtd/debug.c [iso-8859-1] Tue Dec 22 12:50:11 2009 @@ -30,7 +30,7 @@ /**********************************************************************/ -static void * (*pMSVCRTD_operator_new_dbg)(unsigned long, int, const char *, int) = NULL; +static void * (__cdecl *pMSVCRTD_operator_new_dbg)(size_t, int, const char *, int) = NULL; /* Some exports are only available in later versions */ #define SETNOFAIL(x,y) x = (void*)GetProcAddress(hModule,y)
15 years
1
0
0
0
[cwittich] 44708: sync msacm32_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:48:05 2009 New Revision: 44708 URL:
http://svn.reactos.org/svn/reactos?rev=44708&view=rev
Log: sync msacm32_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/msacm32/msacm.c Modified: trunk/rostests/winetests/msacm32/msacm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msacm32/msacm.c…
============================================================================== --- trunk/rostests/winetests/msacm32/msacm.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msacm32/msacm.c [iso-8859-1] Tue Dec 22 12:48:05 2009 @@ -94,7 +94,7 @@ /* MSDN says this should fail but it doesn't in practice */ dd.cbStruct = 4; rc = acmDriverDetails(hadid, &dd, 0); - ok(rc == MMSYSERR_NOERROR, + ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NOTSUPPORTED, "acmDriverDetails(): rc = %08x, should be %08x\n", rc, MMSYSERR_NOERROR); @@ -119,17 +119,16 @@ /* try valid parameters */ rc = acmDriverDetails(hadid, &dd, 0); - ok(rc == MMSYSERR_NOERROR, + ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NOTSUPPORTED, "acmDriverDetails(): rc = %08x, should be %08x\n", rc, MMSYSERR_NOERROR); /* cbStruct should contain size of returned data (at most sizeof(dd)) TODO: should it be *exactly* sizeof(dd), as tested here? */ - if (rc == MMSYSERR_NOERROR) { + if (rc == MMSYSERR_NOERROR) { ok(dd.cbStruct == sizeof(dd), - "acmDriverDetails(): cbStruct = %08x, should be %08lx\n", - dd.cbStruct, (unsigned long)sizeof(dd)); + "acmDriverDetails(): cbStruct = %08x\n", dd.cbStruct); } if (rc == MMSYSERR_NOERROR && winetest_interactive) { @@ -210,7 +209,7 @@ /* try valid parameters */ rc = acmDriverOpen(&had, hadid, 0); - ok(rc == MMSYSERR_NOERROR, + ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NODRIVER, "acmDriverOpen(): rc = %08x, should be %08x\n", rc, MMSYSERR_NOERROR);
15 years
1
0
0
0
[cwittich] 44707: sync msvcrt_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:46:36 2009 New Revision: 44707 URL:
http://svn.reactos.org/svn/reactos?rev=44707&view=rev
Log: sync msvcrt_winetest with wine 1.1.35 Added: trunk/rostests/winetests/msvcrt/signal.c (with props) Modified: trunk/rostests/winetests/msvcrt/cpp.c trunk/rostests/winetests/msvcrt/file.c trunk/rostests/winetests/msvcrt/msvcrt.rbuild trunk/rostests/winetests/msvcrt/string.c trunk/rostests/winetests/msvcrt/testlist.c Modified: trunk/rostests/winetests/msvcrt/cpp.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/cpp.c?re…
============================================================================== --- trunk/rostests/winetests/msvcrt/cpp.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/cpp.c [iso-8859-1] Tue Dec 22 12:46:36 2009 @@ -1032,6 +1032,8 @@ /* 111 */ {"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"}, /* 112 */ {"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"}, /* 113 */ {"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"}, +/* 114 */ {"??0?$Foo@U?$vector_c@H$00$01$0?1$0A@$0A@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@@mpl@boost@@@@QAE@XZ", + "public: __thiscall Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647> >::Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647> >(void)"}, }; int i, num_test = (sizeof(test)/sizeof(test[0])); Modified: trunk/rostests/winetests/msvcrt/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/file.c?r…
============================================================================== --- trunk/rostests/winetests/msvcrt/file.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/file.c [iso-8859-1] Tue Dec 22 12:46:36 2009 @@ -439,6 +439,7 @@ ok(ich == ret, "Second fgetc expected %x got %x\n", ich, ret); fclose(tempfh); unlink(tempf); + free(tempf); } static void test_fputc( void ) @@ -463,6 +464,7 @@ fclose(tempfh); unlink(tempf); + free(tempf); } static void test_flsbuf( void ) @@ -517,6 +519,7 @@ fclose(tempfh); unlink(tempf); + free(tempf); } static void test_fgetwc( void ) @@ -634,6 +637,7 @@ free(mytextW); fclose(tempfh); unlink(tempf); + free(tempf); } static void test_ctrlz( void ) @@ -681,6 +685,7 @@ ok(feof(tempfh), "did not get EOF\n"); fclose(tempfh); unlink(tempf); + free(tempf); } static void test_file_put_get( void ) @@ -730,6 +735,7 @@ free(mytextW); fclose(tempfh); unlink(tempf); + free(tempf); } static void test_file_write_read( void ) @@ -806,6 +812,7 @@ ret = unlink(tempf); ok( ret == 0 ,"Can't unlink '%s': %d\n", tempf, errno); + free(tempf); tempf=_tempnam(".","wne"); tempfd = _open(tempf,_O_CREAT|_O_TRUNC|_O_BINARY|_O_RDWR,0); @@ -833,6 +840,7 @@ "Can't chmod '%s' to read-write: %d\n", tempf, errno); ret = unlink(tempf); ok( ret == 0 ,"Can't unlink '%s': %d\n", tempf, errno); + free(tempf); } static void test_file_inherit_child(const char* fd_s) @@ -1080,6 +1088,7 @@ _close( fd ); _unlink( tempfile ); + free( tempfile ); } static void test_fopen_fclose_fcloseall( void ) Modified: trunk/rostests/winetests/msvcrt/msvcrt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/msvcrt.r…
============================================================================== --- trunk/rostests/winetests/msvcrt/msvcrt.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/msvcrt.rbuild [iso-8859-1] Tue Dec 22 12:46:36 2009 @@ -29,6 +29,7 @@ <file>heap.c</file> <file>printf.c</file> <file>scanf.c</file> + <file>signal.c</file> <file>string.c</file> <file>testlist.c</file> <file>time.c</file> Added: trunk/rostests/winetests/msvcrt/signal.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/signal.c…
============================================================================== --- trunk/rostests/winetests/msvcrt/signal.c (added) +++ trunk/rostests/winetests/msvcrt/signal.c [iso-8859-1] Tue Dec 22 12:46:36 2009 @@ -1,0 +1,48 @@ +/* + * Unit test suite for signal function. + * + * Copyright 2009 Peter Rosin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/test.h" +#include <winbase.h> +#include <signal.h> + +static int test_value = 0; + +static void __cdecl sighandler(int signum) +{ + ++test_value; +} + +static void test_signal(void) +{ + void (__cdecl *old)(int); + int res; + + old = signal(SIGBREAK, sighandler); + ok(old != SIG_ERR, "Failed to install signal handler for SIGBREAK\n"); + test_value = 0; + res = raise(SIGBREAK); + ok(res == 0, "Failed to raise SIGBREAK\n"); + ok(test_value == 1, "SIGBREAK handler not invoked\n"); +} + +START_TEST(signal) +{ + test_signal(); +} Propchange: trunk/rostests/winetests/msvcrt/signal.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/winetests/msvcrt/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/string.c…
============================================================================== --- trunk/rostests/winetests/msvcrt/string.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/string.c [iso-8859-1] Tue Dec 22 12:46:36 2009 @@ -51,6 +51,7 @@ static int (__cdecl *pstrcat_s)(char *dst, size_t len, const char *src); static int (__cdecl *p_mbsnbcpy_s)(unsigned char * dst, size_t size, const unsigned char * src, size_t count); static int (__cdecl *p_wcscpy_s)(wchar_t *wcDest, size_t size, const wchar_t *wcSrc); +static int (__cdecl *p_wcsupr_s)(wchar_t *str, size_t size); static int *p__mb_cur_max; static unsigned char *p_mbctype; @@ -595,6 +596,93 @@ ret = p_wcscpy_s(szDestShort, 8, szLongText); ok(ret == ERANGE || ret == EINVAL, "expected ERANGE/EINVAL got %d\n", ret); ok(szDestShort[0] == 0, "szDestShort[0] not 0\n"); +} + +static void test__wcsupr_s(void) +{ + static const WCHAR mixedString[] = {'M', 'i', 'X', 'e', 'D', 'l', 'o', 'w', + 'e', 'r', 'U', 'P', 'P', 'E', 'R', 0}; + static const WCHAR expectedString[] = {'M', 'I', 'X', 'E', 'D', 'L', 'O', + 'W', 'E', 'R', 'U', 'P', 'P', 'E', + 'R', 0}; + WCHAR testBuffer[2*sizeof(mixedString)/sizeof(WCHAR)]; + int ret; + + if (!p_wcsupr_s) + { + win_skip("_wcsupr_s not found\n"); + return; + } + + /* Test NULL input string and invalid size. */ + errno = EBADF; + ret = p_wcsupr_s(NULL, 0); + ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); + ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); + + /* Test NULL input string and valid size. */ + errno = EBADF; + ret = p_wcsupr_s(NULL, sizeof(testBuffer)/sizeof(WCHAR)); + ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); + ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); + + /* Test empty string with zero size. */ + errno = EBADF; + testBuffer[0] = '\0'; + ret = p_wcsupr_s(testBuffer, 0); + ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); + ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); + ok(testBuffer[0] == '\0', "Expected the buffer to be unchanged\n"); + + /* Test empty string with size of one. */ + testBuffer[0] = '\0'; + ret = p_wcsupr_s(testBuffer, 1); + ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret); + ok(testBuffer[0] == '\0', "Expected the buffer to be unchanged\n"); + + /* Test one-byte buffer with zero size. */ + errno = EBADF; + testBuffer[0] = 'x'; + ret = p_wcsupr_s(testBuffer, 0); + ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); + ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); + ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n"); + + /* Test one-byte buffer with size of one. */ + errno = EBADF; + testBuffer[0] = 'x'; + ret = p_wcsupr_s(testBuffer, 1); + ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); + ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); + ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n"); + + /* Test invalid size. */ + wcscpy(testBuffer, mixedString); + errno = EBADF; + ret = p_wcsupr_s(testBuffer, 0); + ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); + ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); + ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n"); + + /* Test normal string uppercasing. */ + wcscpy(testBuffer, mixedString); + ret = p_wcsupr_s(testBuffer, sizeof(mixedString)/sizeof(WCHAR)); + ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret); + ok(!wcscmp(testBuffer, expectedString), "Expected the string to be fully upper-case\n"); + + /* Test uppercasing with a shorter buffer size count. */ + wcscpy(testBuffer, mixedString); + errno = EBADF; + ret = p_wcsupr_s(testBuffer, sizeof(mixedString)/sizeof(WCHAR) - 1); + ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); + ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); + ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n"); + + /* Test uppercasing with a longer buffer size count. */ + wcscpy(testBuffer, mixedString); + ret = p_wcsupr_s(testBuffer, sizeof(testBuffer)/sizeof(WCHAR)); + ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret); + ok(!wcscmp(testBuffer, expectedString), "Expected the string to be fully upper-case\n"); } static void test_mbcjisjms(void) @@ -721,6 +809,7 @@ pstrcat_s = (void *)GetProcAddress( hMsvcrt,"strcat_s" ); p_mbsnbcpy_s = (void *)GetProcAddress( hMsvcrt,"_mbsnbcpy_s" ); p_wcscpy_s = (void *)GetProcAddress( hMsvcrt,"wcscpy_s" ); + p_wcsupr_s = (void *)GetProcAddress( hMsvcrt,"_wcsupr_s" ); /* MSVCRT memcpy behaves like memmove for overlapping moves, MFC42 CString::Insert seems to rely on that behaviour */ @@ -746,5 +835,6 @@ test_mbcjisjms(); test_strtok(); test_wcscpy_s(); + test__wcsupr_s(); test_strtol(); } Modified: trunk/rostests/winetests/msvcrt/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/testlist…
============================================================================== --- trunk/rostests/winetests/msvcrt/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/testlist.c [iso-8859-1] Tue Dec 22 12:46:36 2009 @@ -15,6 +15,7 @@ extern void func_heap(void); extern void func_printf(void); extern void func_scanf(void); +extern void func_signal(void); extern void func_string(void); extern void func_time(void); @@ -29,6 +30,7 @@ { "heap", func_heap }, { "printf", func_printf }, { "scanf", func_scanf }, + { "signal", func_signal }, { "string", func_string }, { "time", func_time }, { 0, 0 }
15 years
1
0
0
0
[cwittich] 44706: sync lz32_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:42:28 2009 New Revision: 44706 URL:
http://svn.reactos.org/svn/reactos?rev=44706&view=rev
Log: sync lz32_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/lz32/lzexpand_main.c Modified: trunk/rostests/winetests/lz32/lzexpand_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/lz32/lzexpand_m…
============================================================================== --- trunk/rostests/winetests/lz32/lzexpand_main.c [iso-8859-1] (original) +++ trunk/rostests/winetests/lz32/lzexpand_main.c [iso-8859-1] Tue Dec 22 12:42:28 2009 @@ -881,10 +881,10 @@ START_TEST(lzexpand_main) { - buf = malloc(uncompressed_data_size * 2); + buf = HeapAlloc(GetProcessHeap(), 0, uncompressed_data_size * 2); test_LZOpenFileA(); test_LZOpenFileW(); test_LZRead(); test_LZCopy(); - free(buf); -} + HeapFree(GetProcessHeap(), 0, buf); +}
15 years
1
0
0
0
[cwittich] 44705: sync mstask_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:41:32 2009 New Revision: 44705 URL:
http://svn.reactos.org/svn/reactos?rev=44705&view=rev
Log: sync mstask_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/mstask/task.c Modified: trunk/rostests/winetests/mstask/task.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mstask/task.c?r…
============================================================================== --- trunk/rostests/winetests/mstask/task.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mstask/task.c [iso-8859-1] Tue Dec 22 12:41:32 2009 @@ -28,33 +28,6 @@ static ITask *test_task; static const WCHAR empty[] = {0}; -/* allocate some tmp string space */ -/* FIXME: this is not 100% thread-safe */ -static char *get_tmp_space(int size) -{ - static char *list[16]; - static long pos; - char *ret; - int idx; - - idx = ++pos % (sizeof(list)/sizeof(list[0])); - if ((ret = realloc(list[idx], size))) - list[idx] = ret; - return ret; -} - -static const char *dbgstr_w(LPCWSTR str) -{ - char *buf; - int len; - if(!str) - return "(null)"; - len = lstrlenW(str) + 1; - buf = get_tmp_space(len); - WideCharToMultiByte(CP_ACP, 0, str, -1, buf, len, NULL, NULL); - return buf; -} - static BOOL setup_task(void) { HRESULT hres; @@ -122,7 +95,7 @@ if (hres == S_OK) { ok(!lstrcmpiW(stored_name, empty), - "Got %s, expected empty string\n", dbgstr_w(stored_name)); + "Got %s, expected empty string\n", wine_dbgstr_w(stored_name)); CoTaskMemFree(stored_name); } @@ -130,14 +103,14 @@ * the application name that is actually stored */ hres = ITask_SetApplicationName(test_task, non_application_name); ok(hres == S_OK, "Failed setting name %s: %08x\n", - dbgstr_w(non_application_name), hres); + wine_dbgstr_w(non_application_name), hres); hres = ITask_GetApplicationName(test_task, &stored_name); ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); if (hres == S_OK) { full_name = path_resolve_name(non_application_name); ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n", - dbgstr_w(stored_name), dbgstr_w(full_name)); + wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name)); CoTaskMemFree(stored_name); } @@ -145,21 +118,21 @@ * get the stored name */ hres = ITask_SetApplicationName(test_task, notepad_exe); ok(hres == S_OK, "Failed setting name %s: %08x\n", - dbgstr_w(notepad_exe), hres); + wine_dbgstr_w(notepad_exe), hres); hres = ITask_GetApplicationName(test_task, &stored_name); ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); if (hres == S_OK) { full_name = path_resolve_name(notepad_exe); ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n", - dbgstr_w(stored_name), dbgstr_w(full_name)); + wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name)); CoTaskMemFree(stored_name); } /* Set a valid application name without program type extension and * then get the stored name */ hres = ITask_SetApplicationName(test_task, notepad); - ok(hres == S_OK, "Failed setting name %s: %08x\n", dbgstr_w(notepad), hres); + ok(hres == S_OK, "Failed setting name %s: %08x\n", wine_dbgstr_w(notepad), hres); hres = ITask_GetApplicationName(test_task, &stored_name); ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); if (hres == S_OK) @@ -169,7 +142,7 @@ { full_name = path_resolve_name(notepad); ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n", - dbgstr_w(stored_name), dbgstr_w(full_name)); + wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name)); } CoTaskMemFree(stored_name); } @@ -179,26 +152,26 @@ * actually stored */ hres = ITask_SetApplicationName(test_task, non_application_name); ok(hres == S_OK, "Failed setting name %s: %08x\n", - dbgstr_w(non_application_name), hres); + wine_dbgstr_w(non_application_name), hres); hres = ITask_GetApplicationName(test_task, &stored_name); ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); if (hres == S_OK) { full_name = path_resolve_name(non_application_name); ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n", - dbgstr_w(stored_name), dbgstr_w(full_name)); + wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name)); CoTaskMemFree(stored_name); } /* Clear application name */ hres = ITask_SetApplicationName(test_task, empty); - ok(hres == S_OK, "Failed setting name %s: %08x\n", dbgstr_w(empty), hres); + ok(hres == S_OK, "Failed setting name %s: %08x\n", wine_dbgstr_w(empty), hres); hres = ITask_GetApplicationName(test_task, &stored_name); ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); if (hres == S_OK) { ok(!lstrcmpiW(stored_name, empty), - "Got %s, expected empty string\n", dbgstr_w(stored_name)); + "Got %s, expected empty string\n", wine_dbgstr_w(stored_name)); CoTaskMemFree(stored_name); } @@ -257,46 +230,46 @@ if (hres == S_OK) { ok(!lstrcmpW(parameters, empty), - "Got %s, expected empty string\n", dbgstr_w(parameters)); + "Got %s, expected empty string\n", wine_dbgstr_w(parameters)); CoTaskMemFree(parameters); } /* Set parameters to a simple string */ hres = ITask_SetParameters(test_task, parameters_a); ok(hres == S_OK, "Failed setting parameters %s: %08x\n", - dbgstr_w(parameters_a), hres); + wine_dbgstr_w(parameters_a), hres); hres = ITask_GetParameters(test_task, ¶meters); ok(hres == S_OK, "GetParameters failed: %08x\n", hres); if (hres == S_OK) { ok(!lstrcmpW(parameters, parameters_a), "Got %s, expected %s\n", - dbgstr_w(parameters), dbgstr_w(parameters_a)); + wine_dbgstr_w(parameters), wine_dbgstr_w(parameters_a)); CoTaskMemFree(parameters); } /* Update parameters to a different simple string */ hres = ITask_SetParameters(test_task, parameters_b); ok(hres == S_OK, "Failed setting parameters %s: %08x\n", - dbgstr_w(parameters_b), hres); + wine_dbgstr_w(parameters_b), hres); hres = ITask_GetParameters(test_task, ¶meters); ok(hres == S_OK, "GetParameters failed: %08x\n", hres); if (hres == S_OK) { ok(!lstrcmpW(parameters, parameters_b), "Got %s, expected %s\n", - dbgstr_w(parameters), dbgstr_w(parameters_b)); + wine_dbgstr_w(parameters), wine_dbgstr_w(parameters_b)); CoTaskMemFree(parameters); } /* Clear parameters */ hres = ITask_SetParameters(test_task, empty); ok(hres == S_OK, "Failed setting parameters %s: %08x\n", - dbgstr_w(empty), hres); + wine_dbgstr_w(empty), hres); hres = ITask_GetParameters(test_task, ¶meters); ok(hres == S_OK, "GetParameters failed: %08x\n", hres); if (hres == S_OK) { ok(!lstrcmpW(parameters, empty), - "Got %s, expected empty string\n", dbgstr_w(parameters)); + "Got %s, expected empty string\n", wine_dbgstr_w(parameters)); CoTaskMemFree(parameters); } @@ -327,46 +300,46 @@ if (hres == S_OK) { ok(!lstrcmpW(comment, empty), - "Got %s, expected empty string\n", dbgstr_w(comment)); + "Got %s, expected empty string\n", wine_dbgstr_w(comment)); CoTaskMemFree(comment); } /* Set comment to a simple string */ hres = ITask_SetComment(test_task, comment_a); ok(hres == S_OK, "Failed setting comment %s: %08x\n", - dbgstr_w(comment_a), hres); + wine_dbgstr_w(comment_a), hres); hres = ITask_GetComment(test_task, &comment); ok(hres == S_OK, "GetComment failed: %08x\n", hres); if (hres == S_OK) { ok(!lstrcmpW(comment, comment_a), "Got %s, expected %s\n", - dbgstr_w(comment), dbgstr_w(comment_a)); + wine_dbgstr_w(comment), wine_dbgstr_w(comment_a)); CoTaskMemFree(comment); } /* Update comment to a different simple string */ hres = ITask_SetComment(test_task, comment_b); ok(hres == S_OK, "Failed setting comment %s: %08x\n", - dbgstr_w(comment_b), hres); + wine_dbgstr_w(comment_b), hres); hres = ITask_GetComment(test_task, &comment); ok(hres == S_OK, "GetComment failed: %08x\n", hres); if (hres == S_OK) { ok(!lstrcmpW(comment, comment_b), "Got %s, expected %s\n", - dbgstr_w(comment), dbgstr_w(comment_b)); + wine_dbgstr_w(comment), wine_dbgstr_w(comment_b)); CoTaskMemFree(comment); } /* Clear comment */ hres = ITask_SetComment(test_task, empty); ok(hres == S_OK, "Failed setting comment %s: %08x\n", - dbgstr_w(empty), hres); + wine_dbgstr_w(empty), hres); hres = ITask_GetComment(test_task, &comment); ok(hres == S_OK, "GetComment failed: %08x\n", hres); if (hres == S_OK) { ok(!lstrcmpW(comment, empty), - "Got %s, expected empty string\n", dbgstr_w(comment)); + "Got %s, expected empty string\n", wine_dbgstr_w(comment)); CoTaskMemFree(comment); } @@ -477,8 +450,8 @@ if (hres == S_OK) { ok(!lstrcmpW(account_name, dummy_account_name), - "Got %s, expected %s\n", dbgstr_w(account_name), - dbgstr_w(dummy_account_name)); + "Got %s, expected %s\n", wine_dbgstr_w(account_name), + wine_dbgstr_w(dummy_account_name)); CoTaskMemFree(account_name); } @@ -496,8 +469,8 @@ if (hres == S_OK) { ok(!lstrcmpW(account_name, dummy_account_name_b), - "Got %s, expected %s\n", dbgstr_w(account_name), - dbgstr_w(dummy_account_name_b)); + "Got %s, expected %s\n", wine_dbgstr_w(account_name), + wine_dbgstr_w(dummy_account_name_b)); CoTaskMemFree(account_name); } @@ -512,7 +485,7 @@ if (hres == S_OK) { ok(!lstrcmpW(account_name, empty), - "Got %s, expected empty string\n", dbgstr_w(account_name)); + "Got %s, expected empty string\n", wine_dbgstr_w(account_name)); CoTaskMemFree(account_name); }
15 years
1
0
0
0
[cwittich] 44704: sync hlink_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:40:11 2009 New Revision: 44704 URL:
http://svn.reactos.org/svn/reactos?rev=44704&view=rev
Log: sync hlink_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/hlink/hlink.c Modified: trunk/rostests/winetests/hlink/hlink.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/hlink.c?r…
============================================================================== --- trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] Tue Dec 22 12:40:11 2009 @@ -57,15 +57,6 @@ DEFINE_EXPECT(BindToStorage); DEFINE_EXPECT(GetDisplayName); -static const char *debugstr_w(LPCWSTR str) -{ - static char buf[1024]; - if(!str) - return "(null)"; - WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL); - return buf; -} - static const char *debugstr_guid(REFIID riid) { static char buf[50]; @@ -80,7 +71,7 @@ static void test_HlinkIsShortcut(void) { - int i; + UINT i; HRESULT hres; static const WCHAR file0[] = {'f','i','l','e',0}; @@ -597,13 +588,13 @@ hres = IHttpNegotiate_BeginningTransaction(http_negotiate, (void*)0xdeadbeef, (void*)0xdeadbeef, 0, &headers); ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres); - ok(!lstrcmpW(headers, headersexW), "unexpected headers \"%s\"\n", debugstr_w(headers)); + ok(!lstrcmpW(headers, headersexW), "unexpected headers %s\n", wine_dbgstr_w(headers)); CoTaskMemFree(headers); headers = (void*)0xdeadbeef; hres = IHttpNegotiate_OnResponse(http_negotiate, 200, (void*)0xdeadbeef, (void*)0xdeadbeef, &headers); ok(hres == S_OK, "OnResponse failed: %08x\n", hres); - ok(headers == NULL, "unexpected headers \"%s\"\n", debugstr_w(headers)); + ok(headers == NULL, "unexpected headers %s\n", wine_dbgstr_w(headers)); IHttpNegotiate_Release(http_negotiate); IAuthenticate_Release(authenticate); @@ -635,7 +626,7 @@ hres = IMoniker_GetDisplayName(mon, bctx, 0, &name); ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres); - ok(!lstrcmpW(name, winehq_urlW), "wrong display name %s\n", debugstr_w(name)); + ok(!lstrcmpW(name, winehq_urlW), "wrong display name %s\n", wine_dbgstr_w(name)); CoTaskMemFree(name); hres = IMoniker_IsSystemMoniker(mon, &issys); @@ -662,13 +653,14 @@ hres = IMoniker_GetDisplayName(mon, bctx, 0, &name); ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres); - ok(!lstrcmpW(name, invalid_urlW), "wrong display name %s\n", debugstr_w(name)); + ok(!lstrcmpW(name, invalid_urlW), "wrong display name %s\n", wine_dbgstr_w(name)); CoTaskMemFree(name); hres = IMoniker_IsSystemMoniker(mon, &issys); ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres); ok(issys == MKSYS_FILEMONIKER, "issys=%x\n", issys); + IMoniker_Release(mon); IBindCtx_Release(bctx); } @@ -1025,6 +1017,110 @@ IBindCtx_Release(bctx); } +static void test_HlinkGetSetMonikerReference(void) +{ + IMoniker *found_trgt, *dummy, *dummy2; + IHlink *hlink; + HRESULT hres; + const WCHAR one[] = {'1',0}; + const WCHAR two[] = {'2',0}; + const WCHAR name[] = {'a',0}; + WCHAR *found_loc; + + /* create two dummy monikers to use as targets */ + hres = CreateItemMoniker(one, one, &dummy); + ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres); + + hres = CreateItemMoniker(two, two, &dummy2); + ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres); + + /* create a new hlink: target => dummy, location => one */ + hres = HlinkCreateFromMoniker(dummy, one, name, NULL, 0, NULL, &IID_IHlink, (void**)&hlink); + ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); + + /* validate the target and location */ + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); + ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); + ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); + IMoniker_Release(found_trgt); + CoTaskMemFree(found_loc); + + /* set location => two */ + hres = IHlink_SetMonikerReference(hlink, HLINKSETF_LOCATION, dummy2, two); + ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); + ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc)); + IMoniker_Release(found_trgt); + CoTaskMemFree(found_loc); + + /* set target => dummy2 */ + hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET, dummy2, one); + ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt); + ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc)); + IMoniker_Release(found_trgt); + CoTaskMemFree(found_loc); + + /* set target => dummy, location => one */ + hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, dummy, one); + ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); + ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); + IMoniker_Release(found_trgt); + CoTaskMemFree(found_loc); + + /* no HLINKSETF flags */ + hres = IHlink_SetMonikerReference(hlink, 0, dummy2, two); + ok(hres == E_INVALIDARG, "IHlink_SetMonikerReference should've failed with E_INVALIDARG (0x%08x), failed with 0x%08x\n", E_INVALIDARG, hres); + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); + ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); + IMoniker_Release(found_trgt); + CoTaskMemFree(found_loc); + + /* invalid HLINKSETF flags */ + hres = IHlink_SetMonikerReference(hlink, 12, dummy2, two); + ok(hres == 12, "IHlink_SetMonikerReference should've failed with 0x%08x, failed with 0x%08x\n", 12, hres); + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); + ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); + IMoniker_Release(found_trgt); + CoTaskMemFree(found_loc); + + /* valid & invalid HLINKSETF flags */ + hres = IHlink_SetMonikerReference(hlink, 12 | HLINKSETF_TARGET, dummy2, two); + ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt); + ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); + IMoniker_Release(found_trgt); + CoTaskMemFree(found_loc); + + /* NULL args */ + hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, NULL, NULL); + ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(found_trgt == NULL, "Found target should've been %p, was: %p\n", NULL, found_trgt); + ok(found_loc == NULL, "Found location should've been %s, was: %s\n", wine_dbgstr_w(NULL), wine_dbgstr_w(found_loc)); + if(found_trgt) + IMoniker_Release(found_trgt); + + IHlink_Release(hlink); + IMoniker_Release(dummy2); + IMoniker_Release(dummy); +} + START_TEST(hlink) { CoInitialize(NULL); @@ -1036,6 +1132,7 @@ test_HlinkCreateExtensionServices(); test_HlinkParseDisplayName(); test_HlinkResolveMonikerForData(); + test_HlinkGetSetMonikerReference(); CoUninitialize(); }
15 years
1
0
0
0
[cwittich] 44703: sync fusion_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:38:45 2009 New Revision: 44703 URL:
http://svn.reactos.org/svn/reactos?rev=44703&view=rev
Log: sync fusion_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/fusion/asmenum.c trunk/rostests/winetests/fusion/asmname.c Modified: trunk/rostests/winetests/fusion/asmenum.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/asmenum.…
============================================================================== --- trunk/rostests/winetests/fusion/asmenum.c [iso-8859-1] (original) +++ trunk/rostests/winetests/fusion/asmenum.c [iso-8859-1] Tue Dec 22 12:38:45 2009 @@ -209,6 +209,8 @@ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); ok(asmenum == (IAssemblyEnum *)0xdeadbeef, "Expected asmenum to be unchanged, got %p\n", asmenum); + + IAssemblyName_Release(asmname); } typedef struct _tagASMNAME Modified: trunk/rostests/winetests/fusion/asmname.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/asmname.…
============================================================================== --- trunk/rostests/winetests/fusion/asmname.c [iso-8859-1] (original) +++ trunk/rostests/winetests/fusion/asmname.c [iso-8859-1] Tue Dec 22 12:38:45 2009 @@ -726,6 +726,7 @@ ok(name != NULL, "Expected non-NULL name\n"); size = MAX_PATH; + str[0] = '\0'; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); todo_wine @@ -786,6 +787,7 @@ "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); } + if(SUCCEEDED(hr)) IAssemblyName_Release(name); /* no '=' */ to_widechar(namestr, "wine, PublicKeyToken");
15 years
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
51
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
Results per page:
10
25
50
100
200