Branch: Tag:

2001-12-19

2001-12-19 23:52:44 by Martin Stjernholm <mast@lysator.liu.se>

A couple of tests for the get_predefines handler callback.

Rev: src/testsuite.in:1.478

1: - test_true([["$Id: testsuite.in,v 1.477 2001/12/16 01:36:12 mast Exp $"]]); + test_true([["$Id: testsuite.in,v 1.478 2001/12/19 23:52:44 mast Exp $"]]);      cond([[all_constants()->_verify_internals]],   [[
6431:   mixed a() {return functionp(X(Y));}   ")()->a()]])    + test_any([[ +  class handler {mapping get_predefines() {return (["x": "1", "y": "", "z": 0]);}}; +  return cpp ("x y z p", "-", 0, handler()); + ]], "# 1 \"-\"\n1 p"); + test_eval_error([[ +  class handler {mixed get_predefines() {return (<"x">);}}; +  cpp ("x y z", "-", 0, handler()); + ]]); + test_eval_error([[ +  class handler {mapping get_predefines() {return ([0: 0]);}}; +  cpp ("x y z", "-", 0, handler()); + ]]); + test_eval_error([[ +  class handler {mapping get_predefines() {return (["": 1]);}}; +  cpp ("x y z", "-", 0, handler()); + ]]); + test_eval_error([[ +  class handler {mapping get_predefines() {return (["x": 1]);}}; +  cpp ("x y z", "-", 0, handler()); + ]]); +    test_any(int e; object o=clone(Stdio.File); if(!o->open("conftest.h","wct")) return -1; e=o->write("return 17;\n"); if(!o->close()) return -1; return e,11)      test_compile_any([[import Stdio.Readline; mapping x=([]);]]);