Commit 6d22a3a4 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp120: Fix layout of classes with vtordisp field.

parent cd0af885
...@@ -1550,51 +1550,37 @@ static void test_cnd(void) ...@@ -1550,51 +1550,37 @@ static void test_cnd(void)
} }
static struct { static struct {
struct { int value[2];
int value;
int todo;
} arch[2];
const char* export_name; const char* export_name;
} vbtable_size_exports_list[] = { } vbtable_size_exports_list[] = {
{{{0x20, FALSE}, {0x20, FALSE}}, "??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@"}, {{0x20, 0x20}, "??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@"},
{{{0x10, FALSE}, {0x10, FALSE}}, "??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@"}, {{0x10, 0x10}, "??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@"},
{{{0x20, FALSE}, {0x20, FALSE}}, "??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@"}, {{0x20, 0x20}, "??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@"},
{{{0x10, FALSE}, {0x10, FALSE}}, "??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@"}, {{0x10, 0x10}, "??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@"},
{{{0x20, FALSE}, {0x20, FALSE}}, "??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@"}, {{0x20, 0x20}, "??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@"},
{{{0x10, FALSE}, {0x10, FALSE}}, "??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@"}, {{0x10, 0x10}, "??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@"},
{{{0x18, FALSE}, {0x18, FALSE}}, "??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@"}, {{0x18, 0x18}, "??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@"},
{{{0x18, FALSE}, {0x18, FALSE}}, "??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@"}, {{0x18, 0x18}, "??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@"},
{{{0x18, FALSE}, {0x18, FALSE}}, "??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@"}, {{0x18, 0x18}, "??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@"},
{{{ 0x8, TRUE}, {0x10, FALSE}}, "??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@"}, {{ 0x8, 0x10}, "??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@"},
{{{ 0x8, TRUE}, {0x10, FALSE}}, "??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@"}, {{ 0x8, 0x10}, "??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@"},
{{{ 0x8, TRUE}, {0x10, FALSE}}, "??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@"}, {{ 0x8, 0x10}, "??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@"},
{{{ 0x0, FALSE}, { 0x0, FALSE}}, 0} {{ 0x0, 0x0}, 0}
}; };
static void test_vbtable_size_exports(void) static void test_vbtable_size_exports(void)
{ {
int i; int i;
const int *p_vbtable; const int *p_vbtable;
int arch_idx; int arch_idx = (sizeof(void*) == 8);
if(sizeof(void*) == 8)
arch_idx = 1;
else
arch_idx = 0;
for (i = 0; vbtable_size_exports_list[i].export_name; i++) for (i = 0; vbtable_size_exports_list[i].export_name; i++)
{ {
SET(p_vbtable, vbtable_size_exports_list[i].export_name); SET(p_vbtable, vbtable_size_exports_list[i].export_name);
ok(p_vbtable[0] == 0, "vbtable[0] wrong, got 0x%x\n", p_vbtable[0]); ok(p_vbtable[0] == 0, "vbtable[0] wrong, got 0x%x\n", p_vbtable[0]);
ok(p_vbtable[1] == vbtable_size_exports_list[i].value[arch_idx],
if (vbtable_size_exports_list[i].arch[arch_idx].todo) "%d: %s[1] wrong, got 0x%x\n", i, vbtable_size_exports_list[i].export_name, p_vbtable[1]);
todo_wine
ok(p_vbtable[1] == vbtable_size_exports_list[i].arch[arch_idx].value,
"%d: %s[1] wrong, got 0x%x\n", i, vbtable_size_exports_list[i].export_name, p_vbtable[1]);
else
ok(p_vbtable[1] == vbtable_size_exports_list[i].arch[arch_idx].value,
"%d: %s[1] wrong, got 0x%x\n", i, vbtable_size_exports_list[i].export_name, p_vbtable[1]);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment