add unions, typedef_struct, char_contant, sneaky1 testcases

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11558 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Baozeng Ding 2009-08-14 03:35:30 +00:00
commit 4ca1d4c19e
4 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,9 @@
exec loader.sce;
if CHAR_CONSTANT_get() <> 'x' then pause, end
if STRING_CONSTANT_get() <> "xyzzy" then pause, end
if ESC_CONST_get() <> ascii(1) then pause, end
if ia_get() <> ascii('a') then pause, end
if ib_get() <> ascii('b') then pause, end
exit

View file

@ -0,0 +1,15 @@
exec loader.sce;
x = add(3, 4);
if x <> 7 then pause, end
y = subtract(3,4);
if y <> -1 then pause, end
z = mul(3,4);
if z <> 12 then pause, end
w = divide(3,4);
if w <> 0 then pause, end
exit

View file

@ -0,0 +1,16 @@
exec loader.sce
x = new_LineObj();
LineObj_numpoints_set(x, 100);
if LineObj_numpoints_get(x) <> 100 then pause, end
if MS_NOOVERRIDE_get() <> -1111 then pause, end
y = make_a();
A_t_a_set(y, 200);
if A_t_a_get(y) <> 200 then pause, end
A_t_b_set(y, 300);
if A_t_b_get(y) <> 300 then pause, end
exit

View file

@ -0,0 +1,15 @@
exec loader.sce;
small = new_SmallStruct();
SmallStruct_jill_set(small, 200);
big = new_BigStruct();
BigStruct_jack_set(big, 300);
Jill = SmallStruct_jill_get(small);
if Jill <> 200 then pause, end
Jack = BigStruct_jack_get(big);
if Jack <> 300 then pause, end
exit