scilab: fix tests having too long identifier names
This commit is contained in:
parent
78360b4d1b
commit
7307d967d0
16 changed files with 97 additions and 45 deletions
|
|
@ -1,42 +1,41 @@
|
|||
exec("swigtest.start", -1);
|
||||
|
||||
smallnum = int8(-127);
|
||||
if CharValFunction(smallnum) <> smallnum then swigtesterror(); end
|
||||
if CCharValFunction(smallnum) <> smallnum then swigtesterror(); end
|
||||
if CCharRefFunction(smallnum) <> smallnum then swigtesterror(); end
|
||||
smallnum = -127;
|
||||
checkequal(CharValFunction(smallnum), smallnum, "CharValFunction(smallnum)");
|
||||
checkequal(CCharValFunction(smallnum), smallnum, "CCharValFunction(smallnum)");
|
||||
checkequal(CCharRefFunction(smallnum), smallnum, "CCharRefFunction(smallnum)");
|
||||
|
||||
try
|
||||
globalchar_set(smallnum);
|
||||
catch
|
||||
swigtesterror();
|
||||
end
|
||||
if globalchar_get() <> smallnum then swigtesterror(); end
|
||||
|
||||
if globalconstchar_get() <> -110 then swigtesterror(); end
|
||||
checkequal(globalchar_get(), smallnum, "globalchar_get()");
|
||||
checkequal(globalconstchar_get(), -110, "globalconstchar_get()");
|
||||
|
||||
try
|
||||
directorTest = new_DirectorTest();
|
||||
dirTest = new_DirTest();
|
||||
catch
|
||||
swigtesterror();
|
||||
end
|
||||
|
||||
if DirectorTest_CharValFunction(directorTest, smallnum) <> smallnum then swigtesterror(); end
|
||||
if DirectorTest_CCharValFunction(directorTest, smallnum) <> smallnum then swigtesterror(); end
|
||||
if DirectorTest_CCharRefFunction(directorTest, smallnum) <> smallnum then swigtesterror(); end
|
||||
checkequal(DirTest_CharValFunction(dirTest, smallnum), smallnum, "DirTest_CharValFunction(dirTest, smallnum)");
|
||||
checkequal(DirTest_CCharValFunction(dirTest, smallnum), smallnum, "DirTest_CCharValFunction(dirTest, smallnum)");
|
||||
checkequal(DirTest_CCharRefFunction(dirTest, smallnum), smallnum, "DirTest_CCharRefFunction(dirTest, smallnum)");
|
||||
|
||||
// TODO Too long identifiers
|
||||
//if DirectorTest_memberchar_get(directorTest) <> -111 then swigtesterror(); end
|
||||
//if dirTest_memberchar_get(dirTest) <> -111 then swigtesterror(); end
|
||||
//try
|
||||
// DirectorTest_memberchar_set(directorTest, smallnum)
|
||||
// dirTest_memberchar_set(dirTest, smallnum)
|
||||
//catch
|
||||
// swigtesterror();
|
||||
//end
|
||||
//if DirectorTest_memberchar_get(directorTest) <> smallnum then swigtesterror(); end
|
||||
//if dirTest_memberchar_get(dirTest) <> smallnum then swigtesterror(); end
|
||||
|
||||
//if DirectorTest_memberconstchar_get(directorTest) <> -112 then swigtesterror(); end
|
||||
//if dirTest_memberconstchar_get(dirTest) <> -112 then swigtesterror(); end
|
||||
|
||||
try
|
||||
delete_DirectorTest(directorTest);
|
||||
delete_DirTest(dirTest);
|
||||
catch
|
||||
swigtesterror();
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@ exec("swigtest.start", -1);
|
|||
|
||||
testString = "Scilab test string";
|
||||
|
||||
if UCharFunction(testString) <> testString then swigtesterror(); end
|
||||
if SCharFunction(testString) <> testString then swigtesterror(); end
|
||||
if CUCharFunction(testString) <> testString then swigtesterror(); end
|
||||
if CSCharFunction(testString) <> testString then swigtesterror(); end
|
||||
//if CharFunction(testString) <> testString then swigtesterror(); end
|
||||
//if CCharFunction(testString) <> testString then swigtesterror(); end
|
||||
checkequal(UCharFunction(testString), testString, "UCharFunction(testString)");
|
||||
checkequal(SCharFunction(testString), testString, "SCharFunction(testString)");
|
||||
checkequal(CUCharFunction(testString), testString, "CUCharFunction(testString)");
|
||||
checkequal(CSCharFunction(testString), testString, "CSCharFunction(testString)");
|
||||
//checkequal(CharFunction(testString), testString, "CharFunction(testString)");
|
||||
//checkequal(CCharFunction(testString), testString, "CCharFunction(testString)");
|
||||
|
||||
try
|
||||
tNumber = new_TNumber()
|
||||
tNum = new_TNum();
|
||||
catch
|
||||
swigtesterror();
|
||||
end
|
||||
|
|
@ -19,25 +19,25 @@ end
|
|||
//TNumber_DigitsMemberB_get()
|
||||
//TNumber_DigitsMemberB_set
|
||||
try
|
||||
delete_TNumber(tNumber)
|
||||
delete_TNum(tNum);
|
||||
catch
|
||||
swigtesterror();
|
||||
end
|
||||
|
||||
try
|
||||
directorTest = new_DirectorTest();
|
||||
dirTest = new_DirTest();
|
||||
catch
|
||||
swigtesterror();
|
||||
end
|
||||
|
||||
if DirectorTest_UCharFunction(directorTest, testString) <> testString then swigtesterror(); end
|
||||
if DirectorTest_SCharFunction(directorTest, testString) <> testString then swigtesterror(); end
|
||||
if DirectorTest_CUCharFunction(directorTest, testString) <> testString then swigtesterror(); end
|
||||
if DirectorTest_CSCharFunction(directorTest, testString) <> testString then swigtesterror(); end
|
||||
//if DirectorTest_CharFunction(directorTest, testString) <> testString then swigtesterror(); end
|
||||
//if DirectorTest_CCharFunction(directorTest, testString) <> testString then swigtesterror(); end
|
||||
checkequal(DirTest_UCharFunction(dirTest, testString), testString, "DirTest_UCharFunction");
|
||||
checkequal(DirTest_SCharFunction(dirTest, testString), testString, "DirTest_SCharFunction(dirTest, testString)");
|
||||
checkequal(DirTest_CUCharFunction(dirTest, testString), testString, "DirTest_CUCharFunction(dirTest, testString)");
|
||||
checkequal(DirTest_CSCharFunction(dirTest, testString), testString, "DirTest_CSharFunction(dirTest, testString)");
|
||||
//checkequal(DirTest_CharFunction(dirTest, testString), testString, "DirTest_CharFunction(dirTest, testString)");
|
||||
//checkequal(DirTest_CCharFunction(dirTest, testString), testString, "DirTest_CCharFunction(dirTest, testString)");
|
||||
try
|
||||
delete_DirectorTest(directorTest);
|
||||
delete_DirTest(dirTest);
|
||||
catch
|
||||
swigtesterror();
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ checkBool(bool2_get(), %f);
|
|||
checkBool(bo(%t), %t);
|
||||
checkBool(bo(%f), %f);
|
||||
|
||||
bs = new_BoolStructure();
|
||||
checkBool(BoolStructure_m_bool1_get(bs), %t);
|
||||
checkBool(BoolStructure_m_bool2_get(bs), %f);
|
||||
bs = new_BoolSt();
|
||||
checkBool(BoolSt_m_bool1_get(bs), %t);
|
||||
checkBool(BoolSt_m_bool2_get(bs), %f);
|
||||
|
||||
exec("swigtest.quit", -1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue