test_enum fails...
my test case fails.
// Script for testing attributes
static const char *const script =
"enum TEST2_ENUM \n"
"{ \n"
" TEST_1 = -1, \n"
" TEST1 = 1, \n"
" TEST2, \n"
" TEST1200 = 300 * 4, \n"
" TEST1201 = TEST1200 + 1, \n"
" TEST1202, \n"
" TEST1203, \n"
" TEST1205 = TEST_1201 + 4, \n"
" TEST1_0 = TEST_1 + 1, \n"
" TEST1_1 = TEST_1 + 2 \n"
"} \n"
" \n"
"TEST2_ENUM Test1() \n"
"{ \n"
" output(TEST_1); \n"
" output(TEST1); \n"
" output(TEST2); \n"
" output(TEST1200); \n"
" output(TEST1201); \n"
" output(TEST1202); \n"
" output(TEST1203); \n"
" output(TEST1205); \n"
" output(TEST1_0); \n"
" output(TEST1_1); \n"
" return TEST2; \n"
"}
if( buffer != "-1\n1\n2\n1200\n1201\n1202\n1203\n1205\n0\n1\n" )
{
fail = true;
printf(buffer.c_str());
}
What is the output that you get from this test?
What version of AngelScript are you using? What compiler and target platform are you using?
I just tested this with MSVC6 and the latest WIP version from SVN, and the test pass.
What version of AngelScript are you using? What compiler and target platform are you using?
I just tested this with MSVC6 and the latest WIP version from SVN, and the test pass.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
mistake in my test at:
" TEST1205 = TEST_1201 + 4, \n"
Works fine after change to TEST1201.
Bug (or feature?):
test_for.cpp failed on code:
for (int j = 0, n = 2, m = 5; j < m; n++, j++) \n { \n } \n
TestFor (10, 1) : Info : Compiling void Test()
TestFor (22, 43) : Error : Expected ')'
TestFor: Failed to compile the script
Win32, MSVC 6.0 SP6, SVN rev.372
" TEST1205 = TEST_1201 + 4, \n"
Works fine after change to TEST1201.
Bug (or feature?):
test_for.cpp failed on code:
for (int j = 0, n = 2, m = 5; j < m; n++, j++) \n { \n } \n
TestFor (10, 1) : Info : Compiling void Test()
TestFor (22, 43) : Error : Expected ')'
TestFor: Failed to compile the script
Win32, MSVC 6.0 SP6, SVN rev.372
Comma separated expressions are not supported in AngelScript yet. At the moment I have no plans to add it either.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement