msvcirt: Implement iostream constructors/destructors.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
adf3763e46
commit
7de6bca9d2
|
@ -3943,7 +3943,20 @@ static inline iostream* ios_to_iostream(const ios *base)
|
|||
DEFINE_THISCALL_WRAPPER(iostream_ctor, 8)
|
||||
iostream* __thiscall iostream_ctor(iostream *this, BOOL virt_init)
|
||||
{
|
||||
FIXME("(%p %d) stub\n", this, virt_init);
|
||||
ios *base;
|
||||
|
||||
TRACE("(%p %d)\n", this, virt_init);
|
||||
|
||||
if (virt_init) {
|
||||
this->base1.vbtable = iostream_vbtable_istream;
|
||||
this->base2.vbtable = iostream_vbtable_ostream;
|
||||
base = istream_get_ios(&this->base1);
|
||||
ios_ctor(base);
|
||||
} else
|
||||
base = istream_get_ios(&this->base1);
|
||||
istream_ctor(&this->base1, FALSE);
|
||||
ostream_ctor(&this->base2, FALSE);
|
||||
base->vtable = &MSVCP_iostream_vtable;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -3952,7 +3965,9 @@ iostream* __thiscall iostream_ctor(iostream *this, BOOL virt_init)
|
|||
DEFINE_THISCALL_WRAPPER(iostream_sb_ctor, 12)
|
||||
iostream* __thiscall iostream_sb_ctor(iostream *this, streambuf *sb, BOOL virt_init)
|
||||
{
|
||||
FIXME("(%p %p %d) stub\n", this, sb, virt_init);
|
||||
TRACE("(%p %p %d)\n", this, sb, virt_init);
|
||||
iostream_ctor(this, virt_init);
|
||||
ios_init(istream_get_ios(&this->base1), sb);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -3961,8 +3976,7 @@ iostream* __thiscall iostream_sb_ctor(iostream *this, streambuf *sb, BOOL virt_i
|
|||
DEFINE_THISCALL_WRAPPER(iostream_copy_ctor, 12)
|
||||
iostream* __thiscall iostream_copy_ctor(iostream *this, const iostream *copy, BOOL virt_init)
|
||||
{
|
||||
FIXME("(%p %p %d) stub\n", this, copy, virt_init);
|
||||
return this;
|
||||
return iostream_sb_ctor(this, istream_get_ios(©->base1)->sb, virt_init);
|
||||
}
|
||||
|
||||
/* ??1iostream@@UAE@XZ */
|
||||
|
@ -3970,7 +3984,12 @@ iostream* __thiscall iostream_copy_ctor(iostream *this, const iostream *copy, BO
|
|||
DEFINE_THISCALL_WRAPPER(iostream_dtor, 4)
|
||||
void __thiscall iostream_dtor(ios *base)
|
||||
{
|
||||
FIXME("(%p) stub\n", base);
|
||||
iostream *this = ios_to_iostream(base);
|
||||
|
||||
TRACE("(%p)\n", this);
|
||||
|
||||
ostream_dtor(ostream_to_ios(&this->base2));
|
||||
istream_dtor(istream_to_ios(&this->base1));
|
||||
}
|
||||
|
||||
/* ??4iostream@@IAEAAV0@PAVstreambuf@@@Z */
|
||||
|
@ -3996,7 +4015,12 @@ iostream* __thiscall iostream_assign(iostream *this, const iostream *rhs)
|
|||
DEFINE_THISCALL_WRAPPER(iostream_vbase_dtor, 4)
|
||||
void __thiscall iostream_vbase_dtor(iostream *this)
|
||||
{
|
||||
FIXME("(%p) stub\n", this);
|
||||
ios *base = iostream_to_ios(this);
|
||||
|
||||
TRACE("(%p)\n", this);
|
||||
|
||||
iostream_dtor(base);
|
||||
ios_dtor(base);
|
||||
}
|
||||
|
||||
/* ??_Eiostream@@UAEPAXI@Z */
|
||||
|
|
|
@ -154,6 +154,20 @@ typedef struct {
|
|||
ios base_ios; /* virtually inherited */
|
||||
} istream;
|
||||
|
||||
/* class iostream */
|
||||
typedef struct {
|
||||
struct { /* istream */
|
||||
const int *vbtable;
|
||||
int extract_delim;
|
||||
int count;
|
||||
} base1;
|
||||
struct { /* ostream */
|
||||
const int *vbtable;
|
||||
int unknown;
|
||||
} base2;
|
||||
ios base_ios; /* virtually inherited */
|
||||
} iostream;
|
||||
|
||||
static inline float __port_infinity(void)
|
||||
{
|
||||
static const unsigned __inf_bytes = 0x7f800000;
|
||||
|
@ -360,6 +374,13 @@ static istream* (*__thiscall p_istream_withassign_assign_sb)(istream*, streambuf
|
|||
static istream* (*__thiscall p_istream_withassign_assign_is)(istream*, const istream*);
|
||||
static istream* (*__thiscall p_istream_withassign_assign)(istream*, const istream*);
|
||||
|
||||
/* iostream */
|
||||
static iostream* (*__thiscall p_iostream_copy_ctor)(iostream*, const iostream*, BOOL);
|
||||
static iostream* (*__thiscall p_iostream_sb_ctor)(iostream*, streambuf*, BOOL);
|
||||
static iostream* (*__thiscall p_iostream_ctor)(iostream*, BOOL);
|
||||
static void (*__thiscall p_iostream_dtor)(ios*);
|
||||
static void (*__thiscall p_iostream_vbase_dtor)(iostream*);
|
||||
|
||||
/* Emulate a __thiscall */
|
||||
#ifdef __i386__
|
||||
|
||||
|
@ -604,6 +625,12 @@ static BOOL init(void)
|
|||
SET(p_istream_withassign_assign_sb, "??4istream_withassign@@QEAAAEAVistream@@PEAVstreambuf@@@Z");
|
||||
SET(p_istream_withassign_assign_is, "??4istream_withassign@@QEAAAEAVistream@@AEBV1@@Z");
|
||||
SET(p_istream_withassign_assign, "??4istream_withassign@@QEAAAEAV0@AEBV0@@Z");
|
||||
|
||||
SET(p_iostream_copy_ctor, "??0iostream@@IEAA@AEBV0@@Z");
|
||||
SET(p_iostream_sb_ctor, "??0iostream@@QEAA@PEAVstreambuf@@@Z");
|
||||
SET(p_iostream_ctor, "??0iostream@@IEAA@XZ");
|
||||
SET(p_iostream_dtor, "??1iostream@@UEAA@XZ");
|
||||
SET(p_iostream_vbase_dtor, "??_Diostream@@QEAAXXZ");
|
||||
} else {
|
||||
p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z");
|
||||
p_operator_delete = (void*)GetProcAddress(msvcrt, "??3@YAXPAX@Z");
|
||||
|
@ -771,6 +798,12 @@ static BOOL init(void)
|
|||
SET(p_istream_withassign_assign_sb, "??4istream_withassign@@QAEAAVistream@@PAVstreambuf@@@Z");
|
||||
SET(p_istream_withassign_assign_is, "??4istream_withassign@@QAEAAVistream@@ABV1@@Z");
|
||||
SET(p_istream_withassign_assign, "??4istream_withassign@@QAEAAV0@ABV0@@Z");
|
||||
|
||||
SET(p_iostream_copy_ctor, "??0iostream@@IAE@ABV0@@Z");
|
||||
SET(p_iostream_sb_ctor, "??0iostream@@QAE@PAVstreambuf@@@Z");
|
||||
SET(p_iostream_ctor, "??0iostream@@IAE@XZ");
|
||||
SET(p_iostream_dtor, "??1iostream@@UAE@XZ");
|
||||
SET(p_iostream_vbase_dtor, "??_Diostream@@QAEXXZ");
|
||||
}
|
||||
SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A");
|
||||
SET(p_ios_lockc, "?lockc@ios@@KAXXZ");
|
||||
|
@ -5763,6 +5796,180 @@ static void test_istream_withassign(void)
|
|||
ok(isa2.base_ios.do_lock == 0xabababab, "expected %d got %d\n", 0xabababab, isa2.base_ios.do_lock);
|
||||
}
|
||||
|
||||
static void test_iostream(void)
|
||||
{
|
||||
iostream ios1, ios2, *pios;
|
||||
ostream *pos;
|
||||
streambuf sb;
|
||||
|
||||
memset(&ios1, 0xab, sizeof(iostream));
|
||||
memset(&ios2, 0xab, sizeof(iostream));
|
||||
|
||||
/* constructors/destructors */
|
||||
pios = call_func3(p_iostream_sb_ctor, &ios1, NULL, TRUE);
|
||||
ok(pios == &ios1, "wrong return, expected %p got %p\n", &ios1, pios);
|
||||
ok(ios1.base1.extract_delim == 0, "expected 0 got %d\n", ios1.base1.extract_delim);
|
||||
ok(ios1.base1.count == 0, "expected 0 got %d\n", ios1.base1.count);
|
||||
ok(ios1.base2.unknown == 0, "expected 0 got %d\n", ios1.base2.unknown);
|
||||
ok(ios1.base_ios.sb == NULL, "expected %p got %p\n", NULL, ios1.base_ios.sb);
|
||||
ok(ios1.base_ios.state == IOSTATE_badbit, "expected %d got %d\n", IOSTATE_badbit, ios1.base_ios.state);
|
||||
ok(ios1.base_ios.delbuf == 0, "expected 0 got %d\n", ios1.base_ios.delbuf);
|
||||
ok(ios1.base_ios.tie == NULL, "expected %p got %p\n", NULL, ios1.base_ios.tie);
|
||||
ok(ios1.base_ios.flags == FLAGS_skipws, "expected %x got %x\n", FLAGS_skipws, ios1.base_ios.flags);
|
||||
ok(ios1.base_ios.precision == 6, "expected 6 got %d\n", ios1.base_ios.precision);
|
||||
ok(ios1.base_ios.fill == ' ', "expected 32 got %d\n", ios1.base_ios.fill);
|
||||
ok(ios1.base_ios.width == 0, "expected 0 got %d\n", ios1.base_ios.width);
|
||||
ok(ios1.base_ios.do_lock == -1, "expected -1 got %d\n", ios1.base_ios.do_lock);
|
||||
call_func1(p_iostream_vbase_dtor, &ios1);
|
||||
ios1.base1.extract_delim = ios1.base1.count = 0xabababab;
|
||||
ios1.base2.unknown = 0xabababab;
|
||||
memset(&ios1.base_ios, 0xab, sizeof(ios));
|
||||
ios1.base_ios.delbuf = 0;
|
||||
pios = call_func3(p_iostream_sb_ctor, &ios1, NULL, FALSE);
|
||||
ok(pios == &ios1, "wrong return, expected %p got %p\n", &ios1, pios);
|
||||
ok(ios1.base1.extract_delim == 0, "expected 0 got %d\n", ios1.base1.extract_delim);
|
||||
ok(ios1.base1.count == 0, "expected 0 got %d\n", ios1.base1.count);
|
||||
ok(ios1.base2.unknown == 0, "expected 0 got %d\n", ios1.base2.unknown);
|
||||
ok(ios1.base_ios.sb == NULL, "expected %p got %p\n", NULL, ios1.base_ios.sb);
|
||||
ok(ios1.base_ios.state == (0xabababab|IOSTATE_badbit), "expected %d got %d\n",
|
||||
0xabababab|IOSTATE_badbit, ios1.base_ios.state);
|
||||
ok(ios1.base_ios.delbuf == 0, "expected 0 got %d\n", ios1.base_ios.delbuf);
|
||||
ok(ios1.base_ios.tie == ios2.base_ios.tie, "expected %p got %p\n", ios2.base_ios.tie, ios1.base_ios.tie);
|
||||
ok(ios1.base_ios.flags == 0xabababab, "expected %x got %x\n", 0xabababab, ios1.base_ios.flags);
|
||||
ok(ios1.base_ios.precision == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.precision);
|
||||
ok(ios1.base_ios.fill == (char) 0xab, "expected -85 got %d\n", ios1.base_ios.fill);
|
||||
ok(ios1.base_ios.width == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.width);
|
||||
ok(ios1.base_ios.do_lock == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.do_lock);
|
||||
call_func1(p_iostream_dtor, &ios1.base_ios);
|
||||
memset(&ios1, 0xab, sizeof(iostream));
|
||||
pios = call_func3(p_iostream_sb_ctor, &ios1, &sb, TRUE);
|
||||
ok(pios == &ios1, "wrong return, expected %p got %p\n", &ios1, pios);
|
||||
ok(ios1.base1.extract_delim == 0, "expected 0 got %d\n", ios1.base1.extract_delim);
|
||||
ok(ios1.base1.count == 0, "expected 0 got %d\n", ios1.base1.count);
|
||||
ok(ios1.base2.unknown == 0, "expected 0 got %d\n", ios1.base2.unknown);
|
||||
ok(ios1.base_ios.sb == &sb, "expected %p got %p\n", &sb, ios1.base_ios.sb);
|
||||
ok(ios1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ios1.base_ios.state);
|
||||
ok(ios1.base_ios.delbuf == 0, "expected 0 got %d\n", ios1.base_ios.delbuf);
|
||||
ok(ios1.base_ios.tie == NULL, "expected %p got %p\n", NULL, ios1.base_ios.tie);
|
||||
ok(ios1.base_ios.flags == FLAGS_skipws, "expected %x got %x\n", FLAGS_skipws, ios1.base_ios.flags);
|
||||
ok(ios1.base_ios.precision == 6, "expected 6 got %d\n", ios1.base_ios.precision);
|
||||
ok(ios1.base_ios.fill == ' ', "expected 32 got %d\n", ios1.base_ios.fill);
|
||||
ok(ios1.base_ios.width == 0, "expected 0 got %d\n", ios1.base_ios.width);
|
||||
ok(ios1.base_ios.do_lock == -1, "expected -1 got %d\n", ios1.base_ios.do_lock);
|
||||
call_func1(p_iostream_vbase_dtor, &ios1);
|
||||
ok(ios1.base_ios.sb == NULL, "expected %p got %p\n", NULL, ios1.base_ios.sb);
|
||||
ok(ios1.base_ios.state == IOSTATE_badbit, "expected %d got %d\n", IOSTATE_badbit, ios1.base_ios.state);
|
||||
ios1.base1.extract_delim = ios1.base1.count = 0xabababab;
|
||||
ios1.base2.unknown = 0xabababab;
|
||||
memset(&ios1.base_ios, 0xab, sizeof(ios));
|
||||
ios1.base_ios.delbuf = 0;
|
||||
pios = call_func3(p_iostream_sb_ctor, &ios1, &sb, FALSE);
|
||||
ok(pios == &ios1, "wrong return, expected %p got %p\n", &ios1, pios);
|
||||
ok(ios1.base1.extract_delim == 0, "expected 0 got %d\n", ios1.base1.extract_delim);
|
||||
ok(ios1.base1.count == 0, "expected 0 got %d\n", ios1.base1.count);
|
||||
ok(ios1.base2.unknown == 0, "expected 0 got %d\n", ios1.base2.unknown);
|
||||
ok(ios1.base_ios.sb == &sb, "expected %p got %p\n", &sb, ios1.base_ios.sb);
|
||||
ok(ios1.base_ios.state == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.state);
|
||||
ok(ios1.base_ios.delbuf == 0, "expected 0 got %d\n", ios1.base_ios.delbuf);
|
||||
ok(ios1.base_ios.tie == ios2.base_ios.tie, "expected %p got %p\n", ios2.base_ios.tie, ios1.base_ios.tie);
|
||||
ok(ios1.base_ios.flags == 0xabababab, "expected %x got %x\n", 0xabababab, ios1.base_ios.flags);
|
||||
ok(ios1.base_ios.precision == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.precision);
|
||||
ok(ios1.base_ios.fill == (char) 0xab, "expected -85 got %d\n", ios1.base_ios.fill);
|
||||
ok(ios1.base_ios.width == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.width);
|
||||
ok(ios1.base_ios.do_lock == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.do_lock);
|
||||
call_func1(p_iostream_dtor, &ios1.base_ios);
|
||||
memset(&ios1, 0xab, sizeof(iostream));
|
||||
pios = call_func2(p_iostream_ctor, &ios1, TRUE);
|
||||
ok(pios == &ios1, "wrong return, expected %p got %p\n", &ios1, pios);
|
||||
ok(ios1.base1.extract_delim == 0, "expected 0 got %d\n", ios1.base1.extract_delim);
|
||||
ok(ios1.base1.count == 0, "expected 0 got %d\n", ios1.base1.count);
|
||||
ok(ios1.base2.unknown == 0, "expected 0 got %d\n", ios1.base2.unknown);
|
||||
ok(ios1.base_ios.sb == NULL, "expected %p got %p\n", NULL, ios1.base_ios.sb);
|
||||
ok(ios1.base_ios.state == IOSTATE_badbit, "expected %d got %d\n", IOSTATE_badbit, ios1.base_ios.state);
|
||||
ok(ios1.base_ios.delbuf == 0, "expected 0 got %d\n", ios1.base_ios.delbuf);
|
||||
ok(ios1.base_ios.tie == NULL, "expected %p got %p\n", NULL, ios1.base_ios.tie);
|
||||
ok(ios1.base_ios.flags == FLAGS_skipws, "expected %x got %x\n", FLAGS_skipws, ios1.base_ios.flags);
|
||||
ok(ios1.base_ios.precision == 6, "expected 6 got %d\n", ios1.base_ios.precision);
|
||||
ok(ios1.base_ios.fill == ' ', "expected 32 got %d\n", ios1.base_ios.fill);
|
||||
ok(ios1.base_ios.width == 0, "expected 0 got %d\n", ios1.base_ios.width);
|
||||
ok(ios1.base_ios.do_lock == -1, "expected -1 got %d\n", ios1.base_ios.do_lock);
|
||||
call_func1(p_iostream_vbase_dtor, &ios1);
|
||||
ios1.base1.extract_delim = ios1.base1.count = 0xabababab;
|
||||
ios1.base2.unknown = 0xabababab;
|
||||
memset(&ios1.base_ios, 0xab, sizeof(ios));
|
||||
pios = call_func2(p_iostream_ctor, &ios1, FALSE);
|
||||
ok(pios == &ios1, "wrong return, expected %p got %p\n", &ios1, pios);
|
||||
ok(ios1.base1.extract_delim == 0, "expected 0 got %d\n", ios1.base1.extract_delim);
|
||||
ok(ios1.base1.count == 0, "expected 0 got %d\n", ios1.base1.count);
|
||||
ok(ios1.base2.unknown == 0, "expected 0 got %d\n", ios1.base2.unknown);
|
||||
ok(ios1.base_ios.sb == ios2.base_ios.sb, "expected %p got %p\n", ios2.base_ios.sb, ios1.base_ios.sb);
|
||||
ok(ios1.base_ios.state == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.state);
|
||||
ok(ios1.base_ios.delbuf == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.delbuf);
|
||||
ok(ios1.base_ios.tie == ios2.base_ios.tie, "expected %p got %p\n", ios2.base_ios.tie, ios1.base_ios.tie);
|
||||
ok(ios1.base_ios.flags == 0xabababab, "expected %x got %x\n", 0xabababab, ios1.base_ios.flags);
|
||||
ok(ios1.base_ios.precision == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.precision);
|
||||
ok(ios1.base_ios.fill == (char) 0xab, "expected -85 got %d\n", ios1.base_ios.fill);
|
||||
ok(ios1.base_ios.width == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.width);
|
||||
ok(ios1.base_ios.do_lock == 0xabababab, "expected %d got %d\n", 0xabababab, ios1.base_ios.do_lock);
|
||||
call_func1(p_iostream_dtor, &ios1.base_ios);
|
||||
ios1.base1.extract_delim = ios1.base1.count = 0xabababab;
|
||||
ios1.base2.unknown = 0xabababab;
|
||||
memset(&ios2, 0xcd, sizeof(iostream));
|
||||
pios = call_func3(p_iostream_copy_ctor, &ios2, &ios1, TRUE);
|
||||
ok(pios == &ios2, "wrong return, expected %p got %p\n", &ios2, pios);
|
||||
ok(ios2.base1.extract_delim == 0, "expected 0 got %d\n", ios2.base1.extract_delim);
|
||||
ok(ios2.base1.count == 0, "expected 0 got %d\n", ios2.base1.count);
|
||||
ok(ios2.base2.unknown == 0, "expected 0 got %d\n", ios2.base2.unknown);
|
||||
ok(ios2.base_ios.sb == ios1.base_ios.sb, "expected %p got %p\n", ios1.base_ios.sb, ios2.base_ios.sb);
|
||||
ok(ios2.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ios2.base_ios.state);
|
||||
ok(ios2.base_ios.delbuf == 0, "expected 0 got %d\n", ios2.base_ios.delbuf);
|
||||
ok(ios2.base_ios.tie == NULL, "expected %p got %p\n", NULL, ios2.base_ios.tie);
|
||||
ok(ios2.base_ios.flags == FLAGS_skipws, "expected %x got %x\n", FLAGS_skipws, ios2.base_ios.flags);
|
||||
ok(ios2.base_ios.precision == 6, "expected 6 got %d\n", ios2.base_ios.precision);
|
||||
ok(ios2.base_ios.fill == ' ', "expected 32 got %d\n", ios2.base_ios.fill);
|
||||
ok(ios2.base_ios.width == 0, "expected 0 got %d\n", ios2.base_ios.width);
|
||||
ok(ios2.base_ios.do_lock == -1, "expected -1 got %d\n", ios2.base_ios.do_lock);
|
||||
call_func1(p_iostream_vbase_dtor, &ios2);
|
||||
ios1.base_ios.sb = NULL;
|
||||
memset(&ios2, 0xcd, sizeof(iostream));
|
||||
pios = call_func3(p_iostream_copy_ctor, &ios2, &ios1, TRUE);
|
||||
ok(pios == &ios2, "wrong return, expected %p got %p\n", &ios2, pios);
|
||||
ok(ios2.base1.extract_delim == 0, "expected 0 got %d\n", ios2.base1.extract_delim);
|
||||
ok(ios2.base1.count == 0, "expected 0 got %d\n", ios2.base1.count);
|
||||
ok(ios2.base2.unknown == 0, "expected 0 got %d\n", ios2.base2.unknown);
|
||||
ok(ios2.base_ios.sb == NULL, "expected %p got %p\n", NULL, ios2.base_ios.sb);
|
||||
ok(ios2.base_ios.state == IOSTATE_badbit, "expected %d got %d\n", IOSTATE_badbit, ios2.base_ios.state);
|
||||
ok(ios2.base_ios.delbuf == 0, "expected 0 got %d\n", ios2.base_ios.delbuf);
|
||||
ok(ios2.base_ios.tie == NULL, "expected %p got %p\n", NULL, ios2.base_ios.tie);
|
||||
ok(ios2.base_ios.flags == FLAGS_skipws, "expected %x got %x\n", FLAGS_skipws, ios2.base_ios.flags);
|
||||
ok(ios2.base_ios.precision == 6, "expected 6 got %d\n", ios2.base_ios.precision);
|
||||
ok(ios2.base_ios.fill == ' ', "expected 32 got %d\n", ios2.base_ios.fill);
|
||||
ok(ios2.base_ios.width == 0, "expected 0 got %d\n", ios2.base_ios.width);
|
||||
ok(ios2.base_ios.do_lock == -1, "expected -1 got %d\n", ios2.base_ios.do_lock);
|
||||
call_func1(p_iostream_vbase_dtor, &ios2);
|
||||
ios1.base_ios.sb = &sb;
|
||||
ios2.base1.extract_delim = ios2.base1.count = 0xcdcdcdcd;
|
||||
ios2.base2.unknown = 0xcdcdcdcd;
|
||||
memset(&ios2.base_ios, 0xcd, sizeof(ios));
|
||||
ios2.base_ios.delbuf = 0;
|
||||
pos = ios2.base_ios.tie;
|
||||
pios = call_func3(p_iostream_copy_ctor, &ios2, &ios1, FALSE);
|
||||
ok(pios == &ios2, "wrong return, expected %p got %p\n", &ios2, pios);
|
||||
ok(ios2.base1.extract_delim == 0, "expected 0 got %d\n", ios2.base1.extract_delim);
|
||||
ok(ios2.base1.count == 0, "expected 0 got %d\n", ios2.base1.count);
|
||||
ok(ios2.base2.unknown == 0, "expected 0 got %d\n", ios2.base2.unknown);
|
||||
ok(ios2.base_ios.sb == &sb, "expected %p got %p\n", &sb, ios2.base_ios.sb);
|
||||
ok(ios2.base_ios.state == 0xcdcdcdc9, "expected %d got %d\n", 0xcdcdcdc9, ios2.base_ios.state);
|
||||
ok(ios2.base_ios.delbuf == 0, "expected 0 got %d\n", ios2.base_ios.delbuf);
|
||||
ok(ios2.base_ios.tie == pos, "expected %p got %p\n", pos, ios2.base_ios.tie);
|
||||
ok(ios2.base_ios.flags == 0xcdcdcdcd, "expected %x got %x\n", 0xcdcdcdcd, ios2.base_ios.flags);
|
||||
ok(ios2.base_ios.precision == 0xcdcdcdcd, "expected %d got %d\n", 0xcdcdcdcd, ios2.base_ios.precision);
|
||||
ok(ios2.base_ios.fill == (char) 0xcd, "expected -51 got %d\n", ios2.base_ios.fill);
|
||||
ok(ios2.base_ios.width == 0xcdcdcdcd, "expected %d got %d\n", 0xcdcdcdcd, ios2.base_ios.width);
|
||||
ok(ios2.base_ios.do_lock == 0xcdcdcdcd, "expected %d got %d\n", 0xcdcdcdcd, ios2.base_ios.do_lock);
|
||||
call_func1(p_iostream_dtor, &ios2.base_ios);
|
||||
}
|
||||
|
||||
START_TEST(msvcirt)
|
||||
{
|
||||
if(!init())
|
||||
|
@ -5781,6 +5988,7 @@ START_TEST(msvcirt)
|
|||
test_istream_getdouble();
|
||||
test_istream_read();
|
||||
test_istream_withassign();
|
||||
test_iostream();
|
||||
|
||||
FreeLibrary(msvcrt);
|
||||
FreeLibrary(msvcirt);
|
||||
|
|
Loading…
Reference in New Issue