Changeset 5353:1dabdf2b5866 in livinglogic.python.xist

Show
Ignore:
Timestamp:
02/18/13 15:53:01 (7 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Java UL4 doesn't have an InterpretedFunction? any more.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • test/test_ul4.py

    r5352 r5353  
    399399 
    400400    codetemplate = """ 
    401     com.livinglogic.ul4.InterpretedFunction function = %(function)s; 
     401    com.livinglogic.ul4.InterpretedTemplate template = %(template)s; 
    402402    java.util.Map<String, Object> variables = %(variables)s; 
    403     Object output = function.call(variables); 
     403    Object output = template.call(variables); 
    404404    // We can't use ``System.out.print`` here, because this gives us no control over the encoding 
    405405    // Use ``System.out.write`` to make sure the output is in UTF-8 
     
    409409 
    410410    f = sys._getframe(1) 
    411     print("Testing Java InterpretedFunction (compiled by Python) ({}, line {}):".format(f.f_code.co_filename, f.f_lineno)) 
    412     functionsource = ul4c.Function(__, keepws=keepws).javasource() 
    413     java = codetemplate % dict(variables=misc.javaexpr(variables), function=functionsource) 
     411    print("Testing Java InterpretedTemplate (compiled by Python) ({}, line {}):".format(f.f_code.co_filename, f.f_lineno)) 
     412    templatesource = ul4c.Template(__, keepws=keepws).javasource() 
     413    java = codetemplate % dict(variables=misc.javaexpr(variables), template=templatesource) 
    414414    return ul4on.loads(java_runsource(java)) 
    415415 
     
    424424 
    425425    codetemplate = """ 
    426     com.livinglogic.ul4.InterpretedFunction function = new com.livinglogic.ul4.InterpretedFunction(%(source)s, %(keepws)s); 
     426    com.livinglogic.ul4.InterpretedTemplate template = new com.livinglogic.ul4.InterpretedTemplate(%(source)s, %(keepws)s); 
    427427    java.util.Map<String, Object> variables = %(variables)s; 
    428     Object output = function.call(variables); 
     428    Object output = template.call(variables); 
    429429    // We can't use ``System.out.print`` here, because this gives us no control over the encoding 
    430430    // Use ``System.out.write`` to make sure the output is in UTF-8 
     
    434434 
    435435    f = sys._getframe(1) 
    436     print("Testing Java InterpretedFunction (compiled by Java) ({}, line {}):".format(f.f_code.co_filename, f.f_lineno)) 
     436    print("Testing Java InterpretedTemplate (compiled by Java) ({}, line {}):".format(f.f_code.co_filename, f.f_lineno)) 
    437437    java = codetemplate % dict(source=misc.javaexpr(__), variables=misc.javaexpr(variables), keepws=misc.javaexpr(keepws)) 
    438438    return ul4on.loads(java_runsource(java))