Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Odd behavior with #ENDIF in #DEFINE
Message
 
 
À
11/09/2006 16:01:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01152849
Message ID:
01152869
Vues:
33
>>Greg,
>>
>>After VFP encounters #IF .F. it will ignore all lines until it finds #ELIF or closing #ENDIF.
>>
>
>This I do understand. Actually I am attempting to take advandage of it. What I want is when the developer views the code, they will see the TEST_SUITE / ENDTEST_SUITE statement block. But when compiled, the code between these two statement is removed from the compiled version. To help clarify why I want to do this; I am developing a class that when passed a object reference it will recurs the object model and scan the source code for TEST_SUITE statements. When found, the code between the TEST_CASE are extracted, and executed as automated test cases. So far, I have most of it complete, but this inability to convert the ENDTEST_SUITE into proper #ENDIF statement is hanging me up.
>
>P.S. to get around the problem during the development phase, I am setting the TEST_SUITE to "TEST NOSHOW" and the ENDTEST_SUITE to "ENDTEXT". But leaves the code in the compiled version as a chuck of text.

Why cann't you explicitly use #IF .F./ENDIF?
#DEFINE TEST_SUITE
#DEFINE ENDTEST_SUITE
...
#IF .F.
TEST_SUITE
TEST_CASE    First Test Case
    *- <Place Test Case code here>
ENDTEST_CASE
ENDTEST_SUITE
#ENDIF
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform