Module: wine Branch: master Commit: adfe3f1deed2a1186e65ec3723b16ac0e8663447 URL: http://source.winehq.org/git/wine.git/?a=commit;h=adfe3f1deed2a1186e65ec3723... Author: Bernhard Übelacker <bernhardu(a)vr-web.de> Date: Wed Jan 13 22:54:11 2016 +0100 msvcp110/tests: Test virtual base table size exports. Signed-off-by: Bernhard Übelacker <bernhardu(a)vr-web.de> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp110/tests/msvcp110.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/dlls/msvcp110/tests/msvcp110.c b/dlls/msvcp110/tests/msvcp110.c index f688c8d..58db584 100644 --- a/dlls/msvcp110/tests/msvcp110.c +++ b/dlls/msvcp110/tests/msvcp110.c @@ -155,9 +155,45 @@ static void test_tr2_sys__Last_write_time(void) ok(ret == 1, "test_tr2_sys__Remove_dir(): expect 1 got %d\n", ret); } +static struct { + int value[2]; + const char* export_name; +} vbtable_size_exports_list[] = { + {{0x20, 0x20}, "??_8?$basic_iostream(a)DU?$char_traits(a)D@std@@@std@@7B?$basic_istream(a)DU?$char_traits(a)D@std@@@1@@"}, + {{0x10, 0x10}, "??_8?$basic_iostream(a)DU?$char_traits(a)D@std@@@std@@7B?$basic_ostream(a)DU?$char_traits(a)D@std@@@1@@"}, + {{0x20, 0x20}, "??_8?$basic_iostream(a)GU?$char_traits(a)G@std@@@std@@7B?$basic_istream(a)GU?$char_traits(a)G@std@@@1@@"}, + {{0x10, 0x10}, "??_8?$basic_iostream(a)GU?$char_traits(a)G@std@@@std@@7B?$basic_ostream(a)GU?$char_traits(a)G@std@@@1@@"}, + {{0x20, 0x20}, "??_8?$basic_iostream(a)_WU?$char_traits(a)_W@std@@@std@@7B?$basic_istream(a)_WU?$char_traits(a)_W@std@@@1@@"}, + {{0x10, 0x10}, "??_8?$basic_iostream(a)_WU?$char_traits(a)_W@std@@@std@@7B?$basic_ostream(a)_WU?$char_traits(a)_W@std@@@1@@"}, + {{0x18, 0x18}, "??_8?$basic_istream(a)DU?$char_traits(a)D@std@@@std@@7B@"}, + {{0x18, 0x18}, "??_8?$basic_istream(a)GU?$char_traits(a)G@std@@@std@@7B@"}, + {{0x18, 0x18}, "??_8?$basic_istream(a)_WU?$char_traits(a)_W@std@@@std@@7B@"}, + {{ 0x8, 0x10}, "??_8?$basic_ostream(a)DU?$char_traits(a)D@std@@@std@@7B@"}, + {{ 0x8, 0x10}, "??_8?$basic_ostream(a)GU?$char_traits(a)G@std@@@std@@7B@"}, + {{ 0x8, 0x10}, "??_8?$basic_ostream(a)_WU?$char_traits(a)_W@std@@@std@@7B@"}, + {{ 0x0, 0x0}, 0} +}; + +static void test_vbtable_size_exports(void) +{ + int i; + const int *p_vbtable; + int arch_idx = (sizeof(void*) == 8); + + for (i = 0; vbtable_size_exports_list[i].export_name; i++) + { + 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[1] == vbtable_size_exports_list[i].value[arch_idx], + "%d: %s[1] wrong, got 0x%x\n", i, vbtable_size_exports_list[i].export_name, p_vbtable[1]); + } +} + START_TEST(msvcp110) { if(!init()) return; test_tr2_sys__Last_write_time(); + test_vbtable_size_exports(); FreeLibrary(msvcp); }