Module: wine Branch: master Commit: 66ee663e0c063d5f3f04ca659ac091d7b47d8e7e URL: http://source.winehq.org/git/wine.git/?a=commit;h=66ee663e0c063d5f3f04ca659a... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jan 24 12:29:12 2013 +0100 msvcp90: Added std::tan(complex) tests. --- dlls/msvcp90/tests/misc.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/dlls/msvcp90/tests/misc.c b/dlls/msvcp90/tests/misc.c index b1e3c0b..0f1b27e 100644 --- a/dlls/msvcp90/tests/misc.c +++ b/dlls/msvcp90/tests/misc.c @@ -112,6 +112,7 @@ static complex_float* (__thiscall *p_complex_float_ctor)(complex_float*, const f static complex_float* (__cdecl *p_complex_float_add)(complex_float*, const complex_float*, const complex_float*); static complex_float* (__cdecl *p_complex_float_div)(complex_float*, const complex_float*, const complex_float*); static float (__cdecl *p_complex_float__Fabs)(const complex_float*, int*); +static complex_float* (__cdecl *p_complex_float_tan)(complex_float*, const complex_float*); static int invalid_parameter = 0; static void __cdecl test_invalid_parameter_handler(const wchar_t *expression, @@ -252,6 +253,8 @@ static BOOL init(void) "??$?KM(a)std@@YA?AV?$complex(a)M@0(a)AEBV10@0(a)Z"); SET(p_complex_float__Fabs, "??$_Fabs(a)M@std@@YAMAEBV?$complex(a)M@0(a)PEAH@Z"); + SET(p_complex_float_tan, + "??$tan(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z"); } else { SET(p_char_assign, "?assign@?$char_traits(a)D@std@@SAXAADABD(a)Z"); SET(p_wchar_assign, "?assign@?$char_traits(a)_W@std@@SAXAA_WAB_W(a)Z"); @@ -298,6 +301,8 @@ static BOOL init(void) "??$?KM(a)std@@YA?AV?$complex(a)M@0(a)ABV10@0(a)Z"); SET(p_complex_float__Fabs, "??$_Fabs(a)M@std@@YAMABV?$complex(a)M@0(a)PAH@Z"); + SET(p_complex_float_tan, + "??$tan(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z"); } init_thiscall_thunk(); @@ -705,6 +710,24 @@ static void test_complex(void) f1 = p_complex_float__Fabs(&c3, &scale); ok(f1 == 0, "abs(0+0i) = %f\n", f1); ok(scale == 0, "scale = %d\n", scale); + + c1.real = 0; + c1.imag = 0; + p_complex_float_tan(&c2, &c1); + ok(c2.real == 0, "c2.real = %f\n", c2.real); + ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); + + c1.real = 3.14159/2; + c1.imag = 0; + p_complex_float_tan(&c2, &c1); + ok(almost_eq(c2.real, 788906.062500), "c2.real = %f\n", c2.real); + ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); + + c1.real = 7.12; + c1.imag = 0.17; + p_complex_float_tan(&c2, &c1); + ok(almost_eq(c2.real, 1.040818), "c2.real = %f\n", c2.real); + ok(almost_eq(c2.imag, 0.362651), "c2.imag = %f\n", c2.imag); } START_TEST(misc)