<div dir="ltr">Hi Piotr, thanks for commenting.<br><div class="gmail_extra"><br><div class="gmail_quote">2014-10-25 19:03 GMT+08:00 Piotr Caban <span dir="ltr"><<a href="mailto:piotr.caban@gmail.com" target="_blank">piotr.caban@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
Some of the tests are not working on windows:<br>
E:\>vbscript_crosstest.exe run<br>
run.c:1043: Test failed: api.vbs: L"String(1, 564) = 4"<br></blockquote><div> </div><div> 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).</div><div>  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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
run.c:1043: Test failed: api.vbs: L"String(1, 16895.49) = \00ff"<br>
run.c:1043: Test failed: api.vbs: L"String(1, CSng(16895.5)) = "<br></blockquote><div><br></div><div>They are the same problem.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
run.c:1043: Test failed: api.vbs: L"755826670, w: Err.number = 0"<br>
run: 26885 tests executed (0 marked as todo, 4 failures), 0 skipped.<br>
<br>
On 10/25/14 10:10, Shuai Meng wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+Call ok(String(1, 65.5) = "B", "String(1, 65.5) = " & String(1, 65.5))<br>
+Call ok(getVT(String(1, 65.5)) = "VT_BSTR", "getVT(String(1, 65.5)) = " & getVT(String(1, 65.5)))<br>
+Call ok(String(1, 66.5) = "B", "String(1, 66.5) = " & String(1, 66.5))<br>
+Call ok(getVT(String(1, 66.5)) = "VT_BSTR", "getVT(String(1, 66.5)) = " & getVT(String(1, 66.5)))<br>
</blockquote>
You have added exactly the same test twice.<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+Call testStringError<a href="tel:%282147483648" value="+12147483648" target="_blank">(2147483648</a>, "w", 6)<br>
+Call testStringError<a href="tel:%282147483647" value="+12147483647" target="_blank">(2147483647</a>, "w", 5)<br>
+Call testStringError(1073741824, "w", 5)<br>
+Call testStringError(1073741823, "w", 14)<br>
+Call testStringError(755826670, "w", 14)<br>
+Call testStringError(755826669, "w", 0)<br>
</blockquote>
You can't assume it's possible to allocate ~700mb of memory in tests.<br>
<br>
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.<br>
<br></blockquote><div>I will check it later. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Cheers,<br>
Piotr<br>
<br>
</blockquote></div><br></div></div>