/[ascend]/trunk/base/generic/compiler/test/test_hello.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/test/test_hello.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1638 by jpye, Thu Nov 8 12:08:19 2007 UTC revision 1639 by jpye, Thu Nov 8 12:50:01 2007 UTC
# Line 22  Line 22 
22  #include <string.h>  #include <string.h>
23  #include <CUnit/CUnit.h>  #include <CUnit/CUnit.h>
24    
25    #include <general/env.h>
26  #include <utilities/ascConfig.h>  #include <utilities/ascConfig.h>
27    #include <utilities/ascEnvVar.h>
28    #include <utilities/error.h>
29    
30  #include <compiler/ascCompiler.h>  #include <compiler/ascCompiler.h>
31  #include <compiler/module.h>  #include <compiler/module.h>
32    #include <compiler/parser.h>
33    #include <compiler/library.h>
34    
35  #include <assertimpl.h>  #include <assertimpl.h>
36    
# Line 39  static void test_init(void){ Line 44  static void test_init(void){
44  static void test_parse_string_module(void){  static void test_parse_string_module(void){
45            
46      const char *model = "\n\      const char *model = "\n\
47            DEFINITION relation\
48                included IS_A boolean;\
49                message IS_A symbol;\
50                included := TRUE;\
51                message := 'none';\
52            END relation;\
53          MODEL test1;\n\          MODEL test1;\n\
54              x IS_A solver_var;\n\              x IS_A real;\n\
55              x - 1 = 0;\n\              x - 1 = 0;\n\
56          END test1;";          END test1;";
57    
# Line 60  static void test_parse_string_module(voi Line 71  static void test_parse_string_module(voi
71      CONSOLE_DEBUG("zz_parse returns status=%d",status);      CONSOLE_DEBUG("zz_parse returns status=%d",status);
72    
73      CU_ASSERT(status==0);      CU_ASSERT(status==0);
74            
75        struct gl_list_t *l = Asc_TypeByModule(m);
76        CONSOLE_DEBUG("%lu library entries loaded from %s",gl_length(l),Asc_ModuleName(m));
77    
78        CU_ASSERT(gl_length(l)==2);
79  }  }
80    
81    

Legend:
Removed from v.1638  
changed lines
  Added in v.1639

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22