Hi Piotr, thanks for commenting.
2014-10-25 19:03 GMT+08:00 Piotr Caban piotr.caban@gmail.com:
Hi,
Some of the tests are not working on windows: E:>vbscript_crosstest.exe run run.c:1043: Test failed: api.vbs: L"String(1, 564) = 4"
I have tested this for many times, but it is very strange that the result of String(1, 564) varies with different platforms, running in cmd on xp, it equals to String(1, 564 / 256) while equals to String(1, 564 mod 256) running directly in vbs script(meaning save vbs code as test.vbs and double click it). That confuses me a lot, according to MSDN documents, it should equal to String(1, 564 mod 256), I don't know how to handle it.
run.c:1043: Test failed: api.vbs: L"String(1, 16895.49) = \00ff"
run.c:1043: Test failed: api.vbs: L"String(1, CSng(16895.5)) = "
They are the same problem.
run.c:1043: Test failed: api.vbs: L"755826670, w: Err.number = 0" run: 26885 tests executed (0 marked as todo, 4 failures), 0 skipped.
On 10/25/14 10:10, Shuai Meng wrote:
+Call ok(String(1, 65.5) = "B", "String(1, 65.5) = " & String(1, 65.5)) +Call ok(getVT(String(1, 65.5)) = "VT_BSTR", "getVT(String(1, 65.5)) = " & getVT(String(1, 65.5))) +Call ok(String(1, 66.5) = "B", "String(1, 66.5) = " & String(1, 66.5)) +Call ok(getVT(String(1, 66.5)) = "VT_BSTR", "getVT(String(1, 66.5)) = " & getVT(String(1, 66.5)))
You have added exactly the same test twice.
+Call testStringError(2147483648, "w", 6)
+Call testStringError(2147483647, "w", 5) +Call testStringError(1073741824, "w", 5) +Call testStringError(1073741823, "w", 14) +Call testStringError(755826670, "w", 14) +Call testStringError(755826669, "w", 0)
You can't assume it's possible to allocate ~700mb of memory in tests.
The function never returns E_OUTOFMEMORY. You can't test it in wine tests suite but you can see it by calling the function in loop until system runs out of memory and then checking the error. You should simply try to allocate the string and if it fails return VBSE_OUT_OF_STRING_SPACE.
I will check it later.
Cheers, Piotr