Commit Graph

298 Commits

Author SHA1 Message Date
Jacek Caban 0f901b8e47 ucrtbase/tests: Use more ucrtbase functions directly in misc.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 17:27:19 +01:00
Jacek Caban 02cc47c141 ucrtbase/tests: Use ucrtbase functions directly in string.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 19:36:55 +01:00
Jacek Caban 90ae76e93c ucrtbase/tests: Link to _o_* functions directly.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 15:59:19 +01:00
Jacek Caban aa16d0adf1 ucrtbase/tests: Use public onexit table declarations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 15:59:14 +01:00
Jacek Caban 618b0736fe ucrtbase/tests: Fix clock tests.
crt_init_start no longer makes sense since ucrtbase.dll is directly
linked to test executable.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 15:59:05 +01:00
Francois Gouget a909baeb4e tests: Report all errors when failing to wait for a child process.
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Jacek Caban c2ee20c95b ucrtbase/tests: Use more functions directly.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:42:53 +01:00
Jacek Caban f202beb745 ucrtbase/tests: Build with -fno-builtin.
Some of tested functions are handled as builtin compiler functions. We
always want to test our actual implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:42:50 +01:00
Jacek Caban c3165b4c96 ucrtbase/tests: Directly use ucrtbase functions in scanf.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban d6f5afdd3d ucrtbase/tests: Directly use ucrtbase functions in printf.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban cd030f752f ucrtbase/tests: Directly use __stdio_common_* functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban 01bc7e09bd ucrtbase/tests: Use public _CRT_INTERNAL_PRINTF_* defines.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban 6b52c24d2f ucrtbase/tests: Link to ucrtbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jeff Smith 89ca556ac5 msvcrt: Stop forwarding iswctype functions to ntdll.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 21:00:03 +01:00
Jacek Caban 78eca96887 ucrtbase: Add exe entry points implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 20:29:18 +01:00
Jacek Caban 18545725b1 ucrtbase: Use public headers for _vsnprintf implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 21:23:13 +01:00
Jacek Caban 0d537c854c makedep: Use msvcrt headers for objects inside importlibs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 16:44:24 +01:00
Piotr Caban 87f42c3ae7 ucrtbase: Added stub for _get_FMA3_enable.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
Nikolay Sivov 5b9323400d ucrtbase: Add _query_new_handler() and _query_new_mode().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:23:28 +01:00
Chip Davis dfd9196f7c msvcrt: Implement _ispunct_l().
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:41:33 +01:00
Daniel Lehman 31c57484ab ucrtbase: Use given context in wcstok.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 19:53:09 +01:00
Matteo Bruni 904a238ba0 ucrtbase/tests: Add tests for the various tolower() and toupper() variants.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:40:51 +01:00
Matteo Bruni b85f5efa43 ucrtbase: Add _o_fmod() and _o_fmodf().
Together with the previous patch this fixes some crashes reproduced
with Heroes of the Storm.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:40:47 +01:00
Matteo Bruni 4688a57fd3 ucrtbase: Export _o_to{lower, upper}() as to{lower, upper}().
As opposed to _to{lower,upper}() i.e. the broken-by-design version.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:40:40 +01:00
Piotr Caban 3fc3d24c3c ucrtbase: Fix end pointer setting in parse_double on partial nan/infinity match.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-07 22:26:08 +01:00
Piotr Caban c4ad739195 msvcrt: Don't use ungetc when reading double in scanf.
It may not work on unbuffered streams.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Piotr Caban 5034d109e0 msvcrt: Improve strtod precision.
This fixes strtod precision regression. It also removes floating
point operations.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:45 +01:00
Jeff Smith 0b78dd17ae ucrtbase: Correct behavior of strftime formats %c %r.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:49:31 +01:00
Jeff Smith a1ce35cfda ucrtbase: Improve strftime special test cases for %c %r formats.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:46:44 +01:00
Jeff Smith c6bafaa6d9 ucrtbase: Add support for strftime format %r.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 20:45:46 +01:00
Jeff Smith 4f5342fff0 ucrtbase: Add support for strftime format %V.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:04:57 +01:00
Jeff Smith cdcbb9f369 ucrtbase: Use correct type for year with strftime format %g.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:04:55 +01:00
Jeff Smith d0319e20eb ucrtbase: Expand tests for strftime format %g.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:04:52 +01:00
Jeff Smith 8fe3d7c913 msvcrt: Call invalid parameter handler for out-of-range integer.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Piotr Caban c953c36d11 ucrtbase: Fix hexadecimal floats parsing in strtod.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 18:02:59 +01:00
Jeff Smith bb3c3e8fec ucrtbase: Correct day-of-week range for strftime.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 15:29:45 +01:00
Jeff Smith bcb1aee8c7 msvcrt: Correct hour range for strftime.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 15:29:41 +01:00
Jeff Smith cdb09ed279 msvcrt: Correct day-of-month range for strftime.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 15:29:39 +01:00
Jeff Smith 15bbe64609 ucrtbase: Extend range for seconds to allow for leap-second.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 15:29:37 +01:00
Jeff Smith a0be8d49f2 ucrtbase: Treat year more consistently in strftime.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 15:29:35 +01:00
Jeff Smith 6f13ac30b9 msvcrt: Correct behavior of time in strftime formats %X %c.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Jeff Smith 96b6e1d77c msvcrt: Range-check fields used as array indices in _Strftime.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Jeff Smith 23ee25435e ucrtbase: Add strftime format range tests.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Jeff Smith e25962553f ucrtbase: Add _Strftime tests for seconds.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Jeff Smith 8bee5d85d8 msvcrt: Correct behavior of strftime formats %c %x.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 09:08:54 +01:00
Piotr Caban 21a2fde621 ucrtbase: Add _Strftime tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 09:08:49 +01:00
Jeff Smith 959fe2fd10 msvcrt: Add additional strftime tests.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-18 22:12:30 +01:00
Jeff Smith 5725ed3b46 ucrtbase: Strftime %y works for years 0 to 9999.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 22:37:39 +01:00
Piotr Caban 7b60dcbefa ucrtbase: Clean up strftime tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 22:37:25 +01:00
Jeff Smith d4e2b0584b ucrtbase: Strftime returns 4-digit timezone for %z.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 22:37:05 +01:00