=?UTF-8?Q?Bernhard=20=C3=9Cbelacker=20?=: msvcp120/tests: Test virtual base table size exports.
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Jan 9 03:32:17 CST 2016
Module: wine
Branch: master
Commit: 91ddd1d8b2b3164bffe1b4a7ddf2c485dd7a3879
URL: http://source.winehq.org/git/wine.git/?a=commit;h=91ddd1d8b2b3164bffe1b4a7ddf2c485dd7a3879
Author: Bernhard Übelacker <bernhardu at vr-web.de>
Date: Thu Jan 7 13:13:36 2016 +0100
msvcp120/tests: Test virtual base table size exports.
Signed-off-by: Bernhard Übelacker <bernhardu at vr-web.de>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcp120/tests/msvcp120.c | 51 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
index 6ea024a..f5c0954 100644
--- a/dlls/msvcp120/tests/msvcp120.c
+++ b/dlls/msvcp120/tests/msvcp120.c
@@ -1549,6 +1549,55 @@ static void test_cnd(void)
CloseHandle(cm.initialized);
}
+static struct {
+ struct {
+ int value;
+ int todo;
+ } arch[2];
+ const char* export_name;
+} vbtable_size_exports_list[] = {
+ {{{0x20, FALSE}, {0x20, FALSE}}, "??_8?$basic_iostream at DU?$char_traits at D@std@@@std@@7B?$basic_istream at DU?$char_traits at D@std@@@1@@"},
+ {{{0x10, FALSE}, {0x10, FALSE}}, "??_8?$basic_iostream at DU?$char_traits at D@std@@@std@@7B?$basic_ostream at DU?$char_traits at D@std@@@1@@"},
+ {{{0x20, FALSE}, {0x20, FALSE}}, "??_8?$basic_iostream at GU?$char_traits at G@std@@@std@@7B?$basic_istream at GU?$char_traits at G@std@@@1@@"},
+ {{{0x10, FALSE}, {0x10, FALSE}}, "??_8?$basic_iostream at GU?$char_traits at G@std@@@std@@7B?$basic_ostream at GU?$char_traits at G@std@@@1@@"},
+ {{{0x20, FALSE}, {0x20, FALSE}}, "??_8?$basic_iostream at _WU?$char_traits at _W@std@@@std@@7B?$basic_istream at _WU?$char_traits at _W@std@@@1@@"},
+ {{{0x10, FALSE}, {0x10, FALSE}}, "??_8?$basic_iostream at _WU?$char_traits at _W@std@@@std@@7B?$basic_ostream at _WU?$char_traits at _W@std@@@1@@"},
+ {{{0x18, FALSE}, {0x18, FALSE}}, "??_8?$basic_istream at DU?$char_traits at D@std@@@std@@7B@"},
+ {{{0x18, FALSE}, {0x18, FALSE}}, "??_8?$basic_istream at GU?$char_traits at G@std@@@std@@7B@"},
+ {{{0x18, FALSE}, {0x18, FALSE}}, "??_8?$basic_istream at _WU?$char_traits at _W@std@@@std@@7B@"},
+ {{{ 0x8, TRUE}, {0x10, FALSE}}, "??_8?$basic_ostream at DU?$char_traits at D@std@@@std@@7B@"},
+ {{{ 0x8, TRUE}, {0x10, FALSE}}, "??_8?$basic_ostream at GU?$char_traits at G@std@@@std@@7B@"},
+ {{{ 0x8, TRUE}, {0x10, FALSE}}, "??_8?$basic_ostream at _WU?$char_traits at _W@std@@@std@@7B@"},
+ {{{ 0x0, FALSE}, { 0x0, FALSE}}, 0}
+};
+
+static void test_vbtable_size_exports(void)
+{
+ int i;
+ const int *p_vbtable;
+ int arch_idx;
+
+ if(sizeof(void*) == 8)
+ arch_idx = 1;
+ else
+ arch_idx = 0;
+
+ 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]);
+
+ if (vbtable_size_exports_list[i].arch[arch_idx].todo)
+ 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]);
+ }
+}
+
START_TEST(msvcp120)
{
if(!init()) return;
@@ -1577,5 +1626,7 @@ START_TEST(msvcp120)
test_thrd();
test_cnd();
+ test_vbtable_size_exports();
+
FreeLibrary(msvcp);
}
More information about the wine-cvs
mailing list