From a0c5fbcf0e1c6fdb3672d3bfc071b1a57a7b27bf Mon Sep 17 00:00:00 2001 From: Wu Zhou Date: Wed, 6 Jul 2005 06:11:54 +0000 Subject: * gdb.fortran/exprs.exp (test_arithmetic_expressions): Add five tests to evaluate exponentiation expression. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.fortran/exprs.exp | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1a523d3..bc57d7f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-07-06 Wu Zhou + + * gdb.fortran/exprs.exp (test_arithmetic_expressions): Add five + tests to evaluate exponentiation expression. + 2005-06-29 Andreas Schwab * gdb.base/sigrepeat.c: Include and add return type for diff --git a/gdb/testsuite/gdb.fortran/exprs.exp b/gdb/testsuite/gdb.fortran/exprs.exp index 32742b9..c970399 100644 --- a/gdb/testsuite/gdb.fortran/exprs.exp +++ b/gdb/testsuite/gdb.fortran/exprs.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1994, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994, 1997, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -250,6 +250,14 @@ proc test_arithmetic_expressions {} { # Test modulo with various operands + # Test exponentiation with various operands + + gdb_test "p 2 ** 3" " = 8" "int powered by int" + gdb_test "p 2 ** 2 ** 3" " = 256" "combined exponentiation expression" + gdb_test "p (2 ** 2) ** 3" " = 64" "combined exponentiation expression in specified order" + gdb_test "p 4 ** 0.5" " = 2" "int powered by real" + gdb_test "p 4.0 ** 0.5" " = 2" "real powered by real" + } # Start with a fresh gdb. -- cgit v1.1