From 329719ec1d3002c2e148acbf7287fee1dcd531c7 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 22 Sep 2009 17:39:54 +0000 Subject: gdb PR python/10680: * eval.c (evaluate_subexp_standard) : Handle internal functions in EVAL_AVOID_SIDE_EFFECTS case. gdb/testsuite * gdb.python/py-function.exp: Add regression tests. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.python/py-function.exp | 13 +++++++++++++ 2 files changed, 17 insertions(+) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ac6fbc2..b86f723 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-09-22 Tom Tromey + + * gdb.python/py-function.exp: Add regression tests. + 2009-09-21 Keith Seitz * gdb.cp/cplusfuncs.exp (do_tests): Add check for proper error message diff --git a/gdb/testsuite/gdb.python/py-function.exp b/gdb/testsuite/gdb.python/py-function.exp index 7feca2b..30fde7d 100644 --- a/gdb/testsuite/gdb.python/py-function.exp +++ b/gdb/testsuite/gdb.python/py-function.exp @@ -77,3 +77,16 @@ gdb_py_test_multiple "input value-returning convenience function" \ "end" "" gdb_test "print \$double (1)" "= 2" "call value-returning function" + +gdb_py_test_multiple "input int-returning function" \ + "python" "" \ + "class Yes(gdb.Function):" "" \ + " def __init__(self):" "" \ + " gdb.Function.__init__(self, 'yes')" "" \ + " def invoke(self):" "" \ + " return 1" "" \ + "Yes ()" "" \ + "end" "" + +gdb_test "print \$yes() && \$yes()" " = 1" "call yes with &&" +gdb_test "print \$yes() || \$yes()" " = 1" "call yes with ||" -- cgit v1.1