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"
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)) = "
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.
Cheers,
Piotr