Commit 34c2e56d authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

inetmib1/tests: Enable compilation with long types.

parent fb077b48
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = inetmib1.dll TESTDLL = inetmib1.dll
IMPORTS = snmpapi IMPORTS = snmpapi
......
...@@ -65,7 +65,7 @@ if (0) /* crashes on native */ ...@@ -65,7 +65,7 @@ if (0) /* crashes on native */
} }
ret = pSnmpExtensionInit(0, &event, &oid); ret = pSnmpExtensionInit(0, &event, &oid);
ok(ret, "SnmpExtensionInit failed: %d\n", GetLastError()); ok(ret, "SnmpExtensionInit failed: %ld\n", GetLastError());
ok(!strcmp("1.3.6.1.2.1.1", SnmpUtilOidToA(&oid)), ok(!strcmp("1.3.6.1.2.1.1", SnmpUtilOidToA(&oid)),
"Expected 1.3.6.1.2.1.1, got %s\n", SnmpUtilOidToA(&oid)); "Expected 1.3.6.1.2.1.1, got %s\n", SnmpUtilOidToA(&oid));
...@@ -115,10 +115,10 @@ if (0) /* crashes on native */ ...@@ -115,10 +115,10 @@ if (0) /* crashes on native */
error = 0xdeadbeef; error = 0xdeadbeef;
index = 0xdeadbeef; index = 0xdeadbeef;
ret = pSnmpExtensionQuery(SNMP_PDU_GET, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GET, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR, ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); "expected SNMP_ERRORSTATUS_NOERROR, got %ld\n", error);
ok(index == 0, "expected index 0, got %d\n", index); ok(index == 0, "expected index 0, got %ld\n", index);
/* Oddly enough, this "succeeds," even though the OID is clearly /* Oddly enough, this "succeeds," even though the OID is clearly
* unsupported. * unsupported.
...@@ -132,15 +132,15 @@ if (0) /* crashes on native */ ...@@ -132,15 +132,15 @@ if (0) /* crashes on native */
error = 0xdeadbeef; error = 0xdeadbeef;
index = 0xdeadbeef; index = 0xdeadbeef;
ret = pSnmpExtensionQuery(SNMP_PDU_GET, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GET, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR || ok(error == SNMP_ERRORSTATUS_NOERROR ||
broken(error == ERROR_FILE_NOT_FOUND) /* NT4 */, broken(error == ERROR_FILE_NOT_FOUND) /* NT4 */,
"expected SNMP_ERRORSTATUS_NOERROR or ERROR_FILE_NOT_FOUND, got %d\n", "expected SNMP_ERRORSTATUS_NOERROR or ERROR_FILE_NOT_FOUND, got %ld\n",
error); error);
if (error == SNMP_ERRORSTATUS_NOERROR) if (error == SNMP_ERRORSTATUS_NOERROR)
ok(index == 0, "expected index 0, got %d\n", index); ok(index == 0, "expected index 0, got %ld\n", index);
else if (error == ERROR_FILE_NOT_FOUND) else if (error == ERROR_FILE_NOT_FOUND)
ok(index == 1, "expected index 1, got %d\n", index); ok(index == 1, "expected index 1, got %ld\n", index);
/* The OID isn't changed either: */ /* The OID isn't changed either: */
ok(!strcmp("1.2.3.4", SnmpUtilOidToA(&vars[0].name)), ok(!strcmp("1.2.3.4", SnmpUtilOidToA(&vars[0].name)),
"expected 1.2.3.4, got %s\n", SnmpUtilOidToA(&vars[0].name)); "expected 1.2.3.4, got %s\n", SnmpUtilOidToA(&vars[0].name));
...@@ -152,11 +152,11 @@ if (0) /* crashes on native */ ...@@ -152,11 +152,11 @@ if (0) /* crashes on native */
error = 0xdeadbeef; error = 0xdeadbeef;
index = 0xdeadbeef; index = 0xdeadbeef;
ret = pSnmpExtensionQuery(SNMP_PDU_GET, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GET, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOSUCHNAME, ok(error == SNMP_ERRORSTATUS_NOSUCHNAME,
"expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d\n", error); "expected SNMP_ERRORSTATUS_NOSUCHNAME, got %ld\n", error);
/* The index is 1-based rather than 0-based */ /* The index is 1-based rather than 0-based */
ok(index == 1, "expected index 1, got %d\n", index); ok(index == 1, "expected index 1, got %ld\n", index);
/* A Get fails on something that specifies a table (but not a particular /* A Get fails on something that specifies a table (but not a particular
* entry in it)... * entry in it)...
...@@ -172,10 +172,10 @@ if (0) /* crashes on native */ ...@@ -172,10 +172,10 @@ if (0) /* crashes on native */
error = 0xdeadbeef; error = 0xdeadbeef;
index = 0xdeadbeef; index = 0xdeadbeef;
ret = pSnmpExtensionQuery(SNMP_PDU_GET, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GET, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOSUCHNAME, ok(error == SNMP_ERRORSTATUS_NOSUCHNAME,
"expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d\n", error); "expected SNMP_ERRORSTATUS_NOSUCHNAME, got %ld\n", error);
ok(index == 1, "expected index 1, got %d\n", index); ok(index == 1, "expected index 1, got %ld\n", index);
/* but a GetNext succeeds with the same values, because GetNext gets the /* but a GetNext succeeds with the same values, because GetNext gets the
* entry after the specified OID, not the entry specified by it. The * entry after the specified OID, not the entry specified by it. The
* successor to the table is the first entry in the table. * successor to the table is the first entry in the table.
...@@ -194,10 +194,10 @@ if (0) /* crashes on native */ ...@@ -194,10 +194,10 @@ if (0) /* crashes on native */
error = 0xdeadbeef; error = 0xdeadbeef;
index = 0xdeadbeef; index = 0xdeadbeef;
ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR, ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); "expected SNMP_ERRORSTATUS_NOERROR, got %ld\n", error);
ok(index == 0, "expected index 0, got %d\n", index); ok(index == 0, "expected index 0, got %ld\n", index);
if (!ret) if (!ret)
moreData = FALSE; moreData = FALSE;
else if (error) else if (error)
...@@ -276,10 +276,10 @@ if (0) /* crashes on native */ ...@@ -276,10 +276,10 @@ if (0) /* crashes on native */
list.list = vars2; list.list = vars2;
noChange = FALSE; noChange = FALSE;
ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR, ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); "expected SNMP_ERRORSTATUS_NOERROR, got %ld\n", error);
ok(index == 0, "expected index 0, got %d\n", index); ok(index == 0, "expected index 0, got %ld\n", index);
vars3[0].name.idLength = ARRAY_SIZE(mib2If); vars3[0].name.idLength = ARRAY_SIZE(mib2If);
vars3[0].name.ids = mib2If; vars3[0].name.ids = mib2If;
ok(!SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength) || ok(!SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength) ||
...@@ -298,10 +298,10 @@ if (0) /* crashes on native */ ...@@ -298,10 +298,10 @@ if (0) /* crashes on native */
moreData = TRUE; moreData = TRUE;
do { do {
ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR, ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); "expected SNMP_ERRORSTATUS_NOERROR, got %ld\n", error);
ok(index == 0, "expected index 0, got %d\n", index); ok(index == 0, "expected index 0, got %ld\n", index);
if (!ret) if (!ret)
moreData = FALSE; moreData = FALSE;
else if (error) else if (error)
...@@ -364,10 +364,10 @@ if (0) /* crashes on native */ ...@@ -364,10 +364,10 @@ if (0) /* crashes on native */
noChange = FALSE; noChange = FALSE;
do { do {
ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR, ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); "expected SNMP_ERRORSTATUS_NOERROR, got %ld\n", error);
ok(index == 0, "expected index 0, got %d\n", index); ok(index == 0, "expected index 0, got %ld\n", index);
if (!ret) if (!ret)
moreData = FALSE; moreData = FALSE;
else if (error) else if (error)
...@@ -430,7 +430,7 @@ if (0) /* crashes on native */ ...@@ -430,7 +430,7 @@ if (0) /* crashes on native */
noChange = FALSE; noChange = FALSE;
do { do {
ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index); ret = pSnmpExtensionQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); ok(ret, "SnmpExtensionQuery failed: %ld, %ld\n", error, index);
/* FIXME: error and index aren't checked here because the UDP table is /* FIXME: error and index aren't checked here because the UDP table is
* the last OID currently supported by Wine, so the last GetNext fails. * the last OID currently supported by Wine, so the last GetNext fails.
* todo_wine is also not effective because it will succeed for all but * todo_wine is also not effective because it will succeed for all but
...@@ -439,8 +439,8 @@ if (0) /* crashes on native */ ...@@ -439,8 +439,8 @@ if (0) /* crashes on native */
*/ */
if (0) { if (0) {
ok(error == SNMP_ERRORSTATUS_NOERROR, ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); "expected SNMP_ERRORSTATUS_NOERROR, got %ld\n", error);
ok(index == 0, "expected index 0, got %d\n", index); ok(index == 0, "expected index 0, got %ld\n", index);
} }
if (!ret) if (!ret)
moreData = FALSE; moreData = FALSE;
......
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