Changeset 4e59df4 in git


Ignore:
Timestamp:
Jun 27, 2012, 3:38:21 PM (11 years ago)
Author:
Alexander Dreyer <alexander.dreyer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
9165865409bb43ba082670375c4a04e78f8b76e1
Parents:
29fc84389b9713cdf07cc538bad5becf4758553e
git-author:
Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>2012-06-27 15:38:21+02:00
git-committer:
Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>2012-08-01 23:32:35+02:00
Message:
new: tests for interaction of pyobject and newtruct
Location:
Tst/Short
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Tst/Short/pyobject.res.gz.uu

    r29fc843 r4e59df4  
    11begin 644 pyobject.res.gz
    2 M'XL("!X&ZT\``W!Y;V)J96-T+G)E<P#M&6MOX[CQ>WX%SR@@._%Z]9:=7'RX
    3 MW1;M`<6V:`[HA]1U9)F)U<BB(<E)?+^^,WP,Z<<FS18M<,!EL0G)>7!F.)P9
    4 MCFY^_OU/7QACP93]^:=/K->UW:@J%[VKLQL-":<,%N=E77;]P=49_F73*=OL
    5 MQ.)?O.A&-7\>M5W>$4$T932.1^SC1_9CVY8/]9K7'1/WK.V:LGY@5=GQ)J]:
    6 MEM=+5M8=?^!-2X3)B':``9"P:];+#V@=*=.IBR]J#OB!!6>.3..1'4]&BOO5
    7 MF7?(W#-(@3]5+*_.`EH++,,@M`R#2"K\><6+1^2UV74K43/>-,(J%\1Z5W9A
    8 M&(,H/U@%)#H31;%M^%+!BKRN1<<*41=YQVOXSSS@X$GK>6`^CRGB5N$[+(`'
    9 MV)?!=,'O1<.9$J,JP4A!?,GN]F6Y(S&3J1(3C_U-`94T&EZV3$J;5U6^J/C[
    10 M1$J,2+"O%28UP@1#)>C_5ZB4A++[6^$<]PK&R@/$>K.%0VK%FG<K=`5@K;V!
    11 M4,'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)*.=BEI43B*##UBIM")J@,$C!4KN5I`
     41MS8D61>E41X%0D\/*#_U:61)KOAI<D.U5Z/:*T,!R^(S3N,_40N!DTY?)<(^)
     42MCK9W[!]2_193?ETQ!09VEUU\&;LZ.QA#G?T%KCVON(?%'O_F$K]VEW!N,&%N
     43M$'V-&V!8>S?;O<OH*\A'W7"&#92==-TJYGVCMW50Q]C7_642W9!2D$>/L\`F
     44MHK#_WJQ4D+Q5F?A995Z3Q"F3L-U*1Z_$\Y<5>[$);A,5=<+AS$!N/;JI;S0#
     45M7D!_F=S.#*SFF/C'FX:J^;C7.O06ZWMQEV_D[7<#H@]V^H9S36<Z.B[H85O3
     46M0B'6T?EAO<Q@HNOS954^RD:E_:Y2[4HE$-14CW))N-'(S(A'WZT"SHI#NKE@
     47MMY*D@S\^2,;QH13`6>QG.)&8=2+?+7/I!<-PZ%JA013L,D?>#A@JUH>-TB`"
     48ME35/3T=^Q9:@+*!$I.1N`_P**:;T[QK;X'S#C1-:V6[LJZR%M,8%#P/;&I.^
     49M[541QI1?(M2-7N>IJ7!CM[4T#5=5;NI7!J+_((O:B'5!-504SYXW@_8SO=J>
     50MW_]/S1"_9(87A/HOS,""%[9XU9O3YM(?;H9%[?P.O%<UD['UC"A*EL9Y;>QZ
     51M[$'L&E!:^FX--7EOH-O?37$5C$;C:^Q6>_Y07/4W_6OX<]4O:DB'5\$UCOH?
     52M\=F_OKZFF!"';`G=A<>WS4VFB_>GO'O`"AU2^!J2+FZ">W\4Q!`%".CUGIJL
     53MKK$2'_;<U8A54]@#MCCZ`1NC%A@S07A?J[5OOO"==>+PTYGE,:H!1&@.8SIS
     54MJ]27U/\-$F;6!,T*MS.Q+A'7(_FRYGX@_F6;T!X,1S6XR+^)$`S7PH5)KKQ>
     55M7K8=E(-X'7$V$&0$>-;<(?TY:[#.;9!,F,(-Y-^L53WH?2-AD]:"64<[8,W8
     56M`)NQ2B.E#W$U^I!^C6PO\$<9#X`7I"I,[BB:'E64*<>5/E23A>B47YI+.)QV
     57M6Z>$G@:T:0"P.`X<[N[IE`#,FJE[T1:DT7&?7JSSHGN74R\UP':K,EM7S?$E
     58MSH'EK'D4,!P/N(W2Y%4;(1G\-=QW3)2F3/8I,Q&$,H5]V9LH<J*8XD<7*(?%
     59M`&8AY:4IN^],0Z,6)F:C&/Q8I9C3M7B(]"M<!#[K#]C=?4772_BA]794G;*4
     60M.<4WYR@+>N#F+'!(X,U6,7SO[P")`\`5'F@HXDZ9#:=3VO_0]Y_9_XH[@2I=
     61M*)*U1!SLQ+<,,M*#;)X);R&VA0V*4+\.`B93,\<C58C=84/!XE3HNR9+Z(-[
     62MLL"@L8^DT!NTS8W:04"[,?+<V,\[VG6-+R_H3<JF!BV`HR9#"O7P+!0NHDV^
     63MN7D]`9^?DP/H-.SC)R*0.U=PH!MA??!"?'V25;MN2G`PQ"-&,;:,*2$61;;\
     64MLJ@V\Q_KH(\?5"D.Q@Y>%(8#="%1U>3[,.D/E'54FPL_Q++VT:L[(Y;+:E6#
     65M9(M":C=R%0MM5,)#-/M<(/13MIU3?BQQF=93KR'UL;1HV*87(K\3GGE#K/?U
     66MTH03'I;<^48<=F!#_`+K.!/KT"\ENA!;\6X0??WA5UKQTQ\&+DV%<*D\=&@"
     67MID?S7(@=6$9$D2'4'P!9`AX90O894!BZC]'"$*H=_'0/O\Y;M^R-=HB]T-^=
     68*_`>JPG2C_"<`````
    5369`
    5470end
  • Tst/Short/pyobject.stat

    r29fc843 r4e59df4  
    1 1 >> tst_memory_0 :: 1340802591:3144- exported :3-1-4:x86_64-Linux:lts035:220512
    2 1 >> tst_memory_1 :: 1340802591:3144- exported :3-1-4:x86_64-Linux:lts035:3239936
    3 1 >> tst_memory_2 :: 1340802591:3144- exported :3-1-4:x86_64-Linux:lts035:3239936
    4 1 >> tst_timer_1 :: 1340802591:3144- exported :3-1-4:x86_64-Linux:lts035:9
     11 >> tst_memory_0 :: 1340804202:3144- exported :3-1-4:x86_64-Linux:lts035:226832
     21 >> tst_memory_1 :: 1340804202:3144- exported :3-1-4:x86_64-Linux:lts035:3239936
     31 >> tst_memory_2 :: 1340804202:3144- exported :3-1-4:x86_64-Linux:lts035:3239936
     41 >> tst_timer_1 :: 1340804202:3144- exported :3-1-4:x86_64-Linux:lts035:7
  • Tst/Short/pyobject.tst

    r29fc843 r4e59df4  
    161161python_eval("tuple")(list(rl[1..3]));
    162162
     163// interaction with newstruct'ed type
     164newstruct("wrapping","pyobject p");
     165wrapping wrapped;
     166
     167pyobject seventeen = 17;
     168wrapped.p = seventeen;
     169wrapped;
     170
     171proc unwrap(wrapping arg) { return (arg.p); }
     172system("install", "wrapping", "pyobject", unwrap, 1);
     173
     174pyobject released = wrapped;
     175released;
     176
     177proc wrap(pyobject arg) { wrapping res; res.p = arg; return (res); }
     178system("install", "pyobject", "wrapping", wrap, 1);
     179
     180pyobject nineteen = 19;
     181wrapped = nineteen;
     182wrapped;
     183
     184
     185// interaction with built-ins
     186proc to_poly(pyobject arg) { return (poly(23)); }
     187system("install", "pyobject", "poly", to_poly, 1);
     188
     189pyobject for_poly="4poly";
     190poly(for_poly);
     191
     192proc from_poly(poly arg) { pyobject res = string(arg); return (res); }
     193system("install", "pyobject", "=", from_poly, 1);
     194
     195poly p = x+1;
     196for_poly = p;
     197for_poly;
     198
     199
     200// interaction with both built-ins and newstructs
     201newstruct("another","pyobject p");
     202another other;
     203other.p = seventeen;
     204other;
     205
     206released = other;  // -> error
     207released;
     208
     209proc from_types(def arg) {
     210  if (typeof(arg) == "poly") { return (from_poly(arg)); }
     211  if (typeof(arg) == "another") { return (arg.p); }
     212}
     213system("install", "pyobject", "=", from_types, 1);
     214
     215released = other;
     216released;
     217released = p;
     218released;
     219
     220
    163221tst_status(1);
    164222$
Note: See TracChangeset for help on using the changeset viewer.