Revision: 1157 Author: sebastien.lelong Date: Tue Aug 4 10:10:39 2009 Log: add test: aliasing pseudovars http://code.google.com/p/jallib/source/detail?r=1157
Modified: /trunk/test/unittest/jalv2_alias.jalt ======================================= --- /trunk/test/unittest/jalv2_alias.jalt Sun Aug 2 02:08:13 2009 +++ /trunk/test/unittest/jalv2_alias.jalt Tue Aug 4 10:10:39 2009 @@ -34,6 +34,13 @@ const dword constdword = 234 const constuniv = 42 -- pseudo-variables +var byte pseudo_shadow = 0 +function pseudo'get() return byte is + return pseudo_shadow +end function +procedure pseudo'put(byte in val) is + pseudo_shadow = val +end procedure -- procedures -- functions @@ -169,3 +176,14 @@ end if +;@jallib testcase test_alias_pseudovars +;@jallib use pic +;@jallib use self_test + +alias a_pseudo is pseudo +a_pseudo = 100 +test_byte(pseudo_shadow) ;@assertEquals 100 test_pseudo_alias_put +var byte tp +tp = a_pseudo +test_byte(tp) ;@assertEquals 100 test_pseudo_alias_get + --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
