Changeset 1114


Ignore:
Timestamp:
Sep 17, 2012 6:05:19 PM (10 years ago)
Author:
cschlep
Message:

Added nested macro definition test cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • specdomain/trunk/src/specdomain/macros/test-battery.mac

    r1112 r1114  
    242242
    243243#==============================================================================
     244# Some more nasty tests: Nested macro and funtion definitions
     245
     246def nested_macros '{
     247  """
     248  This is to test if the parser works correctly on nested macro definitions.
     249
     250  """
     251
     252  #: def macro definition
     253  def macro_def1 \'print "Not again1" \'
     254
     255  #: rdef macro definition
     256  rdef macro_def2 \'print "But surely, here it goes again" \'
     257
     258  #: def macro function
     259  def macro_function1() \'{print "hello"}\'
     260
     261  #: rdef macro function without arguments
     262  rdef macro_function2() \'{print "hello2"; ct 1}\'
     263
     264  #: rdef macro function with arguments
     265  rdef macro_function3(x,y) \'{
     266    printf("%s, %s\n", x, y)
     267  }\'
     268
     269  #: cdef test case:
     270  cdef("user_precount", "{print \"Starting to count now...\"}; ", "test_key")
     271
     272}'
     273
     274
     275
     276#==============================================================================
    244277
    245278global kohzu_PV kohzuMV_PV UND_PV Und_Off UNDE_TRACK_ON
Note: See TracChangeset for help on using the changeset viewer.