Original Post
I'm trying to get native calling conventions working on armel linux (not android). The test case fails in test_scriptstring,cpp at the follwing:
[source]
printOutput = "";
ExecuteString(engine, "print(\"a\" + 1.2)");
if( printOutput != "a1.2") TEST_FAILED;
printOutput = "";
ExecuteString(engine, "print(1.2 + \"a\")");
if( printOutput != "1.2a") TEST_FAILED;
[/source]
The actual contents of printOutput is:
[source]
a1.05345e-307
5.30084e-315a
[/source]
If I skip those tests it then fails in test_conversion.cpp on the following lines:
[source]
ExecuteString(engine, "ui = -12.3f;"); if( ui != asUINT(-12) ) TEST_FAILED;
ExecuteString(engine, "ui8 = -12.3f;"); if( ui8 != asBYTE(-12) ) TEST_FAILED; // asBYTE(-12.3f) doesn't seem to produce the same result on MSVC and GNUC
ExecuteString(engine, "ui16 = -12.3f;"); if( ui16 != asWORD(-12) ) TEST_FAILED; // asWORD(-12.3f) doesn't seem to produce the same result on MSVC and GNUC
[/source]
Any idea why its failing when handling floats?
Thanks,
Jeremy
[source]
printOutput = "";
ExecuteString(engine, "print(\"a\" + 1.2)");
if( printOutput != "a1.2") TEST_FAILED;
printOutput = "";
ExecuteString(engine, "print(1.2 + \"a\")");
if( printOutput != "1.2a") TEST_FAILED;
[/source]
The actual contents of printOutput is:
[source]
a1.05345e-307
5.30084e-315a
[/source]
If I skip those tests it then fails in test_conversion.cpp on the following lines:
[source]
ExecuteString(engine, "ui = -12.3f;"); if( ui != asUINT(-12) ) TEST_FAILED;
ExecuteString(engine, "ui8 = -12.3f;"); if( ui8 != asBYTE(-12) ) TEST_FAILED; // asBYTE(-12.3f) doesn't seem to produce the same result on MSVC and GNUC
ExecuteString(engine, "ui16 = -12.3f;"); if( ui16 != asWORD(-12) ) TEST_FAILED; // asWORD(-12.3f) doesn't seem to produce the same result on MSVC and GNUC
[/source]
Any idea why its failing when handling floats?
Thanks,
Jeremy